| 71 | } |
| 72 | |
| 73 | void BoxVolume::OnDebugDrawSelected() |
| 74 | { |
| 75 | const Color color = GetWiresColor(); |
| 76 | DEBUG_DRAW_WIRE_BOX(_bounds, color * 0.3f, 0, false); |
| 77 | |
| 78 | Vector3 sideLinks[] = |
| 79 | { |
| 80 | Vector3(0.5f, 0, 0), |
| 81 | Vector3(-0.5f, 0, 0), |
| 82 | Vector3(0, 0.5f, 0), |
| 83 | Vector3(0, -0.5f, 0), |
| 84 | Vector3(0, 0, 0.5f), |
| 85 | Vector3(0, 0, -0.5f), |
| 86 | }; |
| 87 | Vector3 sideLinksFinal[6]; |
| 88 | for (int32 i = 0; i < 6; i++) |
| 89 | { |
| 90 | sideLinksFinal[i] = sideLinks[i] * _size; |
| 91 | _transform.LocalToWorld(sideLinksFinal[i], sideLinksFinal[i]); |
| 92 | } |
| 93 | for (int32 i = 0; i < 6; i++) |
| 94 | { |
| 95 | DEBUG_DRAW_WIRE_SPHERE(BoundingSphere(sideLinksFinal[i], 10.0f), Color::YellowGreen, 0, true); |
| 96 | } |
| 97 | |
| 98 | Vector3 corners[8]; |
| 99 | _bounds.GetCorners(corners); |
| 100 | const float margin = 2.0f; |
| 101 | const Color wiresColor = color.AlphaMultiplied(0.8f); |
| 102 | DEBUG_DRAW_BOX(GetWriteBox(corners[0], corners[1], margin), wiresColor, 0, true); |
| 103 | DEBUG_DRAW_BOX(GetWriteBox(corners[0], corners[3], margin), wiresColor, 0, true); |
| 104 | DEBUG_DRAW_BOX(GetWriteBox(corners[0], corners[4], margin), wiresColor, 0, true); |
| 105 | DEBUG_DRAW_BOX(GetWriteBox(corners[1], corners[2], margin), wiresColor, 0, true); |
| 106 | DEBUG_DRAW_BOX(GetWriteBox(corners[1], corners[5], margin), wiresColor, 0, true); |
| 107 | DEBUG_DRAW_BOX(GetWriteBox(corners[2], corners[3], margin), wiresColor, 0, true); |
| 108 | DEBUG_DRAW_BOX(GetWriteBox(corners[2], corners[6], margin), wiresColor, 0, true); |
| 109 | DEBUG_DRAW_BOX(GetWriteBox(corners[3], corners[7], margin), wiresColor, 0, true); |
| 110 | DEBUG_DRAW_BOX(GetWriteBox(corners[4], corners[5], margin), wiresColor, 0, true); |
| 111 | DEBUG_DRAW_BOX(GetWriteBox(corners[4], corners[7], margin), wiresColor, 0, true); |
| 112 | DEBUG_DRAW_BOX(GetWriteBox(corners[5], corners[6], margin), wiresColor, 0, true); |
| 113 | DEBUG_DRAW_BOX(GetWriteBox(corners[6], corners[7], margin), wiresColor, 0, true); |
| 114 | |
| 115 | // Base |
| 116 | Actor::OnDebugDrawSelected(); |
| 117 | } |
| 118 | |
| 119 | #endif |
| 120 |
nothing calls this directly
no test coverage detected