void CrowdAgent::DrawDebugGeometry(bool depthTest) { Scene* scene = GetScene(); if (scene) { DebugRenderer* debug = scene->GetComponent<DebugRenderer>(); if (debug) DrawDebugGeometry(debug, depthTest); } }
void TileMap2D::DrawDebugGeometry() { Scene* scene = GetScene(); if (!scene) return; DebugRenderer* debug = scene->GetComponent<DebugRenderer>(); if (!debug) return; DrawDebugGeometry(debug, false); }
void PhysicsWorld::Simulate(f64 frametime) { if (!runPhysics_) return; PROFILE(PhysicsWorld_Simulate); emit AboutToUpdate((float)frametime); { PROFILE(Bullet_stepSimulation); ///\note Do not delete or rename this PROFILE() block. The DebugStats profiler uses this string as a label to know where to inject the Bullet internal profiling data. // Use variable timestep if enabled, and if frame timestep exceeds the single physics simulation substep if (useVariableTimestep_ && frametime > physicsUpdatePeriod_) { float clampedTimeStep = (float)frametime; if (clampedTimeStep > 0.1f) clampedTimeStep = 0.1f; // Advance max. 1/10 sec. during one frame world_->stepSimulation(clampedTimeStep, 0, clampedTimeStep); } else world_->stepSimulation((float)frametime, maxSubSteps_, physicsUpdatePeriod_); } // Automatically enable debug geometry if at least one debug-enabled rigidbody. Automatically disable if no debug-enabled rigidbodies // However, do not do this if user has used the physicsdebug console command if (!drawDebugManuallySet_) { if (!IsDebugGeometryEnabled() && !debugRigidBodies_.empty()) SetDebugGeometryEnabled(true); if (IsDebugGeometryEnabled() && debugRigidBodies_.empty()) SetDebugGeometryEnabled(false); } if (IsDebugGeometryEnabled()) DrawDebugGeometry(); }
// ---------------------------------------------------------------------------- void IKSolver::DrawDebugGeometry(bool depthTest) { DebugRenderer* debug = GetScene()->GetComponent<DebugRenderer>(); if (debug) DrawDebugGeometry(debug, depthTest); }