VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DebugDrawGraphCommand Class Reference

Detailed Description

Renders a real-time graph to visualize data points over time

#include <debugRenderCommands.h>

Inheritance diagram for makVre::DebugDrawGraphCommand:
[legend]

Public Member Functions

 DebugDrawGraphCommand (const std::string &name, const DtColor &c, const double &time)
 
virtual ~DebugDrawGraphCommand () override
 
virtual void draw (DtDebugCanvas &canvas) override
 
const std::string & name ()
 
void addPoint (double point)
 
void setScreenPosition (const DtVector &screenPos)
 
- Public Member Functions inherited from makVre::DtDebugDrawCommand
 DtDebugDrawCommand (DtColor color, DtColor::Fill fill, bool clip, const double &time, bool is3D)
 
virtual ~DtDebugDrawCommand ()
 
virtual void reduceTime (double delta)
 
virtual bool ended ()
 
virtual bool get3D ()
 

Static Public Member Functions

static float theGraphSize ()
 

Protected Attributes

double myResetTime
 
std::string myName
 
std::vector< double > myPoints
 
int myCurrentPoint
 
double myMin
 
double myMax
 
DtVector myScreenPosition
 
- Protected Attributes inherited from makVre::DtDebugDrawCommand
DtVector myEyepoint
 
DtColor myColor
 
DtColor::Fill myFill
 
double myTime
 
bool myClip
 
bool my3D
 

Constructor & Destructor Documentation

◆ DebugDrawGraphCommand()

makVre::DebugDrawGraphCommand::DebugDrawGraphCommand ( const std::string & name,
const DtColor & c,
const double & time )

Constructor for graph drawing command.

Parameters
nameName of the graph
cColor of the graph
timeDuration in seconds for this command to remain active

References name().

◆ ~DebugDrawGraphCommand()

virtual makVre::DebugDrawGraphCommand::~DebugDrawGraphCommand ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ draw()

virtual void makVre::DebugDrawGraphCommand::draw ( DtDebugCanvas & drawList)
overridevirtual

Pure virtual draw method that must be implemented by derived classes.

Parameters
drawListCanvas to draw the debug visual on

Implements makVre::DtDebugDrawCommand.

◆ name()

const std::string & makVre::DebugDrawGraphCommand::name ( )
inline

References myName.

Referenced by DebugDrawGraphCommand().

◆ addPoint()

void makVre::DebugDrawGraphCommand::addPoint ( double point)

Adds a data point to the graph.

Parameters
pointThe data point value to add

◆ setScreenPosition()

void makVre::DebugDrawGraphCommand::setScreenPosition ( const DtVector & screenPos)
inline

References myScreenPosition.

◆ theGraphSize()

static float makVre::DebugDrawGraphCommand::theGraphSize ( )
inlinestatic

Gets the default size of the graph.

Returns
The default width/height of the graph in pixels

Member Data Documentation

◆ myResetTime

double makVre::DebugDrawGraphCommand::myResetTime
protected

Time at which the graph should reset.

◆ myName

std::string makVre::DebugDrawGraphCommand::myName
protected

Name of the graph.

Referenced by name().

◆ myPoints

std::vector<double> makVre::DebugDrawGraphCommand::myPoints
protected

Collection of data points to plot.

◆ myCurrentPoint

int makVre::DebugDrawGraphCommand::myCurrentPoint
protected

Current point index.

◆ myMin

double makVre::DebugDrawGraphCommand::myMin
protected

Minimum value in the graph.

◆ myMax

double makVre::DebugDrawGraphCommand::myMax
protected

Maximum value in the graph.

◆ myScreenPosition

DtVector makVre::DebugDrawGraphCommand::myScreenPosition
protected

Position of the graph on the screen.

Referenced by setScreenPosition().


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