Public Member Functions | |
DebugRenderer (Text::IScreenTextRenderer &screenTextRenderer, const Fonts::FontInstance &fontInstance, Rendering::Materials::IMaterial *pDebugMaterial, const Rendering::VertexLayouts::VertexBinding &coloredVertexBinding, Rendering::RenderableFilters &renderableFilters, float lineWidth, const Eegeo::Text::BatchedTextAppearance &defaultTextAppearance, const int initialLineBufferSize, const int initialGeomVertexBufferSize, const int initialGeomIndexBufferSize) | |
void | SetLineWidth (float lineWidth) |
Set the Line Width for rendering. Affects all line rendering & best called before Draw(). | |
void | SetDepthTestEnabled (bool depthTest) |
Set the Depth Testing on or off. Used for the Draw() call and will determine if all rendered geometry is depth tested or not. | |
void | DrawLine (const dv3 &ecefPointA, const dv3 &ecefPointB, const v4 &color, const float lifetimeInSeconds=0.0f) |
Draw a simple line between two ECEF points. More... | |
void | DrawPolyLine (const std::vector< dv3 > &ecefPoints, const v4 &color, const float lifetimeInSeconds=0.0f) |
Draw a polyline - A set of ECEF points connected together. More... | |
void | DrawAxes (const dv3 &ecefCentre, const v3 &xAxis, const v3 &yAxis, const v3 &zAxis, const float lifetimeInSeconds=0.0f) |
Draw a set of axes at the given ecef point. The color of the axes is preset at red (x axis), green (y axis) and blue (z axis) More... | |
void | DrawAxes (const dv3 &ecefCentre, const v3 &xAxis, const v3 &yAxis, const v3 &zAxis, const v4 &xColor, const v4 &yColor, const v4 &zColor, const float lifetimeInSeconds=0.0f) |
Draw a set of axes at the given ecef point. More... | |
void | DrawQuad (const dv3 &ecefCentre, const v3 &xAxis, const v3 &yAxis, const v3 &zAxis, const v4 &color, const float lifetimeInSeconds=0.0f) |
Draw a coloured unlit quad aligned to the XY axes facing along the Z axis;. More... | |
void | DrawCube (const dv3 &ecefCentre, const v3 &xAxis, const v3 &yAxis, const v3 &zAxis, const v4 &color, const float lifetimeInSeconds=0.0f) |
Draw a solid unlit cube with specific orientation and dimensions around an ECEF centre point. More... | |
void | DrawSphere (const dv3 &ecefCentre, const float radius, const v4 &color, const float lifetimeInSeconds=0.0f) |
Draw a solid unlit sphere of a specific radius at the ECEF point. More... | |
void | DrawWireFrustum (const dv3 &ecefCenter, const Geometry::Frustum &frustum, const v4 &color, const float lifetimeInSeconds=0.0f) |
Draw a wireframe representation of a frustum. More... | |
void | DrawText (const dv3 &ecefCenter, const std::string &text, const float size, const float lifetimeInSeconds=0.0f) |
Draw text at the specified ECEF location. Text is center justified around the ecefCenter point, and colour of all text is defined on the Renderer. More... | |
void | DrawTextScreenSpace (const v2 &leftOriginCenter, const std::string &text, const float size, const float lifetimeInSeconds=0.0f) |
Draw text at the specified screen space. Text is justified left, and colour of all text is defined on the Renderer. More... | |
void | DrawTransformedTextScreenSpace (const v2 &transformOrigin, const v2 &localTranslate, float rotate, const std::string &text, const float size, const float lifetimeInSeconds=0.0f) |
Draw text with rotate/translate about transform origin in screen space. Colour of all text is defined on the Renderer. More... | |
void | DrawLineScreenSpace (const v2 &screenPointA, const v2 &screenPointB, const v4 &color, const float lifetimeInSeconds=0.0f) |
Draw a simple line between 2d points given in screen coordinates. More... | |
void | Update (float dt, const Camera::RenderCamera &renderCamera) |
void | GenerateGeometry (const Camera::RenderCamera &renderCamera) |
void Eegeo::DebugRendering::DebugRenderer::DrawAxes | ( | const dv3 & | ecefCentre, |
const v3 & | xAxis, | ||
const v3 & | yAxis, | ||
const v3 & | zAxis, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a set of axes at the given ecef point. The color of the axes is preset at red (x axis), green (y axis) and blue (z axis)
ecefCentre | the centre origin ECEF coordinates of the axis |
xAxis | orientation of the x axis |
yAxis | orientation of the y axis |
zAxis | orientation of the z axis |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawAxes | ( | const dv3 & | ecefCentre, |
const v3 & | xAxis, | ||
const v3 & | yAxis, | ||
const v3 & | zAxis, | ||
const v4 & | xColor, | ||
const v4 & | yColor, | ||
const v4 & | zColor, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a set of axes at the given ecef point.
ecefCentre | the centre origin ECEF coordinates of the axis |
xAxis | orientation of the x axis |
yAxis | orientation of the y axis |
zAxis | orientation of the z axis |
xColor | Color of the X Axis |
yColor | Color of the Y AXis |
zColor | Color of the Z Axis |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawCube | ( | const dv3 & | ecefCentre, |
const v3 & | xAxis, | ||
const v3 & | yAxis, | ||
const v3 & | zAxis, | ||
const v4 & | color, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a solid unlit cube with specific orientation and dimensions around an ECEF centre point.
ecefCentre | the cube centre ECEF point |
xAxis | axis defining the width of the cube along the x axis |
yAxis | axis defining the height of the cube along the y axis |
zAxis | axis defining the breadth of the cube along the z axis |
color | the color of the sphere. Each vector component should be a normalised value between 0.0f and 1.0f. The .w component is the alpha value. |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawLine | ( | const dv3 & | ecefPointA, |
const dv3 & | ecefPointB, | ||
const v4 & | color, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a simple line between two ECEF points.
ecefPointA | The start ECEF point of the line |
ecefPointB | The end ECEF point of the line |
color | the color of the line. Each vector component should be a normalised value between 0.0f and 1.0f. The .w component is the alpha value. |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawLineScreenSpace | ( | const v2 & | screenPointA, |
const v2 & | screenPointB, | ||
const v4 & | color, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a simple line between 2d points given in screen coordinates.
screenPointA | The line's screen start coordinates |
screenPointB | The line's screen end coordinates |
color | The color of the line |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawPolyLine | ( | const std::vector< dv3 > & | ecefPoints, |
const v4 & | color, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a polyline - A set of ECEF points connected together.
ecefPoints | the set of ECEF points of the polyline |
color | the color of the line. Each vector component should be a normalised value between 0.0f and 1.0f. The .w component is the alpha value. |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawQuad | ( | const dv3 & | ecefCentre, |
const v3 & | xAxis, | ||
const v3 & | yAxis, | ||
const v3 & | zAxis, | ||
const v4 & | color, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a coloured unlit quad aligned to the XY axes facing along the Z axis;.
ecefCentre | the centre ECEF coordinate of the quad |
xAxis | axis defining the width of the quad |
yAxis | axis defining the height of the quad |
zAxis | axis defining the facing direction of the quad |
color | the color of the quad. Each vector component should be a normalised value between 0.0f and 1.0f. The .w component is the alpha value. |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawSphere | ( | const dv3 & | ecefCentre, |
const float | radius, | ||
const v4 & | color, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a solid unlit sphere of a specific radius at the ECEF point.
ecefCentre | the sphere centre ECEF point |
radius | radius of the sphere in metres |
color | the color of the sphere. Each vector component should be a normalised value between 0.0f and 1.0f. The .w component is the alpha value. |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawText | ( | const dv3 & | ecefCenter, |
const std::string & | text, | ||
const float | size, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw text at the specified ECEF location. Text is center justified around the ecefCenter point, and colour of all text is defined on the Renderer.
ecefCenter | The ECEF origin of the center justified text |
text | The text to display |
size | The size of the text |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawTextScreenSpace | ( | const v2 & | leftOriginCenter, |
const std::string & | text, | ||
const float | size, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw text at the specified screen space. Text is justified left, and colour of all text is defined on the Renderer.
leftOriginCenter | The top-left of the line in screen space. |
text | The text to display |
size | The size of the text |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawTransformedTextScreenSpace | ( | const v2 & | transformOrigin, |
const v2 & | localTranslate, | ||
float | rotate, | ||
const std::string & | text, | ||
const float | size, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw text with rotate/translate about transform origin in screen space. Colour of all text is defined on the Renderer.
transformOrigin | pivot point in screen space |
localTranslate | local translation to anchor of first glyph in text (left of glyph on baseline) |
rotate | clockwise rotation in radians |
text | The text to display |
size | The size of the text |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |
void Eegeo::DebugRendering::DebugRenderer::DrawWireFrustum | ( | const dv3 & | ecefCenter, |
const Geometry::Frustum & | frustum, | ||
const v4 & | color, | ||
const float | lifetimeInSeconds = 0.0f |
||
) |
Draw a wireframe representation of a frustum.
ecefCenter | The ECEF origin of the frustum. |
frustum | The frustum itself. Ensure it has valid planes |
color | the color of the frustum. Each vector component should be a normalised value between 0.0f and 1.0f. The .w component is the alpha value. |
lifetimeInSeconds | optional: A duration of zero (the default) will draw the primitive for one frame (i.e. you must re-submit every frame). A duration of greater than zero seconds will draw the primitive for this duration (useful for fire-and-forget rendering) |