Tri Class Reference
[Shapes]

Triangle shape node. More...

#include <Tri.h>

Inheritance diagram for Tri:

Inheritance graph
[legend]
Collaboration diagram for Tri:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Tri ()
 Constructs a new Tri with all points at the origin.
 Tri (const Vertex &p1, const Vertex &p2, const Vertex &p3)
 Constructs a new Tri with three vertices.
 Tri (const Vector2f &p1, const Vector2f &p2, const Vector2f &p3)
 Constructs a new Tri with three vertices.
 Tri (const std::string &name)
 Constructs a new Tri with all points at the origin.
 Tri (const std::string &name, const Vertex &p1, const Vertex &p2, const Vertex &p3)
 Constructs a new Tri with three vertices.
 Tri (const std::string &name, const Vector2f &p1, const Vector2f &p2, const Vector2f &p3)
 Constructs a new Tri with three vertices.
 Tri (const Tri &copy)
 Copy constructor for Tri.
ShapeType type ()
 Returns the Tri's type.
Vertexv1 ()
 Gets the first vertex of the Tri.
Vertexv2 ()
 Gets the second vertex of the Tri.
Vertexv3 ()
 Gets the third vertex of the Tri.

Protected Member Functions

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


Detailed Description

Triangle shape node.

The Tri class is type of Shape which draws a three point polygon


Constructor & Destructor Documentation

Tri::Tri ( const std::string &  name  )  [inline]

Constructs a new Tri with all points at the origin.

Parameters:
name name of Node

Tri::Tri ( const std::string &  name,
const Vertex p1,
const Vertex p2,
const Vertex p3 
)

Constructs a new Tri with three vertices.

Parameters:
name name of Node

Tri::Tri ( const std::string &  name,
const Vector2f p1,
const Vector2f p2,
const Vector2f p3 
)

Constructs a new Tri with three vertices.

Parameters:
name name of Node


Member Function Documentation

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

Returns the Tri's type.

Returns:
returns the type Shape::ST_CONVEX

Reimplemented from Shape.

virtual void Tri::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:24 2008 for Scene2D by  doxygen 1.5.5