#include <cAlert.h>
Classes | |
struct | rShape |
Public Member Functions | |
virtual float | constrainParticle (float *worldpos, float radius=0.0f, float *localpos=NULL) |
Checks a defined area for certain intruding objects (most likely the player). When such an intrusion is detected a message is sent to a given group of objects. Those receivers may then react on that message.
Some ideas:
Some further ideas: Message aggregation and processing objects for and, or, xor, forwarding, would allow extended mission scripting.
virtual float cAlert::constrainParticle | ( | float * | worldpos, | |
float | radius = 0.0f , |
|||
float * | localpos = NULL | |||
) | [inline, virtual] |
Constrain the given world position particle or given radius to the object boundary hull ie. place the worldpos to the nearest boundary hull position if the worldpos is inside the object's hull. localpos delivers in case of impact the local position relative to the object of the corrected worldpos. input location vector in world coordinates. radius of the checked particle in world dimensions. output adjusted location vector.
Reimplemented from cObject.