
#include <hgePolygon.h>

Public Member Functions | |
| void | Load (hgeResourceReader *file) |
| virtual void | Render () |
| void | RenderOutline () |
| bool | IsPoint () |
| bool | IsPoly () |
| bool | IsEntity () |
| void | Copy (hgePolygon *) |
| void | SetMap (hgePolygonMap *m_Map) |
| hgeIntersect | Intersects (hgeCircle circle, hgeVector offset=hgeVector(0, 0)) |
| hgeIntersect | Intersects (hgeCircle *circle, hgeVector offset=hgeVector(0, 0)) |
| hgeIntersect | Intersects (hgeLine line, hgeVector offset=hgeVector(0, 0)) |
| hgeIntersect | Intersects (hgeLine *line, hgeVector offset=hgeVector(0, 0)) |
| hgeIntersect | Intersects (hgePolygon *p, hgeVector offset=hgeVector(0, 0)) |
| hgeIntersect | Intersects (hgeEntityEx *p, hgeVector offset=hgeVector(0, 0), float rot=0) |
| hgeTriangle * | TestGetTriangle (hgeVector point) |
| bool | TestPoint (hgeVector point) |
| hgeSprite * | GetSprite () |
| hgeRect | GetAABB () |
| hgeVector | GetCenter () |
| void | SetAABBSize (hgeVector m_size) |
| void | SetAABB (hgeVector m_position, hgeVector m_size) |
| void | SetTexture (HTEXTURE m_texture, int m_blend=-1) |
| void | SetHotSpot (hgeVector m_hotspot) |
| hgeVector | GetHotSpot () |
| void | Shift (hgeVector amount) |
| hgeVector | GetPosition () |
| void | SetPosition (hgeVector pos) |
| hgePVertex * | AddVertex (hgeVector pos) |
| void | RemoveVertex (hgePVertex *which) |
| void | ClearVertices () |
| int | VertexCount () |
| hgePolygon (class hgePolygonMap *pmap=NULL) | |
Public Attributes | |
| std::vector< hgePVertex * > | vertices |
| std::vector< hgeTriangle * > | triangles |
| hgePolyData | texture_data |
| hgeProperties | entity_data |
Protected Attributes | |
| bool | is_entity |
| hgeRect | aabb |
| hgeVector | center |
| hgeSprite * | sprite |
| HGE * | hge |
| class hgePolygonMap * | map |
A Polygon.
| void hgePolygon::Copy | ( | hgePolygon * | poly | ) |
Copies another polygon. Used by the map class when registering polygons, end users should rarely need to use this.
| hgeRect hgePolygon::GetAABB | ( | ) | [inline] |
Returns the AABB surrounding the polygon.
| hgeVector hgePolygon::GetCenter | ( | ) | [inline] |
Returns the center point of the AABB surrounding the polygon.
| hgeVector hgePolygon::GetHotSpot | ( | ) | [inline] |
Returns hot spot vector.
| hgeVector hgePolygon::GetPosition | ( | ) | [inline] |
Fetches the position of a polygon. Usually the top left coordinate of its AABB.
Reimplemented in hgeEntityEx.
| hgeSprite* hgePolygon::GetSprite | ( | ) | [inline] |
Returns the point sprite.
| bool hgePolygon::IsEntity | ( | ) | [inline] |
Can polygon be cast up to a hgeEntity?
| bool hgePolygon::IsPoint | ( | ) | [inline] |
Does polygon contain only a single vertex?
| bool hgePolygon::IsPoly | ( | ) | [inline] |
Is polygon made up of multiple vertices?
| void hgePolygon::Render | ( | ) | [virtual] |
| void hgePolygon::RenderOutline | ( | ) |
Renders the outline of a polygon, or the AABB if it is a point.
| void hgePolygon::SetAABB | ( | hgeVector | m_position, | |
| hgeVector | m_size | |||
| ) | [inline] |
Sets AABB Position & Size.
| void hgePolygon::SetAABBSize | ( | hgeVector | m_size | ) | [inline] |
Sets AABB Size.
| void hgePolygon::SetHotSpot | ( | hgeVector | m_hotspot | ) | [inline] |
Sets hot spot for transform operations.
| m_hotspot | Vector describing the offset from the top left hand corner of the AABB |
Reimplemented in hgeEntityEx.
| void hgePolygon::SetMap | ( | hgePolygonMap * | m_Map | ) | [inline] |
Sets the polygons internal map reference. Used by the map class when registering polygons, end users should rarely need to use this.
| void hgePolygon::SetPosition | ( | hgeVector | pos | ) | [inline] |
Sets the position of a polygon. Usually the top left coordinate of its AABB.
Reimplemented in hgeEntityEx.
| void hgePolygon::SetTexture | ( | HTEXTURE | m_texture, | |
| int | m_blend = -1 | |||
| ) |
Sets the polygons current texture.
| m_texture | HTEXTURE handle to use. | |
| m_blend | Optional HGEBLEND_ mode. |
| void hgePolygon::Shift | ( | hgeVector | amount | ) |
Moves polygon from its current position by a certain amount.
Reimplemented in hgeEntityEx.
| hgeTriangle * hgePolygon::TestGetTriangle | ( | hgeVector | point | ) |
Fetches a triangle from the polygon at given point.
| point | Point to test. |
| bool hgePolygon::TestPoint | ( | hgeVector | point | ) | [inline] |
Simple boolean collision test at given point.
hgeRect hgePolygon::aabb [protected] |
Axis-Aligned Bounding Box (AABB).
hgeVector hgePolygon::center [protected] |
Center point of AABB.
| hgeProperties hgePolygon::entity_data |
Entity Properties data - contains any entity data set in the polygon editor.
HGE* hgePolygon::hge [protected] |
HGE Interface.
bool hgePolygon::is_entity [protected] |
Determines whether it is safe to cast this to a hgeEntity.
class hgePolygonMap* hgePolygon::map [protected] |
Map Reference.
hgeSprite* hgePolygon::sprite [protected] |
Point entity sprite.
| hgePolyData hgePolygon::texture_data |
Texturing + Style data - whether or not its bordered, border heights, texture stretch, etc.
| std::vector<hgeTriangle *> hgePolygon::triangles |
Array of triangles that make up the polygon.
| std::vector<hgePVertex *> hgePolygon::vertices |
Array of vertices that make up the polygon, in clockwise order.
1.5.8