#include <SIM_VolumeInstanceSource.h>
This class can be used to iterate over source instances in the given geometry.
Definition at line 156 of file SIM_VolumeInstanceSource.h.
SIM_SourceInstanceIterator::SIM_SourceInstanceIterator |
( |
bool |
need_rules = true , |
|
|
bool |
need_vel = false |
|
) |
| |
Creates an invalid iterator. setGeometry() must be called before this iterator can be used. need_rules must be true if source rules will be required later. need_vel must be true if instance velocities are required.
SIM_SourceInstanceIterator::SIM_SourceInstanceIterator |
( |
const GA_Detail * |
gdp, |
|
|
bool |
need_rules = true , |
|
|
bool |
need_vel = false |
|
) |
| |
Creates the iterator and initializes it for the given geometry. need_rules must be true if source rules will be required later. need_vel must be true if instance velocities are required.
void SIM_SourceInstanceIterator::advance |
( |
| ) |
|
Advances the iterator to the next instance.
bool SIM_SourceInstanceIterator::atEnd |
( |
| ) |
const |
Returns true if and only if the iterator is at the ned of the list of instances.
UT_Vector3F SIM_SourceInstanceIterator::getAngularVelocity |
( |
| ) |
const |
Returns angular velocity of this instance. The iterator needs to be told on creation that velocities are needed to use this method.
fpreal32 SIM_SourceInstanceIterator::getFrameOffset |
( |
| ) |
const |
Returns the frame offset for the current instance.
UT_Vector3F SIM_SourceInstanceIterator::getLinearVelocity |
( |
| ) |
const |
Returns linear velocity of this instance. The iterator needs to be told on creation that velocities are needed to use this method.
Returns the name of the current instance.
int SIM_SourceInstanceIterator::getNumberOfRules |
( |
| ) |
const |
Get the number of rules that the current instance prescribes. The iterator needs to be told on creation that rules are needed to use this method.
Returns the orientation of the current instance.
UT_Vector3F SIM_SourceInstanceIterator::getPivot |
( |
| ) |
const |
Returns the pivot of the current instance.
UT_Vector3F SIM_SourceInstanceIterator::getPosition |
( |
| ) |
const |
Returns the position for the current instance.
Get a specific rule for the current instance. rule is the index of to acquire, and must be between 0 and getNumberOfRules()-1 (inclusive). The iterator needs to be told on creation that rules are needed to use this method.
bool SIM_SourceInstanceIterator::hasVelocity |
( |
| ) |
const |
Do the instances have linear or angular velocity? Will return false if this iterator was told velocities aren't needed on creation.
bool SIM_SourceInstanceIterator::isValid |
( |
| ) |
const |
Returns true if and only if this iterator is valid. That is, if the instance geometry has all of the required attributes.
void SIM_SourceInstanceIterator::rewind |
( |
| ) |
|
Restarts the iterator. Must be called to start iteration.
void SIM_SourceInstanceIterator::setGeometry |
( |
const GA_Detail * |
gdp | ) |
|
Initializes this iterator for the given geometry.
void SIM_SourceInstanceIterator::updateRulesArray |
( |
| ) |
|
|
protected |
Updates the internal array of rules when the iterator shifts position.
bool SIM_SourceInstanceIterator::myNeedRules |
|
protected |
bool SIM_SourceInstanceIterator::myNeedVelocity |
|
protected |
The documentation for this class was generated from the following file: