* @brief Draws the skeleton of the animation */
| 377 | * @brief Draws the skeleton of the animation |
| 378 | */ |
| 379 | void AnimHandler::debugDrawSkeleton(const Math::Matrix& transform) |
| 380 | { |
| 381 | ddPush(); |
| 382 | for (size_t i = 0; i < m_MeshLib.getNodes().size(); i++) |
| 383 | { |
| 384 | const ZenLoad::ModelNode& n = m_MeshLib.getNodes()[i]; |
| 385 | const auto& t2 = m_ObjectSpaceNodeTransforms[i].Translation(); |
| 386 | |
| 387 | Math::float3 p2 = transform * t2; |
| 388 | |
| 389 | ddSetTransform((transform * m_ObjectSpaceNodeTransforms[i]).v); |
| 390 | ddDrawAxis(0, 0, 0, 0.04f); |
| 391 | ddDrawAxis(0, 0, 0, -0.04f); |
| 392 | |
| 393 | if (n.parentValid()) |
| 394 | { |
| 395 | const auto& t1 = m_ObjectSpaceNodeTransforms[n.parentIndex].Translation(); |
| 396 | Math::float3 p1 = (transform * t1); |
| 397 | |
| 398 | ddSetTransform(nullptr); |
| 399 | ddSetColor(0xFFFFFFFF); |
| 400 | ddMoveTo(p1.x, p1.y, p1.z); |
| 401 | ddLineTo(p2.x, p2.y, p2.z); |
| 402 | } |
| 403 | } |
| 404 | ddPop(); |
| 405 | } |
| 406 | |
| 407 | /** |
| 408 | * @brief Updates the given skeletalmesh-info |
nothing calls this directly
no test coverage detected