cAlert Class Reference

#include <cAlert.h>

Inheritance diagram for cAlert:
cObject

List of all members.

Classes

struct  rShape

Public Member Functions

 cAlert (float *center, float *range, int shapetype, std::string message, OID group, bool positive=true, bool posedge=true, bool once=false, OID fusedelay=0)
virtual float constrainParticle (float *worldpos, float radius=0.0f, float *localpos=NULL, cObject *enactor=NULL)
virtual void drawEffect ()
 Render translucent object-parts and visual effects.

Detailed Description

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. Likewise switching alerts on and off would present opportunities.

A cone or pyramid for detection would make a nice surveilance camera.


Member Function Documentation

float cAlert::constrainParticle ( float *  worldpos,
float  radius = 0.0f,
float *  localpos = NULL,
cObject enactor = NULL 
) [virtual]

Constrain the given world position particle (with 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.

Returns:
the intrusion depth.

Reimplemented from cObject.


The documentation for this class was generated from the following files:
Generated on Fri Aug 27 16:01:36 2010 for Linwarrior 3D by  doxygen 1.6.3