![]() |
PeriDyno 1.0.0
|
#include <Module.h>
Public Member Functions | |
Module (std::string name="default") | |
~Module (void) override | |
bool | initialize () |
void | update () |
void | setName (std::string name) |
std::string | getName () override |
virtual void | setParentNode (Node *node) |
Set the parent node. | |
Node * | getParentNode () |
SceneGraph * | getSceneGraph () |
bool | isInitialized () |
virtual std::string | getModuleType () |
bool | attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true) override |
Attach a field to Base. | |
bool | isInputComplete () |
Check the completeness of input fields. | |
bool | isOutputCompete () |
DEF_VAR (bool, ForceUpdate, false, "") | |
void | setUpdateAlways (bool b) |
Set the update strategy for the module. | |
![]() | |
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 | |
virtual bool | initializeImpl () |
virtual void | updateImpl () |
virtual void | preprocess () |
virtual void | postprocess () |
virtual bool | validateInputs () |
virtual bool | validateOutputs () |
virtual bool | requireUpdate () |
virtual void | updateStarted () |
Two functions called at the beginning and end of update() used for debug. | |
virtual void | updateEnded () |
Private Attributes | |
Node * | m_node |
std::string | m_module_name |
bool | m_initialized |
Additional Inherited Members | |
![]() | |
typedef std::vector< FBase * > | FieldVector |
typedef std::map< FieldID, FBase * > | FieldMap |
![]() | |
static bool | registerClass (ClassInfo *ci) |
static Object * | createObject (std::string name) |
static std::map< std::string, ClassInfo * > * | getClassMap () |
static ObjectId | baseId () |
Base Id. | |
![]() | |
std::vector< FBase * > | fields_input |
std::vector< FBase * > | fields_output |
std::vector< FBase * > | fields_param |
dyno::Module::Module | ( | std::string | name = "default" | ) |
Definition at line 7 of file Module.cpp.
|
override |
Definition at line 15 of file Module.cpp.
|
overridevirtual |
Attach a field to Base.
field | Field pointer |
name | Field name |
desc | Field description |
autoDestroy | The field will be destroyed by Base if true, otherwise, the field should be explicitly destroyed by its creator. |
Reimplemented from dyno::OBase.
Definition at line 240 of file Module.cpp.
dyno::Module::DEF_VAR | ( | bool | , |
ForceUpdate | , | ||
false | , | ||
"" | ) |
|
inlinevirtual |
|
overridevirtual |
Reimplemented from dyno::OBase.
Definition at line 198 of file Module.cpp.
Node * dyno::Module::getParentNode | ( | ) |
dyno::SceneGraph * dyno::Module::getSceneGraph | ( | ) |
@breif Return the SceneGraph that contains this Module
Definition at line 212 of file Module.cpp.
bool dyno::Module::initialize | ( | ) |
Definition at line 36 of file Module.cpp.
|
protectedvirtual |
Reimplemented in dyno::DiscreteElementRenderer, dyno::DualParticleIsphModule< TDataType >, dyno::EnergyAnalysis< TDataType >, dyno::FixedPoints< TDataType >, dyno::FrameToPointSet< TDataType >, dyno::PaticleUniformAnalysis< TDataType >, dyno::PointSetToPointSet< TDataType >, dyno::SemiAnalyticalIncompressibilityModule< TDataType >, dyno::TetrahedronSetToPointSet< TDataType >, dyno::TriangleSetRenderer, and dyno::UniformGridRenderer.
Definition at line 231 of file Module.cpp.
bool dyno::Module::isInitialized | ( | ) |
bool dyno::Module::isInputComplete | ( | ) |
Check the completeness of input fields.
Definition at line 104 of file Module.cpp.
bool dyno::Module::isOutputCompete | ( | ) |
Definition at line 127 of file Module.cpp.
|
inlineprotectedvirtual |
Reimplemented in dyno::GLVisualModule.
Definition at line 104 of file Module.h.
|
inlineprotectedvirtual |
Reimplemented in dyno::GLVisualModule, dyno::GroupModule, dyno::LinearElasticitySolver< TDataType >, dyno::Pipeline, and Pipeline.
Definition at line 102 of file Module.h.
|
protectedvirtual |
Reimplemented in dyno::KeyboardInputModule, dyno::MouseInputModule, dyno::Pipeline, and Pipeline.
Definition at line 164 of file Module.cpp.
void dyno::Module::setName | ( | std::string | name | ) |
|
virtual |
Set the parent node.
Reimplemented in dyno::GroupModule.
Definition at line 193 of file Module.cpp.
void dyno::Module::setUpdateAlways | ( | bool | b | ) |
Set the update strategy for the module.
b | true, the module will be updated no matter the control and input variables are changed; false, the module will updated only when one of the variables are changed. |
Definition at line 221 of file Module.cpp.
void dyno::Module::update | ( | ) |
Definition at line 47 of file Module.cpp.
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in dyno::ComputeModule, dyno::ConstraintModule, dyno::DebugInfo, dyno::GLInstanceVisualModule, dyno::GLPhotorealisticInstanceRender, dyno::GLPhotorealisticRender, dyno::GLPointVisualModule, dyno::GLSurfaceVisualModule, dyno::GLVisualModule, dyno::GLWireframeVisualModule, dyno::GroupModule, dyno::KeyboardInputModule, dyno::MouseInputModule, dyno::OutputModule, dyno::ParticleIntegrator< TDataType >, dyno::Pipeline, dyno::SemiAnalyticalIncompressibleFluidModel< TDataType >, dyno::TopologyMapping, dyno::VkVisualModule, and Pipeline.
Definition at line 236 of file Module.cpp.
|
protectedvirtual |
Two functions called at the beginning and end of update() used for debug.
Definition at line 149 of file Module.cpp.
|
protectedvirtual |
Reimplemented in dyno::ContactsToPointSet< TDataType >, dyno::ContactsUnion< TDataType >, and dyno::GLVisualModule.
Definition at line 99 of file Module.cpp.
|
protectedvirtual |
Definition at line 159 of file Module.cpp.