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

#include <SIM_ConstraintNetworkIterator.h>

+ Inheritance diagram for SIM_ConstraintNetwork::iterator:

Public Member Functions

 iterator (const SIM_Data &container, const SIM_Data &data_root, SIM_GeometryCopy *geo, const SIM_Time &t, ConstraintAccessor &constraint_accessor, AnchorAccessor &anchor_accessor)
 
 ~iterator ()
 
void rewind ()
 
bool atEnd () const
 
void advance ()
 
exint getConstraintIndex () const
 Return the number of constraints that have been seen so far. More...
 
GA_Index getPrimIndex () const
 Return the primitive number corresponding to the current constraint. More...
 
GA_Offset getPrimOffset () const
 
exint getConstraintDataIndex () const
 Returns the index of the current constraint data type. More...
 
GA_Index getPointNumber (bool anchor1) const
 Return the point number corresponding to an anchor. More...
 
GU_DetailgetGdp () const
 
void breakConstraint ()
 
void updateLinearConstraintState (fpreal force, fpreal distance)
 
void updateAngularConstraintState (fpreal torque, fpreal angle)
 
const_iteratorgetConstIterator ()
 Returns the underlying const_iterator. More...
 

Detailed Description

Provides a convenient way to process all of the constraints in the network, and update attributes of the constraints.

Definition at line 194 of file SIM_ConstraintNetworkIterator.h.

Constructor & Destructor Documentation

SIM_ConstraintNetwork::iterator::iterator ( const SIM_Data container,
const SIM_Data data_root,
SIM_GeometryCopy geo,
const SIM_Time t,
ConstraintAccessor constraint_accessor,
AnchorAccessor anchor_accessor 
)

Use the filter parameter to process only a certain constraint type. The default behaviour is to process everything.

SIM_ConstraintNetwork::iterator::~iterator ( )

Member Function Documentation

void SIM_ConstraintNetwork::iterator::advance ( )
inline

Definition at line 208 of file SIM_ConstraintNetworkIterator.h.

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

Definition at line 207 of file SIM_ConstraintNetworkIterator.h.

void SIM_ConstraintNetwork::iterator::breakConstraint ( )

Mark the current constraint as being broken. This will cause it to switch to the next constraint type (if defined) or break and be skipped on any further traversals of the constraints. The broken constraints are placed into a primitive group, which can then be used in a SOP solver to trigger events when constraints break.

const_iterator& SIM_ConstraintNetwork::iterator::getConstIterator ( )
inline

Returns the underlying const_iterator.

Definition at line 239 of file SIM_ConstraintNetworkIterator.h.

exint SIM_ConstraintNetwork::iterator::getConstraintDataIndex ( ) const
inline

Returns the index of the current constraint data type.

Definition at line 218 of file SIM_ConstraintNetworkIterator.h.

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

Return the number of constraints that have been seen so far.

Definition at line 211 of file SIM_ConstraintNetworkIterator.h.

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

Definition at line 223 of file SIM_ConstraintNetworkIterator.h.

GA_Index SIM_ConstraintNetwork::iterator::getPointNumber ( bool  anchor1) const

Return the point number corresponding to an anchor.

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

Return the primitive number corresponding to the current constraint.

Definition at line 214 of file SIM_ConstraintNetworkIterator.h.

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

Definition at line 215 of file SIM_ConstraintNetworkIterator.h.

void SIM_ConstraintNetwork::iterator::rewind ( )
inline

Definition at line 206 of file SIM_ConstraintNetworkIterator.h.

void SIM_ConstraintNetwork::iterator::updateAngularConstraintState ( fpreal  torque,
fpreal  angle 
)
void SIM_ConstraintNetwork::iterator::updateLinearConstraintState ( fpreal  force,
fpreal  distance 
)

Convenience method to update the constraint about the forces or torques applied to satisfy it.


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