void DebugRenderer::AddAxisGizmo(const Matrix& transform, F32 axisLength, Lifespan lifespan) { Vector3f i = Vector3f::Normalize(transform.GetLeft()); Vector3f j = Vector3f::Normalize(transform.GetUp()); Vector3f k = Vector3f::Normalize(transform.GetForward()); Vector3f position = transform.GetTranslation(); AddLine(position, i, axisLength, Color::Red, lifespan); AddLine(position, j, axisLength, Color::Green, lifespan); AddLine(position, k, axisLength, Color::Blue, lifespan); }
void BufferedPrimitiveRenderer::DrawAxisGizmo(const Matrix& transform, F32 axisLength, DebugLifespan::Enum lifespan /*= DebugLifespan::Temporary*/, bool depthEnabled /*= false*/, bool antiAliased /*= false*/) { Vector3f i = Vector3f::Normalize(transform.GetLeft()); Vector3f j = Vector3f::Normalize(transform.GetUp()); Vector3f k = Vector3f::Normalize(transform.GetForward()); Vector3f position = transform.GetTranslation(); DrawLine(position, i, axisLength, Color::Red, lifespan, depthEnabled, antiAliased); DrawLine(position, j, axisLength, Color::Green, lifespan, depthEnabled, antiAliased); DrawLine(position, k, axisLength, Color::Blue, lifespan, depthEnabled, antiAliased); }