Main MRPT website > C++ reference for MRPT 1.5.9
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
mrpt::opengl::COctreePointRenderer< Derived > Class Template Reference

Detailed Description

template<class Derived>
class mrpt::opengl::COctreePointRenderer< Derived >

Template class that implements the data structure and algorithms for Octree-based efficient rendering.

See also
mrpt::opengl::CPointCloud, mrpt::opengl::CPointCloudColoured, http://www.mrpt.org/Efficiently_rendering_point_clouds_of_millions_of_points

Definition at line 45 of file COctreePointRenderer.h.

#include <mrpt/opengl/COctreePointRenderer.h>

Inheritance diagram for mrpt::opengl::COctreePointRenderer< Derived >:
Inheritance graph

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 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 double lines_width=1, const mrpt::utils::TColorf &lines_color=mrpt::utils::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::gl_utils::TRenderInfo &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::gl_utils::TRenderInfo &ri, mrpt::utils::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< TRenderQueueElementm_render_queue
 The list of elements that really are visible and will be rendered. More...
 
bool m_octree_has_to_rebuild_all
 
mrpt::aligned_containers< TNode >::deque_t m_octree_nodes
 First one [0] is always the root node. More...
 
volatile size_t m_visible_octree_nodes
 
volatile size_t m_visible_octree_nodes_ongoing
 

Member Enumeration Documentation

◆ anonymous enum

template<class Derived>
anonymous enum
Enumerator
OCTREE_ROOT_NODE 

Definition at line 63 of file COctreePointRenderer.h.

Constructor & Destructor Documentation

◆ COctreePointRenderer() [1/2]

template<class Derived>
mrpt::opengl::COctreePointRenderer< Derived >::COctreePointRenderer ( )
inline

Default ctor.

Definition at line 49 of file COctreePointRenderer.h.

◆ COctreePointRenderer() [2/2]

template<class Derived>
mrpt::opengl::COctreePointRenderer< Derived >::COctreePointRenderer ( const COctreePointRenderer< Derived > &  )
inline

Copy ctor.

Definition at line 56 of file COctreePointRenderer.h.

Member Function Documentation

◆ internal_octree_assure_uptodate()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::internal_octree_assure_uptodate ( )
inlineprivate

◆ internal_recursive_split()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::internal_recursive_split ( const size_t  node_id,
const bool  all_pts = false 
)
inlineprivate

◆ octree_assure_uptodate()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::octree_assure_uptodate ( ) const
inlineprotected

◆ octree_debug_dump_tree()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::octree_debug_dump_tree ( std::ostream &  o) const
inline

Used for debug only.

Definition at line 579 of file COctreePointRenderer.h.

◆ octree_derived() [1/2]

template<class Derived>
Derived& mrpt::opengl::COctreePointRenderer< Derived >::octree_derived ( )
inlineprotected

◆ octree_derived() [2/2]

template<class Derived>
const Derived& mrpt::opengl::COctreePointRenderer< Derived >::octree_derived ( ) const
inlineprotected

Definition at line 68 of file COctreePointRenderer.h.

◆ octree_get_graphics_boundingboxes()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::octree_get_graphics_boundingboxes ( mrpt::opengl::CSetOfObjects gl_bb,
const double  lines_width = 1,
const mrpt::utils::TColorf lines_color = mrpt::utils::TColorf(1,1,1),
const bool  draw_solid_boxes = false 
) const
inline

Returns a graphical representation of all the bounding boxes of the octree (leaf) nodes.

Parameters
[in]draw_solid_boxesIf false, will draw solid boxes of color lines_color. Otherwise, wireframe boxes will be drawn.

Definition at line 556 of file COctreePointRenderer.h.

◆ octree_get_node_count()

template<class Derived>
size_t mrpt::opengl::COctreePointRenderer< Derived >::octree_get_node_count ( ) const
inline

Return the number of octree nodes (all of them, including the empty ones)

See also
octree_get_nonempty_node_count

Definition at line 545 of file COctreePointRenderer.h.

◆ octree_get_visible_nodes()

template<class Derived>
size_t mrpt::opengl::COctreePointRenderer< Derived >::octree_get_visible_nodes ( ) const
inline

Return the number of visible octree nodes in the last render event.

Definition at line 548 of file COctreePointRenderer.h.

◆ octree_getBoundingBox()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::octree_getBoundingBox ( mrpt::math::TPoint3D bb_min,
mrpt::math::TPoint3D bb_max 
) const
inlineprotected

Definition at line 102 of file COctreePointRenderer.h.

◆ octree_mark_as_outdated()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::octree_mark_as_outdated ( )
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 551 of file COctreePointRenderer.h.

◆ octree_recursive_render()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::octree_recursive_render ( size_t  node_idx,
const mrpt::opengl::gl_utils::TRenderInfo ri,
mrpt::utils::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
inlineprivate

◆ octree_render()

template<class Derived>
void mrpt::opengl::COctreePointRenderer< Derived >::octree_render ( const mrpt::opengl::gl_utils::TRenderInfo ri) const
inlineprotected

Render the entire octree recursively.

Should be called from children's render() method.

Definition at line 79 of file COctreePointRenderer.h.

Member Data Documentation

◆ m_octree_has_to_rebuild_all

template<class Derived>
bool mrpt::opengl::COctreePointRenderer< Derived >::m_octree_has_to_rebuild_all
private

◆ m_octree_nodes

template<class Derived>
mrpt::aligned_containers<TNode>::deque_t mrpt::opengl::COctreePointRenderer< Derived >::m_octree_nodes
private

◆ m_render_queue

template<class Derived>
std::vector<TRenderQueueElement> mrpt::opengl::COctreePointRenderer< Derived >::m_render_queue
mutableprivate

◆ m_visible_octree_nodes

template<class Derived>
volatile size_t mrpt::opengl::COctreePointRenderer< Derived >::m_visible_octree_nodes
mutableprivate

◆ m_visible_octree_nodes_ongoing

template<class Derived>
volatile size_t mrpt::opengl::COctreePointRenderer< Derived >::m_visible_octree_nodes_ongoing
mutableprivate



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020