A view overlay item showing an axis cross synchronized with current camera settings. More...
Public Member Functions | |
OverlayAxisCross (Camera *camera, Font *font) | |
Constructs an axis cross overlay item connected to camera. More... | |
virtual unsigned int | width () const |
Returns the width of the overlay axis cross in pixels. More... | |
virtual unsigned int | height () const |
Returns the height of the overlay axis cross in pixels. More... | |
void | setSize (unsigned int width, unsigned int height) |
Sets the size of the axis cross, in pixels. More... | |
virtual int | priority () const |
Returns the render priority of the item. More... | |
virtual void | setPriority (int priority) |
Sets render priority of the item. More... | |
Color3f | textColor () const |
Returns text color. More... | |
void | setTextColor (const Color3f &color) |
Sets the text color. More... | |
Str | xAxisLabel () const |
Returns the label to draw on the x axis. Default: 'X'. More... | |
Str | yAxisLabel () const |
Returns the label to draw on the y axis. Default: 'Y'. More... | |
Str | zAxisLabel () const |
Returns the label to draw on the z axis. Default: 'Z'. More... | |
void | setAxisLabels (const Str &xLabel, const Str &yLabel, const Str &zlabel) |
Sets the labels to show as axes descriptions. Default 'X', 'Y' and 'Z'. More... | |
bool | alwaysShowLabels () const |
Returns true if the labels will always be visible (drawn on top of the axis arrows). More... | |
void | setAlwaysShowLabels (bool alwaysShow) |
Specifies if the labels should be always visible, or if the should do a depth test with the axis (default) More... | |
![]() | |
bool | visible () const |
Returns true if the overlay item is set to be visible. More... | |
void | setVisible (bool visible) |
Sets if the overlay item should be visible or not. More... | |
int | absolutePositionX () const |
Returns the x coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION. More... | |
int | absolutePositionY () const |
Returns the y coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION. More... | |
void | setAbsolutePosition (int x, int y) |
Sets the absolute position of the bottom left corner of the OverlayItem as an offset from the LayoutCorner of the item. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Additional Inherited Members | |
![]() | |
enum | LayoutCorner { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER, TOP_CENTER, BOTTOM_CENTER } |
Enumerator for the different locations/"corners" of the view. More... | |
enum | LayoutDirection { HORIZONTAL, VERTICAL, ABSOLUTE_POSITION } |
Enumerator for horizontal or vertical orientation of layout items. Describes which direction additional items should be positioned if more than one exists in the same corner. More... | |
A view overlay item showing an axis cross synchronized with current camera settings.
Provides a small axis cross to be visualized in a corner of the view. The axis cross will always be synchronized with the current camera settings.
The overlay item can be added to a view using View::overlay() and Overlay::addItem(). The view manages the layout of the overlay items, so only a desired size can be given in in this class. The position is specified when the overlay item is added to the view.
You can set the color and the text of the labels on the axis cross.
Constructs an axis cross overlay item connected to camera.
bool cee::vis::OverlayAxisCross::alwaysShowLabels | ( | ) | const |
Returns true if the labels will always be visible (drawn on top of the axis arrows).
|
virtual |
Returns the height of the overlay axis cross in pixels.
Implements cee::vis::OverlayItem.
|
virtual |
Returns the render priority of the item.
Implements cee::vis::OverlayItem.
void cee::vis::OverlayAxisCross::setAlwaysShowLabels | ( | bool | alwaysShow | ) |
Specifies if the labels should be always visible, or if the should do a depth test with the axis (default)
void cee::vis::OverlayAxisCross::setAxisLabels | ( | const Str & | xLabel, |
const Str & | yLabel, | ||
const Str & | zlabel | ||
) |
Sets the labels to show as axes descriptions. Default 'X', 'Y' and 'Z'.
|
virtual |
Sets render priority of the item.
The render priority determines the order in which item get rendered. Items with lower priorities get rendered first. The default priority is 20.
Implements cee::vis::OverlayItem.
|
virtual |
Sets the size of the axis cross, in pixels.
Implements cee::vis::OverlayItem.
void cee::vis::OverlayAxisCross::setTextColor | ( | const Color3f & | color | ) |
Sets the text color.
Color3f cee::vis::OverlayAxisCross::textColor | ( | ) | const |
Returns text color.
|
virtual |
Returns the width of the overlay axis cross in pixels.
Implements cee::vis::OverlayItem.
Str cee::vis::OverlayAxisCross::xAxisLabel | ( | ) | const |
Returns the label to draw on the x axis. Default: 'X'.
Str cee::vis::OverlayAxisCross::yAxisLabel | ( | ) | const |
Returns the label to draw on the y axis. Default: 'Y'.
Str cee::vis::OverlayAxisCross::zAxisLabel | ( | ) | const |
Returns the label to draw on the z axis. Default: 'Z'.