PeriDyno
1.0.0
Loading...
Searching...
No Matches
D:
Peridyno
peridyno
src
Dynamics
Vulkan
ParticleSystem
ParticleSystem.cpp
Go to the documentation of this file.
1
#include "
ParticleSystem.h
"
2
3
namespace
dyno
4
{
5
IMPLEMENT_CLASS
(
ParticleSystem
)
6
7
ParticleSystem::ParticleSystem
()
8
:
Node
()
9
{
10
auto
ptSet = std::make_shared<PointSet>();
11
this->statePointSet()->setDataPtr(ptSet);
12
}
13
14
ParticleSystem::~ParticleSystem()
15
{
16
}
17
18
std::string ParticleSystem::getNodeType()
19
{
20
return
"ParticleSystem"
;
21
}
22
23
void
ParticleSystem::resetStates()
24
{
25
auto
ptSet = this->statePointSet()->getDataPtr();
26
if
(ptSet ==
nullptr
)
return
;
27
28
auto
pts = ptSet->getPoints();
29
30
if
(pts.size() > 0)
31
{
32
this->statePosition()->resize(pts.size());
33
this->stateVelocity()->resize(pts.size());
34
this->stateForce()->resize(pts.size());
35
36
this->statePosition()->getData().assign(pts);
37
this->stateVelocity()->getDataPtr()->reset();
38
}
39
40
Node::resetStates
();
41
}
42
}
IMPLEMENT_CLASS
#define IMPLEMENT_CLASS(name)
Definition
Object.h:79
ParticleSystem.h
Node::resetStates
virtual void resetStates()
Definition
Node.cpp:214
dyno::Node
Definition
Node.h:68
dyno::ParticleSystem
This class represents the base class for more advanced particle-based nodes.
Definition
ParticleSystem.h:14
dyno::ParticleSystem::ParticleSystem
ParticleSystem()
Definition
ParticleSystem.cpp:8
dyno
This is an implementation of AdditiveCCD based on peridyno.
Definition
Array.h:25
Generated by
1.13.2