![]() |
PeriDyno 1.0.0
|
This class represents the base class for more advanced particle-based nodes. More...
#include <ParticleSystem.h>
Public Types | |
typedef TDataType::Real | Real |
typedef TDataType::Coord | Coord |
![]() | |
template<class T> | |
using | SPtr = std::shared_ptr<T> |
![]() | |
typedef std::vector< FBase * > | FieldVector |
typedef std::map< FieldID, FBase * > | FieldMap |
Public Member Functions | |
ParticleSystem () | |
~ParticleSystem () override | |
std::string | getNodeType () override |
DEF_ARRAY_STATE (Coord, Position, DeviceType::GPU, "Particle position") | |
Particle position. | |
DEF_ARRAY_STATE (Coord, Velocity, DeviceType::GPU, "Particle velocity") | |
Particle velocity. | |
DEF_INSTANCE_STATE (PointSet< TDataType >, PointSet, "Topology") | |
A topology. | |
ParticleSystem () | |
~ParticleSystem () override | |
std::string | getNodeType () override |
float | getDt () override |
Simulation timestep. | |
DEF_ARRAY_STATE (Vec3f, Position, DeviceType::GPU, "Particle position") | |
Particle position. | |
DEF_ARRAY_STATE (Vec3f, Velocity, DeviceType::GPU, "Particle velocity") | |
Particle velocity. | |
DEF_ARRAY_STATE (Vec3f, Force, DeviceType::GPU, "Force on each particle") | |
Particle force. | |
DEF_INSTANCE_STATE (PointSet, PointSet, "Topology") | |
A topology. | |
![]() | |
Node () | |
~Node () override | |
void | setName (std::string name) |
std::string | getName () override |
bool | isAutoSync () |
bool | isAutoHidden () |
void | setAutoSync (bool con) |
Whether the node can be automatically synchronized when its ancestor is updated. | |
void | setAutoHidden (bool con) |
virtual bool | isActive () |
Check the state of dynamics. | |
virtual void | setActive (bool active) |
Set the state of dynamics. | |
virtual bool | isVisible () |
Check the visibility of context. | |
virtual void | setVisible (bool visible) |
Set the visibility of context. | |
void | setDt (Real dt) |
void | setSceneGraph (SceneGraph *scn) |
SceneGraph * | getSceneGraph () |
std::vector< NodePort * > & | getImportNodes () |
std::vector< NodePort * > & | getExportNodes () |
bool | addModule (std::shared_ptr< Module > module) |
Add a module to m_module_list and other special module lists. | |
bool | deleteModule (std::shared_ptr< Module > module) |
template<class TModule> | |
bool | addModule (std::shared_ptr< TModule > tModule) |
Add a speical kind of module. | |
template<class TModule> | |
bool | deleteModule (std::shared_ptr< TModule > tModule) |
std::list< std::shared_ptr< Module > > & | getModuleList () |
bool | hasModule (std::string name) |
std::shared_ptr< Module > | getModule (std::string name) |
Get a module by its name. | |
template<class TModule> | |
std::shared_ptr< TModule > | getModule () |
Get the Module by the module class name. | |
template<class TModule> | |
std::shared_ptr< TModule > | getModule (std::string name) |
std::shared_ptr< Pipeline > | resetPipeline () |
std::shared_ptr< AnimationPipeline > | animationPipeline () |
std::shared_ptr< GraphicsPipeline > | graphicsPipeline () |
template<class TModule> | |
std::shared_ptr< TModule > | addModule (std::string name) |
void | update () |
Called every time interval. | |
void | updateGraphicsContext () |
void | reset () |
virtual NBoundingBox | boundingBox () |
bool | connect (NodePort *nPort) |
Depth-first tree traversal. | |
bool | disconnect (NodePort *nPort) |
bool | attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true) override |
Attach a field to Node. | |
std::vector< NodePort * > & | getAllNodePorts () |
uint | sizeOfNodePorts () |
uint | sizeOfImportNodes () const |
uint | sizeOfExportNodes () const |
void | setForceUpdate (bool b) |
DEF_VAR_STATE (Real, ElapsedTime, 0, "Elapsed Time") | |
DEF_VAR_STATE (Real, TimeStep, Real(0.033), "Time step size") | |
DEF_VAR_STATE (uint, FrameNumber, 0, "Frame number") | |
![]() | |
OBase () | |
~OBase () override | |
virtual std::string | caption () |
Return the caption. | |
virtual bool | captionVisible () |
Whether to hide the caption in the GUI. | |
virtual std::string | description () |
Return a description for the node or module, override this function to support user-defined description. | |
bool | addField (FBase *data) |
Add a field to Base FieldID will be set to the name of Field by default. | |
bool | addField (FieldID name, FBase *data) |
Add a field to Base. | |
bool | addFieldAlias (FieldID name, FBase *data) |
bool | addFieldAlias (FieldID name, FBase *data, FieldMap &fieldAlias) |
bool | findField (FBase *data) |
Find a field by its pointer. | |
bool | findFieldAlias (const FieldID name) |
Find a field by its name. | |
bool | findFieldAlias (const FieldID name, FieldMap &fieldAlias) |
Find a field in fieldAlias by its name This function is typically called by other functions. | |
bool | removeField (FBase *data) |
Remove a field by its pointer. | |
bool | removeFieldAlias (const FieldID name) |
Remove a field by its name. | |
bool | removeFieldAlias (const FieldID name, FieldMap &fieldAlias) |
FBase * | getField (const FieldID name) |
Return a field by its name. | |
std::vector< FBase * > & | getAllFields () |
template<typename T> | |
T * | getField (FieldID name) |
bool | isAllFieldsReady () |
Check the completeness of all required fields. | |
std::vector< FieldID > | getFieldAlias (FBase *data) |
int | getFieldAliasCount (FBase *data) |
void | setBlockCoord (float x, float y) |
float | bx () |
float | by () |
bool | findInputField (FBase *field) |
bool | addInputField (FBase *field) |
bool | removeInputField (FBase *field) |
std::vector< FBase * > & | getInputFields () |
bool | findOutputField (FBase *field) |
bool | addOutputField (FBase *field) |
bool | addToOutput (FBase *field) |
bool | removeOutputField (FBase *field) |
bool | removeFromOutput (FBase *field) |
std::vector< FBase * > & | getOutputFields () |
bool | findParameter (FBase *field) |
bool | addParameter (FBase *field) |
bool | removeParameter (FBase *field) |
std::vector< FBase * > & | getParameters () |
![]() | |
Object () | |
virtual | ~Object () |
ObjectId | objectId () |
Protected Member Functions | |
void | resetStates () override |
void | postUpdateStates () override |
void | resetStates () override |
![]() | |
bool | appendExportNode (NodePort *nodePort) |
bool | removeExportNode (NodePort *nodePort) |
virtual void | preUpdateStates () |
virtual void | updateStates () |
virtual void | updateTopology () |
virtual bool | validateInputs () |
virtual bool | requireUpdate () |
void | tick () |
notify all state and output fields are updated | |
Additional Inherited Members | |
![]() | |
static bool | registerClass (ClassInfo *ci) |
static Object * | createObject (std::string name) |
static std::map< std::string, ClassInfo * > * | getClassMap () |
static ObjectId | baseId () |
Base Id. | |
![]() | |
std::string | m_node_name |
![]() | |
std::vector< FBase * > | fields_input |
std::vector< FBase * > | fields_output |
std::vector< FBase * > | fields_param |
This class represents the base class for more advanced particle-based nodes.
Projective peridynamics.
Position-based fluids.
This class implements a position-based fluid solver. Refer to Macklin and Muller's "Position Based Fluids" for details
This class implements the projective peridynamics. Refer to He et al' "Projective peridynamics for modeling versatile elastoplastic materials" for details.
Definition at line 13 of file ParticleSystem.h.
typedef TDataType::Coord dyno::ParticleSystem< TDataType >::Coord |
Definition at line 17 of file ParticleSystem.h.
typedef TDataType::Real dyno::ParticleSystem< TDataType >::Real |
Definition at line 16 of file ParticleSystem.h.
dyno::ParticleSystem< TDataType >::ParticleSystem | ( | ) |
Definition at line 8 of file ParticleSystem.cpp.
|
override |
Definition at line 16 of file ParticleSystem.cpp.
dyno::ParticleSystem< TDataType >::ParticleSystem | ( | ) |
|
override |
dyno::ParticleSystem< TDataType >::DEF_ARRAY_STATE | ( | Coord | , |
Position | , | ||
DeviceType::GPU | , | ||
"Particle position" | ) |
Particle position.
dyno::ParticleSystem< TDataType >::DEF_ARRAY_STATE | ( | Coord | , |
Velocity | , | ||
DeviceType::GPU | , | ||
"Particle velocity" | ) |
Particle velocity.
dyno::ParticleSystem< TDataType >::DEF_ARRAY_STATE | ( | Vec3f | , |
Force | , | ||
DeviceType::GPU | , | ||
"Force on each particle" | ) |
Particle force.
dyno::ParticleSystem< TDataType >::DEF_ARRAY_STATE | ( | Vec3f | , |
Position | , | ||
DeviceType::GPU | , | ||
"Particle position" | ) |
Particle position.
dyno::ParticleSystem< TDataType >::DEF_ARRAY_STATE | ( | Vec3f | , |
Velocity | , | ||
DeviceType::GPU | , | ||
"Particle velocity" | ) |
Particle velocity.
dyno::ParticleSystem< TDataType >::DEF_INSTANCE_STATE | ( | PointSet | , |
PointSet | , | ||
"Topology" | ) |
A topology.
dyno::ParticleSystem< TDataType >::DEF_INSTANCE_STATE | ( | PointSet< TDataType > | , |
PointSet | , | ||
"Topology" | ) |
A topology.
|
inlineoverridevirtual |
|
overridevirtual |
Reimplemented from dyno::Node.
Reimplemented in dyno::Peridynamics< TDataType >.
Definition at line 21 of file ParticleSystem.cpp.
|
overridevirtual |
Reimplemented from dyno::Node.
Reimplemented in dyno::Peridynamics< TDataType >.
|
overrideprotectedvirtual |
Reimplemented from dyno::Node.
Reimplemented in dyno::SemiAnalyticalSFINode< TDataType >.
Definition at line 43 of file ParticleSystem.cpp.
|
overrideprotectedvirtual |
Reimplemented from dyno::Node.
Reimplemented in dyno::Peridynamics< TDataType >, and dyno::SemiAnalyticalSFINode< TDataType >.
Definition at line 27 of file ParticleSystem.cpp.
|
overrideprotectedvirtual |
Reimplemented from dyno::Node.
Reimplemented in dyno::Peridynamics< TDataType >, and dyno::SemiAnalyticalSFINode< TDataType >.