processed a lot of feedback: added 'realtime' simulation with fixed substeps (and clamping maximum number of substeps), this means that when stepSimulation is called with smaller timesteps then 'fixed substep' the motionstate is interpolated.
renamed m_ccdSweptSphereRadius, enabled wireframe debugDrawObject (using debugDrawer)
This commit is contained in:
@@ -45,6 +45,10 @@ protected:
|
||||
|
||||
btVector3 m_gravity;
|
||||
|
||||
//for variable timesteps
|
||||
float m_localTime;
|
||||
//for variable timesteps
|
||||
|
||||
bool m_ownsIslandManager;
|
||||
bool m_ownsConstraintSolver;
|
||||
|
||||
@@ -74,6 +78,7 @@ protected:
|
||||
|
||||
void saveKinematicState(float timeStep);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@@ -84,8 +89,9 @@ public:
|
||||
btDiscreteDynamicsWorld();
|
||||
|
||||
virtual ~btDiscreteDynamicsWorld();
|
||||
|
||||
virtual void stepSimulation( float timeStep, int numSubsteps=1);
|
||||
|
||||
///if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's
|
||||
virtual int stepSimulation( float timeStep,int maxSubSteps=1, float fixedTimeStep=1.f/60.f);
|
||||
|
||||
virtual void updateAabbs();
|
||||
|
||||
@@ -128,6 +134,9 @@ public:
|
||||
|
||||
virtual void removeRigidBody(btRigidBody* body);
|
||||
|
||||
void debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //BT_DISCRETE_DYNAMICS_WORLD_H
|
||||
|
||||
Reference in New Issue
Block a user