109 if (!f_in->isOptional() && f_in->isEmpty())
114 std::string errMsg = std::string(
"The input field ") + f_in->getObjectName() +
115 std::string(
" in Module ") + this->getClassInfo()->getClassName() + std::string(
" is not set!");
132 if (f_out->isEmpty())
137 std::string errMsg = std::string(
"The output field ") + f_out->getObjectName() +
138 std::string(
" in Module ") + this->getClassInfo()->getClassName() + std::string(
" is not prepared!");
166 if (this->varForceUpdate()->getValue())
172 bool modified =
false;
175 modified |= f_in->isModified();
181 modified |= var->isModified();
216 if (node == NULL)
return NULL;
218 return node->getSceneGraph();
223 this->varForceUpdate()->setValue(b);
FieldTypeEnum getFieldType()
void setParent(OBase *owner)
void setObjectName(std::string name)
void setAutoDestroy(bool autoDestroy)
void setDescription(std::string description)
@ Error
Error information while executing something.
static void sendMessage(MessageType type, const std::string &text)
Add a new message to log.
virtual void updateImpl()
SceneGraph * getSceneGraph()
void setName(std::string name)
virtual bool validateOutputs()
virtual void setParentNode(Node *node)
Set the parent node.
virtual void preprocess()
void setUpdateAlways(bool b)
Set the update strategy for the module.
virtual void postprocess()
virtual bool initializeImpl()
bool isInputComplete()
Check the completeness of input fields.
std::string getName() override
virtual void updateStarted()
Two functions called at the beginning and end of update() used for debug.
Module(std::string name="default")
virtual bool requireUpdate()
std::string m_module_name
virtual void updateEnded()
virtual bool validateInputs()
bool attachField(FBase *field, std::string name, std::string desc, bool autoDestroy=true) override
Attach a field to Base.
SceneGraph * getSceneGraph()
std::vector< FBase * > fields_param
bool addParameter(FBase *field)
std::vector< FBase * > fields_output
std::vector< FBase * > fields_input
bool addOutputField(FBase *field)
bool addInputField(FBase *field)
bool isValidationInfoPrintable()
This is an implementation of AdditiveCCD based on peridyno.