PeriDyno 1.0.0
Loading...
Searching...
No Matches
Cloth.h
Go to the documentation of this file.
1#pragma once
2#include "TriangularSystem.h"
3#include "Bond.h"
4
5namespace dyno
6{
11 template<typename TDataType>
12 class Cloth : public TriangularSystem<TDataType>
13 {
14 DECLARE_TCLASS(Cloth, TDataType)
15 public:
16 typedef typename TDataType::Real Real;
17 typedef typename TDataType::Coord Coord;
18 typedef typename ::dyno::TBond<TDataType> Bond;
19
20 Cloth();
21 ~Cloth() override;
22
23 DEF_VAR(Real, Horizon, 0.01, "Horizon");
24
25 public:
27
28 DEF_VAR_STATE(Real, Horizon, Real(1), "A state field representing horizon");
29
30 DEF_ARRAY_STATE(Coord, RestPosition, DeviceType::GPU, "");
31
32 DEF_ARRAY_STATE(Coord, OldPosition, DeviceType::GPU, "");
33
34 DEF_ARRAYLIST_STATE(Bond, Bonds, DeviceType::GPU, "Storing neighbors");
35
36 protected:
37 void resetStates() override;
38
39 void preUpdateStates() override;
40
41 private:
42
43 };
44}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
~Cloth() override
Definition Cloth.cpp:79
TDataType::Real Real
Definition Cloth.h:16
TDataType::Coord Coord
Definition Cloth.h:17
DEF_ARRAY_STATE(Coord, OldPosition, DeviceType::GPU, "")
::dyno::TBond< TDataType > Bond
Definition Cloth.h:18
DEF_INSTANCE_IN(TriangleSet< TDataType >, TriangleSet, "Input")
DEF_VAR(Real, Horizon, 0.01, "Horizon")
DEF_ARRAY_STATE(Coord, RestPosition, DeviceType::GPU, "")
void resetStates() override
Definition Cloth.cpp:85
void preUpdateStates() override
Definition Cloth.cpp:118
DEF_ARRAYLIST_STATE(Bond, Bonds, DeviceType::GPU, "Storing neighbors")
DEF_VAR_STATE(Real, Horizon, Real(1), "A state field representing horizon")
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25