template class mrpt::opengl::COctreePointRenderer¶
Template class that implements the data structure and algorithms for Octree-based efficient rendering.
See also:
mrpt::opengl::CPointCloud, mrpt::opengl::CPointCloudColoured, https://www.mrpt.org/Efficiently_rendering_point_clouds_of_millions_of_points
#include <mrpt/opengl/COctreePointRenderer.h> template <class Derived> class COctreePointRenderer { public: // structs struct TNode; struct TRenderQueueElement; // construction COctreePointRenderer(); COctreePointRenderer(const COctreePointRenderer&); // methods size_t octree_get_node_count() const; size_t octree_get_visible_nodes() const; void octree_mark_as_outdated(); void octree_get_graphics_boundingboxes( mrpt::opengl::CSetOfObjects& gl_bb, const float lines_width = 1, const mrpt::img::TColorf& lines_color = mrpt::img::TColorf(1, 1, 1), const bool draw_solid_boxes = false ) const; void octree_debug_dump_tree(std::ostream& o) const; }; // direct descendants class CPointCloud; class CPointCloudColoured;
Construction¶
COctreePointRenderer()
Default ctor.
COctreePointRenderer(const COctreePointRenderer&)
Copy ctor.
Methods¶
size_t octree_get_node_count() const
Return the number of octree nodes (all of them, including the empty ones)
See also:
octree_get_nonempty_node_count
size_t octree_get_visible_nodes() const
Return the number of visible octree nodes in the last render event.
void octree_mark_as_outdated()
Called from the derived class (or the user) to indicate we have/want to rebuild the entire node tree (for example, after modifying the point cloud or any global octree parameter)
void octree_get_graphics_boundingboxes( mrpt::opengl::CSetOfObjects& gl_bb, const float lines_width = 1, const mrpt::img::TColorf& lines_color = mrpt::img::TColorf(1, 1, 1), const bool draw_solid_boxes = false ) const
Returns a graphical representation of all the bounding boxes of the octree (leaf) nodes.
Parameters:
draw_solid_boxes |
If false, will draw solid boxes of color lines_color. Otherwise, wireframe boxes will be drawn. |
void octree_debug_dump_tree(std::ostream& o) const
Used for debug only.