hgeEntityEx Class Reference

Polygon Entity Class with rotation & scaling. More...

#include <hgeEntity.h>

Inheritance diagram for hgeEntityEx:

hgeEntity hgePolygon hgeShape

List of all members.

Public Member Functions

hgeVector GetRotatedPosition (hgeVector pos, float r)
hgeVector GetPosition ()
void SetPosition (hgeVector pos)
void SetHotSpot (hgeVector m_hotspot)
void Shift (hgeVector amount)
 hgeEntityEx (int m_Layer, bool m_Static)
void Rotate (float m_angle)
void SetRotation (float m_angle)
float GetRotation ()


Detailed Description

hgeEntityEx derives from hgeEntity, providing rotation & scaling functionality to polygon entitys.
A special TestEx routine is available in hgePolygonMap for testing EntityEx objects with an offset rotation - useful for getting the correct collision response on your rotating polygons.

Member Function Documentation

hgeVector hgeEntityEx::GetPosition (  )  [inline]

Fetches the position of a polygon. Usually the top left coordinate of its AABB.

Remarks:
If a hotspot was set, returns the location of the hotspot in world coordinates.
See also:
SetPosition() | SetHotSpot()

Reimplemented from hgePolygon.

hgeVector hgeEntityEx::GetRotatedPosition ( hgeVector  pos,
float  r 
) [inline]

Returns:
The rotated position of a given vector in world space, around this polygon at angle shift of r. Used by collision routines.

void hgeEntityEx::SetHotSpot ( hgeVector  m_hotspot  )  [inline]

Sets hot spot for transform operations.

Parameters:
m_hotspot Vector describing the offset from the top left hand corner of the AABB
The hot spot is used by translation routines in the polygon, such as SetPosition().
It works in the same way a hotspot does in a hgeSprite - it is an offset from the top left hand corner of the shape.

Reimplemented from hgePolygon.

void hgeEntityEx::SetPosition ( hgeVector  pos  )  [inline]

Sets the position of a polygon. Usually the top left coordinate of its AABB.

Remarks:
If a hotspot was set, the position is offset to match.
See also:
GetPosition() | SetHotSpot()

Reimplemented from hgePolygon.

void hgeEntityEx::Shift ( hgeVector  amount  )  [inline]

Moves polygon from its current position by a certain amount.

Remarks:
Shifts all of the polygons attributes, including vertices, triangles, quads, triangles & aabb.
See also:
SetPosition

Reimplemented from hgePolygon.


Generated on Wed Apr 29 12:56:50 2009 for Opal by  doxygen 1.5.8