COgreScene Class Reference

Management of an Ogre scene This class creates a scene manager and a default 3D scene which can be populated using a simplified 3D API. More...

Public Member Functions

 COgreScene (const OpenViBE::Kernel::IKernelContext &rKernelContext, const Ogre::String &rName, COgreVisualisation *pOgreVis)
 Constructor. More...
 
 ~COgreScene ()
 Destructor.
 
OpenViBE::boolean init ()
 Create a new scene manager and a default 3D scene. More...
 
const Ogre::String & getName ()
 Get the name of this object. More...
 
Ogre::SceneManager * getSceneManager ()
 Get pointer to this scene's SceneManager. More...
 
void getBoundingBox (OpenViBE::float32 &rMinX, OpenViBE::float32 &rMinY, OpenViBE::float32 &rMinZ, OpenViBE::float32 &rMaxX, OpenViBE::float32 &rMaxY, OpenViBE::float32 &rMaxZ)
 Get axis aligned bounding box of objects contained in this scene. More...
 
COgreObjectcreateObject (OpenViBE::CIdentifier rObjectIdentifier, const OpenViBE::CString &rGeometryFileName, const OpenViBE::CNameValuePairList &rNameValuePairList)
 Create a new 3D object. More...
 
COgreObjectcreatePlane (OpenViBE::CIdentifier rObjectIdentifier, const OpenViBE::CNameValuePairList &rNameValuePairList)
 Create a new 3D plane. More...
 
OpenViBE::boolean removeObject (OpenViBE::CIdentifier rObjectIdentifier)
 Remove a 3D object. More...
 
COgreObjectgetOgreObject (OpenViBE::CIdentifier rObjectIdentifier)
 Get an Ogre object. More...
 

Detailed Description

Management of an Ogre scene This class creates a scene manager and a default 3D scene which can be populated using a simplified 3D API.

Author
Vincent Delannoy (INRIA/IRISA)
Date
2008-06

Constructor & Destructor Documentation

COgreScene ( const OpenViBE::Kernel::IKernelContext rKernelContext,
const Ogre::String &  rName,
COgreVisualisation pOgreVis 
)

Constructor.

Parameters
[in]rKernelContextOpenViBE kernel context
[in]rNameName of the object
[in]pOgreVisPointer to Ogre visualisation

Member Function Documentation

OpenViBE::boolean init ( )

Create a new scene manager and a default 3D scene.

Remarks
This method should only be called after primary render window is created and resources are loaded
Returns
True if new scene was successfully created, false otherwise
const Ogre::String& getName ( )

Get the name of this object.

Returns
Name of this object
Ogre::SceneManager* getSceneManager ( )

Get pointer to this scene's SceneManager.

Returns
Pointer to scene manager
void getBoundingBox ( OpenViBE::float32 &  rMinX,
OpenViBE::float32 &  rMinY,
OpenViBE::float32 &  rMinZ,
OpenViBE::float32 &  rMaxX,
OpenViBE::float32 &  rMaxY,
OpenViBE::float32 &  rMaxZ 
)

Get axis aligned bounding box of objects contained in this scene.

Parameters
rMinXX lower bound
rMinYY lower bound
rMinZZ lower bound
rMaxXX upper bound
rMaxYY upper bound
rMaxZZ upper bound
COgreObject* createObject ( OpenViBE::CIdentifier  rObjectIdentifier,
const OpenViBE::CString rGeometryFileName,
const OpenViBE::CNameValuePairList rNameValuePairList 
)

Create a new 3D object.

Parameters
rObjectIdentifierIdentifier to give to new object
rGeometryFileName.scene filename containing object geometry
rNameValuePairListObject creation parameters
Returns
Pointer to newly created object
COgreObject* createPlane ( OpenViBE::CIdentifier  rObjectIdentifier,
const OpenViBE::CNameValuePairList rNameValuePairList 
)

Create a new 3D plane.

Parameters
rObjectIdentifierIdentifier to give to new object
rNameValuePairListObject creation parameters
Returns
Pointer to newly created object
OpenViBE::boolean removeObject ( OpenViBE::CIdentifier  rObjectIdentifier)

Remove a 3D object.

Parameters
rObjectIdentifierIdentifier of object to be removed
Returns
True if object was removed successfully, false otherwise
COgreObject* getOgreObject ( OpenViBE::CIdentifier  rObjectIdentifier)

Get an Ogre object.

Parameters
rObjectIdentifierIdentifier of object to retrieve
Returns
Pointer to Ogre object if it was found, NULL otherwise