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

Method DrawCylinder

trinity/Tr2DebugRenderer.cpp:381–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381void Tr2DebugRenderer::DrawCylinder( Tr2DebugObjectReference owner, const Matrix& transform, float radius, float height, uint32_t segments, Effect effect, Tr2DebugColor color )
382{
383 const Vector2 vertices[] = { Vector2( -height / 2, 0 ), Vector2( -height / 2, radius ), Vector2( height / 2, radius ), Vector2( height / 2, 0 ) };
384 const Vector2 normals[] = { Vector2( -1, 0 ), Vector2( -1, 0 ), Vector2( 0, 1 ), Vector2( 0, 1 ), Vector2( 1, 0 ), Vector2( 1, 0 ) };
385 DrawExtrusionShape( owner, transform, vertices, normals, sizeof( vertices ) / sizeof( vertices[0] ), segments, effect, color );
386}
387
388void Tr2DebugRenderer::DrawCylinder( Tr2DebugObjectReference owner, const Vector3& cap0, const Vector3& cap1, float radius, uint32_t segments, Effect effect, Tr2DebugColor color )
389{

Callers

nothing calls this directly

Calls 1

LineTransformFunction · 0.85

Tested by

no test coverage detected