An arrow consisting of a cylinder and a cone. More...
#include <arrow.h>
Public Member Functions | |
Arrow (Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node=0, float shaft_length=1.0f, float shaft_diameter=0.1f, float head_length=0.3f, float head_diameter=0.2f) | |
Constructor. More... | |
Shape * | getHead () |
virtual const Ogre::Quaternion & | getOrientation () |
Get the local orientation of this object. More... | |
virtual const Ogre::Vector3 & | getPosition () |
Get the local position of this object. More... | |
Ogre::SceneNode * | getSceneNode () |
Get the scene node associated with this arrow. More... | |
Shape * | getShaft () |
void | set (float shaft_length, float shaft_diameter, float head_length, float head_diameter) |
Set the parameters for this arrow. More... | |
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]. More... | |
void | setColor (const Ogre::ColourValue &color) |
void | setDirection (const Ogre::Vector3 &direction) |
Set the direction of the arrow. More... | |
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]. More... | |
void | setHeadColor (const Ogre::ColourValue &color) |
virtual void | setOrientation (const Ogre::Quaternion &orientation) |
Set the orientation. More... | |
virtual void | setPosition (const Ogre::Vector3 &position) |
Set the position of the base of the arrow. More... | |
virtual void | setScale (const Ogre::Vector3 &scale) |
Set the scale of the object. Always relative to the identity orientation of the object. More... | |
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]. More... | |
void | setShaftColor (const Ogre::ColourValue &color) |
void | setUserData (const Ogre::Any &data) |
Sets user data on all ogre objects we own. More... | |
virtual | ~Arrow () |
Public Member Functions inherited from rviz::Object | |
Object (Ogre::SceneManager *scene_manager) | |
virtual | ~Object () |
Private Attributes | |
Shape * | head_ |
Cone used for the head of the arrow. More... | |
Ogre::SceneNode * | scene_node_ |
Shape * | shaft_ |
Cylinder used for the shaft of the arrow. More... | |
Additional Inherited Members | |
Protected Attributes inherited from rviz::Object | |
Ogre::SceneManager * | scene_manager_ |
Ogre scene manager this object is part of. More... | |
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.
rviz::Arrow::Arrow | ( | Ogre::SceneManager * | scene_manager, |
Ogre::SceneNode * | parent_node = 0 , |
||
float | shaft_length = 1.0f , |
||
float | shaft_diameter = 0.1f , |
||
float | head_length = 0.3f , |
||
float | head_diameter = 0.2f |
||
) |
Constructor.
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_diameter | Diameter of the arrow's shaft |
head_length | Length of the arrow's head |
head_diameter | Diameter of the arrow's head |
|
virtual |
|
virtual |
|
inline |
void rviz::Arrow::set | ( | float | shaft_length, |
float | shaft_diameter, | ||
float | head_length, | ||
float | head_diameter | ||
) |
|
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].
r | Red component |
g | Green component |
b | Blue component |
Implements rviz::Object.
void rviz::Arrow::setColor | ( | const Ogre::ColourValue & | color | ) |
void rviz::Arrow::setDirection | ( | const Ogre::Vector3 & | direction | ) |
Set the direction of the arrow.
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.
void rviz::Arrow::setHeadColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a = 1.0f |
||
) |
void rviz::Arrow::setHeadColor | ( | const Ogre::ColourValue & | color | ) |
|
virtual |
Set the orientation.
Note that negative Z is the identity orientation.
Both setOrientation() and setDirection() change the direction the arrow points.
Implements rviz::Object.
|
virtual |
Set the position of the base of the arrow.
Implements rviz::Object.
|
virtual |
Set the scale of the object. Always relative to the identity orientation of the object.
Scale | vector scale to set to. |
Implements rviz::Object.
void rviz::Arrow::setShaftColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a = 1.0f |
||
) |
void rviz::Arrow::setShaftColor | ( | const Ogre::ColourValue & | color | ) |
|
virtual |
Sets user data on all ogre objects we own.
Implements rviz::Object.
|
private |
|
private |