Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Member Functions | Protected Attributes | List of all members
om::editors::views::SpaceView::Tool Class Reference

#include <omEditorsSpaceView.h>

Inheritance diagram for om::editors::views::SpaceView::Tool:
om::editors::views::SelectionTool om::editors::views::TransformTool

Classes

class  Delegate
 A class that contains callback functions for a space view tool that are registered to the space view. More...
 

Public Member Functions

 Tool ()
 Create a new space view tool with no context, scene, or camera viewport. More...
 
OM_INLINE DelegategetDelegate ()
 Return a reference to the delegate which responds to events for this space view tool. More...
 
OM_INLINE const DelegategetDelegate () const
 Return a reference to the delegate which responds to events for this space view tool. More...
 
OM_INLINE void setDelegate (const Delegate &newDelegate)
 Return a reference to the delegate which responds to events for this space view tool. More...
 
virtual GUIImage getIcon (const Vector2f &size) const
 Return an icon that represents the tool. More...
 
virtual om::graphics::gui::GUIObjectgetToolbar () const
 Return a GUI object for the tool's parameter toolbar. More...
 
OM_INLINE GraphicsContext * getContext () const
 Return a pointer to the graphics context that the tool uses for rendering its own interface. More...
 
virtual void setContext (GraphicsContext *context)
 Set the graphics context that the tool should use for rendering its own interface. More...
 
virtual void setScene (GraphicsScene *scene)
 Set the scene that contains the graphical representations of the objects in the space view. More...
 
virtual void setCamera (Camera *camera)
 Set the camera that the space view is currently using to view the scene. More...
 
virtual void addSelection (SpatialObject *object)
 A method called by the space view when a new spatial object is added to the current selection. More...
 
virtual void removeSelection (SpatialObject *object)
 A method called by the space view when a spatial object is removed from the current selection. More...
 
virtual void clearSelection ()
 A method called by the space view when the current selection is cleared. More...
 
virtual void update (const Time &dt)
 Update the state of the tool for the specified time interval in seconds. More...
 
virtual void draw (const SceneRenderer &renderer, const Viewport &viewport)
 Draw the visual representation of this tool in the specified viewport on the current framebuffer. More...
 
virtual void getRenderables (const SceneRenderRequest &sceneRequest, const om::graphics::RenderRequest &renderRequest, RenderQueue &renderQueue)
 A method which allows the tool to provide graphics data for the space view's main render pass. More...
 
virtual Bool guiEvent (const GUIEvent &event)
 Process a GUI event received by this tool and return whether or not it was handled. More...
 
virtual Bool textEvent (const TextEvent &event)
 Process a text event received by this tool and return whether or not it was handled. More...
 
virtual Bool keyEvent (const KeyEvent &event)
 Process a key event received by this tool and return whether or not it was handled. More...
 
virtual Bool mouseButtonEvent (const MouseButtonEvent &event)
 Process a mouse button event received by this tool and return whether or not it was handled. More...
 
virtual Bool mouseMotionEvent (const MouseMotionEvent &event)
 Process a mouse motion event received by this tool and return whether or not it was handled. More...
 
virtual Bool mouseWheelEvent (const MouseWheelEvent &event)
 Process a mouse wheel event received by this tool and return whether or not it was handled. More...
 

Protected Attributes

GraphicsContext * context
 A pointer to the graphics context that the tool uses for rendering its own interface. More...
 
GraphicsScene * scene
 The scene that contains the graphical representations of the objects in the space view. More...
 
Camera * camera
 The camera that the space view is currently using to view the scene. More...
 
Delegate delegate
 An object that receieves callback events for the tool. More...
 

Constructor & Destructor Documentation

om::editors::views::SpaceView::Tool::Tool ( )

Create a new space view tool with no context, scene, or camera viewport.

Member Function Documentation

OM_INLINE Delegate& om::editors::views::SpaceView::Tool::getDelegate ( )
inline

Return a reference to the delegate which responds to events for this space view tool.

OM_INLINE const Delegate& om::editors::views::SpaceView::Tool::getDelegate ( ) const
inline

Return a reference to the delegate which responds to events for this space view tool.

OM_INLINE void om::editors::views::SpaceView::Tool::setDelegate ( const Delegate newDelegate)
inline

Return a reference to the delegate which responds to events for this space view tool.

virtual GUIImage om::editors::views::SpaceView::Tool::getIcon ( const Vector2f &  size) const
virtual

Return an icon that represents the tool.

The default implementation returns a placeholder icon.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual om::graphics::gui::GUIObject* om::editors::views::SpaceView::Tool::getToolbar ( ) const
virtual

Return a GUI object for the tool's parameter toolbar.

The default implementation returns NULL, indicating that the tool has no toolbar.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

OM_INLINE GraphicsContext* om::editors::views::SpaceView::Tool::getContext ( ) const
inline

Return a pointer to the graphics context that the tool uses for rendering its own interface.

virtual void om::editors::views::SpaceView::Tool::setContext ( GraphicsContext *  context)
virtual

Set the graphics context that the tool should use for rendering its own interface.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual void om::editors::views::SpaceView::Tool::setScene ( GraphicsScene *  scene)
virtual

Set the scene that contains the graphical representations of the objects in the space view.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual void om::editors::views::SpaceView::Tool::setCamera ( Camera *  camera)
virtual

Set the camera that the space view is currently using to view the scene.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual void om::editors::views::SpaceView::Tool::addSelection ( SpatialObject object)
virtual

A method called by the space view when a new spatial object is added to the current selection.

The default implementation has no effect. Override to handle selections.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual void om::editors::views::SpaceView::Tool::removeSelection ( SpatialObject object)
virtual

A method called by the space view when a spatial object is removed from the current selection.

The default implementation has no effect. Override to handle selections.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual void om::editors::views::SpaceView::Tool::clearSelection ( )
virtual

A method called by the space view when the current selection is cleared.

The default implementation has no effect. Override to handle selections.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual void om::editors::views::SpaceView::Tool::update ( const Time dt)
virtual

Update the state of the tool for the specified time interval in seconds.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual void om::editors::views::SpaceView::Tool::draw ( const SceneRenderer &  renderer,
const Viewport &  viewport 
)
virtual

Draw the visual representation of this tool in the specified viewport on the current framebuffer.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual void om::editors::views::SpaceView::Tool::getRenderables ( const SceneRenderRequest &  sceneRequest,
const om::graphics::RenderRequest renderRequest,
RenderQueue &  renderQueue 
)
virtual

A method which allows the tool to provide graphics data for the space view's main render pass.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual Bool om::editors::views::SpaceView::Tool::guiEvent ( const GUIEvent &  event)
virtual

Process a GUI event received by this tool and return whether or not it was handled.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual Bool om::editors::views::SpaceView::Tool::textEvent ( const TextEvent &  event)
virtual

Process a text event received by this tool and return whether or not it was handled.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual Bool om::editors::views::SpaceView::Tool::keyEvent ( const KeyEvent &  event)
virtual

Process a key event received by this tool and return whether or not it was handled.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual Bool om::editors::views::SpaceView::Tool::mouseButtonEvent ( const MouseButtonEvent &  event)
virtual

Process a mouse button event received by this tool and return whether or not it was handled.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual Bool om::editors::views::SpaceView::Tool::mouseMotionEvent ( const MouseMotionEvent &  event)
virtual

Process a mouse motion event received by this tool and return whether or not it was handled.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

virtual Bool om::editors::views::SpaceView::Tool::mouseWheelEvent ( const MouseWheelEvent &  event)
virtual

Process a mouse wheel event received by this tool and return whether or not it was handled.

Reimplemented in om::editors::views::SelectionTool, and om::editors::views::TransformTool.

Member Data Documentation

GraphicsContext* om::editors::views::SpaceView::Tool::context
protected

A pointer to the graphics context that the tool uses for rendering its own interface.

GraphicsScene* om::editors::views::SpaceView::Tool::scene
protected

The scene that contains the graphical representations of the objects in the space view.

Camera* om::editors::views::SpaceView::Tool::camera
protected

The camera that the space view is currently using to view the scene.

Delegate om::editors::views::SpaceView::Tool::delegate
protected

An object that receieves callback events for the tool.


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