Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
rviz::Shape Class Reference

#include <shape.h>

Inheritance diagram for rviz::Shape:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Type {
  Cone, Cube, Cylinder, Sphere,
  Mesh
}

Public Member Functions

Ogre::Entity * getEntity ()
Ogre::MaterialPtr getMaterial ()
virtual const Ogre::Quaternion & getOrientation ()
 Get the local orientation of this object.
virtual const Ogre::Vector3getPosition ()
 Get the local position of this object.
Ogre::SceneNode * getRootNode ()
 Get the root scene node (pivot node) for this object.
Type getType ()
virtual void setColor (float r, float g, float b, float a)
 Set the color of the object. Values are in the range [0, 1].
void setColor (const Ogre::ColourValue &c)
void setOffset (const Ogre::Vector3 &offset)
 Set the offset for this shape.
virtual void setOrientation (const Ogre::Quaternion &orientation)
 Set the orientation of the object.
virtual void setPosition (const Ogre::Vector3 &position)
 Set the position of this object.
virtual void setScale (const Ogre::Vector3 &scale)
 Set the scale of the object. Always relative to the identity orientation of the object.
void setUserData (const Ogre::Any &data)
 Sets user data on all ogre objects we own.
 Shape (Type shape_type, Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node=NULL)
 Constructor.
virtual ~Shape ()

Static Public Member Functions

static Ogre::Entity * createEntity (const std::string &name, Type shape_type, Ogre::SceneManager *scene_manager)

Protected Attributes

Ogre::Entity * entity_
Ogre::MaterialPtr material_
std::string material_name_
Ogre::SceneNode * offset_node_
Ogre::SceneNode * scene_node_
Type type_

Detailed Description

Definition at line 52 of file shape.h.


Member Enumeration Documentation

Enumerator:
Cone 
Cube 
Cylinder 
Sphere 
Mesh 

Definition at line 55 of file shape.h.


Constructor & Destructor Documentation

rviz::Shape::Shape ( Type  shape_type,
Ogre::SceneManager *  scene_manager,
Ogre::SceneNode *  parent_node = NULL 
)

Constructor.

Parameters:
scene_managerThe scene manager this object is associated with
parent_nodeA scene node to use as the parent of this object. If NULL, uses the root scene node.

Definition at line 77 of file shape.cpp.

rviz::Shape::~Shape ( ) [virtual]

Definition at line 113 of file shape.cpp.


Member Function Documentation

Ogre::Entity * rviz::Shape::createEntity ( const std::string &  name,
Type  shape_type,
Ogre::SceneManager *  scene_manager 
) [static]

Definition at line 46 of file shape.cpp.

Ogre::Entity* rviz::Shape::getEntity ( ) [inline]

Definition at line 104 of file shape.h.

Ogre::MaterialPtr rviz::Shape::getMaterial ( void  ) [inline]

Definition at line 106 of file shape.h.

const Ogre::Quaternion & rviz::Shape::getOrientation ( ) [virtual]

Get the local orientation of this object.

Returns:
The orientation

Implements rviz::Object.

Definition at line 172 of file shape.cpp.

const Ogre::Vector3 & rviz::Shape::getPosition ( ) [virtual]

Get the local position of this object.

Returns:
The position

Implements rviz::Object.

Definition at line 167 of file shape.cpp.

Ogre::SceneNode* rviz::Shape::getRootNode ( ) [inline]

Get the root scene node (pivot node) for this object.

Returns:
The root scene node of this object

Definition at line 97 of file shape.h.

Type rviz::Shape::getType ( ) [inline]

Definition at line 73 of file shape.h.

void rviz::Shape::setColor ( float  r,
float  g,
float  b,
float  a 
) [virtual]

Set the color of the object. Values are in the range [0, 1].

Parameters:
rRed component
gGreen component
bBlue component

Implements rviz::Object.

Definition at line 142 of file shape.cpp.

void rviz::Shape::setColor ( const Ogre::ColourValue &  c)

Definition at line 125 of file shape.cpp.

void rviz::Shape::setOffset ( const Ogre::Vector3 offset)

Set the offset for this shape.

The default is no offset, which puts the pivot point directly in the center of the object.

Parameters:
offsetAmount to offset the center of the object from the pivot point

Definition at line 147 of file shape.cpp.

void rviz::Shape::setOrientation ( const Ogre::Quaternion &  orientation) [virtual]

Set the orientation of the object.

Parameters:
Orientationquaternion orientation to set to.

Implements rviz::Object.

Definition at line 157 of file shape.cpp.

void rviz::Shape::setPosition ( const Ogre::Vector3 position) [virtual]

Set the position of this object.

Parameters:
Positionvector position to set to.

Implements rviz::Object.

Definition at line 152 of file shape.cpp.

void rviz::Shape::setScale ( const Ogre::Vector3 scale) [virtual]

Set the scale of the object. Always relative to the identity orientation of the object.

Parameters:
Scalevector scale to set to.

Implements rviz::Object.

Definition at line 162 of file shape.cpp.

void rviz::Shape::setUserData ( const Ogre::Any &  data) [virtual]

Sets user data on all ogre objects we own.

Implements rviz::Object.

Definition at line 177 of file shape.cpp.


Member Data Documentation

Ogre::Entity* rviz::Shape::entity_ [protected]

Definition at line 113 of file shape.h.

Ogre::MaterialPtr rviz::Shape::material_ [protected]

Definition at line 114 of file shape.h.

std::string rviz::Shape::material_name_ [protected]

Definition at line 115 of file shape.h.

Ogre::SceneNode* rviz::Shape::offset_node_ [protected]

Definition at line 112 of file shape.h.

Ogre::SceneNode* rviz::Shape::scene_node_ [protected]

Definition at line 111 of file shape.h.

Type rviz::Shape::type_ [protected]

Definition at line 117 of file shape.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Tue Oct 3 2017 03:19:32