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

Method DrawAxes

trinity/RenderJob/TriStepRenderDebug.cpp:203–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void TriStepRenderDebug::DrawAxes( const Matrix& m, float scale )
204{
205 Vector3 origin = TransformCoord( Vector3( 0.0f, 0.0f, 0.0f ), m );
206 Vector3 xAxis = TransformCoord( Vector3( scale, 0.0f, 0.0f ), m );
207 Vector3 yAxis = TransformCoord( Vector3( 0.0f, scale, 0.0f ), m );
208 Vector3 zAxis = TransformCoord( Vector3( 0.0f, 0.0f, scale ), m );
209
210 m_lineSet->Add( origin, 0xffff0000, xAxis, 0xffff0000 );
211 m_lineSet->Add( origin, 0xff00ff00, yAxis, 0xff00ff00 );
212 m_lineSet->Add( origin, 0xff0000ff, zAxis, 0xff0000ff );
213}
214
215void TriStepRenderDebug::Print2D( int x, int y, uint32_t color, const std::string& msg )
216{

Callers

nothing calls this directly

Calls 2

Vector3Class · 0.50
AddMethod · 0.45

Tested by

no test coverage detected