Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIGEL_Robot::SIG_GeometryIterator Class Reference

A geometry iterator can be used to easily iterate over all polygons in a surface description. More...

#include <SIG_GeometryIterator.h>

List of all members.

Public Methods

 SIG_GeometryIterator (SIG_Geometry const *over)
 Constructor. More...

 ~SIG_GeometryIterator (void)
 Destructor. More...

bool valid (void) const
 Is there another polygon? More...

 operator bool (void) const
 Convenient version of the valid() function. More...

SIG_Polygon const& current (void) const
 Returns the current polygon. More...

void next (void)
 This will make the iterator move over to the next polygon. More...

SIG_Polygon const& iterate (void)
 Returns the current polygon and moves over to the next. More...


Private Attributes

SIG_Geometry const* iterating
int iteration


Detailed Description

A geometry iterator can be used to easily iterate over all polygons in a surface description.

Simply create the object saying which geometry you want to iterate over, then you can say "iterate()" while "valid()" returns true. Each time you say "iterate()" you will get another polygon.

You will find an example of how to use the iterator in the header file.

Definition at line 21 of file SIG_GeometryIterator.h.


Constructor & Destructor Documentation

SIGEL_Robot::SIG_GeometryIterator::SIG_GeometryIterator ( SIG_Geometry const * over )
 

Constructor.

Parameters:
over   This is the geometry object that contains the polygons the iterator will return.

Definition at line 4 of file SIG_GeometryIterator.cpp.

SIGEL_Robot::SIG_GeometryIterator::~SIG_GeometryIterator ( void )
 

Destructor.

Definition at line 9 of file SIG_GeometryIterator.cpp.


Member Function Documentation

SIG_Polygon const & SIGEL_Robot::SIG_GeometryIterator::current ( void ) const
 

Returns the current polygon.

Definition at line 17 of file SIG_GeometryIterator.cpp.

Referenced by SIGEL_Visualisation::SIG_RobotRenderer::buildDisplayLists().

SIG_Polygon const & SIGEL_Robot::SIG_GeometryIterator::iterate ( void ) [inline]
 

Returns the current polygon and moves over to the next.

Definition at line 58 of file SIG_GeometryIterator.h.

void SIGEL_Robot::SIG_GeometryIterator::next ( void )
 

This will make the iterator move over to the next polygon.

Definition at line 22 of file SIG_GeometryIterator.cpp.

Referenced by SIGEL_Visualisation::SIG_RobotRenderer::buildDisplayLists().

SIGEL_Robot::SIG_GeometryIterator::operator bool ( void ) const [inline]
 

Convenient version of the valid() function.

Definition at line 46 of file SIG_GeometryIterator.h.

bool SIGEL_Robot::SIG_GeometryIterator::valid ( void ) const
 

Is there another polygon?

Definition at line 12 of file SIG_GeometryIterator.cpp.

Referenced by SIGEL_Visualisation::SIG_RobotRenderer::buildDisplayLists().


Member Data Documentation

SIG_Geometry const * SIGEL_Robot::SIG_GeometryIterator::iterating [private]
 

Definition at line 23 of file SIG_GeometryIterator.h.

int SIGEL_Robot::SIG_GeometryIterator::iteration [private]
 

Definition at line 24 of file SIG_GeometryIterator.h.


The documentation for this class was generated from the following files:
Generated at Mon Sep 3 01:32:42 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000