#include <qafCollisionStruct.h>
Inheritance diagram for qaf::CollisionStruct::Composite:
Using a composite collision structure allows the representation of non-contiguous areas, or complex shapes that would otherwise require a polygon.
The Composite
class is, essentially, a Container
of CollisionStruct
s, so you can use any method from the container class to add, remove, and manipulate its elements.
delete
d automatically. You must delete
them yourself.
Public Member Functions | |
Composite (CollisionStruct *const elems[], int nCount) | |
Initializes the composite with the supplied structures. | |
Composite () | |
Initializes an empty composite. | |
void | render (float scrollX, float scrollY, unsigned long color) |
bool | collidesWith (CollisionStruct *otherStruct) |
bool | hasPoint (float x, float y) |
bool | pointIntersection (float x1, float y1, float x2, float y2, Vector2D *pContact, Vector2D *pNormal) |
void | move (float dx, float dy) |