MRPT
2.0.4
|
Template class that implements the data structure and algorithms for Octree-based efficient rendering.
Definition at line 52 of file COctreePointRenderer.h.
#include <mrpt/opengl/COctreePointRenderer.h>
Classes | |
struct | TNode |
The structure for each octree spatial node. More... | |
struct | TRenderQueueElement |
Public Types | |
enum | { OCTREE_ROOT_NODE = 0 } |
Public Member Functions | |
COctreePointRenderer ()=default | |
Default ctor. More... | |
COctreePointRenderer (const COctreePointRenderer &) | |
Copy ctor. More... | |
size_t | octree_get_node_count () const |
Return the number of octree nodes (all of them, including the empty ones) More... | |
size_t | octree_get_visible_nodes () const |
Return the number of visible octree nodes in the last render event. More... | |
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) More... | |
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. More... | |
void | octree_debug_dump_tree (std::ostream &o) const |
Used for debug only. More... | |
Protected Member Functions | |
Derived & | octree_derived () |
const Derived & | octree_derived () const |
void | octree_assure_uptodate () const |
Must be called at children class' render() previously to octree_render() More... | |
void | octree_render (const mrpt::opengl::TRenderMatrices &ri) const |
Render the entire octree recursively. More... | |
void | octree_getBoundingBox (mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const |
Private Member Functions | |
void | octree_recursive_render (size_t node_idx, const mrpt::opengl::TRenderMatrices &ri, mrpt::img::TPixelCoordf cr_px[8], float cr_z[8], bool corners_are_all_computed=true, bool trust_me_youre_visible=false, float approx_area_sqpixels=0) const |
Render a given node. More... | |
void | internal_octree_assure_uptodate () |
void | internal_recursive_split (const size_t node_id, const bool all_pts=false) |
Private Attributes | |
std::vector< TRenderQueueElement > | m_render_queue |
The list of elements that really are visible and will be rendered. More... | |
bool | m_octree_has_to_rebuild_all {true} |
std::deque< TNode > | m_octree_nodes |
First one [0] is always the root node. More... | |
std::atomic< size_t > | m_visible_octree_nodes = 0 |
size_t | m_visible_octree_nodes_ongoing = 0 |
anonymous enum |
Enumerator | |
---|---|
OCTREE_ROOT_NODE |
Definition at line 66 of file COctreePointRenderer.h.
|
default |
Default ctor.
|
inline |
Copy ctor.
Definition at line 59 of file COctreePointRenderer.h.
|
inlineprivate |
Definition at line 568 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_assure_uptodate().
|
inlineprivate |
Definition at line 585 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::internal_octree_assure_uptodate(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::internal_recursive_split().
|
inlineprotected |
Must be called at children class' render() previously to octree_render()
Definition at line 81 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_get_graphics_boundingboxes(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_getBoundingBox().
|
inline |
Used for debug only.
Definition at line 752 of file COctreePointRenderer.h.
|
inlineprotected |
Definition at line 73 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::internal_recursive_split(), mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_debug_dump_tree(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_render().
|
inlineprotected |
Definition at line 74 of file COctreePointRenderer.h.
|
inline |
Returns a graphical representation of all the bounding boxes of the octree (leaf) nodes.
[in] | draw_solid_boxes | If false, will draw solid boxes of color lines_color. Otherwise, wireframe boxes will be drawn. |
Definition at line 729 of file COctreePointRenderer.h.
|
inline |
Return the number of octree nodes (all of them, including the empty ones)
Definition at line 713 of file COctreePointRenderer.h.
|
inline |
Return the number of visible octree nodes in the last render event.
Definition at line 715 of file COctreePointRenderer.h.
|
inlineprotected |
Definition at line 115 of file COctreePointRenderer.h.
|
inline |
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)
Definition at line 719 of file COctreePointRenderer.h.
|
inlineprivate |
Render a given node.
Definition at line 287 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_recursive_render(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_render().
|
inlineprotected |
Render the entire octree recursively.
Should be called from children's render() method.
Definition at line 90 of file COctreePointRenderer.h.
|
private |
Definition at line 278 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::internal_octree_assure_uptodate(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_mark_as_outdated().
|
private |
First one [0] is always the root node.
Definition at line 280 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::internal_octree_assure_uptodate(), mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::internal_recursive_split(), mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_debug_dump_tree(), mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_get_graphics_boundingboxes(), mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_get_node_count(), mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_getBoundingBox(), mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_recursive_render(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_render().
|
mutableprivate |
The list of elements that really are visible and will be rendered.
Definition at line 276 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_recursive_render(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_render().
|
mutableprivate |
Definition at line 283 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_get_visible_nodes(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_render().
|
mutableprivate |
Definition at line 284 of file COctreePointRenderer.h.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_recursive_render(), and mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_render().
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |