MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / DrawWireArrow

Method DrawWireArrow

Source/Engine/Debug/DebugDraw.cpp:2201–2216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2199}
2200
2201void DebugDraw::DrawWireArrow(const Vector3& position, const Quaternion& orientation, float scale, float capScale, const Color& color, float duration, bool depthTest)
2202{
2203 Float3 direction, up, right;
2204 Float3::Transform(Float3::Forward, orientation, direction);
2205 Float3::Transform(Float3::Up, orientation, up);
2206 Float3::Transform(Float3::Right, orientation, right);
2207 const Vector3 end = position + direction * (100.0f * scale);
2208 const Vector3 capEnd = end - (direction * (100 * Math::Min(capScale, scale * 0.5f)));
2209 const float arrowSidesRatio = Math::Min(capScale, scale * 0.5f) * 30.0f;
2210
2211 DrawLine(position, end, color, duration, depthTest);
2212 DrawLine(end, capEnd + up * arrowSidesRatio, color, duration, depthTest);
2213 DrawLine(end, capEnd - up * arrowSidesRatio, color, duration, depthTest);
2214 DrawLine(end, capEnd + right * arrowSidesRatio, color, duration, depthTest);
2215 DrawLine(end, capEnd - right * arrowSidesRatio, color, duration, depthTest);
2216}
2217
2218void DebugDraw::DrawBox(const BoundingBox& box, const Color& color, float duration, bool depthTest)
2219{

Callers 2

OnDebugDrawMethod · 0.45
OnDebugDrawMethod · 0.45

Calls 3

DrawLineFunction · 0.85
TransformClass · 0.70
MinFunction · 0.50

Tested by

no test coverage detected