An arrow object. More...
#include <arrow.h>
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 | 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 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 | 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. |
An arrow object.
Definition at line 53 of file arrow.h.
ogre_tools::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.
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 |
const Ogre::Quaternion & ogre_tools::Arrow::getOrientation | ( | ) | [virtual] |
const Ogre::Vector3 & ogre_tools::Arrow::getPosition | ( | ) | [virtual] |
Ogre::SceneNode* ogre_tools::Arrow::getSceneNode | ( | ) | [inline] |
void ogre_tools::Arrow::set | ( | float | shaft_length, | |
float | shaft_radius, | |||
float | head_length, | |||
float | head_radius | |||
) |
void ogre_tools::Arrow::setColor | ( | const Ogre::ColourValue & | color | ) |
void ogre_tools::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].
r | Red component | |
g | Green component | |
b | Blue component |
Implements ogre_tools::Object.
void ogre_tools::Arrow::setHeadColor | ( | const Ogre::ColourValue & | color | ) |
void ogre_tools::Arrow::setHeadColor | ( | float | r, | |
float | g, | |||
float | b, | |||
float | a = 1.0f | |||
) |
void ogre_tools::Arrow::setOrientation | ( | const Ogre::Quaternion & | orientation | ) | [virtual] |
Set the orientation of the object.
Orientation | quaternion orientation to set to. |
Implements ogre_tools::Object.
void ogre_tools::Arrow::setPosition | ( | const Ogre::Vector3 & | position | ) | [virtual] |
Set the position of this object.
Position | vector position to set to. |
Implements ogre_tools::Object.
void ogre_tools::Arrow::setScale | ( | const Ogre::Vector3 & | scale | ) | [virtual] |
Set the scale of the object. Always relative to the identity orientation of the object.
Scale | vector scale to set to. |
Implements ogre_tools::Object.
void ogre_tools::Arrow::setShaftColor | ( | const Ogre::ColourValue & | color | ) |
void ogre_tools::Arrow::setShaftColor | ( | float | r, | |
float | g, | |||
float | b, | |||
float | a = 1.0f | |||
) |
void ogre_tools::Arrow::setUserData | ( | const Ogre::Any & | data | ) | [virtual] |
Sets user data on all ogre objects we own.
Implements ogre_tools::Object.
Shape* ogre_tools::Arrow::head_ [private] |
Ogre::SceneNode* ogre_tools::Arrow::scene_node_ [private] |
Shape* ogre_tools::Arrow::shaft_ [private] |