Resolution independent 2D graphics engine
qr::line

Class Description

Line primitive. Inherits qr::scene_node.

Public Methods

line (scene_manager *scene_man)
line (scene_node *parent)
void set_end_points (vector2d_f nP0, vector2d_f nP1)
void set_sprite_coords (float UV0, float UV1)
void set_width (float n_width)

Protected Methods

void on_register ()
void on_render ()
void on_drop ()

Details

qr::line::line ( scene_manager * scene_man
)

Description

Creates a line and registers it with the scene manager.

Paramiters

scene_man Scene manager.
qr::line::line ( scene_node * parent
)

Description

Creates a line and attaches it to another scene node.

Paramiters

parent Parent scene node.
void qr::line::set_end_points ( vector2d_f nP0,
vector2d_f nP1
) [inline]

Description

Set the lines end points.

Paramiters

nP0 End point 0.
nP1 End point 1.
void qr::line::set_sprite_coords ( float UV0,
float UV1
) [inline]

Description

Sets the sprite co-ordinates.

Paramiters

UV0 Mapping offset from the left of the sprite, should be between 0 and 1.
UV1 Mapping offset from the right of the sprite, should be between 0 and 1.
void qr::line::set_width ( float n_width
) [inline]

Description

Sets the width of the line.

Paramiters

n_width New line width.
void qr::line::on_register ( ) [protected, virtual]

Description

Sets up the line.

void qr::line::on_render ( ) [protected, virtual]

Description

Re-Calculates the line polygon if the end points have moved.

void qr::line::on_drop ( ) [protected, inline, virtual]

Description

Necessary so that the node will register, but doesn't actually do anything.