QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::TransformIterator Struct Reference
[Geometric ObjectsObject Iterators]

Read or write a list of transforms for a Cluster. More...

#include <Q/q.h>

Inheritance diagram for Q::TransformIterator:

Q::ObjectBase List of all members.

Public Member Functions

bool valid () const
Utils::Result next ()
bool index (unsigned int index)
unsigned int add (const Maths::Vec3f &position, const Maths::Vec3f &scale, const Maths::Quat4f &orientation, unsigned int parent)
unsigned int add (const Maths::Vec3f &position, const Maths::Vec3f &scale, const Maths::Quat4f &orientation)
Utils::Result add (const Geom &g)
Utils::Result remove (const Geom &g)
Maths::Vec3f position () const
Maths::Vec3f scale () const
Maths::Quat4f orientation () const
bool getParent (unsigned int &) const
List geoms () const
TransformIteratoroperator++ ()

Detailed Description

Read or write a list of transforms for a Cluster.

Iterates over the individual transforms within a Cluster.

See also:
Cluster, ClusterInstance


Member Function Documentation

Utils::Result Q::TransformIterator::add const Geom g  ) 
 

Add a Q::Geom to this transform. g cannot be a Q::Light. Return Utils::InvalidArgument if g is a Q::Light. Return Utils::Failure if g is already attached to this tranform. Return Utils::Success otherwise.

unsigned int Q::TransformIterator::add const Maths::Vec3f position,
const Maths::Vec3f scale,
const Maths::Quat4f orientation
 

Add a transform without a parent. The orientation should be normalised. Return the index of the new transform. The iterator is not updated to reference the new transform.

unsigned int Q::TransformIterator::add const Maths::Vec3f position,
const Maths::Vec3f scale,
const Maths::Quat4f orientation,
unsigned int  parent
 

Add a transform with a parent. The parent is the transform at the specified index and must have been added already. The orientation should be normalised. Return the index of the new transform. The iterator is not updated to reference the new transform.

List Q::TransformIterator::geoms  )  const
 

Return the geoms associated with this transform.

bool Q::TransformIterator::getParent unsigned int &   )  const
 

Get the index of the parent transform. Return true if this transform has a parent, false otherwise.

bool Q::TransformIterator::index unsigned int  index  ) 
 

Set the iterator to reference the given transform in the collection. Transform indices start at zero. This returns true if the new iterator position represents a valid transform.

Utils::Result Q::TransformIterator::next  ) 
 

Advance the iterator to the next object in the list or if the current object is the last object in the list, then set the state of the iterator to invalid. Return Utils::Success.

TransformIterator& Q::TransformIterator::operator++  )  [inline]
 

See also:
next.

Maths::Quat4f Q::TransformIterator::orientation  )  const
 

Return the orientation of the current transform.

Maths::Vec3f Q::TransformIterator::position  )  const
 

Return the position of the current transform.

Utils::Result Q::TransformIterator::remove const Geom g  ) 
 

Remove a Q::Geom from this transform. If g is valid: if g is found on this transform, remove it and return true, otherwise return false. If g is not valid: if there are Geoms associated with this transform, remove them all and return true, otherwise return false.

Maths::Vec3f Q::TransformIterator::scale  )  const
 

Return the scale of the current transform.

bool Q::TransformIterator::valid  )  const
 

Return true if this iterator represents a valid transform in the collection. This will return false after the iterator has been advanced past the last transform in the collection.

Reimplemented from Q::ObjectBase.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004