Go to the documentation of this file.
121 float lineWidth = 1.0);
124 ~CBox()
override =
default;
void freeOpenGLResources() override
Free opengl buffers.
~CBox() override=default
Destructor
void enableBoxBorder(bool drawBorder=true)
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
float getLineWidth() const
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
A solid or wireframe box in 3D, defined by 6 rectangular faces parallel to the planes X,...
Renderizable generic renderer for objects using the wireframe shader.
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
bool isBoxBorderEnabled() const
mrpt::math::TPoint3D m_corner_max
bool m_draw_border
Draw line borders to solid box with the given linewidth (default: true)
void freeOpenGLResources() override
Free opengl buffers.
void getBoxCorners(mrpt::math::TPoint3D &corner1, mrpt::math::TPoint3D &corner2) const
void setLineWidth(float width)
void freeOpenGLResources() override
Free opengl buffers.
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers,...
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray tracing.
static constexpr shader_id_t WIREFRAME
static constexpr shader_id_t TRIANGLES
mrpt::img::TColor getBoxBorderColor() const
mrpt::math::TPoint3D m_corner_min
Corners coordinates.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void onUpdateBuffers_Triangles() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
Context for calls to render()
mrpt::img::TColor m_solidborder_color
Color of the solid box borders.
void setBoxBorderColor(const mrpt::img::TColor &c)
CBox()=default
Basic empty constructor.
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
Renderizable generic renderer for objects using the triangles shader.
bool m_wireframe
true: wireframe, false (default): solid
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
void setBoxCorners(const mrpt::math::TPoint3D &corner1, const mrpt::math::TPoint3D &corner2)
Set the position and size of the box, from two corners in 3D.
The namespace for 3D scene representation and rendering.
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 setWireframe(bool is_wireframe=true)
Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Fri May 15 23:51:15 UTC 2020 | |