| 1830 | } |
| 1831 | |
| 1832 | void DebugDraw::DrawCapsule(const Vector3& position, const Quaternion& orientation, float radius, float length, const Color& color, float duration, bool depthTest) |
| 1833 | { |
| 1834 | // Check if has no length (just sphere) |
| 1835 | if (length < ZeroTolerance) |
| 1836 | { |
| 1837 | DrawSphere(BoundingSphere(position, radius), color, duration, depthTest); |
| 1838 | } |
| 1839 | else |
| 1840 | { |
| 1841 | const Float3 dir = orientation * Float3::Forward; |
| 1842 | radius = Math::Max(radius, 0.05f); |
| 1843 | length = Math::Max(length, 0.05f); |
| 1844 | const float halfLength = length / 2.0f; |
| 1845 | DrawSphere(BoundingSphere(position + dir * halfLength, radius), color, duration, depthTest); |
| 1846 | DrawSphere(BoundingSphere(position - dir * halfLength, radius), color, duration, depthTest); |
| 1847 | DrawCylinder(position, orientation * Quaternion::Euler(90.0f, 0, 0), radius, length, color, duration, depthTest); |
| 1848 | } |
| 1849 | } |
| 1850 | |
| 1851 | void DebugDraw::DrawWireTube(const Vector3& position, const Quaternion& orientation, float radius, float length, const Color& color, float duration, bool depthTest) |
| 1852 | { |
nothing calls this directly
no test coverage detected