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

Method DrawTriangles

Source/Engine/Debug/DebugDraw.cpp:1545–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1543}
1544
1545void DebugDraw::DrawTriangles(const Span<Float3>& vertices, const Color& color, float duration, bool depthTest)
1546{
1547 CHECK(vertices.Length() % 3 == 0);
1548 DebugTriangle t;
1549 t.Color = Color32(color);
1550 t.TimeLeft = duration;
1551 auto dst = AppendTriangles(vertices.Length() / 3, duration, depthTest);
1552 const Float3 origin = Context->Origin;
1553 for (int32 i = 0; i < vertices.Length();)
1554 {
1555 t.V0 = vertices.Get()[i++] - origin;
1556 t.V1 = vertices.Get()[i++] - origin;
1557 t.V2 = vertices.Get()[i++] - origin;
1558 *dst++ = t;
1559 }
1560}
1561
1562void DebugDraw::DrawTriangles(const Span<Float3>& vertices, const Matrix& transform, const Color& color, float duration, bool depthTest)
1563{

Callers 1

DrawEditorGridMethod · 0.45

Calls 7

AddOneMethod · 0.80
TransformClass · 0.70
Color32Class · 0.50
LengthMethod · 0.45
GetMethod · 0.45
GetSizeMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected