HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Local variables

POP_LocalVar

POP_LocalVar is a convenient subclass of POP_Node that handles many common local variables derived from particle attributes. It is common to derive new modifier POPs from POP_LocalVar.

Members of interest include:

POP_GenVar

POP_GenVar is a convenient subclass of POP_Node that handles many common functions useful for generator POPs. It is common to derive new generator POPs from POP_GenVar instead of POP_Node.

Members of interest include:

Disallow Local Variables

It is common to want to disallow the use of local variables in some parameters where per-particle values doesn't make sense. POP_Node::allowVar(), implemented by both POP_LocalVar and POP_GenVar, is useful in these situations. Typically it is used as follows:

allowVar(0);
// Evaluate parameters that do not support local variables. An error will
// occur if any of the following parameters reference a local variable.
setCone(ANGLE(t), DELTA(t), ROLLOFF(t));
allowVar(1);

User Variables

User variables are registered with the POP_ContextData object, usually when the associated point attribute is added in the POP_Node::addAttrib() override. See POP_ContextData::addUserVariable().