Placement

Stores the position, rotation and stretch of an object.

Vec2D position,
float rotation = 0.0,
Vec2D stretch = Vec2D( 1.0, 1.0 ))

Creates a new Placement with the specified position, rotation and stretch.

Examples

// Create a new placement for an object with the position x = 200.0, y = 100.0 //
Placement myPlacement( Vec2D200.0100.0 ));

// Do the same as above, but also rotate the object 90 decrees counter clockwise //
Placement myPlacement2( Vec2D200.0100.0 ), 0.5 * AL_PI );

// Do the same as above, but also stretch the object to double of its original size //
Placement myPlacement3( Vec2D200.0100.0 ), 0.5 * AL_PI, 2.0 );


Member functions
MoveBy
Moves the Placement
RotateBy
Rotates the Placement
StretchBy
Stretches the Position
GetDistance
Returns the distance between this Placement and an another one
SetPosition
Sets the position value of the Placement
GetPosition
Returns the position value of the Placement
SetRotation
Sets the rotation angle of the Placement
GetRotation
Returns the rotation angle of the Placement
SetStretch
Sets the stretching factor of the Placement
GetStretch
Returns the stretching factor of the Placement


Questions about Placement? Click here.