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

SIGEL_Robot::SIG_Polygon Class Reference

A polygon class. More...

#include <SIG_Polygon.h>

List of all members.

Public Methods

 SIG_Polygon (SIG_Geometry *within)
 Quasi standard constructor. More...

 SIG_Polygon (SIG_Geometry *mygeom, QTextStream & tx)
 Unstreaming constructor. More...

 ~SIG_Polygon (void)
 Destructor. More...

void appendVertex (DL_vector pt)
 Appends a vertex to the polygon. More...

int getNumVertices (void) const
 Returns the number of vertices. More...

DL_vector getVertex (int nr) const
 Returns the ith vertex. More...

int getVertexIndex (int nr) const
 Returns the index of the ith vertex. More...

void writeToFileTransfer (QTextStream & tx) const
 Writes the polygon to a stream. More...


Protected Methods

 SIG_Polygon (SIG_Geometry *within, SIG_Polygon *other)
 "Unreal" copy constructor. More...


Private Attributes

SIG_GeometrymyGeometry
QArray<int> vertices

Friends

class  SIG_Geometry


Detailed Description

A polygon class.

Definition at line 15 of file SIG_Polygon.h.


Constructor & Destructor Documentation

SIGEL_Robot::SIG_Polygon::SIG_Polygon ( SIG_Geometry * within,
SIG_Polygon * other ) [protected]
 

"Unreal" copy constructor.

Duplicates the array of vertex indexes. This is intended to be called by SIG_Geometry only. You probably guess that this could be the reason why the constructor is protected.

Definition at line 6 of file SIG_Polygon.cpp.

SIGEL_Robot::SIG_Polygon::SIG_Polygon ( SIG_Geometry * within )
 

Quasi standard constructor.

This constructor creates an empty polygon.

Definition at line 15 of file SIG_Polygon.cpp.

SIGEL_Robot::SIG_Polygon::SIG_Polygon ( SIG_Geometry * mygeom,
QTextStream & tx )
 

Unstreaming constructor.

Reads the polygon data from a stream.

Definition at line 22 of file SIG_Polygon.cpp.

SIGEL_Robot::SIG_Polygon::~SIG_Polygon ( void )
 

Destructor.

Definition at line 39 of file SIG_Polygon.cpp.


Member Function Documentation

void SIGEL_Robot::SIG_Polygon::appendVertex ( DL_vector pt )
 

Appends a vertex to the polygon.

Definition at line 43 of file SIG_Polygon.cpp.

int SIGEL_Robot::SIG_Polygon::getNumVertices ( void ) const
 

Returns the number of vertices.

Definition at line 50 of file SIG_Polygon.cpp.

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

DL_vector SIGEL_Robot::SIG_Polygon::getVertex ( int nr ) const
 

Returns the ith vertex.

Definition at line 55 of file SIG_Polygon.cpp.

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

int SIGEL_Robot::SIG_Polygon::getVertexIndex ( int nr ) const
 

Returns the index of the ith vertex.

The index is an index into the array of vertices held in the SIG_Geometry object.

Definition at line 60 of file SIG_Polygon.cpp.

void SIGEL_Robot::SIG_Polygon::writeToFileTransfer ( QTextStream & tx ) const
 

Writes the polygon to a stream.

Definition at line 65 of file SIG_Polygon.cpp.


Friends And Related Function Documentation

class SIG_Geometry [friend]
 

Definition at line 16 of file SIG_Polygon.h.


Member Data Documentation

SIG_Geometry * SIGEL_Robot::SIG_Polygon::myGeometry [private]
 

Definition at line 19 of file SIG_Polygon.h.

QArray< int > SIGEL_Robot::SIG_Polygon::vertices [private]
 

Definition at line 20 of file SIG_Polygon.h.


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