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

#include <visualization/3d/MeshObject.h>

Inheritance diagram for MeshObject:
Inheritance graph
[legend]

Public Member Functions

 MeshObject (const std::string &mesh, Ogre::SceneManager *sceneManager, Ogre::SceneNode *parent=NULL)
 Constructs a mesh object that renders the specified mesh resource as child of 'parent'. More...
 
 MeshObject (const std::string &mesh, Ogre::MaterialPtr material, Ogre::SceneManager *sceneManager, Ogre::SceneNode *parent=NULL)
 Constructs a mesh object that renders the specified mesh resource as child of 'parent'. More...
 
virtual ~MeshObject ()
 
virtual void setColor (const Ogre::ColourValue &color)
 Sets the base color of the mesh's material. More...
 
Ogre::MaterialPtr getMaterial ()
 Returns the default material that is created and set in the constructor. More...
 
Ogre::Entity * getEntity ()
 Returns the entity that is created and set in the constructor. More...
 
virtual void setScale (const Ogre::Vector3 &scale)
 
virtual void setScale (const Eigen::Vector3f &scale)
 
virtual void setPosition (const Ogre::Vector3 &position)
 
virtual void setPosition (const Eigen::Vector3f &position)
 
virtual void setOrientation (const Ogre::Quaternion &orientation)
 
virtual void setOrientation (const Eigen::Quaternionf &orientation)
 
virtual void setColor (Color::RGBA color)
 
virtual void setTransform (const RigidTransform2f &transform)
 
virtual void setTransform (const RigidTransform3f &transform)
 
virtual void setVisible (bool visible, bool cascade=true)
 
Ogre::SceneNode * getNode ()
 

Protected Member Functions

void create (const std::string &mesh)
 

Protected Attributes

Ogre::Entity * mEntity
 
Ogre::MaterialPtr mMaterial
 
bool mOwnsMaterial
 
Ogre::SceneManager * mSceneManager
 
Ogre::SceneNode * mNode
 

Detailed Description

Examples:
tutorials/Point3BasicVisualization.C, and tutorials/Point3Visualization.C.

Constructor & Destructor Documentation

◆ MeshObject() [1/2]

MeshObject ( const std::string &  mesh,
Ogre::SceneManager *  sceneManager,
Ogre::SceneNode *  parent = NULL 
)

Constructs a mesh object that renders the specified mesh resource as child of 'parent'.

A material is created, and destroyed when the object is deleted.

◆ MeshObject() [2/2]

MeshObject ( const std::string &  mesh,
Ogre::MaterialPtr  material,
Ogre::SceneManager *  sceneManager,
Ogre::SceneNode *  parent = NULL 
)

Constructs a mesh object that renders the specified mesh resource as child of 'parent'.

As the MeshObject possibly manipulates the material in setColor(), only use this constructor if you really need the object to share its material with other objects. Otherwise prefer the above constructor which lets the object create its own independent material.

◆ ~MeshObject()

virtual ~MeshObject ( )
virtual

Member Function Documentation

◆ setColor() [1/2]

virtual void setColor ( const Ogre::ColourValue &  color)
virtual

Sets the base color of the mesh's material.

Note
This method manipulates the material based on its transparency: alpha < 1: Scene Blending = Ogre::SBT_TRANSPARENT_ALPHA, Depth-buffer Writing == off alpha = 1: Scene Blending = Ogre::SBT_REPLACE, Depth-buffer Writing == on

Reimplemented from VisualizationObject.

◆ getMaterial()

Ogre::MaterialPtr getMaterial ( )
inline

Returns the default material that is created and set in the constructor.

◆ getEntity()

Ogre::Entity* getEntity ( )
inline

Returns the entity that is created and set in the constructor.

◆ create()

void create ( const std::string &  mesh)
protected

◆ setScale() [1/2]

virtual void setScale ( const Ogre::Vector3 &  scale)
virtualinherited

◆ setScale() [2/2]

virtual void setScale ( const Eigen::Vector3f &  scale)
virtualinherited

◆ setPosition() [1/2]

virtual void setPosition ( const Ogre::Vector3 &  position)
virtualinherited

◆ setPosition() [2/2]

virtual void setPosition ( const Eigen::Vector3f &  position)
virtualinherited

◆ setOrientation() [1/2]

virtual void setOrientation ( const Ogre::Quaternion &  orientation)
virtualinherited

◆ setOrientation() [2/2]

virtual void setOrientation ( const Eigen::Quaternionf orientation)
virtualinherited

◆ setColor() [2/2]

virtual void setColor ( Color::RGBA  color)
inlinevirtualinherited

◆ setTransform() [1/2]

virtual void setTransform ( const RigidTransform2f transform)
virtualinherited

◆ setTransform() [2/2]

virtual void setTransform ( const RigidTransform3f transform)
virtualinherited

◆ setVisible()

virtual void setVisible ( bool  visible,
bool  cascade = true 
)
virtualinherited

Reimplemented in TextObject, AxesObject, and LineStripObject.

◆ getNode()

Ogre::SceneNode* getNode ( )
inlineinherited

Member Data Documentation

◆ mEntity

Ogre::Entity* mEntity
protected

◆ mMaterial

Ogre::MaterialPtr mMaterial
protected

◆ mOwnsMaterial

bool mOwnsMaterial
protected

◆ mSceneManager

Ogre::SceneManager* mSceneManager
protectedinherited

◆ mNode

Ogre::SceneNode* mNode
protectedinherited

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