Poly Class Reference
[Shapes]

Polygon shape node. More...

#include <Poly.h>

Inheritance diagram for Poly:

Inheritance graph
[legend]
Collaboration diagram for Poly:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Poly ()
 Constructs a new Poly with no points.
 Poly (const std::string &name)
 Constructs a new Poly with no points.
ShapeType type ()
 Returns the Poly's type.
void addVertex (const Vertex &vertex)
 Adds a vertex to this Poly.
void addVertex (const Vector2f &vertex)
 Adds a point to this Poly.
int size ()
 Number of points in this Poly.

Protected Member Functions

virtual void draw ()
 Called when a Node is to be drawn.


Detailed Description

Polygon shape node.

The Poly class is type of Shape which draws an arbitrary polygon


Constructor & Destructor Documentation

Poly::Poly ( const std::string &  name  ) 

Constructs a new Poly with no points.

Parameters:
name name of Node


Member Function Documentation

ShapeType Poly::type (  )  [inline, virtual]

Returns the Poly's type.

Returns:
returns the type Shape::ST_POLY

Reimplemented from Shape.

void Poly::addVertex ( const Vertex vertex  ) 

Adds a vertex to this Poly.

Parameters:
vertex vertex to add

void Poly::addVertex ( const Vector2f vertex  ) 

Adds a point to this Poly.

Parameters:
vertex point to add

int Poly::size (  ) 

Number of points in this Poly.

Returns:
number of points

virtual void Poly::draw (  )  [protected, virtual]

Called when a Node is to be drawn.

Override this method in subclasses to tell a Node how to draw itself on the screen. Drawing should take place in object space (the parent Nodes will apply their own transforms to the rendering stack).

Reimplemented from Node.


The documentation for this class was generated from the following file:

Generated on Fri Feb 22 15:56:22 2008 for Scene2D by  doxygen 1.5.5