#include <Line.h>
Public Member Functions | |
Line (const Vector2f &direction) | |
Constructs a new Line representing a given direction. | |
Line (const Vector2f &start, const Vector2f &end) | |
Constructs a new Line from one point to another. | |
Line (const std::string &name, const Vector2f &direction) | |
Constructs a new Line representing a given direction. | |
Line (const std::string &name, const Vector2f &start, const Vector2f &end) | |
Constructs a new Line from one point to another. | |
void | setStart (const Vector2f &start) |
Sets the start point of the line. | |
void | setEnd (const Vector2f &end) |
Sets the end point of the line. | |
void | setDirection (const Vector2f &direction) |
Sets the direction of the line. | |
ShapeType | type () |
Returns the Line's type. | |
Protected Member Functions | |
void | draw () |
Called when a Node is to be drawn. |
The Line class is type of Shape which draws from one point to another
Line::Line | ( | const Vector2f & | direction | ) |
Line::Line | ( | const std::string & | name, | |
const Vector2f & | direction | |||
) |
void Line::setStart | ( | const Vector2f & | start | ) |
Sets the start point of the line.
start | start point |
void Line::setEnd | ( | const Vector2f & | end | ) |
Sets the end point of the line.
end | end point |
void Line::setDirection | ( | const Vector2f & | direction | ) |
Sets the direction of the line.
The direction vector is considered to start at (0, 0) in object space.
direction | line direction |
ShapeType Line::type | ( | ) | [inline, virtual] |
void Line::draw | ( | ) | [protected, virtual] |