HDK
|
#include <SIM_ConstraintNetworkIterator.h>
Public Member Functions | |
GenericConstraintAccessor () | |
Default constructor uses SIM_DataFilterAll. More... | |
GenericConstraintAccessor (UT_UniquePtr< SIM_DataFilter > filter) | |
void | init (const GU_Detail *gdp, exint num_constraint_types) override |
bool | acceptConstraint (const SIM_Data &constraint_data, exint idx) override |
void | advance (exint constraint_idx, GA_Offset primoff) |
Update the current constraint data type index and primitive offset. More... | |
const SIM_Data * | getConstraintData () const |
template<typename T > | |
T | get (const UT_StringRef &attribute_name) const |
template<typename T > | |
T | getDataOption (const UT_StringRef &attribute_name) const |
Retrieve a value from the attached subdata for the constraint. More... | |
template<typename T > | |
bool | getPrimitiveAttribute (const UT_StringRef &attribute_name, T &value) const |
Public Member Functions inherited from SIM_ConstraintNetwork::ConstraintAccessor | |
ConstraintAccessor ()=default | |
virtual | ~ConstraintAccessor ()=default |
UT_NON_COPYABLE (ConstraintAccessor) | |
Generic implementation of ConstraintAccessor, which evaluates constraint parameter values by name.
Definition at line 342 of file SIM_ConstraintNetworkIterator.h.
SIM_ConstraintNetwork::GenericConstraintAccessor::GenericConstraintAccessor | ( | ) |
Default constructor uses SIM_DataFilterAll.
SIM_ConstraintNetwork::GenericConstraintAccessor::GenericConstraintAccessor | ( | UT_UniquePtr< SIM_DataFilter > | filter | ) |
|
overridevirtual |
Returns whether the constraint type should be included when iterating over the constraint network, and performs any necessary caching with the constraint data and its index.
Implements SIM_ConstraintNetwork::ConstraintAccessor.
|
inline |
Update the current constraint data type index and primitive offset.
Definition at line 120 of file SIM_ConstraintNetworkIteratorImpl.h.
T SIM_ConstraintNetwork::GenericConstraintAccessor::get | ( | const UT_StringRef & | attribute_name | ) | const |
Returns the value of an attribute of the constraint. If there is no primitive attribute with that name, a default value will be taken from the attached subdata if possible.
Definition at line 134 of file SIM_ConstraintNetworkIteratorImpl.h.
|
inline |
Definition at line 127 of file SIM_ConstraintNetworkIteratorImpl.h.
T SIM_ConstraintNetwork::GenericConstraintAccessor::getDataOption | ( | const UT_StringRef & | attribute_name | ) | const |
Retrieve a value from the attached subdata for the constraint.
Definition at line 143 of file SIM_ConstraintNetworkIteratorImpl.h.
bool SIM_ConstraintNetwork::GenericConstraintAccessor::getPrimitiveAttribute | ( | const UT_StringRef & | attribute_name, |
T & | value | ||
) | const |
Looks up a value for a primitive attribute. Returns true if the attribute exists, and false otherwise.
Definition at line 156 of file SIM_ConstraintNetworkIteratorImpl.h.
|
overridevirtual |
Initialize with the constraint network's GU_Detail, and the number of constraint types referenced by the geometry (from the 'constraint_name' primitive attribute).
Implements SIM_ConstraintNetwork::ConstraintAccessor.