COgreObject Class Reference
An OgreObject manages a 3D object in an Ogre scene. More...
Public Member Functions | |
COgreObject (const OpenViBE::Kernel::IKernelContext &rKernelContext, OpenViBE::CIdentifier oIdentifier, COgreVisualisation *pOgreVis, Ogre::SceneManager *pSceneManager, const OpenViBE::CString &rGeometryFileName) | |
Constructor. More... | |
~COgreObject () | |
Destructor. | |
OpenViBE::CIdentifier | getIdentifier () |
Clone object. More... | |
const OpenViBE::CString & | getName () |
Return object name. | |
const OpenViBE::CString & | getGeometryFileName () |
Return geometry file name. | |
NodeMaterialOrig * | getNodeMaterialOrig () |
Return the node to change the materials. | |
Ogre::SceneNode & | getSceneNode () const |
Retrieve scene node corresponding to this object. | |
OpenViBE::boolean | setVisible (OpenViBE::boolean bVisible) |
Set visibility. More... | |
OpenViBE::boolean | setDiffuseColor (const Ogre::ColourValue &oDiffuse) |
Set the color of an object. More... | |
OpenViBE::boolean | setDiffuseColor (Ogre::Real f32ColorRed, Ogre::Real f32ColorGreen, Ogre::Real f32ColorBlue) |
Set the color of an object. More... | |
OpenViBE::boolean | setTransparency (Ogre::Real transparency) |
Set the transparency of an object. More... | |
OpenViBE::boolean | setPosition (Ogre::Real positionX, Ogre::Real positionY, Ogre::Real positionZ) |
Set the position of an object. More... | |
OpenViBE::boolean | setRotation (Ogre::Real rotationX, Ogre::Real rotationY, Ogre::Real rotationZ) |
Set the orientation of an object. More... | |
OpenViBE::boolean | setRotation (Ogre::Real rotationX, Ogre::Real rotationY, Ogre::Real rotationZ, Ogre::Real rotationW) |
Set the orientation of an object. More... | |
OpenViBE::boolean | setScale (Ogre::Real scaleX, Ogre::Real scaleY, Ogre::Real scaleZ) |
Set the scale of an object. More... | |
OpenViBE::boolean | setVertexColorArray (Ogre::uint32 ui32VertexColorCount, Ogre::Real *pVertexColorArray) |
Set vertex colors of an object. More... | |
OpenViBE::boolean | getVertexCount (Ogre::uint32 &ui32VertexCount) const |
Get object vertex count. More... | |
OpenViBE::boolean | getVertexPositionArray (Ogre::uint32 ui32VertexCount, Ogre::Real *pVertexPositionArray) const |
Get vertex position array. More... | |
OpenViBE::boolean | getTriangleCount (Ogre::uint32 &ui32TriangleCount) const |
Get object triangle count. More... | |
OpenViBE::boolean | getTriangleIndexArray (Ogre::uint32 ui32TriangleCount, OpenViBE::uint32 *pTriangleIndexArray) const |
Get array of face indices. More... | |
OpenViBE::boolean | getWorldBoundingBox (Ogre::Real &rMinX, Ogre::Real &rMinY, Ogre::Real &rMinZ, Ogre::Real &rMaxX, Ogre::Real &rMaxY, Ogre::Real &rMaxZ) |
Get world bounding box of an object. More... | |
Friends | |
class | COgreScene |
Detailed Description
An OgreObject manages a 3D object in an Ogre scene.
- Date
- 2008-06
Constructor & Destructor Documentation
COgreObject | ( | const OpenViBE::Kernel::IKernelContext & | rKernelContext, |
OpenViBE::CIdentifier | oIdentifier, | ||
COgreVisualisation * | pOgreVis, | ||
Ogre::SceneManager * | pSceneManager, | ||
const OpenViBE::CString & | rGeometryFileName | ||
) |
Constructor.
- Parameters
-
[in] rKernelContext OpenViBE kernel context [in] rIdentifier Object identifier [in] pOgreVis pointer to OgreVisualisation object [in] pSceneManager pointer to scene manager this object is to be added to [in] rGeometryfileName name of file containing this object's geometry
Member Function Documentation
OpenViBE::CIdentifier getIdentifier | ( | ) |
Clone object.
- Parameters
-
[in] oIdentifier Identifier of the object [out] pClone Reference of pointer to cloned object
- Returns
- True if cloned object could be created, false otherwiseReturn object identifier
OpenViBE::boolean setVisible | ( | OpenViBE::boolean | bVisible | ) |
Set visibility.
- Parameters
-
bVisible Visibility flag
- Returns
- True if visibility could be set, false otherwise
OpenViBE::boolean setDiffuseColor | ( | const Ogre::ColourValue & | oDiffuse | ) |
Set the color of an object.
- Parameters
-
oDiffuse RGBA diffuse color
- Returns
- True if color could be set, false otherwise
OpenViBE::boolean setDiffuseColor | ( | Ogre::Real | f32ColorRed, |
Ogre::Real | f32ColorGreen, | ||
Ogre::Real | f32ColorBlue | ||
) |
Set the color of an object.
- Parameters
-
f32ColorRed Red component (0 to 1) f32ColorGreen Green component (0 to 1) f32ColorBlue Blue component (0 to 1)
- Returns
- True if color could be set, false otherwise
OpenViBE::boolean setTransparency | ( | Ogre::Real | transparency | ) |
Set the transparency of an object.
- Parameters
-
f32Transparency Transparency (0 to 1, 1 being totally transparent)
- Returns
- True if transparency could be set, false otherwise
OpenViBE::boolean setPosition | ( | Ogre::Real | positionX, |
Ogre::Real | positionY, | ||
Ogre::Real | positionZ | ||
) |
Set the position of an object.
- Parameters
-
f32PositionX X coordinate of position f32PositionY Y coordinate of position f32PositionZ Z coordinate of position
- Returns
- True if object position could be set, false otherwise
OpenViBE::boolean setRotation | ( | Ogre::Real | rotationX, |
Ogre::Real | rotationY, | ||
Ogre::Real | rotationZ | ||
) |
Set the orientation of an object.
- Returns
- True if orientation could be set, false otherwise
OpenViBE::boolean setRotation | ( | Ogre::Real | rotationX, |
Ogre::Real | rotationY, | ||
Ogre::Real | rotationZ, | ||
Ogre::Real | rotationW | ||
) |
Set the orientation of an object.
- Parameters
-
f32OrientationX X component of a quaternion f32OrientationY Y component of a quaternion f32OrientationZ Z component of a quaternion f32OrientationW W component of a quaternion
- Returns
- True if orientation could be set, false otherwise
OpenViBE::boolean setScale | ( | Ogre::Real | scaleX, |
Ogre::Real | scaleY, | ||
Ogre::Real | scaleZ | ||
) |
Set the scale of an object.
- Parameters
-
f32ScaleX X component of scale f32ScaleY Y component of scale f32ScaleZ Z component of scale
- Returns
- True if scale could be set, false otherwise
OpenViBE::boolean setVertexColorArray | ( | Ogre::uint32 | ui32VertexColorCount, |
Ogre::Real * | pVertexColorArray | ||
) |
Set vertex colors of an object.
- Remarks
- This method applies vertex colors to the first mesh of the first Ogre::Entity encountered in the object hierarchy only. For it to work, the Ogre::Mesh needs to have been flagged as using vertex colors in authoring tools.
- Parameters
-
ui32VertexColorCount Number of colors contained in pVertexColorArray pVertexColorArray Array of color triplets
- Returns
- True if colors could be set, false otherwise
OpenViBE::boolean getVertexCount | ( | Ogre::uint32 & | ui32VertexCount | ) | const |
Get object vertex count.
- Remarks
- This method returns the number of vertices in the first mesh of the first Ogre::Entity encountered in the object hierarchy only.
- Parameters
-
ui32VertexCount Number of vertices found in first mesh of first entity
- Returns
- True if vertex count could be retrieved, false otherwise
OpenViBE::boolean getVertexPositionArray | ( | Ogre::uint32 | ui32VertexCount, |
Ogre::Real * | pVertexPositionArray | ||
) | const |
Get vertex position array.
- Remarks
- This method returns vertex positions of the first mesh of the first Ogre::Entity encountered in the object hierarchy only.
- Parameters
-
ui32VertexCount Number of vertices that can be stored in pVertexPositionArray pVertexPositionArray Preallocated array destined to store vertex position triplets
- Returns
- True if vertex positions could be retrieved, false otherwise
OpenViBE::boolean getTriangleCount | ( | Ogre::uint32 & | ui32TriangleCount | ) | const |
Get object triangle count.
- Remarks
- This method returns the number of triangles in the first mesh of the first Ogre::Entity encountered in the object hierarchy only.
- Parameters
-
ui32TriangleCount Number of triangles found in first mesh of first entity
- Returns
- True if triangle count could be retrieved, false otherwise
OpenViBE::boolean getTriangleIndexArray | ( | Ogre::uint32 | ui32TriangleCount, |
OpenViBE::uint32 * | pTriangleIndexArray | ||
) | const |
Get array of face indices.
- Remarks
- This method returns face indices of the first mesh of the first Ogre::Entity encountered in the object hierarchy only.
- Parameters
-
ui32TriangleCount Number of triangles that can be stored in pTriangleIndexArray pTriangleIndexArray Preallocated array destined to store face indices triplets
- Returns
- True if face indices could be retrieved, false otherwise
OpenViBE::boolean getWorldBoundingBox | ( | Ogre::Real & | rMinX, |
Ogre::Real & | rMinY, | ||
Ogre::Real & | rMinZ, | ||
Ogre::Real & | rMaxX, | ||
Ogre::Real & | rMaxY, | ||
Ogre::Real & | rMaxZ | ||
) |
Get world bounding box of an object.
- Parameters
-
rMinX X lower bound rMinY Y lower bound rMinZ Z lower bound rMaxX X upper bound rMaxY Y upper bound rMaxZ Z upper bound
- Returns
- True if bounding box could be retrieved, false otherwise
Generated on Tue Jun 26 2012 15:25:54 for Documentation by
