Template for simple GLUT-style viewer applications. More...
#include <mitsuba/hw/viewer.h>
Inheritance diagram for mitsuba::Viewer:Public Member Functions | |
| Viewer () | |
| Construct a new viewer. More... | |
| int | run (int argc, char **argv) |
| Program entry point. More... | |
Public Member Functions inherited from Object | |
| Object () | |
| Construct a new object. More... | |
| int | getRefCount () const |
| Return the current reference count. More... | |
| void | incRef () const |
| Increase the reference count of the object by one. More... | |
| void | decRef (bool autoDeallocate=true) const |
| Decrease the reference count of the object and possibly deallocate it. More... | |
| virtual std::string | toString () const |
| Return a human-readable string representation of the object's contents. More... | |
Static Public Attributes | |
| static Class * | m_theClass |
Static Public Attributes inherited from mitsuba::Utility | |
| static Class * | m_theClass |
Static Public Attributes inherited from Object | |
| static Class * | m_theClass |
| Pointer to the object's class descriptor. More... | |
Protected Member Functions | |
| void | drawHUD (const std::string &text) |
| Draw a heads-up display. More... | |
| void | redraw () |
| Request that the draw() routine be called. More... | |
| virtual void | draw ()=0 |
| To be overwritten by the subclass: main drawing routine. More... | |
| virtual bool | init (int argc, char **argv) |
| To be overwritten (optionally): perform any necessary initializations. More... | |
| virtual void | shutdown () |
| To be overwritten (optionally): perform any necessary cleanups. More... | |
| virtual void | keyPressed (const DeviceEvent &event) |
| To be overwritten (optionally): handle a key press event. More... | |
| virtual void | keyReleased (const DeviceEvent &event) |
| To be overwritten (optionally): handle a key release event. More... | |
| virtual void | mouseButtonPressed (const DeviceEvent &event) |
| To be overwritten (optionally): handle a mouse button press event. More... | |
| virtual void | mouseButtonReleased (const DeviceEvent &event) |
| To be overwritten (optionally): handle a mouse button release event. More... | |
| virtual void | mouseMoved (const DeviceEvent &event) |
| To be overwritten (optionally): handle a mouse motion event. More... | |
| virtual void | mouseBeginDrag (const DeviceEvent &event) |
| To be overwritten (optionally): handle a mouse begin drag event. More... | |
| virtual void | mouseDragged (const DeviceEvent &event) |
| To be overwritten (optionally): handle a mouse drag event. More... | |
| virtual void | mouseEndDrag (const DeviceEvent &event) |
| To be overwritten (optionally): handle a mouse end drag event. More... | |
| virtual void | windowResized (const DeviceEvent &event) |
| To be overwritten (optionally): handle a window resize event. More... | |
Protected Member Functions inherited from mitsuba::Utility | |
| virtual | ~Utility () |
| Virtual destructor. More... | |
| ref< Scene > | loadScene (const fs::path &fname, const ParameterMap ¶ms=ParameterMap()) |
| Load a scene from an external file. More... | |
| ref< Scene > | loadSceneFromString (const std::string &content, const ParameterMap ¶ms=ParameterMap()) |
| Load a scene from a string. More... | |
Protected Member Functions inherited from Object | |
| virtual | ~Object () |
| Virtual private deconstructor. (Will only be called by ref) More... | |
Protected Member Functions inherited from mitsuba::DeviceEventListener | |
| virtual | ~DeviceEventListener () |
| Virtual destructor. More... | |
Protected Attributes | |
| ref< Session > | m_session |
| ref< Device > | m_device |
| ref< Renderer > | m_renderer |
| ref< Font > | m_font |
| bool | m_quit |
| bool | m_leaveEventLoop |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static void | staticInitialization () |
| Initializes the built-in reference count debugger (if enabled) More... | |
| static void | staticShutdown () |
| Free the memory taken by staticInitialization() More... | |
Protected Types inherited from mitsuba::Utility | |
| typedef std::map< std::string, std::string, SimpleStringOrdering > | ParameterMap |
Template for simple GLUT-style viewer applications.
This class makes it possible to rapidly prototype simple OpenGL applications, which can be started using the 'mtsutil' launcher.
| mitsuba::Viewer::Viewer | ( | ) |
Construct a new viewer.
|
protectedpure virtual |
To be overwritten by the subclass: main drawing routine.
|
protected |
Draw a heads-up display.
|
protectedvirtual |
To be overwritten (optionally): perform any necessary initializations.
The default implementation does nothing and returns true.
| argc | Number of command line arguments |
| argv | List of command line argument strings |
true upon success. Otherwise, the viewer will quit.
|
protectedvirtual |
To be overwritten (optionally): handle a key press event.
|
protectedvirtual |
To be overwritten (optionally): handle a key release event.
|
protectedvirtual |
To be overwritten (optionally): handle a mouse begin drag event.
|
protectedvirtual |
To be overwritten (optionally): handle a mouse button press event.
|
protectedvirtual |
To be overwritten (optionally): handle a mouse button release event.
|
protectedvirtual |
To be overwritten (optionally): handle a mouse drag event.
|
protectedvirtual |
To be overwritten (optionally): handle a mouse end drag event.
|
protectedvirtual |
To be overwritten (optionally): handle a mouse motion event.
|
inlineprotected |
Request that the draw() routine be called.
|
virtual |
Program entry point.
The viewer is initialized by this method – to add custom initialization code, please override init
Implements mitsuba::Utility.
|
protectedvirtual |
To be overwritten (optionally): perform any necessary cleanups.
|
protectedvirtual |
To be overwritten (optionally): handle a window resize event.
|
protected |
|
protected |
|
static |