Quad Class Reference
[Shapes]

Quad shape node. More...

#include <Quad.h>

Inheritance diagram for Quad:

Inheritance graph
[legend]
Collaboration diagram for Quad:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Quad ()
 Constructs a new Quad with all points at the origin.
 Quad (const std::string &name)
 Constructs a new Quad with all points at the origin.
 Quad (const Vertex &p1, const Vertex &p2, const Vertex &p3, const Vertex &p4)
 Constructs a new Quad with four vertices.
 Quad (const Vector2f &p1, const Vector2f &p2, const Vector2f &p3, const Vector2f &p4)
 Constructs a new Quad with four vertices.
 Quad (float x, float y, float width, float height)
 Constructs a new Quad for a given rectangle.
 Quad (const std::string &name, const Vertex &p1, const Vertex &p2, const Vertex &p3, const Vertex &p4)
 Constructs a new Quad with four vertices.
 Quad (const std::string &name, const Vector2f &p1, const Vector2f &p2, const Vector2f &p3, const Vector2f &p4)
 Constructs a new Quad with four vertices.
 Quad (const std::string &name, float x, float y, float width, float height)
 Constructs a new Quad for a given rectangle.
 Quad (const Quad &copy)
 Copy constructor for Quad.
ShapeType type ()
 Returns the Quad's type.
void setRect (float x, float y, float width, float height)
 Sets the vertices of the Quad to represent the specified rectangle.
Vertexv1 ()
 Gets the first vertex of the Quad.
Vertexv2 ()
 Gets the second vertex of the Quad.
Vertexv3 ()
 Gets the third vertex of the Quad.
Vertexv4 ()
 Gets the fourth vertex of the Quad.

Protected Member Functions

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


Detailed Description

Quad shape node.

The Quad class is type of Shape which draws a four point polygon


Constructor & Destructor Documentation

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

Constructs a new Quad with all points at the origin.

Parameters:
name name of Node

Quad::Quad ( float  x,
float  y,
float  width,
float  height 
)

Constructs a new Quad for a given rectangle.

Parameters:
x lower left x coordinate of rect
y lower left y coordinate of rect
width width of rect
height height of rect

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

Constructs a new Quad with four vertices.

Parameters:
name name of Node

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

Constructs a new Quad with four vertices.

Parameters:
name name of Node

Quad::Quad ( const std::string &  name,
float  x,
float  y,
float  width,
float  height 
)

Constructs a new Quad for a given rectangle.

Parameters:
name name of Node
x lower left x coordinate of rect
y lower left y coordinate of rect
width width of rect
height height of rect


Member Function Documentation

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

Returns the Quad's type.

Returns:
returns the type Shape::ST_CONVEX

Reimplemented from Shape.

void Quad::setRect ( float  x,
float  y,
float  width,
float  height 
)

Sets the vertices of the Quad to represent the specified rectangle.

Parameters:
x lower left x coordinate of rect
y lower left y coordinate of rect
width width of rect
height height of rect

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