HDK
|
#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_Detail & | getGdp () const |
void | breakConstraint () |
void | updateLinearConstraintState (fpreal force, fpreal distance) |
void | updateAngularConstraintState (fpreal torque, fpreal angle) |
const_iterator & | getConstIterator () |
Returns the underlying const_iterator. More... | |
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.
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 | ( | ) |
|
inline |
Definition at line 284 of file SIM_ConstraintNetworkIterator.h.
|
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.
|
inline |
Returns the underlying const_iterator.
Definition at line 316 of file SIM_ConstraintNetworkIterator.h.
|
inline |
Returns the index of the current constraint data type.
Definition at line 295 of file SIM_ConstraintNetworkIterator.h.
|
inline |
Return the number of constraints that have been seen so far.
Definition at line 287 of file SIM_ConstraintNetworkIterator.h.
|
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.
|
inline |
Return the primitive number corresponding to the current constraint.
Definition at line 290 of file SIM_ConstraintNetworkIterator.h.
|
inline |
Definition at line 291 of file SIM_ConstraintNetworkIterator.h.
|
inline |
Definition at line 292 of file SIM_ConstraintNetworkIterator.h.
|
inline |
Definition at line 282 of file SIM_ConstraintNetworkIterator.h.
Convenience method to update the constraint about the forces or torques applied to satisfy it.
SIM_ConstraintNetwork::iterator::UT_NON_COPYABLE | ( | iterator | ) |