20 #ifdef DEBUG_SPU_COLLISION_DETECTION
23 #define spu_printf printf
25 #endif //DEBUG_SPU_COLLISION_DETECTION
42 btScalar friction = friction0*friction1;
46 if (friction < -MAX_FRICTION)
47 friction = -MAX_FRICTION;
48 if (friction > MAX_FRICTION)
49 friction = MAX_FRICTION;
56 return restitution0*restitution1;
102 #ifdef DEBUG_SPU_COLLISION_DETECTION
103 spu_printf(
"SPU: contactTreshold %f\n",contactTreshold);
104 #endif //DEBUG_SPU_COLLISION_DETECTION
121 normal = normalOnBInWorld * -1;
122 pointA = pointInWorld + normal * depth;
124 localB = transB.
invXform(pointInWorld);
128 normal = normalOnBInWorld;
129 pointA = pointInWorld + normal * depth;
131 localB = transB.
invXform(pointInWorld);
143 if (insertIndex >= 0)
178 #if defined (__SPU__) || defined (USE_LIBSPE2)
191 #ifdef DEBUG_SPU_COLLISION_DETECTION
192 spu_printf(
"*** SpuContactResult::addContactPoint: depth = %f\n",depth);
193 spu_printf(
"*** normal = %f,%f,%f\n",normalOnBInWorld.
getX(),normalOnBInWorld.
getY(),normalOnBInWorld.
getZ());
195 #endif //DEBUG_SPU_COLLISION_DETECTION
198 #ifdef DEBUG_SPU_COLLISION_DETECTION
201 #endif //DEBUG_SPU_COLLISION_DETECTION
233 #ifdef DEBUG_SPU_COLLISION_DETECTION
234 spu_printf(
"SPU: Start SpuContactResult::flush (Put) DMA\n");
237 #endif //DEBUG_SPU_COLLISION_DETECTION
240 #ifdef DEBUG_SPU_COLLISION_DETECTION
242 #endif //DEBUG_SPU_COLLISION_DETECTION
void backBufferDmaPut(uint64_t ea, unsigned int numBytes, unsigned int tag)
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
int getCacheEntry(const btManifoldPoint &newPoint) const
void refreshContactPoints(const btTransform &trA, const btTransform &trB)
calculated new worldspace coordinates and depth, and reject points that exceed the collision margin ...
btScalar getContactBreakingThreshold() const
btScalar m_combinedRestitution
ManifoldContactPoint collects and maintains persistent contactpoints.
const btScalar & getZ() const
Return the z value.
btVector3 m_positionWorldOnB
const btScalar & getY() const
Return the y value.
const btScalar & getX() const
Return the x value.
btVector3 m_positionWorldOnA
m_positionWorldOnA is redundant information, see getPositionWorldOnA(), but for clarity ...
btVector3 can be used to represent 3D points and vectors.
int getNumContacts() const
btScalar m_combinedFriction
void replaceContactPoint(const btManifoldPoint &newPoint, int insertIndex)
int addManifoldPoint(const btManifoldPoint &newPoint, bool isPredictive=false)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...