rviz::Arrow Class Reference
An arrow consisting of a cylinder and a cone.
More...
#include <arrow.h>
List of all members.
Public Member Functions |
| Arrow (Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node=0, float shaft_length=1.0f, float shaft_radius=0.1f, float head_length=0.3f, float head_radius=0.2f) |
| Constructor.
|
Shape * | getHead () |
virtual const Ogre::Quaternion & | getOrientation () |
| Get the local orientation of this object.
|
virtual const Ogre::Vector3 & | getPosition () |
| Get the local position of this object.
|
Ogre::SceneNode * | getSceneNode () |
| Get the scene node associated with this arrow.
|
Shape * | getShaft () |
void | set (float shaft_length, float shaft_radius, float head_length, float head_radius) |
| Set the parameters for this arrow.
|
void | setColor (const Ogre::ColourValue &color) |
virtual void | setColor (float r, float g, float b, float a) |
| Set the color of this arrow. Sets both the head and shaft color to the same value. Values are in the range [0, 1].
|
void | setDirection (const Ogre::Vector3 &direction) |
| Set the direction of the arrow.
|
void | setHeadColor (const Ogre::ColourValue &color) |
void | setHeadColor (float r, float g, float b, float a=1.0f) |
| Set the color of the arrow's head. Values are in the range [0, 1].
|
virtual void | setOrientation (const Ogre::Quaternion &orientation) |
| Set the orientation.
|
virtual void | setPosition (const Ogre::Vector3 &position) |
| Set the position of the base of the arrow.
|
virtual void | setScale (const Ogre::Vector3 &scale) |
| Set the scale of the object. Always relative to the identity orientation of the object.
|
void | setShaftColor (const Ogre::ColourValue &color) |
void | setShaftColor (float r, float g, float b, float a=1.0f) |
| Set the color of the arrow's shaft. Values are in the range [0, 1].
|
void | setUserData (const Ogre::Any &data) |
| Sets user data on all ogre objects we own.
|
virtual | ~Arrow () |
Private Attributes |
Shape * | head_ |
| Cone used for the head of the arrow.
|
Ogre::SceneNode * | scene_node_ |
Shape * | shaft_ |
| Cylinder used for the shaft of the arrow.
|
Detailed Description
An arrow consisting of a cylinder and a cone.
The base of the arrow is at the position sent to setPosition(). The arrow points in the direction of the negative Z axis by default, and -Z is the identity direction of it. To set a different direction, call setOrientation() with a rotation from -Z to the desired vector.
Definition at line 59 of file arrow.h.
Constructor & Destructor Documentation
rviz::Arrow::Arrow |
( |
Ogre::SceneManager * |
scene_manager, |
|
|
Ogre::SceneNode * |
parent_node = 0 , |
|
|
float |
shaft_length = 1.0f , |
|
|
float |
shaft_radius = 0.1f , |
|
|
float |
head_length = 0.3f , |
|
|
float |
head_radius = 0.2f | |
|
) |
| | |
Constructor.
- Parameters:
-
| scene_manager | The scene manager to use to construct any necessary objects |
| parent_node | A scene node to use as the parent of this object. If NULL, uses the root scene node. |
| shaft_length | Length of the arrow's shaft |
| shaft_radius | Radius of the arrow's shaft |
| head_length | Length of the arrow's head |
| head_radius | Radius of the arrow's head |
Definition at line 43 of file arrow.cpp.
rviz::Arrow::~Arrow |
( |
|
) |
[virtual] |
Member Function Documentation
Shape* rviz::Arrow::getHead |
( |
|
) |
[inline] |
const Ogre::Quaternion & rviz::Arrow::getOrientation |
( |
|
) |
[virtual] |
Get the local orientation of this object.
- Returns:
- The orientation
Implements rviz::Object.
Definition at line 140 of file arrow.cpp.
const Ogre::Vector3 & rviz::Arrow::getPosition |
( |
|
) |
[virtual] |
Get the local position of this object.
- Returns:
- The position
Implements rviz::Object.
Definition at line 135 of file arrow.cpp.
Ogre::SceneNode* rviz::Arrow::getSceneNode |
( |
|
) |
[inline] |
Get the scene node associated with this arrow.
- Returns:
- the scene node associated with this arrow
Definition at line 143 of file arrow.h.
Shape* rviz::Arrow::getShaft |
( |
|
) |
[inline] |
void rviz::Arrow::set |
( |
float |
shaft_length, |
|
|
float |
shaft_radius, |
|
|
float |
head_length, |
|
|
float |
head_radius | |
|
) |
| | |
Set the parameters for this arrow.
- Parameters:
-
| shaft_length | Length of the arrow's shaft |
| shaft_radius | Radius of the arrow's shaft |
| head_length | Length of the arrow's head |
| head_radius | Radius of the arrow's head |
Definition at line 71 of file arrow.cpp.
void rviz::Arrow::setColor |
( |
const Ogre::ColourValue & |
color |
) |
|
void rviz::Arrow::setColor |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a | |
|
) |
| | [virtual] |
Set the color of this arrow. Sets both the head and shaft color to the same value. Values are in the range [0, 1].
- Parameters:
-
| r | Red component |
| g | Green component |
| b | Blue component |
Implements rviz::Object.
Definition at line 86 of file arrow.cpp.
void rviz::Arrow::setDirection |
( |
const Ogre::Vector3 & |
direction |
) |
|
Set the direction of the arrow.
- Parameters:
-
| direction | The direction the arrow should point, in the coordinate frame of the parent Ogre::SceneNode. |
If direction is zero, this does not change the arrow.
Both setOrientation() and setDirection() change the direction the arrow points.
Definition at line 122 of file arrow.cpp.
void rviz::Arrow::setHeadColor |
( |
const Ogre::ColourValue & |
color |
) |
|
void rviz::Arrow::setHeadColor |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a = 1.0f | |
|
) |
| | |
Set the color of the arrow's head. Values are in the range [0, 1].
- Parameters:
-
| r | Red component |
| g | Green component |
| b | Blue component |
Definition at line 106 of file arrow.cpp.
void rviz::Arrow::setOrientation |
( |
const Ogre::Quaternion & |
orientation |
) |
[virtual] |
void rviz::Arrow::setPosition |
( |
const Ogre::Vector3 & |
position |
) |
[virtual] |
void rviz::Arrow::setScale |
( |
const Ogre::Vector3 & |
scale |
) |
[virtual] |
Set the scale of the object. Always relative to the identity orientation of the object.
- Parameters:
-
| Scale | vector scale to set to. |
Implements rviz::Object.
Definition at line 130 of file arrow.cpp.
void rviz::Arrow::setShaftColor |
( |
const Ogre::ColourValue & |
color |
) |
|
void rviz::Arrow::setShaftColor |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a = 1.0f | |
|
) |
| | |
Set the color of the arrow's shaft. Values are in the range [0, 1].
- Parameters:
-
| r | Red component |
| g | Green component |
| b | Blue component |
Definition at line 101 of file arrow.cpp.
void rviz::Arrow::setUserData |
( |
const Ogre::Any & |
data |
) |
[virtual] |
Member Data Documentation
Cone used for the head of the arrow.
Definition at line 157 of file arrow.h.
Cylinder used for the shaft of the arrow.
Definition at line 156 of file arrow.h.
The documentation for this class was generated from the following files:
- /u/hersh/groovy_stacks/visualization/rviz/src/rviz/ogre_helpers/arrow.h
- /u/hersh/groovy_stacks/visualization/rviz/src/rviz/ogre_helpers/arrow.cpp