MIRA
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

◆ reflect() [1/3]

void reflect ( Reflector &  r)
inline

◆ getGLRenderWidget()

QGLWidget* getGLRenderWidget ( )

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

◆ captureContent()

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.

◆ addVisualization()

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.

◆ moveUpVisualization()

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.

◆ moveDownVisualization()

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.

◆ addTool()

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.

◆ supportedVisualizationClass()

virtual const Class& supportedVisualizationClass ( ) const
virtual

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

Implements VisualizationView.

◆ supportedVisualizationToolClass()

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.

◆ update()

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.

◆ changeLightColor()

void changeLightColor ( )
protected

◆ changeLightDirection()

virtual void changeLightDirection ( )
protectedvirtual

◆ changeAmbientLight()

void changeAmbientLight ( )
protected

◆ createVisualizationPart()

virtual QWidget* createVisualizationPart ( )
protectedvirtual

Implements VisualizationView.

◆ resetView()

virtual void resetView ( )
protectedvirtual

Reimplemented from VisualizationView.

◆ saveContentToFile()

virtual void saveContentToFile ( )
protectedvirtual

Reimplemented from VisualizationView.

◆ setCameraFrame()

virtual void setCameraFrame ( const TransformProperty frame)
protectedvirtual

Reimplemented from VisualizationViewTransformable.

◆ getSceneManager()

virtual Ogre::SceneManager* getSceneManager ( )
virtual

Implements IVisualization3DSite.

◆ registerInteractionListener()

virtual void registerInteractionListener ( InteractionListener3D listener)
virtual

Implements IVisualization3DSite.

◆ removeInteractionListener()

virtual void removeInteractionListener ( InteractionListener3D listener)
virtual

Implements IVisualization3DSite.

◆ getInteractionListeners()

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

Implements IVisualization3DSite.

◆ getFixedFrame()

virtual const std::string& getFixedFrame ( ) const
inlinevirtual

◆ getCameraFrame()

virtual const std::string& getCameraFrame ( ) const
inlinevirtual

◆ getCamera()

virtual const Camera& getCamera ( ) const
virtual

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

Implements IVisualization3DSite.

◆ setCamera() [1/2]

virtual void setCamera ( const Camera &  camera)
virtual

◆ acquireCamera()

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.

◆ releaseCamera()

virtual void releaseCamera ( )
virtual

Releases a camera that previously was acquired.

Implements IVisualization3DSite.

◆ reflect() [2/3]

void reflect ( XMLDeserializer r)
inherited

Specialization of reflect method for XML.

◆ reflect() [3/3]

void reflect ( XMLSerializer r)
inherited

Specialization of reflect method for XML.

◆ removeVisualization()

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.

◆ getVisualizations()

const std::list<Visualization*>& getVisualizations ( ) const
inherited

◆ getTools()

const std::vector<VisualizationTool*>& getTools ( ) const
inherited

◆ getControl()

VisualizationControlPage* getControl ( )
inherited

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

◆ getAdapter()

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.

◆ defaultVisualizationClass()

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).

◆ createPartControl()

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.

◆ setUpdateInterval()

void setUpdateInterval ( int  interval)
inherited

◆ getUpdateInterval()

int getUpdateInterval ( )
inherited

◆ getActiveTool()

VisualizationTool* getActiveTool ( )
inlineinherited

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

◆ activateTool()

void activateTool ( VisualizationTool tool)
inherited

◆ setOfferAuxiliaryVisualizations()

void setOfferAuxiliaryVisualizations ( bool  on)
inlineinherited

◆ startUpdateTimer()

void startUpdateTimer ( )
protectedinherited

◆ timerEvent()

virtual void timerEvent ( QTimerEvent *  )
protectedvirtualinherited

◆ eventFilter()

bool eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedinherited

◆ keyPressEvent()

void keyPressEvent ( QKeyEvent *  event)
protectedinherited

◆ keyReleaseEvent()

void keyReleaseEvent ( QKeyEvent *  event)
protectedinherited

◆ focusOutEvent()

void focusOutEvent ( QFocusEvent *  event)
protectedinherited

◆ getChannelIDFromMimeData()

std::string getChannelIDFromMimeData ( const QMimeData *  mimeData)
protectedinherited

◆ getVisualizationsFor()

std::list<ClassProxy> getVisualizationsFor ( const std::string &  channelID)
protectedinherited

◆ dragEnterEventImpl()

void dragEnterEventImpl ( QDragEnterEvent *  event)
protectedinherited

◆ dropEventImpl()

void dropEventImpl ( QDropEvent *  event,
QWidget *  widget 
)
protectedinherited

◆ destroyVisualizations()

void destroyVisualizations ( )
protectedinherited

◆ destroyTools()

void destroyTools ( )
protectedinherited

◆ init()

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.

◆ getSite()

IWorkbenchPartSite* getSite ( )
inherited

◆ getViewMenu()

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.

◆ closeEvent()

virtual void closeEvent ( QCloseEvent *  )
protectedvirtualinherited

◆ editorClosed

void editorClosed ( EditorPart editor)
signalinherited

◆ editorDestroyed

void editorDestroyed ( EditorPart editor)
signalinherited

◆ setWidget()

void setWidget ( QWidget *  widget)
inherited

◆ widget()

QWidget* widget ( ) const
inherited

◆ getTitleBar()

EditorPartTitleBar* getTitleBar ( )
inherited

◆ undock()

void undock ( )
inlineinherited

Undocks the window from the EditorPartArea and makes it floating.

◆ dock()

void dock ( )
inlineinherited

Docks the window back to the EditorPartArea.

◆ isDocked()

bool isDocked ( ) const
inlineinherited

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

◆ setOnTop()

void setOnTop ( bool  onTop)
inlineinherited

Makes the window stay on top of other windows.

◆ isOnTop()

bool isOnTop ( ) const
inlineinherited

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

◆ showDecorations()

void showDecorations ( bool  show)
inherited

◆ setAutoHideDecorations()

void setAutoHideDecorations ( bool  on)
inherited

◆ paintEvent()

virtual void paintEvent ( QPaintEvent *  paintEvent)
protectedvirtualinherited

◆ changeEvent()

virtual void changeEvent ( QEvent *  event)
protectedvirtualinherited

◆ setActive()

void setActive ( bool  activate)
protectedinherited

◆ windowStateChanged()

virtual void windowStateChanged ( Qt::WindowStates  oldState,
Qt::WindowStates  newState 
)
protectedvirtualinherited

◆ updateDecorations()

void updateDecorations ( )
protectedinherited

◆ updateStateButtons()

void updateStateButtons ( )
protectedinherited

◆ onMinimized

void onMinimized ( )
protectedslotinherited

◆ onMaximized

void onMaximized ( )
protectedslotinherited

◆ onRestored

void onRestored ( )
protectedslotinherited

◆ onUndock

void onUndock ( )
protectedslotinherited

◆ onDock

void onDock ( )
protectedslotinherited

◆ onOnTop

void onOnTop ( bool  onTop)
protectedslotinherited

◆ windowTitleChanged

void windowTitleChanged ( EditorPartWindow editor)
signalinherited

◆ activate()

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.

◆ deactivate()

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.

◆ isActivated()

bool isActivated ( ) const
inlineinherited

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

◆ getClass()

Class const& getClass ( ) const
inlineinherited

call the virtual internalGetClass().

◆ CLASS()

static PseudoClass const& CLASS ( )
inlinestaticinherited

◆ internalGetClass()

virtual Class const& internalGetClass ( ) const
protectedpure virtualinherited

◆ setCamera() [2/2]

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

◆ UI

friend class UI
friend

◆ RenderModeTechniqueMod

friend class RenderModeTechniqueMod
friend

◆ RenderQueueSorter

friend class RenderQueueSorter
friend

Member Data Documentation

◆ mFixedFrame

TransformProperty mFixedFrame
protectedinherited

◆ mCameraFrame

TransformProperty mCameraFrame
protectedinherited

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