Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
| Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
| #include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" | #include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" | ||||
| class WrapperVehicle; | class WrapperVehicle; | ||||
| class btPersistentManifold; | class btPersistentManifold; | ||||
| class btBroadphaseInterface; | class btBroadphaseInterface; | ||||
| struct btDbvtBroadphase; | struct btDbvtBroadphase; | ||||
| class btOverlappingPairCache; | class btOverlappingPairCache; | ||||
| class btIDebugDraw; | class btIDebugDraw; | ||||
| class btDynamicsWorld; | |||||
| class PHY_IVehicle; | class PHY_IVehicle; | ||||
| class CcdOverlapFilterCallBack; | class CcdOverlapFilterCallBack; | ||||
| class CcdShapeConstructionInfo; | class CcdShapeConstructionInfo; | ||||
| /** CcdPhysicsEnvironment is an experimental mainloop for physics simulation using optional continuous collision detection. | /** CcdPhysicsEnvironment is an experimental mainloop for physics simulation using optional continuous collision detection. | ||||
| * Physics Environment takes care of stepping the simulation and is a container for physics entities. | * Physics Environment takes care of stepping the simulation and is a container for physics entities. | ||||
| * It stores rigidbodies,constraints, materials etc. | * It stores rigidbodies,constraints, materials etc. | ||||
| * A derived class may be able to 'construct' entities by loading and/or converting | * A derived class may be able to 'construct' entities by loading and/or converting | ||||
| ▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | virtual int GetNumTimeSubSteps() | ||||
| return m_numTimeSubSteps; | return m_numTimeSubSteps; | ||||
| } | } | ||||
| virtual void BeginFrame(); | virtual void BeginFrame(); | ||||
| virtual void EndFrame() {} | virtual void EndFrame() {} | ||||
| /// Perform an integration step of duration 'timeStep'. | /// Perform an integration step of duration 'timeStep'. | ||||
| virtual bool ProceedDeltaTime(double curTime,float timeStep,float interval); | virtual bool ProceedDeltaTime(double curTime,float timeStep,float interval); | ||||
| /** | |||||
| * Called by Bullet for every physical simulation (sub)tick. | |||||
| * Our constructor registers this callback to Bullet, which stores a pointer to 'this' in | |||||
| * the btDynamicsWorld::getWorldUserInfo() pointer. | |||||
| */ | |||||
| static void StaticSimulationSubtickCallback(btDynamicsWorld *world, btScalar timeStep); | |||||
| void SimulationSubtickCallback(btScalar timeStep); | |||||
| virtual void DebugDrawWorld(); | virtual void DebugDrawWorld(); | ||||
| // virtual bool proceedDeltaTimeOneStep(float timeStep); | // virtual bool proceedDeltaTimeOneStep(float timeStep); | ||||
| virtual void SetFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep) | virtual void SetFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep) | ||||
| { | { | ||||
| SetNumTimeSubSteps((int)(fixedTimeStep / KX_KetsjiEngine::GetTicRate())); | SetNumTimeSubSteps((int)(fixedTimeStep / KX_KetsjiEngine::GetTicRate())); | ||||
| } | } | ||||
| //returns 0.f if no fixed timestep is used | //returns 0.f if no fixed timestep is used | ||||
| ▲ Show 20 Lines • Show All 190 Lines • Show Last 20 Lines | |||||