| 34 | #include "Engine/Core/Math/Color.h" |
| 35 | |
| 36 | void SphericalJoint::OnDebugDrawSelected() |
| 37 | { |
| 38 | const Vector3 source = GetPosition(); |
| 39 | const Vector3 target = GetTargetPosition(); |
| 40 | const float size = 15.0f; |
| 41 | const float arrowSize = size / 100.0f * 0.5f; |
| 42 | const Color color = Color::Green.AlphaMultiplied(0.6f); |
| 43 | DEBUG_DRAW_WIRE_ARROW(source, GetOrientation(), arrowSize, arrowSize * 0.5f, Color::Red, 0, false); |
| 44 | if (EnumHasAnyFlags(_flags, SphericalJointFlag::Limit)) |
| 45 | { |
| 46 | DEBUG_DRAW_CONE(source, GetOrientation(), size, _limit.YLimitAngle * DegreesToRadians, _limit.ZLimitAngle * DegreesToRadians, color, 0, false); |
| 47 | } |
| 48 | else |
| 49 | { |
| 50 | DEBUG_DRAW_SPHERE(BoundingSphere(source, size), color, 0, false); |
| 51 | } |
| 52 | DEBUG_DRAW_LINE(source, target, Color::Green * 0.6f, 0, false); |
| 53 | |
| 54 | // Base |
| 55 | Joint::OnDebugDrawSelected(); |
| 56 | } |
| 57 | |
| 58 | #endif |
| 59 |
nothing calls this directly
no test coverage detected