MIRA
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OgreWidgetEx Class Reference

Extended version of OgreWidget that provides default setup of Ogre components (scene manager, light, camera, etc.) and hence provides a ready-to-use playground for 3D rendering. More...

#include <widgets/OgreWidgetEx.h>

Inheritance diagram for OgreWidgetEx:
Inheritance graph
[legend]

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

 OgreWidgetEx (QWidget *parent=0)
 
virtual ~OgreWidgetEx ()
 
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
 
struct {
   Point3f   position
 
   float   yaw
 
   float   pitch
 
   float   roll
 
   float   distance
 
mCameraSettings
 
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
 

Detailed Description

Extended version of OgreWidget that provides default setup of Ogre components (scene manager, light, camera, etc.) and hence provides a ready-to-use playground for 3D rendering.

It moreover provides advanced capabilities such as:

Member Enumeration Documentation

◆ CameraMode

enum CameraMode
Enumerator
PERSPECTIVE 
ORTHOGRAPHIC 
BIRDS_EYE 

◆ StereoMode

enum StereoMode
Enumerator
NONE 
CROSSED_EYE 

◆ BackgroundMode

Enumerator
BACKGROUND_SOLID 
BACKGROUND_GRADIENT 
BACKGROUND_WHITE 
BACKGROUND_BLACK 

◆ RenderMode

enum RenderMode
Enumerator
NORMAL 
WIREFRAME 
HIDDEN_LINE 

Constructor & Destructor Documentation

◆ OgreWidgetEx()

OgreWidgetEx ( QWidget *  parent = 0)
explicit

◆ ~OgreWidgetEx()

virtual ~OgreWidgetEx ( )
virtual

Member Function Documentation

◆ initOgre()

virtual void initOgre ( )
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 OgreWidget.

Reimplemented in Visualization3DContainer.

◆ setBackgroundMode()

void setBackgroundMode ( BackgroundMode  mode)

◆ setBackgroundColor1()

void setBackgroundColor1 ( Ogre::ColourValue  color1)

◆ setBackgroundColor2()

void setBackgroundColor2 ( Ogre::ColourValue  color2)

◆ setBackgroundColors()

void setBackgroundColors ( Ogre::ColourValue  color1,
Ogre::ColourValue  color2 
)

◆ setCameraMode()

void setCameraMode ( CameraMode  mode)

◆ setRenderMode()

void setRenderMode ( RenderMode  mode)

◆ setStereoMode()

void setStereoMode ( StereoMode  mode)

◆ showBoundingBoxes()

void showBoundingBoxes ( bool  show = true)

◆ setCamera()

void setCamera ( const Point3f position,
float  yaw,
float  pitch,
float  roll,
float  distance 
)

◆ lookAt()

void lookAt ( const Point3f from,
const Point3f to 
)

◆ updateCamera()

void updateCamera ( )
protected

◆ paintGL()

virtual void paintGL ( )
virtualinherited

◆ initializeGL()

virtual void initializeGL ( )
protectedvirtualinherited

◆ resizeGL()

virtual void resizeGL ( int  w,
int  h 
)
protectedvirtualinherited

◆ getRenderWindow()

Ogre::RenderWindow* getRenderWindow ( )
inlineprotectedinherited

Member Data Documentation

◆ mBackgroundMode

BackgroundMode mBackgroundMode
protected

◆ mBackgroundColor1

Ogre::ColourValue mBackgroundColor1
protected

◆ mBackgroundColor2

Ogre::ColourValue mBackgroundColor2
protected

◆ mCameraMode

CameraMode mCameraMode
protected

◆ position

Point3f position

◆ yaw

float yaw

◆ pitch

float pitch

◆ roll

float roll

◆ distance

float distance

◆ mCameraSettings

struct { ... } mCameraSettings

◆ mRenderMode

RenderMode mRenderMode
protected

◆ mStereoMode

StereoMode mStereoMode
protected

◆ mStereoEyeDistance

float mStereoEyeDistance
protected

◆ mShowBoundingBoxes

bool mShowBoundingBoxes
protected

◆ mLight

Ogre::Light* mLight
protected

◆ mCamera

Ogre::Camera* mCamera
protected

◆ mCameraRight

Ogre::Camera* mCameraRight
protected

◆ mViewport

Ogre::Viewport* mViewport
protected

◆ mViewportRight

Ogre::Viewport* mViewportRight
protected

◆ mSceneManager

Ogre::SceneManager* mSceneManager
protected

◆ mBackground

ColouredRectangle2D* mBackground
protected

◆ mRenderModeTechniqueMod

RenderModeTechniqueMod* mRenderModeTechniqueMod
protected

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