MIRA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Friends | List of all members
Visualization3DView Class Referenceabstract

3D view of a scene that may contain different visualization objects which show the actual content of the scene. More...

#include <views/Visualization3DView.h>

Inheritance diagram for Visualization3DView:
Inheritance graph
[legend]

Signals

void editorClosed (EditorPart *editor)
 
void editorDestroyed (EditorPart *editor)
 
void windowTitleChanged (EditorPartWindow *editor)
 

Public Member Functions

template<typename Reflector >
void reflect (Reflector &r)
 
QGLWidget * getGLRenderWidget ()
 Returns the GLWidget where this view renders its content (may be NULL if the view is uninitialized) More...
 
virtual QImage captureContent ()
 Returns the content of the editor part as QImage. More...
 
virtual void addVisualization (Visualization *vis)
 Adds an existing visualization to this view. More...
 
virtual void moveUpVisualization (Visualization *vis)
 Change order of visualizations in the view, move the specified visualization up. More...
 
virtual void moveDownVisualization (Visualization *vis)
 Change order of visualizations in the view, move the specified visualization down. More...
 
virtual void addTool (VisualizationTool *tool)
 Adds an existing tool to this view. More...
 
virtual const ClasssupportedVisualizationClass () const
 Derived visualization views must return the base class of their supported visualizations. More...
 
virtual const ClasssupportedVisualizationToolClass () const
 Derived visualization views may return the base class of their supported tools. More...
 
virtual Ogre::SceneManager * getSceneManager ()
 
virtual void registerInteractionListener (InteractionListener3D *listener)
 
virtual void removeInteractionListener (InteractionListener3D *listener)
 
virtual std::set
< InteractionListener3D * > 
getInteractionListeners ()
 
virtual const std::string & getFixedFrame () const
 
virtual const std::string & getCameraFrame () const
 
virtual const Camera & getCamera () const
 Obtains the current camera settings (position, orientation, etc.) of the views own camera. More...
 
virtual void setCamera (const Camera &camera)
 
virtual Ogre::Camera * acquireCamera (boost::function< void()> lostCameraCallback=boost::function< void()>())
 Requests the camera of the visualization site. More...
 
virtual void releaseCamera ()
 Releases a camera that previously was acquired. More...
 
void reflect (XMLDeserializer &r)
 Specialization of reflect method for XML. More...
 
void reflect (XMLSerializer &r)
 Specialization of reflect method for XML. More...
 
virtual void removeVisualization (Visualization *vis)
 Remove the specified visualization from this view. More...
 
const std::list< Visualization * > & getVisualizations () const
 
const std::vector
< VisualizationTool * > & 
getTools () const
 
