All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Eegeo::DebugRendering::DebugRenderer Class Reference

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)
 

Member Function Documentation

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)

Parameters
ecefCentrethe centre origin ECEF coordinates of the axis
xAxisorientation of the x axis
yAxisorientation of the y axis
zAxisorientation of the z axis
lifetimeInSecondsoptional: 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.

Parameters
ecefCentrethe centre origin ECEF coordinates of the axis
xAxisorientation of the x axis
yAxisorientation of the y axis
zAxisorientation of the z axis
xColorColor of the X Axis
yColorColor of the Y AXis
zColorColor of the Z Axis
lifetimeInSecondsoptional: 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.

Parameters
ecefCentrethe cube centre ECEF point
xAxisaxis defining the width of the cube along the x axis
yAxisaxis defining the height of the cube along the y axis
zAxisaxis defining the breadth of the cube along the z axis
colorthe 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.
lifetimeInSecondsoptional: 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.

Parameters
ecefPointAThe start ECEF point of the line
ecefPointBThe end ECEF point of the line
colorthe 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.
lifetimeInSecondsoptional: 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.

Parameters
screenPointAThe line's screen start coordinates
screenPointBThe line's screen end coordinates
colorThe color of the line
lifetimeInSecondsoptional: 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.

Parameters
ecefPointsthe set of ECEF points of the polyline
colorthe 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.
lifetimeInSecondsoptional: 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;.

Parameters
ecefCentrethe centre ECEF coordinate of the quad
xAxisaxis defining the width of the quad
yAxisaxis defining the height of the quad
zAxisaxis defining the facing direction of the quad
colorthe 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.
lifetimeInSecondsoptional: 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.

Parameters
ecefCentrethe sphere centre ECEF point
radiusradius of the sphere in metres
colorthe 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.
lifetimeInSecondsoptional: 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.

Parameters
ecefCenterThe ECEF origin of the center justified text
textThe text to display
sizeThe size of the text
lifetimeInSecondsoptional: 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.

Parameters
leftOriginCenterThe top-left of the line in screen space.
textThe text to display
sizeThe size of the text
lifetimeInSecondsoptional: 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.

Parameters
transformOriginpivot point in screen space
localTranslatelocal translation to anchor of first glyph in text (left of glyph on baseline)
rotateclockwise rotation in radians
textThe text to display
sizeThe size of the text
lifetimeInSecondsoptional: 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.

Parameters
ecefCenterThe ECEF origin of the frustum.
frustumThe frustum itself. Ensure it has valid planes
colorthe 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.
lifetimeInSecondsoptional: 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)

The documentation for this class was generated from the following files: