Fluid Dynamics Library
Public Member Functions | Protected Member Functions | Private Attributes
fdl::VLApp Class Reference

#include <vlapp.hpp>

List of all members.

Public Member Functions

 VLApp ()
void initialize ()
virtual void addedListenerEvent (OpenGLContext *openglContext)
virtual void removedListenerEvent (OpenGLContext *)
virtual void keyReleaseEvent (unsigned short, EKey key)
virtual void destroyEvent ()
virtual void updateEvent ()
virtual void resizeEvent (int, int)
virtual void initEvent ()
virtual void enableEvent (bool)
virtual void mouseMoveEvent (int, int)
virtual void mouseUpEvent (EMouseButton, int, int)
virtual void mouseDownEvent (EMouseButton, int, int)
virtual void mouseWheelEvent (int)
virtual void keyPressEvent (unsigned short, EKey)
virtual void fileDroppedEvent (const std::vector< String > &)
virtual void visibilityEvent (bool)
RenderingAbstract * rendering ()
const RenderingAbstract * rendering () const
void setRendering (RenderingAbstract *rendering)
SceneManagerActorTree * sceneManager ()
const SceneManagerActorTree * sceneManager () const
void setTrackball (TrackballManipulator *trackball)
TrackballManipulator * trackball ()
const TrackballManipulator * trackball () const
double fps () const
virtual void updateScene ()
void setAppletName (const String &app_name)
const String & appletName () const

Protected Member Functions

void bindManipulators (Camera *camera)

Private Attributes

ref< RenderingAbstract > mRendering
ref< TrackballManipulator > mTrackball
ref< SceneManagerActorTree > mSceneManagerActorTree
ref< ReadPixels > mReadPixels
String mAppletName
double mStartTime
double mFPS
int mFrameCount

Detailed Description

The Applet class is an utilitly UIEventListener that features a ghost manipulator, trackball manipulator, an FPS counter and a simple rendering pipeline.

Default key bindings:

Definition at line 31 of file vlapp.hpp.


Constructor & Destructor Documentation

VLApp::VLApp ( )

Constructor

Definition at line 12 of file vlapp.cpp.


Member Function Documentation

const String& fdl::VLApp::appletName ( ) const [inline]

The applet name, used for the window title and for naming screenshots.

Definition at line 116 of file vlapp.hpp.

double fdl::VLApp::fps ( ) const [inline]

Current average frames per second (updated every 500ms).

Definition at line 102 of file vlapp.hpp.

void VLApp::initialize ( )

Initializes the default rendering (with Rendering), the default scene manager (with SceneManagerActorTree) and camera manipulators (GhostCameraManipulator and TrackballManipulator).

Definition at line 22 of file vlapp.cpp.

RenderingAbstract* fdl::VLApp::rendering ( ) [inline]

The rendering used by the VLApp, by default a Rendering.

Definition at line 80 of file vlapp.hpp.

const RenderingAbstract* fdl::VLApp::rendering ( ) const [inline]

The rendering used by the VLApp, by default a Rendering.

Definition at line 83 of file vlapp.hpp.

SceneManagerActorTree* fdl::VLApp::sceneManager ( ) [inline]

The scene manager used by the default rendering.

Definition at line 89 of file vlapp.hpp.

const SceneManagerActorTree* fdl::VLApp::sceneManager ( ) const [inline]

The scene manager used by the default rendering.

Definition at line 92 of file vlapp.hpp.

void fdl::VLApp::setAppletName ( const String &  app_name) [inline]

Sets the applet name, used for the window title and for naming screenshots.

Definition at line 113 of file vlapp.hpp.

void fdl::VLApp::setRendering ( RenderingAbstract *  rendering) [inline]

Sets the rendering used by the VLApp, by default a Rendering.

Definition at line 86 of file vlapp.hpp.

void fdl::VLApp::setTrackball ( TrackballManipulator *  trackball) [inline]

TrackballManipulator used by the applet, activated by the "T" key.

Definition at line 95 of file vlapp.hpp.

TrackballManipulator* fdl::VLApp::trackball ( ) [inline]

TrackballManipulator used by the applet, activated by the "T" key.

Definition at line 98 of file vlapp.hpp.

virtual void fdl::VLApp::updateScene ( ) [inline, virtual]

Override this to update the content of your scene. Called by updateEvent() right before rendering()->render() and swapping opengl front/back buffers.

Note:
Since updateScene() is called by updateEvent() this function is called only if somebody requests a OpenGLContext::update() or if OpenGLContext::continuousUpdate() is set to true.

Definition at line 110 of file vlapp.hpp.


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