| 542 | |
| 543 | #if PX_ENABLE_DEBUG_VISUALIZATION |
| 544 | void NpRigidDynamic::visualize(Cm::RenderOutput& out, NpScene* npScene) |
| 545 | { |
| 546 | NpRigidDynamicT::visualize(out, npScene); |
| 547 | |
| 548 | if (getScbBodyFast().getActorFlags() & PxActorFlag::eVISUALIZATION) |
| 549 | { |
| 550 | PX_ASSERT(npScene); |
| 551 | const PxReal scale = npScene->getVisualizationParameter(PxVisualizationParameter::eSCALE); |
| 552 | |
| 553 | const PxReal massAxes = scale * npScene->getVisualizationParameter(PxVisualizationParameter::eBODY_MASS_AXES); |
| 554 | if (massAxes != 0.0f) |
| 555 | { |
| 556 | PxReal sleepTime = getScbBodyFast().getWakeCounter() / npScene->getWakeCounterResetValueInteral(); |
| 557 | PxU32 color = PxU32(0xff * (sleepTime>1.0f ? 1.0f : sleepTime)); |
| 558 | color = getScbBodyFast().isSleeping() ? 0xff0000 : (color<<16 | color<<8 | color); |
| 559 | PxVec3 dims = invertDiagInertia(getScbBodyFast().getInverseInertia()); |
| 560 | dims = getDimsFromBodyInertia(dims, 1.0f / getScbBodyFast().getInverseMass()); |
| 561 | |
| 562 | out << color << getScbBodyFast().getBody2World() << Cm::DebugBox(dims * 0.5f); |
| 563 | } |
| 564 | } |
| 565 | } |
| 566 | #endif |
nothing calls this directly
no test coverage detected