MCPcopy Create free account
hub / github.com/carbonengine/trinity / DrawCone

Method DrawCone

trinity/Tr2DebugRenderer.cpp:400–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400void Tr2DebugRenderer::DrawCone( Tr2DebugObjectReference owner, const Matrix& transform, float radius, float height, uint32_t segments, Effect effect, Tr2DebugColor color )
401{
402 const Vector2 vertices[] = { Vector2( -height / 2, 0 ), Vector2( -height / 2, radius ), Vector2( height / 2, 0 ) };
403 Vector2 n( vertices[2] - vertices[1] );
404 n = XMVector2Normalize( Vector2( -n.y, n.x ) );
405 const Vector2 normals[] = { Vector2( -1, 0 ), Vector2( -1, 0 ), n, n };
406 DrawExtrusionShape( owner, transform, vertices, normals, sizeof( vertices ) / sizeof( vertices[0] ), segments, effect, color );
407}
408
409void Tr2DebugRenderer::DrawCone( Tr2DebugObjectReference owner, const Vector3& base, const Vector3& focal, float radius, uint32_t segments, Effect effect, Tr2DebugColor color )
410{

Callers

nothing calls this directly

Calls 2

LineTransformFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected