57void btCollisionShape::calculateTemporalAabb(
const btTransform& curTrans,
const btVector3& linvel,
const btVector3& angvel,
btScalar timeStep, btVector3& temporalAabbMin, btVector3& temporalAabbMax)
const
60 getAabb(curTrans, temporalAabbMin, temporalAabbMax);
62 btScalar temporalAabbMaxx = temporalAabbMax.getX();
63 btScalar temporalAabbMaxy = temporalAabbMax.getY();
64 btScalar temporalAabbMaxz = temporalAabbMax.getZ();
65 btScalar temporalAabbMinx = temporalAabbMin.getX();
66 btScalar temporalAabbMiny = temporalAabbMin.getY();
67 btScalar temporalAabbMinz = temporalAabbMin.getZ();
70 btVector3 linMotion = linvel * timeStep;
73 temporalAabbMaxx += linMotion.x();
75 temporalAabbMinx += linMotion.x();
77 temporalAabbMaxy += linMotion.y();
79 temporalAabbMiny += linMotion.y();
81 temporalAabbMaxz += linMotion.z();
83 temporalAabbMinz += linMotion.z();
87 btVector3 angularMotion3d(angularMotion, angularMotion, angularMotion);
88 temporalAabbMin =
btVector3(temporalAabbMinx, temporalAabbMiny, temporalAabbMinz);
89 temporalAabbMax =
btVector3(temporalAabbMaxx, temporalAabbMaxy, temporalAabbMaxz);
91 temporalAabbMin -= angularMotion3d;
92 temporalAabbMax += angularMotion3d;
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicat...
virtual bool serialize(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) const
Data buffer MUST be 16 byte aligned.