HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_ConstraintNetwork::GenericConstraintAccessor Class Reference

#include <SIM_ConstraintNetworkIterator.h>

+ Inheritance diagram for SIM_ConstraintNetwork::GenericConstraintAccessor:

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_DatagetConstraintData () const
 
template<typename T >
get (const UT_StringRef &attribute_name) const
 
template<typename 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)
 

Detailed Description

Generic implementation of ConstraintAccessor, which evaluates constraint parameter values by name.

Definition at line 342 of file SIM_ConstraintNetworkIterator.h.

Constructor & Destructor Documentation

SIM_ConstraintNetwork::GenericConstraintAccessor::GenericConstraintAccessor ( )

Default constructor uses SIM_DataFilterAll.

SIM_ConstraintNetwork::GenericConstraintAccessor::GenericConstraintAccessor ( UT_UniquePtr< SIM_DataFilter filter)

Member Function Documentation

bool SIM_ConstraintNetwork::GenericConstraintAccessor::acceptConstraint ( const SIM_Data constraint_data,
exint  idx 
)
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.

void SIM_ConstraintNetwork::GenericConstraintAccessor::advance ( exint  constraint_idx,
GA_Offset  primoff 
)
inline

Update the current constraint data type index and primitive offset.

Definition at line 120 of file SIM_ConstraintNetworkIteratorImpl.h.

template<typename T >
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.

const SIM_Data * SIM_ConstraintNetwork::GenericConstraintAccessor::getConstraintData ( ) const
inline

Definition at line 127 of file SIM_ConstraintNetworkIteratorImpl.h.

template<typename T >
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.

template<typename T >
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.

void SIM_ConstraintNetwork::GenericConstraintAccessor::init ( const GU_Detail gdp,
exint  num_constraint_types 
)
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.


The documentation for this class was generated from the following files: