Version 5, last updated by mercior at April 12, 2009 00:26 UTC

 

hgePolygonMap.h

 

Function:

        hgeIntersect Test(  hgeShape *shape, 
hgeVector offset = hgeVector(0,0),
hgePolygon **return_poly = NULL,
int test_type = COLLIDE_STATIC,
std::string class_filter = "",
int layer_filter = -1 );

Description:

Performs a collision test on the map and game entitys.

 

Parameters:

  • hgeShape *shape

A hgeLine, hgeCircle or hgePolygon pointer.

  • hgeVector offset = hgeVector(0,0)

A vector offset. The given shape will be offset by this amount before testing.

  • hgePolygon **return_poly = NULL

A reference to a hgePolygon pointer. If the test succeeds, the pointer will be set to the polygon the test collided with.

  •  int test_type = COLLIDE_STATIC

Test type. COLLIDE_STATIC tests against static entitys & polygons. COLLIDE_DYNAMIC tests against dynamic entitys.

You can perform a faster test on only visible dynamic entitys by using COLLIDE_DYNAMIC + COLLIDE_VISIBLE

  • std::string class_filter = ""

A string filter which can contain an entitys classname. If specified, only polygons & entitys matching the filtername will be tested.

  • int layer_filter = -1

An integer filter specifying a specific layer to perform the collision test on.

 

Returns:

hgeIntersect


Notes:

meh