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

Q::VertexIterator Struct Reference
[Geometric ObjectsObject Iterators]

Read or write a list of vertices for a mesh-based object. More...

#include <Q/q.h>

Inheritance diagram for Q::VertexIterator:

Q::ObjectBase List of all members.

Public Member Functions

bool valid () const
Utils::Result next ()
void index (unsigned int index)
Maths::Vec3f vertex () const
Maths::Vec3f current () const
void setVertex (const Maths::Vec3f &v)
unsigned int add (const Maths::Vec3f &v)
unsigned int addDirect (const Maths::Vec3f &v)
unsigned int index () const
Maths::Vec3f operator * () const
VertexIteratoroperator++ ()

Detailed Description

Read or write a list of vertices for a mesh-based object.

The VertexIterator is an object used to manage a list of vertices. Typically, this is used to edit instances of Mesh and Skin.


Member Function Documentation

unsigned int Q::VertexIterator::add const Maths::Vec3f v  ) 
 

Add a new vertex to the collection and return its index. The position of the iterator will be updated to reference the new vertex.

unsigned int Q::VertexIterator::addDirect const Maths::Vec3f v  ) 
 

Add a new vertex to the collection and return its index. The position of the iterator will be updated to reference the new vertex. The new vertex is not checked against the current vertex array, therefore duplicates are allowed.

Maths::Vec3f Q::VertexIterator::current  )  const [inline]
 

Return the value of the current vertex.

unsigned int Q::VertexIterator::index  )  const
 

Return the index of the current vertex in the collection.

void Q::VertexIterator::index unsigned int  index  ) 
 

Set the iterator to reference the given vertex in the collection. Vertex indices start at zero.

Utils::Result Q::VertexIterator::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.

Maths::Vec3f Q::VertexIterator::operator *  )  const [inline]
 

See also:
current

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

See also:
next

void Q::VertexIterator::setVertex const Maths::Vec3f v  ) 
 

Set the value of the current vertex to v.

bool Q::VertexIterator::valid  )  const
 

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

Reimplemented from Q::ObjectBase.

Maths::Vec3f Q::VertexIterator::vertex  )  const
 

Return the value of the current vertex.

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