Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::FaceIterator Class Reference
[OpenSG Geometry Iterators]

The FaceIterator allows iteration through faces, i.e. More...

#include <OSGFaceIterator.h>

Collaboration diagram for osg::FaceIterator:

Collaboration graph
[legend]
List of all members.

Public Methods

Construction
 FaceIterator (void)
 FaceIterator (const FaceIterator &source)
 FaceIterator (const GeometryPtr &geo)
 FaceIterator (const NodePtr &geo)
Destructors
virtual ~FaceIterator (void)
Access
Int32 getIndex (void) const
UInt32 getType (void) const
UInt32 getLength (void) const
Int32 getPositionIndex (Int32 which) const
Pnt3f getPosition (Int32 which) const
Int32 getNormalIndex (Int32 which) const
Vec3f getNormal (Int32 which) const
Int32 getColorIndex (Int32 which) const
Color3f getColor (Int32 which) const
Int32 getTexCoordsIndex (Int32 which) const
Vec2f getTexCoords (Int32 which) const
Int32 getIndexIndex (Int32 which) const
GeometryPtr getGeometry (void) const
Your operators
void seek (Int32 index)
void operator++ (void)
FaceIterator & operator= (const FaceIterator &source)
bool operator< (const FaceIterator &other) const
bool operator== (const FaceIterator &other) const
bool operator!= (const FaceIterator &other) const
Field Set
void setToBegin (void)
void setToEnd (void)

Static Public Methods

Class Get
const char * getClassname (void)

Private Methods

void startPrim (void)

Private Attributes

PrimitiveIterator _primIt
GeometryPtr _geo
Int32 _faceIndex
UInt32 _actPrimIndex
Int32 _facePntIndex [4]

Static Private Attributes

char cvsid [] = "@(#)$Id: OSGFaceIterator.cpp,v 1.14 2002/02/04 20:14:09 dirk Exp $"

Detailed Description

The FaceIterator allows iteration through faces, i.e.

tris and/or quads.


Constructor & Destructor Documentation

FaceIterator::FaceIterator void   
 

FaceIterator::FaceIterator const FaceIterator &    source
 

FaceIterator::FaceIterator const GeometryPtr   geo
 

FaceIterator::FaceIterator const NodePtr   geo
 

These constructors create an iterator for the given geometry/node. They are useful to create an iterator to be used to seek() to a specific indexed face. Otherwise, use Geometry::beginFaces() resp. Geometry::endFaces() to create an iterator.

FaceIterator::~FaceIterator void    [virtual]
 


Member Function Documentation

const char* osg::FaceIterator::getClassname void    [inline, static]
 

Int32 osg::FaceIterator::getIndex void    const [inline]
 

Return the index of the current face. The index runs from 0 to the number of faces in the geometry. Its main use is as an input to seek().

UInt32 osg::FaceIterator::getType void    const [inline]
 

Return the type of the current primitive. Mainly useful to be able to treat e.g. polygons differently than other triangle-generating primitives.

UInt32 osg::FaceIterator::getLength void    const [inline]
 

Return the length of the current face. 3 or 4, depending on the current primitive.

Int32 osg::FaceIterator::getPositionIndex Int32    which const [inline]
 

Return the position index of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

Pnt3f osg::FaceIterator::getPosition Int32    which const [inline]
 

Return the position of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

Int32 osg::FaceIterator::getNormalIndex Int32    which const [inline]
 

Return the normal index of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

Vec3f osg::FaceIterator::getNormal Int32    which const [inline]
 

Return the normal of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

Int32 osg::FaceIterator::getColorIndex Int32    which const [inline]
 

Return the color index of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

Color3f osg::FaceIterator::getColor Int32    which const [inline]
 

Return the color of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

Int32 osg::FaceIterator::getTexCoordsIndex Int32    which const [inline]
 

Return the texture coordinate index of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

Vec2f osg::FaceIterator::getTexCoords Int32    which const [inline]
 

Return the texture coordinate of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

Int32 osg::FaceIterator::getIndexIndex Int32    which const [inline]
 

Return the index index of a point in the current face.

Parameters:
which  the point to access. Must be between 0 and getLength().

GeometryPtr osg::FaceIterator::getGeometry void    const [inline]
 

Return the index of the current face. The index runs from 0 to the number of faces in the geometry. Its main use is as an input to seek().

void FaceIterator::seek Int32    index
 

void FaceIterator::operator++ void   
 

The increment operator steps the iterator to the next face. If it is already beyond the last face it does not change.

FaceIterator & FaceIterator::operator= const FaceIterator &    source
 

bool FaceIterator::operator< const FaceIterator &    other const
 

bool FaceIterator::operator== const FaceIterator &    other const
 

bool FaceIterator::operator!= const FaceIterator &    other const
 

void FaceIterator::setToBegin void   
 

void FaceIterator::setToEnd void   
 

void FaceIterator::startPrim void    [private]
 

Helper function to reset all state to the beginning of a new primitive. Also skips non-polygonal primitives (lines, points).


Member Data Documentation

char FaceIterator::cvsid = "@(#)$Id: OSGFaceIterator.cpp,v 1.14 2002/02/04 20:14:09 dirk Exp $" [static, private]
 

PrimitiveIterator osg::FaceIterator::_primIt [private]
 

GeometryPtr osg::FaceIterator::_geo [private]
 

Int32 osg::FaceIterator::_faceIndex [private]
 

UInt32 osg::FaceIterator::_actPrimIndex [private]
 

Int32 osg::FaceIterator::_facePntIndex[4] [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Jul 3 16:27:00 2002 for OpenSG by doxygen1.2.16