class mrpt::viz::CAxis

Overview

Draw a 3D world axis, with coordinate marks at some regular interval.

mrpt::viz::CAxis mrpt::viz::CAxis mrpt::viz::CAxis mrpt::viz::CAxis

See also:

opengl::Scene

#include <mrpt/viz/CAxis.h>

class CAxis:
    public mrpt::viz::CVisualObject,
    public mrpt::viz::VisualObjectParams_Lines
{
public:
    // construction

    CAxis(
        float xmin = -1.0f,
        float ymin = -1.0f,
        float zmin = -1.0f,
        float xmax = 1.0f,
        float ymax = 1.0f,
        float zmax = 1.0f,
        float frecuency = 1.f,
        float lineWidth = 3.0f,
        bool marks = true
        );

    // methods

    void setAxisLimits(
        float xmin,
        float ymin,
        float zmin,
        float xmax,
        float ymax,
        float zmax
        );

    void setFrequency(float f);
    float getFrequency() const;
    void setTextScale(float f);
    float getTextScale() const;
    void setTextLabelOrientation(int axis, float yaw_deg, float pitch_deg, float roll_deg);
    void getTextLabelOrientation(int axis, float& yaw_deg, float& pitch_deg, float& roll_deg) const;
    void enableTickMarks(bool v = true);

    void enableTickMarks(
        bool show_x,
        bool show_y,
        bool show_z
        );

    void setTickMarksLength(float len);
    float getTickMarksLength(float len);
    virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const;
};

Inherited Members

public:
    // structs

    struct OutdatedState;
    struct State;

    // methods

    void setLineWidth(float w);
    float getLineWidth() const;
    void enableAntiAliasing(bool enable = true);
    bool isAntiAliasingEnabled() const;

Construction

CAxis(
    float xmin = -1.0f,
    float ymin = -1.0f,
    float zmin = -1.0f,
    float xmax = 1.0f,
    float ymax = 1.0f,
    float zmax = 1.0f,
    float frecuency = 1.f,
    float lineWidth = 3.0f,
    bool marks = true
    )

Constructor.

Methods

void setFrequency(float f)

Changes the frequency of the “ticks”.

void setTextScale(float f)

Changes the size of text labels (default:0.25)

void setTextLabelOrientation(
    int axis,
    float yaw_deg,
    float pitch_deg,
    float roll_deg
    )

axis: {0,1,2}=>{X,Y,Z}

void getTextLabelOrientation(
    int axis,
    float& yaw_deg,
    float& pitch_deg,
    float& roll_deg
    ) const

axis: {0,1,2}=>{X,Y,Z}

void setTickMarksLength(float len)

As a ratio of “marks frequency” (default: 0.05)

virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const

Must be implemented by derived classes to provide the updated bounding box in the object local frame of coordinates.

This will be called only once after each time the derived class reports to notifyChange() that the object geometry changed.

See also:

getBoundingBox(), getBoundingBoxLocal(), getBoundingBoxLocalf()