VisualizationControlPagegetControl ()
 Returns pointer to VisualizationControlPage (or NULL, if no such page was created yet. More...
 
virtual ObjectgetAdapter (const Class &adapter)
 Returns an object which is an instance of the given class associated with this object. More...
 
virtual const ClassdefaultVisualizationClass () const
 If a default visualization class is provided, this class is used to instantiate a default visualization for data objects, no other specialized visualization is found for. More...
 
void setUpdateInterval (int interval)
 
int getUpdateInterval ()
 
VisualizationToolgetActiveTool ()
 Returns the current active tool, or NULL of no tool is active. More...
 
void activateTool (VisualizationTool *tool)
 
void setOfferAuxiliaryVisualizations (bool on)
 
virtual void init (IWorkbenchPartSite *site)
 Is called by the workbench. More...
 
IWorkbenchPartSitegetSite ()
 
void setWidget (QWidget *widget)
 
QWidget * widget () const
 
EditorPartTitleBargetTitleBar ()
 
void undock ()
 Undocks the window from the EditorPartArea and makes it floating. More...
 
void dock ()
 Docks the window back to the EditorPartArea. More...
 
bool isDocked () const
 Returns true, if the window is docked in the EditorPartArea. More...
 
void setOnTop (bool onTop)
 Makes the window stay on top of other windows. More...
 
bool isOnTop () const
 Returns true, if the window stays on top of other windows. More...
 
void showDecorations (bool show)
 
void setAutoHideDecorations (bool on)
 
virtual void activate ()
 Is called by the Workbench to inform the Part that is being activated by the user. More...
 
virtual void deactivate ()
 Is called by the Workbench to inform the Part that is being deactivated since another Part got the focus. More...
 
bool isActivated () const
 Returns true if this ViewPart currently has the focus and hence the users attention. More...
 
Class const & getClass () const
 call the virtual internalGetClass(). More...
 
virtual void setCamera (const Camera &camera)=0
 Sets the current camera settings (position, orientation, etc.) of the views own camera. More...
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Protected Slots

void onMinimized ()
 
void onMaximized ()
 
void onRestored ()
 
void onUndock ()
 
void onDock ()
 
void onOnTop (bool onTop)
 

Protected Member Functions

virtual void update (Duration dt)
 Is called by this class within the update timer event to update the view. More...
 
void changeLightColor ()
 
virtual void changeLightDirection ()
 
void changeAmbientLight ()
 
virtual QWidget * createVisualizationPart ()
 
virtual void resetView ()
 
virtual void saveContentToFile ()
 
virtual void setCameraFrame (const TransformProperty &frame)
 
virtual QWidget * createPartControl ()
 Must be overloaded in subclasses to create the actual widget for this EditorPart. More...
 
void startUpdateTimer ()
 
virtual void timerEvent (QTimerEvent *)
 
bool eventFilter (QObject *obj, QEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 
void keyReleaseEvent (QKeyEvent *event)
 
void focusOutEvent (QFocusEvent *event)
 
std::string getChannelIDFromMimeData (const QMimeData *mimeData)
 
std::list< ClassProxygetVisualizationsFor (const std::string &channelID)
 
void dragEnterEventImpl (QDragEnterEvent *event)
 
void dropEventImpl (QDropEvent *event, QWidget *widget)
 
void destroyVisualizations ()
 
void destroyTools ()
 
QMenu * getViewMenu ()
 Returns the optional editor menu that is shown when the user clicks the editor menu tool button. More...
 
virtual void closeEvent (QCloseEvent *)
 
virtual void paintEvent (QPaintEvent *paintEvent)
 
virtual void changeEvent (QEvent *event)
 
void setActive (bool activate)
 
virtual void windowStateChanged (Qt::WindowStates oldState, Qt::WindowStates newState)
 
void updateDecorations ()
 
void updateStateButtons ()
 
virtual Class const & internalGetClass () const =0
 

Protected Attributes

TransformProperty mFixedFrame
 
TransformProperty mCameraFrame
 

Friends

class UI
 
class RenderModeTechniqueMod
 
class RenderQueueSorter
 

Detailed Description

3D view of a scene that may contain different visualization objects which show the actual content of the scene.

Member Function Documentation

void reflect ( Reflector &  r)
inline
QGLWidget* getGLRenderWidget ( )

Returns the GLWidget where this view renders its content (may be NULL if the view is uninitialized)

virtual QImage captureContent ( )
virtual

Returns the content of the editor part as QImage.

Can be reimplemented by subclasses to provide special capturing techniques that are e.g. required by OpenQL widgets.

Reimplemented from EditorPart.

virtual void addVisualization ( Visualization vis)
virtual

Adds an existing visualization to this view.

The view will take ownership of the visualization and will destroy it upon its own deletion.

Reimplemented from VisualizationView.

virtual void moveUpVisualization ( Visualization vis)
virtual

Change order of visualizations in the view, move the specified visualization up.

The base VisualizationView just changes the order in the stored list of visualizations. Subclasses should overwrite this method to adapt their respective GUI accordingly.

Reimplemented from VisualizationView.

virtual void moveDownVisualization ( Visualization vis)
virtual

Change order of visualizations in the view, move the specified visualization down.

The base VisualizationView just changes the order in the stored list of visualizations. Subclasses should overwrite this method to adapt their respective GUI accordingly.

Reimplemented from VisualizationView.

virtual void addTool ( VisualizationTool tool)
virtual

Adds an existing tool to this view.

The view will take ownership of the tool and will destroy it upon its own deletion.

Reimplemented from VisualizationView.

virtual const Class& supportedVisualizationClass ( ) const
virtual

Derived visualization views must return the base class of their supported visualizations.

Implements VisualizationView.

virtual const Class& supportedVisualizationToolClass ( ) const
virtual

Derived visualization views may return the base class of their supported tools.

The default implementation returns a null-class to indicate that no tools are supported.

Reimplemented from VisualizationView.

virtual void update ( Duration  dt)
protectedvirtual

Is called by this class within the update timer event to update the view.

The visualizations of the view have been updated before this method is called. The update cycle must be enabled by calling startUpdateTimer() after the derived class and its GUI components have been enabled

Implements VisualizationView.

void changeLightColor ( )
protected
virtual void changeLightDirection ( )
protectedvirtual
void changeAmbientLight ( )
protected
virtual QWidget* createVisualizationPart ( )
protectedvirtual

Implements VisualizationView.

virtual void resetView ( )
protectedvirtual

Reimplemented from VisualizationView.

virtual void saveContentToFile ( )
protectedvirtual

Reimplemented from VisualizationView.

virtual void setCameraFrame ( const TransformProperty frame)
protectedvirtual

Reimplemented from VisualizationViewTransformable.

virtual Ogre::SceneManager* getSceneManager ( )
virtual

Implements IVisualization3DSite.

virtual void registerInteractionListener ( InteractionListener3D listener)
virtual

Implements IVisualization3DSite.

virtual void removeInteractionListener ( InteractionListener3D listener)
virtual

Implements IVisualization3DSite.

virtual std::set<InteractionListener3D*> getInteractionListeners ( )
virtual

Implements IVisualization3DSite.

virtual const std::string& getFixedFrame ( ) const
inlinevirtual
virtual const std::string& getCameraFrame ( ) const
inlinevirtual
virtual const Camera& getCamera ( ) const
virtual

Obtains the current camera settings (position, orientation, etc.) of the views own camera.

Implements IVisualization3DSite.

virtual void setCamera ( const Camera &  camera)
virtual
virtual Ogre::Camera* acquireCamera ( boost::function< void()>  lostCameraCallback = boost::function< void()>())
virtual

Requests the camera of the visualization site.

This method can be called by visualizations or tools to get direct access to the camera. The visualization/tool is then responsible for updating the cameras position (e.g. in its update() method). Optionally, a callback can be specified, that is called if another visualization/tool has requested the camera. The visualization finally should release the camera by calling releaseCamera().

Implements IVisualization3DSite.

virtual void releaseCamera ( )
virtual

Releases a camera that previously was acquired.

Implements IVisualization3DSite.

void reflect ( XMLDeserializer r)
inherited

Specialization of reflect method for XML.

void reflect ( XMLSerializer r)
inherited

Specialization of reflect method for XML.

virtual void removeVisualization ( Visualization vis)
virtualinherited

Remove the specified visualization from this view.

The view will give up its ownership of the visualization and the Visualization must be destroyed outside of this view.

const std::list<Visualization*>& getVisualizations ( ) const
inherited
const std::vector<VisualizationTool*>& getTools ( ) const
inherited
VisualizationControlPage* getControl ( )
inherited

Returns pointer to VisualizationControlPage (or NULL, if no such page was created yet.

virtual Object* getAdapter ( const Class adapter)
virtualinherited

Returns an object which is an instance of the given class associated with this object.

Returns nullptr if no such object can be found. The implementation if IAdaptable is responsible for destroying the instance of the created object.

Reimplemented from WorkbenchPart.

virtual const Class& defaultVisualizationClass ( ) const
inlinevirtualinherited

If a default visualization class is provided, this class is used to instantiate a default visualization for data objects, no other specialized visualization is found for.

If no default visualization class exists, such data objects can not be visualized (the default behavior).

virtual QWidget* createPartControl ( )
protectedvirtualinherited

Must be overloaded in subclasses to create the actual widget for this EditorPart.

This EditorPart should be set as parent for the created widget.

Implements EditorPart.

void setUpdateInterval ( int  interval)
inherited
int getUpdateInterval ( )
inherited
VisualizationTool* getActiveTool ( )
inlineinherited

Returns the current active tool, or NULL of no tool is active.

void activateTool ( VisualizationTool tool)
inherited
void setOfferAuxiliaryVisualizations ( bool  on)
inlineinherited
void startUpdateTimer ( )
protectedinherited
virtual void timerEvent ( QTimerEvent *  )
protectedvirtualinherited
bool eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedinherited
void keyPressEvent ( QKeyEvent *  event)
protectedinherited
void keyReleaseEvent ( QKeyEvent *  event)
protectedinherited
void focusOutEvent ( QFocusEvent *  event)
protectedinherited
std::string getChannelIDFromMimeData ( const QMimeData *  mimeData)
protectedinherited
std::list<ClassProxy> getVisualizationsFor ( const std::string &  channelID)
protectedinherited
void dragEnterEventImpl ( QDragEnterEvent *  event)
protectedinherited
void dropEventImpl ( QDropEvent *  event,
QWidget *  widget 
)
protectedinherited
void destroyVisualizations ( )
protectedinherited
void destroyTools ( )
protectedinherited
virtual void init ( IWorkbenchPartSite site)
virtualinherited

Is called by the workbench.

The WorkbenchPart should initialize itself and my store the pointer tothe IWorkbenchPartSite interface for later use.

Implements WorkbenchPart.

IWorkbenchPartSite* getSite ( )
inherited
QMenu* getViewMenu ( )
protectedinherited

Returns the optional editor menu that is shown when the user clicks the editor menu tool button.

An EditorPart can add items to this menu within it's createPartControl() method, by calling this method and populating items to the menu.

virtual void closeEvent ( QCloseEvent *  )
protectedvirtualinherited
void editorClosed ( EditorPart editor)
signalinherited
void editorDestroyed ( EditorPart editor)
signalinherited
void setWidget ( QWidget *  widget)
inherited
QWidget* widget ( ) const
inherited
EditorPartTitleBar* getTitleBar ( )
inherited
void undock ( )
inlineinherited

Undocks the window from the EditorPartArea and makes it floating.

void dock ( )
inlineinherited

Docks the window back to the EditorPartArea.

bool isDocked ( ) const
inlineinherited

Returns true, if the window is docked in the EditorPartArea.

void setOnTop ( bool  onTop)
inlineinherited

Makes the window stay on top of other windows.

bool isOnTop ( ) const
inlineinherited

Returns true, if the window stays on top of other windows.

void showDecorations ( bool  show)
inherited
void setAutoHideDecorations ( bool  on)
inherited
virtual void paintEvent ( QPaintEvent *  paintEvent)
protectedvirtualinherited
virtual void changeEvent ( QEvent *  event)
protectedvirtualinherited
void setActive ( bool  activate)
protectedinherited
virtual void windowStateChanged ( Qt::WindowStates  oldState,
Qt::WindowStates  newState 
)
protectedvirtualinherited
void updateDecorations ( )
protectedinherited
void updateStateButtons ( )
protectedinherited
void onMinimized ( )
protectedslotinherited
void onMaximized ( )
protectedslotinherited
void onRestored ( )
protectedslotinherited
void onUndock ( )
protectedslotinherited
void onDock ( )
protectedslotinherited
void onOnTop ( bool  onTop)
protectedslotinherited
void windowTitleChanged ( EditorPartWindow editor)
signalinherited
virtual void activate ( )
virtualinherited

Is called by the Workbench to inform the Part that is being activated by the user.

Implements IWorkbenchPart.

Reimplemented in ViewPart.

virtual void deactivate ( )
virtualinherited

Is called by the Workbench to inform the Part that is being deactivated since another Part got the focus.

Implements IWorkbenchPart.

Reimplemented in ViewPart.

bool isActivated ( ) const
inlineinherited

Returns true if this ViewPart currently has the focus and hence the users attention.

Class const& getClass ( ) const
inlineinherited

call the virtual internalGetClass().

static PseudoClass const& CLASS ( )
inlinestaticinherited
virtual Class const& internalGetClass ( ) const
protectedpure virtualinherited
virtual void setCamera ( const Camera camera)
pure virtualinherited

Sets the current camera settings (position, orientation, etc.) of the views own camera.

Implemented in Visualization3DContainer.

Friends And Related Function Documentation

friend class UI
friend
friend class RenderModeTechniqueMod
friend
friend class RenderQueueSorter
friend

Member Data Documentation

TransformProperty mFixedFrame
protectedinherited
TransformProperty mCameraFrame
protectedinherited

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