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

#include <SIM_ConstraintNetworkIterator.h>

+ Inheritance diagram for SIM_ConstraintNetwork::const_iterator:

Public Member Functions

 const_iterator (const SIM_Data &container, const SIM_Data &data_root, const SIM_Geometry *geo, const SIM_Time &t, const SIM_DataFilter &filter=SIM_DataFilterAll())
 
 const_iterator (const SIM_Data &container, const SIM_Data &data_root, const SIM_Geometry *geo, const GU_Detail *gdp, const GA_PrimitiveGroup *broken_group, const SIM_Time &t, const SIM_DataFilter &filter)
 
void rewind ()
 
bool atEnd () const
 
void advance ()
 
const GU_DetailgetGdp () const
 The constraint network geometry. More...
 
exint getConstraintIndex () const
 The number of valid constraints that have been seen so far. More...
 
GA_Index getPrimIndex () const
 The primitive index. More...
 
GA_Offset getPrimOffset () const
 The primitive offset. More...
 
const SIM_DatagetConstraintData () const
 
ConstraintType getConstraintType () const
 
GA_Index getPointNumber (bool anchor1) const
 The point number for this anchor in the constraint network geometry. More...
 
GA_Offset getAnchorPointOffset (bool anchor1) const
 
GA_Index getAnchorPointIndex (bool anchor1) const
 
UT_Vector3 getAnchorPosition (bool anchor1) const
 
UT_Vector3 getAnchorVelocity (bool anchor1) const
 
PositionType getAnchorPositionType (bool anchor1) const
 
UT_Quaternion getAnchorOrientation (bool anchor1) const
 
UT_Vector3 getAnchorAngularVelocity (bool anchor1) const
 
bool getObjectCentroid (bool anchor1, UT_Vector3 &pos) const
 
int getAnchorNumConDOFs (bool anchor1) const
 
UT_Vector3 getAnchorDOFVector (bool anchor1) const
 
UT_StringHolder getAnchorName (bool anchor1) const
 
int getObjectId (bool anchor1) const
 
const SIM_ObjectgetObject (bool anchor1) 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 >
get (const UT_StringRef &attribute_name) const
 
template<typename T >
bool getPrimitiveAttribute (const UT_StringRef &attribute_name, T &value) const
 Retrieve a value from a primitive attribute of the constraint. More...
 
template<typename T >
getDetailAttribute (const UT_StringRef &attribute_name, const T &default_value) const
 
template<typename T , typename Detail , typename AttributeRef >
void get (const UT_StringRef &attribute_name, Detail &gdp, UT_StringMap< AttributeRef > &cache, T &value) const
 
template<typename Detail , typename AttributeRef >
void get (const UT_StringRef &attribute_name, Detail &gdp, UT_StringMap< AttributeRef > &cache, fpreal &value) const
 
template<typename T , typename Detail , typename AttributeRef >
bool getPrimitiveAttribute (const UT_StringRef &attribute_name, Detail &gdp, UT_StringMap< AttributeRef > &cache, T &value) const
 

Detailed Description

Definition at line 67 of file SIM_ConstraintNetworkIterator.h.

Constructor & Destructor Documentation

SIM_ConstraintNetwork::const_iterator::const_iterator ( const SIM_Data container,
const SIM_Data data_root,
const SIM_Geometry geo,
const SIM_Time t,
const SIM_DataFilter filter = SIM_DataFilterAll() 
)
Parameters
containerA SIM_Relationship or SIM_Object that contains the constraint network as subdata.
data_rootParent of the SIM_ConRel subdata.
SIM_ConstraintNetwork::const_iterator::const_iterator ( const SIM_Data container,
const SIM_Data data_root,
const SIM_Geometry geo,
const GU_Detail gdp,
const GA_PrimitiveGroup broken_group,
const SIM_Time t,
const SIM_DataFilter filter 
)

Member Function Documentation

void SIM_ConstraintNetwork::const_iterator::advance ( )
inline

Definition at line 53 of file SIM_ConstraintNetworkIteratorImpl.h.

bool SIM_ConstraintNetwork::const_iterator::atEnd ( ) const
inline

Definition at line 47 of file SIM_ConstraintNetworkIteratorImpl.h.

template<typename T >
T SIM_ConstraintNetwork::const_iterator::get ( const UT_StringRef attribute_name) const
inline

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 143 of file SIM_ConstraintNetworkIterator.h.

template<typename T , typename Detail , typename AttributeRef >
void SIM_ConstraintNetwork::const_iterator::get ( const UT_StringRef attribute_name,
Detail &  gdp,
UT_StringMap< AttributeRef > &  cache,
T &  value 
) const

Look up an attribute value. If the primitive attribute is not present, the value from the subdata will be used. This works for both GA_ROAttributeRef and GA_RWAttributeRef, which require const and non-const GU_Details, respectively.

Definition at line 208 of file SIM_ConstraintNetworkIteratorImpl.h.

template<typename Detail , typename AttributeRef >
void SIM_ConstraintNetwork::const_iterator::get ( const UT_StringRef attribute_name,
Detail &  gdp,
UT_StringMap< AttributeRef > &  cache,
fpreal value 
) const

Look up a floating-point attribute value. If present, the primitive attribute value will be multiplied with the value from the subdata.

Definition at line 219 of file SIM_ConstraintNetworkIteratorImpl.h.

UT_Vector3 SIM_ConstraintNetwork::const_iterator::getAnchorAngularVelocity ( bool  anchor1) const
UT_Vector3 SIM_ConstraintNetwork::const_iterator::getAnchorDOFVector ( bool  anchor1) const
inline

