OpenCOVER
|
This class handles onscreen debugging output. More...
#include <coOnscreenDebug.h>
Public Member Functions | |
void | show () |
show the debugging output More... | |
void | hide () |
hide the debugging output More... | |
void | toggleVisibility () |
toggle visibility More... | |
void | redraw () |
redraw the debugging output More... | |
void | update () |
update (does nothing) More... | |
void | setText (const char *text) |
set the text of the label More... | |
ostringstream & | out () |
void | updateString () |
Static Public Member Functions | |
static coOnscreenDebug * | instance () |
Protected Member Functions | |
coOnscreenDebug () | |
virtual | ~coOnscreenDebug () |
Protected Attributes | |
bool | visible |
osg::ref_ptr< osgText::Text > | text |
osg::ref_ptr< osg::Geode > | geode |
osg::ref_ptr< osg::Camera > | camera |
ostringstream | os |
Static Protected Attributes | |
static coOnscreenDebug * | singleton |
This class handles onscreen debugging output.
With this class you can print debugging messages on the screen. In a cave, every screen shows output which is local to it, so you can compare values for each screen.
#include <sstream> ... ostringstream& os = coOnscreenDebug::instance()->out(); os << "Hello World!" << std::endl; coOnscreenDebug::instance()->updateString()
The code above creates and initializes the debug label if necessary and returns a stringstream reference to which you can direct your information. When finished, you need to call updateString(), so the contents of the stringstream are flushed to the label.
|
protected |
|
protectedvirtual |
void opencover::coOnscreenDebug::hide | ( | ) |
hide the debugging output
|
static |
retrieve the singleton instance of coOnscreenDebug
ostringstream& opencover::coOnscreenDebug::out | ( | ) |
retrieve the ostringstream for output
void opencover::coOnscreenDebug::redraw | ( | ) |
redraw the debugging output
void opencover::coOnscreenDebug::setText | ( | const char * | text | ) |
set the text of the label
void opencover::coOnscreenDebug::show | ( | ) |
show the debugging output
void opencover::coOnscreenDebug::toggleVisibility | ( | ) |
toggle visibility
void opencover::coOnscreenDebug::update | ( | ) |
update (does nothing)
void opencover::coOnscreenDebug::updateString | ( | ) |
flush the contents of the ostringstream to the internal text. This clears the ostringstream, so anything from the last updateString() is lost!
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |