MIRA
|
A standalone container for 3D visualizations, similar to Visualization3DView but as lightweight standalone widget instead of a view within the RCP framework. More...
#include <visualization/Visualization3DContainer.h>
Public Types | |
enum | CameraMode { PERSPECTIVE =0, ORTHOGRAPHIC, BIRDS_EYE } |
enum | StereoMode { NONE, CROSSED_EYE } |
enum | BackgroundMode { BACKGROUND_SOLID =0, BACKGROUND_GRADIENT, BACKGROUND_WHITE, BACKGROUND_BLACK } |
enum | RenderMode { NORMAL = 0, WIREFRAME, HIDDEN_LINE } |
Public Member Functions | |
Visualization3DContainer (QWidget *parent=NULL, bool enableOrbitTool=true) | |
virtual | ~Visualization3DContainer () |
Visualization3D * | addVisualization (const std::string &visualizationClassName) |
Creates an instance of the specified visualization class, adds it to the container and returns a pointer to it. More... | |
void | addVisualization (Visualization3D *vis) |
Adds the specified visualization instance to the container. More... | |
std::string | getPropertyString (Visualization3D *vis, const std::string &property) |
Returns the value of the specified property for the specified visualization as string. More... | |
template<typename T > | |
T | getProperty (Visualization3D *vis, const std::string &property) |
Returns the value of the specified property for the specified visualization. More... | |
void | setPropertyString (Visualization3D *vis, const std::string &property, const std::string &value) |
Sets the value of the specified property for the specified visualization from string. More... | |
template<typename T > | |
void | setProperty (Visualization3D *vis, const std::string &property, const T &value) |
Sets the value of the specified property for the specified visualization. More... | |
PropertyEditor * | getPropertyEditor (QWidget *parent=NULL) |
Creates a property editor (if not yet created) and returns the pointer to it. More... | |
virtual Ogre::SceneManager * | getSceneManager () |
virtual void | registerInteractionListener (InteractionListener3D *listener) |
virtual void | removeInteractionListener (InteractionListener3D *listener) |
virtual std::set< InteractionListener3D * > | getInteractionListeners () |
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) |
Sets the current camera settings (position, orientation, etc.) of the views own camera. More... | |
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... | |
virtual const std::string & | getFixedFrame () const |
virtual const std::string & | getCameraFrame () const |
void | setFixedFrame (const std::string &frame) |
void | setCameraFrame (const std::string &frame) |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | wheelEvent (QWheelEvent *e) |
virtual void | timerEvent (QTimerEvent *e) |
void | setBackgroundMode (BackgroundMode mode) |
void | setBackgroundColor1 (Ogre::ColourValue color1) |
void | setBackgroundColor2 (Ogre::ColourValue color2) |
void | setBackgroundColors (Ogre::ColourValue color1, Ogre::ColourValue color2) |
void | setCameraMode (CameraMode mode) |
void | setRenderMode (RenderMode mode) |
void | setStereoMode (StereoMode mode) |
void | showBoundingBoxes (bool show=true) |
void | setCamera (const Point3f &position, float yaw, float pitch, float roll, float distance) |
void | lookAt (const Point3f &from, const Point3f &to) |
virtual void | paintGL () |
Protected Member Functions | |
virtual void | initOgre () |
May be overwritten in subclasses to initialize your Ogre components. More... | |
void | updateCamera () |
virtual void | initializeGL () |
virtual void | resizeGL (int w, int h) |
Ogre::RenderWindow * | getRenderWindow () |
Protected Attributes | |
BackgroundMode | mBackgroundMode |
Ogre::ColourValue | mBackgroundColor1 |
Ogre::ColourValue | mBackgroundColor2 |
CameraMode | mCameraMode |
RenderMode | mRenderMode |
StereoMode | mStereoMode |
float | mStereoEyeDistance |
bool | mShowBoundingBoxes |
Ogre::Light * | mLight |
Ogre::Camera * | mCamera |
Ogre::Camera * | mCameraRight |
Ogre::Viewport * | mViewport |
Ogre::Viewport * | mViewportRight |
Ogre::SceneManager * | mSceneManager |
ColouredRectangle2D * | mBackground |
RenderModeTechniqueMod * | mRenderModeTechniqueMod |
A standalone container for 3D visualizations, similar to Visualization3DView but as lightweight standalone widget instead of a view within the RCP framework.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Visualization3DContainer | ( | QWidget * | parent = NULL , |
bool | enableOrbitTool = true |
||
) |
|
virtual |
Visualization3D* addVisualization | ( | const std::string & | visualizationClassName | ) |
Creates an instance of the specified visualization class, adds it to the container and returns a pointer to it.
void addVisualization | ( | Visualization3D * | vis | ) |
Adds the specified visualization instance to the container.
The container will take ownership of the visualization.
std::string getPropertyString | ( | Visualization3D * | vis, |
const std::string & | property | ||
) |
Returns the value of the specified property for the specified visualization as string.
|
inline |
Returns the value of the specified property for the specified visualization.
void setPropertyString | ( | Visualization3D * | vis, |
const std::string & | property, | ||
const std::string & | value | ||
) |
Sets the value of the specified property for the specified visualization from string.
|
inline |
Sets the value of the specified property for the specified visualization.
PropertyEditor* getPropertyEditor | ( | QWidget * | parent = NULL | ) |
Creates a property editor (if not yet created) and returns the pointer to it.
The widget is hidden by default. Hence, you should call its show() method. Moreover, the widget has no parent by default. The parent can be set in the first call of this method as optional parameter.
|
virtual |
Implements IVisualization3DSite.
|
virtual |
Implements IVisualization3DSite.
|
virtual |
Implements IVisualization3DSite.
|
virtual |
Implements IVisualization3DSite.
|
virtual |
Obtains the current camera settings (position, orientation, etc.) of the views own camera.
Implements IVisualization3DSite.
|
virtual |
Sets the current camera settings (position, orientation, etc.) of the views own camera.
Implements IVisualization3DSite.
|
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 |
Releases a camera that previously was acquired.
Implements IVisualization3DSite.
|
virtual |
Implements IVisualizationSiteTransformable.
|
virtual |
Implements IVisualizationSiteTransformable.
void setFixedFrame | ( | const std::string & | frame | ) |
void setCameraFrame | ( | const std::string & | frame | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
May be overwritten in subclasses to initialize your Ogre components.
This method is called after the main parts of Ogre (including the render window) are created.
Reimplemented from OgreWidgetEx.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
virtualinherited |
|
protectedvirtualinherited |
|
protectedvirtualinherited |
|
inlineprotectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |