Class CArrow

Inheritance Relationships

Base Types

Class Documentation

class CArrow : public virtual mrpt::viz::CVisualObject, public mrpt::viz::VisualObjectParams_Triangles

A 3D arrow

../../output_staging/generated/doxygen/xml/preview_CArrow.png

See also

opengl::Scene

Public Functions

inline void setArrowEnds(float x0, float y0, float z0, float x1, float y1, float z1)
template<typename Vector3Like>
inline void setArrowEnds(const Vector3Like &start, const Vector3Like &end)
inline void setHeadRatio(float rat)
inline void setSmallRadius(float rat)
inline void setLargeRadius(float rat)
inline void setSlicesCount(uint32_t slices)

Number of radial divisions

inline uint32_t getSlicesCount() const

Number of radial divisions

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.

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()

CArrow() = default
inline CArrow(const mrpt::math::TPoint3Df &from, const mrpt::math::TPoint3Df &to, float headRatio = 0.2f, float smallRadius = 0.05f, float largeRadius = 0.2f)

Protected Attributes

mutable float m_x0 = 0
float m_y0 = 0
float m_z0 = 0
mutable float m_x1 = 0
float m_y1 = 0
float m_z1 = 0
float m_headRatio
float m_smallRadius
float m_largeRadius
uint32_t m_slices = 10

Number of radial divisions.