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

#include <SIM_ConstraintNetworkIterator.h>

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, bool skip_broken=true)
 
 ~iterator ()
 
 UT_NON_COPYABLE (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
 
bool isBroken () 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 265 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,
bool  skip_broken = true 
)

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

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

Definition at line 283 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 316 of file SIM_ConstraintNetworkIterator.h.

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

Returns the index of the current constraint data type.

Definition at line 295 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 287 of file SIM_ConstraintNetworkIterator.h.

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

Definition at line 300 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 290 of file SIM_ConstraintNetworkIterator.h.

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

Definition at line 291 of file SIM_ConstraintNetworkIterator.h.

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

Definition at line 292 of file SIM_ConstraintNetworkIterator.h.

void SIM_ConstraintNetwork::iterator::rewind ( )
inline

Definition at line 282 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.

SIM_ConstraintNetwork::iterator::UT_NON_COPYABLE ( iterator  )

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