proland::TweakSceneGraph Class Reference
[twbar]

A TweakBarHandler to control the scene graph. More...

#include <TweakSceneGraph.h>

Inheritance diagram for proland::TweakSceneGraph:
proland::TweakBarHandler

List of all members.

Public Member Functions

 TweakSceneGraph (ptr< SceneNode > scene, bool active)
 Creates a new TweakSceneGraph.
virtual ~TweakSceneGraph ()
 Deletes this TweakSceneGraph.
virtual void redisplay (double t, double dt, bool &needUpdate)
 This method is called when a window must be redrawn.
virtual bool mouseClick (EventHandler::button b, EventHandler::state s, EventHandler::modifier m, int x, int y, bool &needUpdate)
 This method is called when a mouse click occurs.
virtual bool mouseWheel (EventHandler::wheel b, EventHandler::modifier m, int x, int y, bool &needUpdate)
 This method is called when a mouse wheel event occurs.
virtual bool mouseMotion (int x, int y, bool &needUpdate)
 This method is called periodically when the mouse is moved.
virtual bool mousePassiveMotion (int x, int y, bool &needUpdate)
 This method is called periodically when the mouse is moved.

Protected Member Functions

 TweakSceneGraph ()
 Creates an uninitialized TweakSceneGraph.
virtual void init (ptr< SceneNode > scene, bool active)
 Initializes this TweakSceneGraph.
virtual void updateBar (TwBar *bar)
 Adds controls to the given tweak bar.

Private Attributes

ptr< SceneNode > scene
 The root of the scene graph to control.

Detailed Description

A TweakBarHandler to control the scene graph.

Authors:
Eric Bruneton, Antoine Begault

Constructor & Destructor Documentation

proland::TweakSceneGraph::TweakSceneGraph ( ptr< SceneNode >  scene,
bool  active 
)

Creates a new TweakSceneGraph.

Parameters:
scene the root of the scene graph to control.
active true if this TweakBarHandler must be initialy active.
virtual proland::TweakSceneGraph::~TweakSceneGraph (  )  [virtual]

Deletes this TweakSceneGraph.

proland::TweakSceneGraph::TweakSceneGraph (  )  [protected]

Creates an uninitialized TweakSceneGraph.


Member Function Documentation

virtual void proland::TweakSceneGraph::init ( ptr< SceneNode >  scene,
bool  active 
) [protected, virtual]

Initializes this TweakSceneGraph.

See TweakSceneGraph.

virtual bool proland::TweakSceneGraph::mouseClick ( EventHandler::button  b,
EventHandler::state  s,
EventHandler::modifier  m,
int  x,
int  y,
bool &  needUpdate 
) [virtual]

This method is called when a mouse click occurs.

The default implementation of this method delegates to eventHandler if it is not NULL, and sets needUpdate to false.

Parameters:
b the button that was clicked.
s the state of this button.
m the modifiers that were pressed when the click occured.
x the mouse x coordinate in pixels when the click occured.
y the mouse y coordinate in pixels when the click occured.
[out] needUpdate true if the tweakbar must be updated.
Returns:
true if the event has been handled by this method.

Reimplemented from proland::TweakBarHandler.

virtual bool proland::TweakSceneGraph::mouseMotion ( int  x,
int  y,
bool &  needUpdate 
) [virtual]

This method is called periodically when the mouse is moved.

The default implementation of this method delegates to eventHandler if it is not NULL, and sets needUpdate to false.

Parameters:
x the mouse x coordinate in pixels.
y the mouse y coordinate in pixels.
[out] needUpdate true if the tweakbar must be updated.
Returns:
true if the event has been handled by this method.

Reimplemented from proland::TweakBarHandler.

virtual bool proland::TweakSceneGraph::mousePassiveMotion ( int  x,
int  y,
bool &  needUpdate 
) [virtual]

This method is called periodically when the mouse is moved.

The default implementation of this method delegates to eventHandler if it is not NULL, and sets needUpdate to false.

Parameters:
x the mouse x coordinate in pixels.
y the mouse y coordinate in pixels.
[out] needUpdate true if the tweakbar must be updated.
Returns:
true if the event has been handled by this method.

Reimplemented from proland::TweakBarHandler.

virtual bool proland::TweakSceneGraph::mouseWheel ( EventHandler::wheel  b,
EventHandler::modifier  m,
int  x,
int  y,
bool &  needUpdate 
) [virtual]

This method is called when a mouse wheel event occurs.

The default implementation of this method delegates to eventHandler if it is not NULL, and sets needUpdate to false.

Parameters:
b the wheel event that occured (WHEEL_UP or WHEEL_DOWN)
m the modifiers that were pressed when the wheel event occured.
x the mouse x coordinate in pixels when the wheel event occured.
y the mouse y coordinate in pixels when the wheel event occured.
[out] needUpdate true if the tweakbar must be updated.
Returns:
true if the event has been handled by this method.

Reimplemented from proland::TweakBarHandler.

virtual void proland::TweakSceneGraph::redisplay ( double  t,
double  dt,
bool &  needUpdate 
) [virtual]

This method is called when a window must be redrawn.

The default implementation of this method delegates to eventHandler if it is not NULL, and sets needUpdate to needUpdate (which is then reset to false).

Parameters:
[out] needUpdate true if the tweakbar must be updated.

Reimplemented from proland::TweakBarHandler.

virtual void proland::TweakSceneGraph::updateBar ( TwBar *  bar  )  [protected, virtual]

Adds controls to the given tweak bar.

Implements proland::TweakBarHandler.


Member Data Documentation

ptr<SceneNode> proland::TweakSceneGraph::scene [private]

The root of the scene graph to control.


Generated on Sat May 12 09:41:40 2012 for proland by  doxygen 1.6.1