| 554 | |
| 555 | #if PX_ENABLE_DEBUG_VISUALIZATION |
| 556 | void NpRigidDynamic::visualize(Cm::RenderOutput& out, NpScene* npScene) |
| 557 | { |
| 558 | NpRigidDynamicT::visualize(out, npScene); |
| 559 | |
| 560 | if (getScbBodyFast().getActorFlags() & PxActorFlag::eVISUALIZATION) |
| 561 | { |
| 562 | PX_ASSERT(npScene); |
| 563 | const PxReal scale = npScene->getVisualizationParameter(PxVisualizationParameter::eSCALE); |
| 564 | |
| 565 | const PxReal massAxes = scale * npScene->getVisualizationParameter(PxVisualizationParameter::eBODY_MASS_AXES); |
| 566 | if (massAxes != 0.0f) |
| 567 | { |
| 568 | PxReal sleepTime = getScbBodyFast().getWakeCounter() / npScene->getWakeCounterResetValueInteral(); |
| 569 | PxU32 color = PxU32(0xff * (sleepTime>1.0f ? 1.0f : sleepTime)); |
| 570 | color = getScbBodyFast().isSleeping() ? 0xff0000 : (color<<16 | color<<8 | color); |
| 571 | PxVec3 dims = invertDiagInertia(getScbBodyFast().getInverseInertia()); |
| 572 | dims = getDimsFromBodyInertia(dims, 1.0f / getScbBodyFast().getInverseMass()); |
| 573 | |
| 574 | out << color << getScbBodyFast().getBody2World() << Cm::DebugBox(dims * 0.5f); |
| 575 | } |
| 576 | } |
| 577 | } |
| 578 | #endif |
nothing calls this directly
no test coverage detected