Line Class Reference
[Shapes]

Line shape node. More...

#include <Line.h>

Inheritance diagram for Line:

Inheritance graph
[legend]
Collaboration diagram for Line:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

Line shape node.

The Line class is type of Shape which draws from one point to another


Constructor & Destructor Documentation

Line::Line ( const Vector2f direction  ) 

Constructs a new Line representing a given direction.

Parameters:
direction direction of line

Line::Line ( const Vector2f start,
const Vector2f end 
)

Constructs a new Line from one point to another.

Parameters:
start start point
end end point

Line::Line ( const std::string &  name,
const Vector2f direction 
)

Constructs a new Line representing a given direction.

Parameters:
name name of the Node
direction direction of line

Line::Line ( const std::string &  name,
const Vector2f start,
const Vector2f end 
)

Constructs a new Line from one point to another.

Parameters:
name name of the Node
start start point
end end point


Member Function Documentation

void Line::setStart ( const Vector2f start  ) 

Sets the start point of the line.

Parameters:
start start point

void Line::setEnd ( const Vector2f end  ) 

Sets the end point of the line.

Parameters:
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.

Parameters:
direction line direction

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

Returns the Line's type.

Returns:
returns the type Shape::ST_LINE

Reimplemented from Shape.

void Line::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:21 2008 for Scene2D by  doxygen 1.5.5