Kanzi 4.0.0-beta2
kanzi::PerformanceInfo Class Reference

HUD class allows drawing information on top of tests. More...

#include <kanzi/core.ui/application/performance_info.hpp>

Public Types

using DrawValues
 Draw value listing.
 
using DrawValuesRegistry
 Registry for draw values.
 

Public Member Functions

void drawFps ()
 Draws the FPS information on the screen.
 
void drawFrameProfilingSamples (Renderer &renderer, float graphX, float graphY, float graphWidth, float graphHeight, const DrawValues &drawValues, float minValue, float maxValue, const MaterialSharedPtr &material, const ColorRGBA &lineColor, const ColorRGBA &borderColor)
 Draws frame profiling samples (one set) for the performance info.
 
void drawGraph (Renderer &renderer, float x, float y, float width, float height, BrushRenderer *brushRenderer, kanzi::TextFormat *textFormat, const DrawValues &drawValues, const char *name, const MaterialSharedPtr &graphMaterial, const ColorRGBA &lineColor, const ColorRGBA &borderColor)
 Draws graph including the profiling samples.
 
void drawGraphicsInfo ()
 Draws Kanzi graphics related information on the screen.
 
void drawInfo ()
 Draws performance related information on the screen.
 
void drawProfilingInfo ()
 Draws profiling graphs.
 
 PerformanceInfo (const FrameTimeQueue &frameTimeQueue, Domain *domain, const PerformanceInfoProperties &properties)
 Constructor for HUD.
 
void setBorderColor (const ColorRGBA &borderColor)
 Sets the border color of the HUD info boxes.
 
void setFontColor (const ColorRGBA &fontColor)
 Sets the font color for drawing the HUD info.
 
void setLineColor (const ColorRGBA &lineColor)
 Sets the color of the lines used to draw the performance graphs.
 
void setTextTopLeft (int x, int y)
 Set the text top-left corner position.
 

Static Public Attributes

static const size_t s_numIterationsToDraw
 Number of iterations to draw.
 

Detailed Description

HUD class allows drawing information on top of tests.

Member Typedef Documentation

◆ DrawValues

Draw value listing.

Since
Kanzi 4.0.0

◆ DrawValuesRegistry

Registry for draw values.

Since
Kanzi 4.0.0

Constructor & Destructor Documentation

◆ PerformanceInfo()

kanzi::PerformanceInfo::PerformanceInfo ( const FrameTimeQueue & frameTimeQueue,
Domain * domain,
const PerformanceInfoProperties & properties )
explicit

Constructor for HUD.

Parameters
frameTimeQueueThe FrameTimeQueue from which to query the frame rate.
domainThe Application Domain.
propertiesProperties for the PerformanceInfo HUD to construct.
Since
Kanzi 4.0.0 changed the type of the frameTimeQueue parameter to const FrameTimeQueue&.

Member Function Documentation

◆ drawFps()

void kanzi::PerformanceInfo::drawFps ( )

Draws the FPS information on the screen.

◆ drawInfo()

void kanzi::PerformanceInfo::drawInfo ( )

Draws performance related information on the screen.

◆ drawGraphicsInfo()

void kanzi::PerformanceInfo::drawGraphicsInfo ( )

Draws Kanzi graphics related information on the screen.

◆ drawProfilingInfo()

void kanzi::PerformanceInfo::drawProfilingInfo ( )

Draws profiling graphs.

◆ drawGraph()

void kanzi::PerformanceInfo::drawGraph ( Renderer & renderer,
float x,
float y,
float width,
float height,
BrushRenderer * brushRenderer,
kanzi::TextFormat * textFormat,
const DrawValues & drawValues,
const char * name,
const MaterialSharedPtr & graphMaterial,
const ColorRGBA & lineColor,
const ColorRGBA & borderColor )

Draws graph including the profiling samples.

Parameters
rendererRenderer to use.
xGraph X position.
yGraph Y position.
widthGraph width.
heightGraph height.
brushRendererBrush renderer to use for text.
textFormatText format to use for rendering text.
drawValuesSample values to draw.
nameName label for the graph.
graphMaterialMaterial to use for drawing.
lineColorColor for the drawn graph lines.
borderColorColor for the drawn border lines.
Since
Kanzi 4.0.0

◆ drawFrameProfilingSamples()

void kanzi::PerformanceInfo::drawFrameProfilingSamples ( Renderer & renderer,
float graphX,
float graphY,
float graphWidth,
float graphHeight,
const DrawValues & drawValues,
float minValue,
float maxValue,
const MaterialSharedPtr & material,
const ColorRGBA & lineColor,
const ColorRGBA & borderColor )

Draws frame profiling samples (one set) for the performance info.

Parameters
rendererRenderer to use.
graphXGraph X position.
graphYGraph Y position.
graphWidthGraph width.
graphHeightGraph height.
drawValuesSample values to draw.
minValueMinimum value in the set.
maxValueMaximum value in the set.
materialMaterial to use for drawing.
lineColorColor for the drawn graph lines.
borderColorColor for the drawn border lines.
Since
Kanzi 4.0.0 changed the type of the renderer parameter to Renderer&.

◆ setFontColor()

void kanzi::PerformanceInfo::setFontColor ( const ColorRGBA & fontColor)

Sets the font color for drawing the HUD info.

Parameters
fontColorThe ColorRGBA color value of the font

◆ setLineColor()

void kanzi::PerformanceInfo::setLineColor ( const ColorRGBA & lineColor)

Sets the color of the lines used to draw the performance graphs.

Parameters
lineColorThe ColorRGBA color value for the graph lines

◆ setBorderColor()

void kanzi::PerformanceInfo::setBorderColor ( const ColorRGBA & borderColor)

Sets the border color of the HUD info boxes.

Parameters
borderColorThe ColorRGBA color value for the graph borders

◆ setTextTopLeft()

void kanzi::PerformanceInfo::setTextTopLeft ( int x,
int y )

Set the text top-left corner position.

Parameters
xText x-position on the screen.
yText y-position on the screen.

Member Data Documentation

◆ s_numIterationsToDraw

const size_t kanzi::PerformanceInfo::s_numIterationsToDraw
static

Number of iterations to draw.

Since
Kanzi 4.0.0

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