#include <pointaxis.h>

Public Types | |
| enum | AXIS { X = 0L, Y, Z, NUMAXES } |
| < ids used to specify which axis to manipulate More... | |
| enum | AXISCOLOR { BLACK = 0L, WHITE, RED, YELLOW, GREEN, CYAN, BLUE, MAGENTA, CUSTOM_X, CUSTOM_Y, CUSTOM_Z, NUMAXISCOLORS } |
| < ids for preset color values More... | |
| enum | FLAG { AXES = BIT(0L), LABELS = BIT(1L), LABEL_X = BIT(2L), LABEL_Y = BIT(3L), LABEL_Z = BIT(4L), XYZ_LABELS = BIT(5L), HPR_LABELS = BIT(6L), CUSTOM_LABELS = BIT(7L) } |
| < bit-masks for toggling features on/of More... | |
Public Member Functions | |
| PointAxis () | |
| default constructor - no parameters | |
| virtual void | Enable (int f) |
| enable rendering axes, labels and types of labels | |
| virtual void | Disable (int f) |
| disable rendering axes, labels and types of labels | |
| virtual const char * | GetLabel (AXIS a) const |
| get the current label for an axis | |
| virtual void | SetLabel (AXIS a, const char *l) |
| set a custom label for an axis | |
| virtual float | GetLength (AXIS a) const |
| get the length of an axis | |
| virtual void | SetLength (AXIS a, float l) |
| set the length of an axis | |
| virtual AXISCOLOR | GetColor (AXIS a) const |
| get the color-id of an axis | |
| virtual void | SetColor (AXIS a, AXISCOLOR c) |
| set the color of an axis by a predefined color-id | |
| virtual void | GetColor (AXIS a, osg::Vec4 &c) const |
| get the color value of an axis (0.0 - 1.0) | |
| virtual void | SetColor (AXIS a, const osg::Vec4 c) |
| set a custom color value of an axis | |
| virtual AXISCOLOR | GetLabelColor (AXIS a) const |
| get the color-id of a label | |
| virtual void | SetLabelColor (AXIS a, AXISCOLOR c) |
| set the color of a label by a predefined color-id | |
| virtual void | GetLabelColor (AXIS a, osg::Vec4 &c) const |
| get the color value of a label (0.0 - 1.0) | |
| virtual void | SetLabelColor (AXIS a, const osg::Vec4 c) |
| set a custom color value of an label | |
Protected Member Functions | |
| virtual | ~PointAxis () |
| destructor | |
The PointAxis class allows you to quickly add a visible axis-rose to the scene. To use, just create an instance of it, and add the PointAxis to the Scene for it to be rendered.
The default setting is to not display the axis labels. To turn them on call the Enable function with the appropriate FLAG enum (LABEL_X,LABEL_Y,LABEL_Z). They each must be enabled individually (FLAG::LABELS will toggle the label rendering only if the label has been previously enabled).
Custom labels can be set or HPR can be enabled. Colors of the axes and the length of the line can also be set through the interface functions.
| PointAxis::PointAxis | ( | ) |
default constructor - no parameters
default constructor
| PointAxis::~PointAxis | ( | ) | [protected, virtual] |
destructor
| void PointAxis::Enable | ( | int | f | ) | [virtual] |
enable rendering axes, labels and types of labels
enable rendering axes, labels and label types
| f | : flags of the items to enable |
| void PointAxis::Disable | ( | int | f | ) | [virtual] |
disable rendering axes, labels and types of labels
disable rendering axes, labels and label types
| f | : flags of the items to disable |
| const char * PointAxis::GetLabel | ( | AXIS | a | ) | const [virtual] |
get the current label for an axis
get the label of a specific axis
| a | : id of the axis |
| void PointAxis::SetLabel | ( | AXIS | a, | |
| const char * | l | |||
| ) | [virtual] |
set a custom label for an axis
set a custom label for a specific axis
| a | : id of the axis | |
| l | : pointer to the label |
| float PointAxis::GetLength | ( | AXIS | a | ) | const [virtual] |
get the length of an axis
get the length of a specific axis
| a | : id of the axis |
| void PointAxis::SetLength | ( | AXIS | a, | |
| float | l | |||
| ) | [virtual] |
set the length of an axis
set the length of a specific axis
| a | : id of the axis | |
| l | : the new length |
| PointAxis::AXISCOLOR PointAxis::GetColor | ( | AXIS | a | ) | const [virtual] |
get the color-id of an axis
get the color-id of a specific axis
| a | : id of the axis |
set the color of an axis by a predefined color-id
set the color of a specific axis by using a predefined color id
| a | : id of the axis | |
| c | : color-id to use |
| void PointAxis::GetColor | ( | AXIS | a, | |
| osg::Vec4 & | c | |||
| ) | const [virtual] |
get the color value of an axis (0.0 - 1.0)
get the color value of a specific axis
| a | : id of the axis | |
| c | : the color value array |
| void PointAxis::SetColor | ( | AXIS | a, | |
| const osg::Vec4 | c | |||
| ) | [virtual] |
set a custom color value of an axis
set the color of a specific axis by using a custom color value
| a | : id of the axis | |
| c | : color value array |
| PointAxis::AXISCOLOR PointAxis::GetLabelColor | ( | AXIS | a | ) | const [virtual] |
get the color-id of a label
get the color-id of a specific label
| a | : id of the axis |
set the color of a label by a predefined color-id
set the color of a specific label by using a predefined color id
| a | : id of the axis | |
| c | : color-id to use |
| void PointAxis::GetLabelColor | ( | AXIS | a, | |
| osg::Vec4 & | c | |||
| ) | const [virtual] |
get the color value of a label (0.0 - 1.0)
get the color value of a specific label
| a | : id of the axis | |
| c | : the color value array |
| void PointAxis::SetLabelColor | ( | AXIS | a, | |
| const osg::Vec4 | c | |||
| ) | [virtual] |
set a custom color value of an label
set the color of a specific label by using a custom color value
| a | : id of the axis | |
| c | : color value array |