Class CGridPlaneXZ

Inheritance Relationships

Base Types

Class Documentation

class CGridPlaneXZ : public virtual mrpt::viz::CVisualObject, public mrpt::viz::VisualObjectParams_Lines

A grid of lines over the XZ plane.

../../output_staging/generated/doxygen/xml/preview_CGridPlaneXZ.png

See also

opengl::Scene

Public Functions

inline void setPlaneLimits(float xmin, float xmax, float zmin, float zmax)
inline void getPlaneLimits(float &xmin, float &xmax, float &zmin, float &zmax) const
inline void setPlaneYcoord(float y)
inline float getPlaneYcoord() const
inline void setGridFrequency(float freq)
inline float getGridFrequency() const
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()

CGridPlaneXZ(float xMin = -10, float xMax = 10, float zMin = -10, float zMax = 10, float y = 0, float frequency = 1, float lineWidth = 1.3f, bool antiAliasing = true)

Constructor

~CGridPlaneXZ() override = default

Private, virtual destructor: only can be deleted from smart pointers

Protected Attributes

float m_xMin
float m_xMax
float m_zMin
float m_zMax
float m_plane_y
float m_frequency