#include <Quad.h>
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 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. | |
Vertex & | v1 () |
Gets the first vertex of the Quad. | |
Vertex & | v2 () |
Gets the second vertex of the Quad. | |
Vertex & | v3 () |
Gets the third vertex of the Quad. | |
Vertex & | v4 () |
Gets the fourth vertex of the Quad. | |
Protected Member Functions | |
virtual void | draw () |
Called when a Node is to be drawn. |
The Quad class is type of Shape which draws a four point polygon
Quad::Quad | ( | const std::string & | name | ) | [inline] |
Quad::Quad | ( | float | x, | |
float | y, | |||
float | width, | |||
float | height | |||
) |
Constructs a new Quad for a given rectangle.
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, | |
float | x, | |||
float | y, | |||
float | width, | |||
float | height | |||
) |
ShapeType Quad::type | ( | ) | [inline, virtual] |
void Quad::setRect | ( | float | x, | |
float | y, | |||
float | width, | |||
float | height | |||
) |
Sets the vertices of the Quad to represent the specified rectangle.
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] |