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

Method DrawLine

Source/Engine/Debug/DebugDraw.cpp:1117–1134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1115}
1116
1117void DebugDraw::DrawLine(const Vector3& start, const Vector3& end, const Color& color, float duration, bool depthTest)
1118{
1119 PROFILE_MEM(EngineDebug);
1120 const Float3 startF = start - Context->Origin, endF = end - Context->Origin;
1121 auto& debugDrawData = depthTest ? Context->DebugDrawDepthTest : Context->DebugDrawDefault;
1122 if (duration > 0)
1123 {
1124 DebugLine l = { startF, endF, Color32(color), duration };
1125 debugDrawData.DefaultLines.Add(l);
1126 }
1127 else
1128 {
1129 Vertex l = { startF, Color32(color) };
1130 debugDrawData.OneFrameLines.Add(l);
1131 l.Position = endF;
1132 debugDrawData.OneFrameLines.Add(l);
1133 }
1134}
1135
1136void DebugDraw::DrawLine(const Vector3& start, const Vector3& end, const Color& startColor, const Color& endColor, float duration, bool depthTest)
1137{

Callers 1

DrawMethod · 0.45

Calls 2

Color32Class · 0.50
AddMethod · 0.45

Tested by

no test coverage detected