44 float xmin = -1.0f,
float ymin = -1.0f,
float zmin = -1.0f,
45 float xmax = 1.0f,
float ymax = 1.0f,
float zmax = 1.0f,
46 float frecuency = 1.f,
float lineWidth = 3.0f,
bool marks =
true);
48 virtual ~CAxis()
override =
default;
51 float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax);
60 int axis,
float yaw_deg,
float pitch_deg,
float roll_deg);
63 int axis,
float& yaw_deg,
float& pitch_deg,
float& roll_deg)
const;
80 std::array<bool, 3>
m_marks = {
false,
false,
false};
float getFrequency() const
std::deque< CRenderizable::Ptr > CListOpenGLObjects
A list of smart pointers to renderizable objects.
mrpt::opengl::CListOpenGLObjects m_gl_labels
Context for calls to render()
float getTextScale() const
void enableTickMarks(bool v=true)
virtual ~CAxis() override=default
Rendering state related to the projection and model-view matrices.
void getTextLabelOrientation(int axis, float &yaw_deg, float &pitch_deg, float &roll_deg) const
axis: {0,1,2}=>{X,Y,Z}
float getTickMarksLength(float len)
std::array< bool, 3 > m_marks
draw marks for X,Y,Z
void setTextLabelOrientation(int axis, float yaw_deg, float pitch_deg, float roll_deg)
axis: {0,1,2}=>{X,Y,Z}
void setTickMarksLength(float len)
As a ratio of "marks frequency" (default: 0.05)
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
Renderizable generic renderer for objects using the wireframe shader.
Draw a 3D world axis, with coordinate marks at some regular interval.
void setFrequency(float f)
Changes the frequency of the "ticks".
The namespace for 3D scene representation and rendering.
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.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void enqueForRenderRecursive(const mrpt::opengl::TRenderMatrices &state, RenderQueue &rq) const override
void setAxisLimits(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
void setTextScale(float f)
Changes the size of text labels (default:0.25)
std::map< shader_id_t, std::multimap< float, RenderQueueElement > > RenderQueue
A queue for rendering, sorted by shader program to minimize changes of OpenGL shader programs while r...