sio2_sensor.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SIO2sensor

Functions

typedef void (SIO2sensordistance(void *, float))
 Distance sensor function callback.
typedef void (SIO2sensorray(void *, vec3 *))
 Physic ray function callback.
typedef void (SIO2sensorcontact(void *))
 Contact function callback.
typedef void (SIO2sensorcollision(void *))
 Collision function callback.
SIO2sensorsio2SensorInitDistance (char *, SIO2object *, SIO2object *, float, SIO2sensordistance *)
SIO2sensorsio2SensorInitRay (char *, vec3 *, vec3 *, SIO2physic *, SIO2sensorray *)
SIO2sensorsio2SensorInitContact (char *, SIO2object *, SIO2object *, SIO2sensorcontact *)
SIO2sensorsio2SensorInitCollision (char *, SIO2object *, SIO2object *, SIO2sensorcollision *)
SIO2sensorsio2SensorFree (SIO2sensor *)
void sio2SensorEvaluate (SIO2sensor *, SIO2physic *)


Function Documentation

void sio2SensorEvaluate ( SIO2sensor _SIO2sensor,
SIO2physic _SIO2physic 
)

Evaluate the state of an SIO2sensor. This function is basically called by sio2ResourceRender when asked to evaluate the sensor. This function will analyze and dispatch the information to the appropriate callback depending on the type (or multi-type) of SIO2sensor we are dealing with.

_SIO2sensor: A valid SIO2sensor pointer.

References SIO2physic::_btSoftRigidDynamicsWorld, SIO2sensor::_SIO2object0, SIO2sensor::_SIO2object1, SIO2sensor::_SIO2physic, SIO2sensor::_SIO2sensorcollision, SIO2sensor::_SIO2sensordistance, SIO2sensor::_SIO2sensorray, SIO2object::_SIO2transform, SIO2sensor::dist, SIO2sensor::from, SIO2sensor::hit_point, SIO2transform::loc, sio2Distance(), SIO2sensor::threshold, SIO2sensor::to, vec3::x, vec3::y, and vec3::z.

Referenced by sio2ResourceRender().

Here is the call graph for this function:

SIO2sensor* sio2SensorFree ( SIO2sensor _SIO2sensor  ) 

Free an SIO2sensor. The SIO2sensor will be removed from the current sio2->SIO2resource handle.

_SIO2sensor: A valid SIO2sensor pointer.

return a NULL SIO2sensor pointer.

References SIO2sensor::_SIO2object0, SIO2sensor::_SIO2object1, SIO2::_SIO2resource, sio2, SIO2_SENSOR, sio2ObjectDisableObjectCollisionCallback(), and sio2ResourceDel().

Referenced by sio2ResourceUnload().

Here is the call graph for this function:

SIO2sensor* sio2SensorInitCollision ( char _name,
SIO2object _SIO2object0,
SIO2object _SIO2object1,
SIO2sensorcollision *  _SIO2sensorcollision 
)

Helper function that create a collision callback sensor. The new SIO2physic pointer will be added to the global sio2 SIO2resource handle.

_name: The name of the SIO2sensor. _SIO2object0: The first collision object. _SIO2object1: The second collision object. _SIO2sensorcollision: The function callback called when the 2 objects collide.

return a new SIO2sensor handle.

References SIO2sensor::_SIO2object0, SIO2sensor::_SIO2object1, SIO2::_SIO2resource, SIO2sensor::_SIO2sensorcollision, SIO2sensor::name, sio2, SIO2_SENSOR, sio2ResourceAdd(), and sio2StringCpy().

Here is the call graph for this function:

SIO2sensor* sio2SensorInitContact ( char _name,
SIO2object _SIO2object0,
SIO2object _SIO2object1,
SIO2sensorcontact *  _SIO2sensorcontact 
)

Helper function that create a contact callback sensor. The new SIO2physic pointer will be added to the global sio2 SIO2resource handle.

_name: The name of the SIO2sensor. _SIO2object0: The first collision object. _SIO2object1: The second collision object. _SIO2sensorcontact: The function callback called when a contact point is created between 2 objects.

return a new SIO2sensor handle.

References SIO2sensor::_SIO2object0, SIO2sensor::_SIO2object1, SIO2::_SIO2resource, SIO2sensor::_SIO2sensorcontact, SIO2sensor::name, sio2, SIO2_SENSOR, sio2ObjectEnableObjectCollisionCallback(), sio2PhysicContactCallback(), sio2ResourceAdd(), and sio2StringCpy().

Here is the call graph for this function:

SIO2sensor* sio2SensorInitDistance ( char _name,
SIO2object _SIO2object0,
SIO2object _SIO2object1,
float  _threshold,
SIO2sensordistance *  _SIO2sensordistance 
)

Helper function that initialize a distance sensor. The new SIO2physic pointer will be added to the global sio2 SIO2resource handle.

_name: The name of the SIO2sensor.
_SIO2object0: The first SIO2object to track.
_SIO2object1: The second SIO2object to track the distance with.
_threshold: The minimum distance that will trigger the SIO2sensordistance callback.
_SIO2sensordistance: The function callback to call when the 2 objects are lower than the specified treshold.

return a new SIO2sensor handle.

References SIO2sensor::_SIO2object0, SIO2sensor::_SIO2object1, SIO2::_SIO2resource, SIO2sensor::_SIO2sensordistance, SIO2sensor::name, sio2, SIO2_SENSOR, sio2ResourceAdd(), sio2StringCpy(), and SIO2sensor::threshold.

Here is the call graph for this function:

SIO2sensor* sio2SensorInitRay ( char _name,
vec3 _from,
vec3 _to,
SIO2physic _SIO2physic,
SIO2sensorray *  _SIO2sensorray 
)

Helper function that initialize a collision ray sensor. The new SIO2physic pointer will be added to the global sio2 SIO2resource handle.

_name: The name of the SIO2sensor.
_from: The world XYZ position where the ray should be casted. _to: The world XYZ position where the ray should stop. _SIO2physic: The physic world to use when cast the ray. _SIO2sensorray: The function callback when the ray get a hit in the world.

return a new SIO2sensor handle.

References SIO2sensor::_SIO2physic, SIO2::_SIO2resource, SIO2sensor::_SIO2sensorray, SIO2sensor::from, SIO2sensor::name, sio2, SIO2_SENSOR, sio2ResourceAdd(), sio2StringCpy(), and SIO2sensor::to.

Here is the call graph for this function:

typedef void ( SIO2sensorcollision(void *)   ) 

Collision function callback.

typedef void ( SIO2sensorcontact(void *)   ) 

Contact function callback.

typedef void ( SIO2sensorray(void *, vec3 *)   ) 

Physic ray function callback.

typedef void ( SIO2sensordistance(void *, float)   ) 

Distance sensor function callback.


Generated on Thu Mar 4 15:41:49 2010 for SIO2 Engine by  doxygen 1.5.6