Definition at line 113 of file SIM_ConstraintNetworkIteratorImpl.h.

UT_StringHolder SIM_ConstraintNetwork::const_iterator::getAnchorName ( bool  anchor1) const
inline

Definition at line 121 of file SIM_ConstraintNetworkIteratorImpl.h.

int SIM_ConstraintNetwork::const_iterator::getAnchorNumConDOFs ( bool  anchor1) const
inline

Definition at line 106 of file SIM_ConstraintNetworkIteratorImpl.h.

UT_Quaternion SIM_ConstraintNetwork::const_iterator::getAnchorOrientation ( bool  anchor1) const
GA_Index SIM_ConstraintNetwork::const_iterator::getAnchorPointIndex ( bool  anchor1) const
inline

Gets the point index of the point referred to by the anchor in a similar way to getAnchorPointOffset.

Definition at line 96 of file SIM_ConstraintNetworkIteratorImpl.h.

GA_Offset SIM_ConstraintNetwork::const_iterator::getAnchorPointOffset ( bool  anchor1) const

Get the point offset of the point referred to by the anchor. Either the anchor directly references a point on an object, or it references a vertex on an object which has an associated point. Returns GA_INVALID_OFFSET in the case where the anchor doesnt reference a point. If 'anchor_pid' or 'anchor_vid' is present, then return the first point (or vertex) with same id as on the constraint.

UT_Vector3 SIM_ConstraintNetwork::const_iterator::getAnchorPosition ( bool  anchor1) const
PositionType SIM_ConstraintNetwork::const_iterator::getAnchorPositionType ( bool  anchor1) const
inline

Returns the type of position described by the anchor (e.g. relative offset).

Definition at line 160 of file SIM_ConstraintNetworkIteratorImpl.h.

UT_Vector3 SIM_ConstraintNetwork::const_iterator::getAnchorVelocity ( bool  anchor1) const
const SIM_Data * SIM_ConstraintNetwork::const_iterator::getConstraintData ( ) const
inline

Definition at line 276 of file SIM_ConstraintNetworkIteratorImpl.h.

exint SIM_ConstraintNetwork::const_iterator::getConstraintIndex ( ) const
inline

The number of valid constraints that have been seen so far.

Definition at line 89 of file SIM_ConstraintNetworkIterator.h.

ConstraintType SIM_ConstraintNetwork::const_iterator::getConstraintType ( ) const
inline

Definition at line 67 of file SIM_ConstraintNetworkIteratorImpl.h.

template<typename T >
T SIM_ConstraintNetwork::const_iterator::getDataOption ( const UT_StringRef attribute_name) const

Retrieve a value from the attached subdata for the constraint.

Definition at line 287 of file SIM_ConstraintNetworkIteratorImpl.h.

template<typename T >
T SIM_ConstraintNetwork::const_iterator::getDetailAttribute ( const UT_StringRef attribute_name,
const T &  default_value 
) const

Returns the value of an attribute of the overall network (i.e. a detail attribute). If the attribute does not exist, the default value will be returned.

Definition at line 302 of file SIM_ConstraintNetworkIteratorImpl.h.

const GU_Detail& SIM_ConstraintNetwork::const_iterator::getGdp ( ) const
inline

The constraint network geometry.

Definition at line 87 of file SIM_ConstraintNetworkIterator.h.

const SIM_Object* SIM_ConstraintNetwork::const_iterator::getObject ( bool  anchor1) const
bool SIM_ConstraintNetwork::const_iterator::getObjectCentroid ( bool  anchor1,
UT_Vector3 pos 
) const
int SIM_ConstraintNetwork::const_iterator::getObjectId ( bool  anchor1) const

Returns the id of the object named by the anchor. Returns -1 of the anchor does not name an object.

GA_Index SIM_ConstraintNetwork::const_iterator::getPointNumber ( bool  anchor1) const
inline

The point number for this anchor in the constraint network geometry.

Definition at line 90 of file SIM_ConstraintNetworkIteratorImpl.h.

GA_Index SIM_ConstraintNetwork::const_iterator::getPrimIndex ( ) const
inline

The primitive index.

Definition at line 91 of file SIM_ConstraintNetworkIterator.h.

template<typename T >
bool SIM_ConstraintNetwork::const_iterator::getPrimitiveAttribute ( const UT_StringRef attribute_name,
T &  value 
) const
inline

Retrieve a value from a primitive attribute of the constraint.

Definition at line 152 of file SIM_ConstraintNetworkIterator.h.

template<typename T , typename Detail , typename AttributeRef >
bool SIM_ConstraintNetwork::const_iterator::getPrimitiveAttribute ( const UT_StringRef attribute_name,
Detail &  gdp,
UT_StringMap< AttributeRef > &  cache,
T &  value 
) const

Looks up a value for a primitive attribute. This works for both GA_ROAttributeRef and GA_RWAttributeRef, which require const and non-const GU_Details, respectively. Returns true if the attribute exists, and false otherwise.

Definition at line 231 of file SIM_ConstraintNetworkIteratorImpl.h.

GA_Offset SIM_ConstraintNetwork::const_iterator::getPrimOffset ( ) const
inline

The primitive offset.

Definition at line 61 of file SIM_ConstraintNetworkIteratorImpl.h.

void SIM_ConstraintNetwork::const_iterator::rewind ( )
inline

Definition at line 39 of file SIM_ConstraintNetworkIteratorImpl.h.


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