Main MRPT website > C++ reference
MRPT logo
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
mrpt::opengl::COctreePointRenderer Class Reference

Detailed Description

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

#include <mrpt/opengl/COctreePointRenderer.h>

Inheritance diagram for mrpt::opengl::COctreePointRenderer:
Inheritance graph
[legend]

List of all members.

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.
 COctreePointRenderer (const COctreePointRenderer &)
 Copy ctor.
size_t octree_get_node_count () const
 Return the number of octree nodes (all of them, including the empty ones)
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 double lines_width=1, const TColorf lines_color=TColorf(1, 1, 1)) const
 Returns a graphical representation of all the bounding boxes of the octree (leaf) nodes.
void octree_debug_dump_tree (std::ostream &o) const
 Used for debug only.

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()
void octree_render (const mrpt::opengl::gl_utils::TRenderInfo &ri) const
 Render the entire octree recursively.

Private Member Functions

void octree_recursive_render (size_t node_idx, const mrpt::opengl::gl_utils::TRenderInfo &ri, 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.
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.
bool m_octree_has_to_rebuild_all
std::deque< TNodem_octree_nodes
 First one [0] is always the root node.
volatile size_t m_visible_octree_nodes
volatile size_t m_visible_octree_nodes_ongoing

Member Enumeration Documentation

anonymous enum
Enumerator:
OCTREE_ROOT_NODE 

Definition at line 81 of file COctreePointRenderer.h.


Constructor & Destructor Documentation

mrpt::opengl::COctreePointRenderer::COctreePointRenderer ( ) [inline]

Default ctor.

Definition at line 69 of file COctreePointRenderer.h.

mrpt::opengl::COctreePointRenderer::COctreePointRenderer ( const COctreePointRenderer ) [inline]

Copy ctor.

Definition at line 76 of file COctreePointRenderer.h.


Member Function Documentation

void mrpt::opengl::COctreePointRenderer::internal_octree_assure_uptodate ( ) [inline, private]
void mrpt::opengl::COctreePointRenderer::internal_recursive_split ( const size_t  node_id,
const bool  all_pts = false 
) [inline, private]
void mrpt::opengl::COctreePointRenderer::octree_assure_uptodate ( ) const [inline, protected]

Must be called at children class' render() previously to octree_render()

Definition at line 89 of file COctreePointRenderer.h.

Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_get_graphics_boundingboxes().

void mrpt::opengl::COctreePointRenderer::octree_debug_dump_tree ( std::ostream o) const [inline]

Used for debug only.

Definition at line 570 of file COctreePointRenderer.h.

Derived& mrpt::opengl::COctreePointRenderer::octree_derived ( ) [inline, protected]
const Derived& mrpt::opengl::COctreePointRenderer::octree_derived ( ) const [inline, protected]

Definition at line 86 of file COctreePointRenderer.h.

void mrpt::opengl::COctreePointRenderer::octree_get_graphics_boundingboxes ( mrpt::opengl::CSetOfObjects gl_bb,
const double  lines_width = 1,
const TColorf  lines_color = TColorf(1,1,1) 
) const [inline]

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

Definition at line 548 of file COctreePointRenderer.h.

size_t mrpt::opengl::COctreePointRenderer::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 538 of file COctreePointRenderer.h.

size_t mrpt::opengl::COctreePointRenderer::octree_get_visible_nodes ( ) const [inline]

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

Definition at line 541 of file COctreePointRenderer.h.

void mrpt::opengl::COctreePointRenderer::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 544 of file COctreePointRenderer.h.

void mrpt::opengl::COctreePointRenderer::octree_recursive_render ( size_t  node_idx,
const mrpt::opengl::gl_utils::TRenderInfo ri,
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 [inline, private]
void mrpt::opengl::COctreePointRenderer::octree_render ( const mrpt::opengl::gl_utils::TRenderInfo ri) const [inline, protected]

Render the entire octree recursively.

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

Definition at line 97 of file COctreePointRenderer.h.


Member Data Documentation




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011