cee::vis::OverlayAxisCross

class OverlayAxisCross : public OverlayItem

A view overlay item showing an axis cross synchronized with current camera settings.

../_images/axiscross.png

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.

See also

OverlayItem, Overlay, and View

Public Functions

OverlayAxisCross(Camera *camera, Font *font)

Constructs an axis cross overlay item connected to camera.

virtual unsigned int width() const

Returns the width of the overlay axis cross in pixels.

virtual unsigned int height() const

Returns the height of the overlay axis cross in pixels.

virtual void setSize(unsigned int width, unsigned int height)

Sets the size of the axis cross, in pixels.

virtual int priority() const

Returns the render priority of the item.

virtual void setPriority(int priority)

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.

Color3f textColor() const

Returns text color.

void setTextColor(const Color3f &color)

Sets the text color.

Str xAxisLabel() const

Returns the label to draw on the x axis. Default: ‘X’.

Str yAxisLabel() const

Returns the label to draw on the y axis. Default: ‘Y’.

Str zAxisLabel() const

Returns the label to draw on the z axis. Default: ‘Z’.

void setAxisLabels(const Str &xLabel, const Str &yLabel, const Str &zlabel)

Sets the labels to show as axes descriptions. Default ‘X’, ‘Y’ and ‘Z’.

bool alwaysShowLabels() const

Returns true if the labels will always be visible (drawn on top of the axis arrows).

void setAlwaysShowLabels(bool alwaysShow)

Specifies if the labels should be always visible, or if the should do a depth test with the axis (default)