Class CAxis
Defined in File CAxis.h
Inheritance Relationships
Base Types
public mrpt::viz::CVisualObject(Class CVisualObject)public mrpt::viz::VisualObjectParams_Lines(Class VisualObjectParams_Lines)
Class Documentation
-
class CAxis : public virtual mrpt::viz::CVisualObject, public mrpt::viz::VisualObjectParams_Lines
Draw a 3D world axis, with coordinate marks at some regular interval

See also
opengl::Scene
Public Functions
-
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
-
void setAxisLimits(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
-
void setFrequency(float f)
Changes the frequency of the “ticks”
-
float getFrequency() const
-
void setTextScale(float f)
Changes the size of text labels (default:0.25)
-
float getTextScale() const
-
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 enableTickMarks(bool v = true)
-
void enableTickMarks(bool show_x, bool show_y, bool show_z)
-
void setTickMarksLength(float len)
As a ratio of “marks frequency” (default: 0.05)
-
inline float getTickMarksLength() const
-
virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const override
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()
-
virtual void updateBuffers() const override
Called by the rendering system to update internal geometry buffers.
Derived classes should override this to populate their data buffers (triangles, points, lines) when the object geometry changes.
This is called automatically when hasToUpdateBuffers() returns true, which happens after notifyChange() was called.
The base implementation does nothing; derived classes should override.
Note
Thread safety: implementations should lock the appropriate mutexes when writing to shared buffers.
-
inline virtual bool isCompositeObject() const override
Should return true if enqueueForRenderRecursive() is defined since the object has inner children. Examples: CSetOfObjects, CAssimpModel.
-
inline virtual const ListVisualObjects &getInternalChildren() const override
Access to internal text labels (for rendering pipeline)
Protected Attributes
-
float m_xmin
-
float m_ymin
-
float m_zmin
-
float m_xmax
-
float m_ymax
-
float m_zmax
-
float m_frequency
-
std::array<bool, 3> m_marks = {false, false, false}
draw marks for X,Y,Z
-
float m_textScale = {0.10f}
-
float m_textRot[3][3]
-
float m_markLen = {0.07f}
-
mutable mrpt::containers::PerThreadDataHolder<mrpt::viz::ListVisualObjects> m_gl_labels
-
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)