54 inline laPoint3 _displacement_vector(
const laTimer &t,
const laPoint3 ve )
const{
55 return ve * (t.delta()*
M_UNIT);
59 void _sim_gravitation(laTimer &t);
60 laPoint3 _sim_collisions(laTimer &t);
66 static unsigned long _nDomains;
77 laPoint3 ptGeometryOffset;
87 M_BOOL bSimulateGravitation;
88 M_BOOL bSimulateCollision;
106 inline void simulate(laTimer &t)
108 PROFILE_COL(laPivot_simulate);
111 if(bSimulateCollision)
113 ASSERT(_pCollider,
"Nil collider");
114 ASSERT(_pFirstDomain,
"Nil first collision domain domain");
116 if( bSimulateGravitation ) _sim_gravitation(t);
118 dv = _sim_collisions(t);
120 else dv = _displacement_vector(t, velocity);
128 void projectShadow();
133 laPoint3 projectVector( laPoint3 vector, M_BOOL *pTrapFlag = NULL,
rpgTrap** ppTrap = NULL);
138 _pFirstDomain = pfirst;
145 laPivot &operator =(
const laPoint3 &pt) {
146 x( pt.x() ); y( pt.y() ); z( pt.z() );
158 #endif //#ifndef M_PH_POINT_H
#define M_UNIT
Unit of 1 meter.
Collision Detection and Response.