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

Detailed Description

Renders a panel of text that can be updated with new lines

#include <debugRenderCommands.h>

Inheritance diagram for makVre::DebugDrawTextPanelCommand:
[legend]

Public Member Functions

 DebugDrawTextPanelCommand (const std::string &name, const DtColor &c, const double &time)
 
virtual ~DebugDrawTextPanelCommand () override
 
virtual void draw (DtDebugCanvas &canvas) override
 
const std::string & name ()
 
void addText (const std::string &point, bool scroll=false)
 
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 thePanelSize ()
 

Protected Attributes

double myResetTime
 
std::string myName
 
std::list< std::string > myText
 
int myCurrentText
 
DtVector myScreenPosition
 
- Protected Attributes inherited from makVre::DtDebugDrawCommand
DtVector myEyepoint
 
DtColor myColor
 
DtColor::Fill myFill
 
double myTime
 
bool myClip
 
bool my3D
 

Constructor & Destructor Documentation

◆ DebugDrawTextPanelCommand()

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

Constructor for text panel drawing command.

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

References name().

◆ ~DebugDrawTextPanelCommand()

virtual makVre::DebugDrawTextPanelCommand::~DebugDrawTextPanelCommand ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ draw()

virtual void makVre::DebugDrawTextPanelCommand::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::DebugDrawTextPanelCommand::name ( )
inline

References myName.

Referenced by DebugDrawTextPanelCommand().

◆ addText()

void makVre::DebugDrawTextPanelCommand::addText ( const std::string & point,
bool scroll = false )

Adds a line of text to the panel.

Parameters
pointThe text line to add
scrollWhether to automatically scroll to show newest text

◆ setScreenPosition()

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

References myScreenPosition.

◆ thePanelSize()

static float makVre::DebugDrawTextPanelCommand::thePanelSize ( )
inlinestatic

Gets the default size of the text panel.

Returns
The default width of the panel in pixels

Member Data Documentation

◆ myResetTime

double makVre::DebugDrawTextPanelCommand::myResetTime
protected

Time at which the panel should reset.

◆ myName

std::string makVre::DebugDrawTextPanelCommand::myName
protected

Name of the text panel.

Referenced by name().

◆ myText

std::list<std::string> makVre::DebugDrawTextPanelCommand::myText
protected

Collection of text lines to display.

◆ myCurrentText

int makVre::DebugDrawTextPanelCommand::myCurrentText
protected

Current text index.

◆ myScreenPosition

DtVector makVre::DebugDrawTextPanelCommand::myScreenPosition
protected

Position of the panel on the screen.

Referenced by setScreenPosition().


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