ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccPointCloudLOD Class Reference

L.O.D. (Level of Detail) structure. More...

#include <ecvPointCloudLOD.h>

Collaboration diagram for ccPointCloudLOD:

Classes

struct  Level
 
struct  Node
 Octree 'tree' node. More...
 
struct  RenderParams
 Parameters of the current render state. More...
 

Public Types

enum  State { NOT_INITIALIZED , UNDER_CONSTRUCTION , INITIALIZED , BROKEN }
 Structure initialization state. More...
 

Public Member Functions

 ccPointCloudLOD ()
 Default constructor. More...
 
virtual ~ccPointCloudLOD ()
 Destructor. More...
 
bool init (ccPointCloud *cloud)
 Initializes the construction process (asynchronous) More...
 
void lock ()
 Locks the structure. More...
 
void unlock ()
 Unlocks the structure. More...
 
State getState ()
 Returns the current state. More...
 
void clear ()
 Clears the structure. More...
 
const ccOctree::Sharedoctree () const
 Returns the associated octree. More...
 
bool isNull ()
 
bool isInitialized ()
 Returns whether the structure is initialized or not. More...
 
bool isUnderConstruction ()
 Returns whether the structure is initialized or not. More...
 
bool isBroken ()
 Returns whether the structure is broken or not. More...
 
unsigned char maxLevel ()
 Returns the maximum accessible level. More...
 
Nodenode (int32_t index, unsigned char level)
 
const Nodenode (int32_t index, unsigned char level) const
 
Noderoot ()
 
const Noderoot () const
 
uint32_t flagVisibility (const Frustum &frustum, ccClipPlaneSet *clipPlanes=0)
 Test all cells visibility with a given frustum. More...
 
LODIndexSetgetIndexMap (unsigned char level, unsigned &maxCount, unsigned &remainingPointsAtThisLevel)
 Builds an index map with the remaining visible points. More...
 
const LODIndexSetgetLasIndexMap () const
 Returns the last index map. More...
 
bool allDisplayed () const
 Returns whether all points have been displayed or not. More...
 
size_t memory () const
 Returns the memory used by the structure (in bytes) More...
 

Static Public Attributes

static const unsigned char UNDEFINED = 255
 Undefined visibility flag. More...
 

Protected Member Functions

void setState (State state)
 Sets the current state. More...
 
void clearExtended (bool autoStopThread, State newState)
 Clears the structure (with more options) More...
 
void clearData ()
 Clears the internal (nodes) data. More...
 
int32_t newCell (unsigned char level)
 Reserves a new cell at a given level. More...
 
void shrink_to_fit ()
 Shrinks the internal data to its minimum size. More...
 
void resetVisibility ()
 Updates the max radius per level FOR ALL CELLS. More...
 
uint32_t addNPointsToIndexMap (Node &node, uint32_t count)
 

Protected Attributes

friend ccPointCloudLODThread
 
std::vector< Levelm_levels
 Per-level cells data. More...
 
RenderParams m_currentState
 Current rendering state. More...
 
LODIndexSet m_indexMap
 Index map. More...
 
LODIndexSet m_lastIndexMap
 Last index map (pointer on) More...
 
ccOctree::Shared m_octree
 Associated octree. More...
 
ccPointCloudLODThreadm_thread
 Computing thread. More...
 
QMutex m_mutex
 For concurrent access. More...
 
State m_state
 State. More...
 

Detailed Description

L.O.D. (Level of Detail) structure.

Definition at line 43 of file ecvPointCloudLOD.h.

Member Enumeration Documentation

◆ State

Structure initialization state.

Enumerator
NOT_INITIALIZED 
UNDER_CONSTRUCTION 
INITIALIZED 
BROKEN 

Definition at line 46 of file ecvPointCloudLOD.h.

Constructor & Destructor Documentation

◆ ccPointCloudLOD()

ccPointCloudLOD::ccPointCloudLOD ( )

Default constructor.

◆ ~ccPointCloudLOD()

virtual ccPointCloudLOD::~ccPointCloudLOD ( )
virtual

Destructor.

Member Function Documentation

◆ addNPointsToIndexMap()

uint32_t ccPointCloudLOD::addNPointsToIndexMap ( Node node,
uint32_t  count 
)
protected

Adds a given number of points to the active index map (should be dispatched among the children cells)

◆ allDisplayed()

bool ccPointCloudLOD::allDisplayed ( ) const
inline

Returns whether all points have been displayed or not.

Definition at line 171 of file ecvPointCloudLOD.h.

References ccPointCloudLOD::RenderParams::displayedPoints, m_currentState, and ccPointCloudLOD::RenderParams::visiblePoints.

◆ clear()

void ccPointCloudLOD::clear ( )

Clears the structure.

◆ clearData()

void ccPointCloudLOD::clearData ( )
protected

Clears the internal (nodes) data.

◆ clearExtended()

void ccPointCloudLOD::clearExtended ( bool  autoStopThread,
State  newState 
)
protected

Clears the structure (with more options)

◆ flagVisibility()

uint32_t ccPointCloudLOD::flagVisibility ( const Frustum frustum,
ccClipPlaneSet clipPlanes = 0 
)

Test all cells visibility with a given frustum.

Automatically calls resetVisibility

◆ getIndexMap()

LODIndexSet& ccPointCloudLOD::getIndexMap ( unsigned char  level,
unsigned &  maxCount,
unsigned &  remainingPointsAtThisLevel 
)

Builds an index map with the remaining visible points.

◆ getLasIndexMap()

const LODIndexSet& ccPointCloudLOD::getLasIndexMap ( ) const
inline

Returns the last index map.

Definition at line 168 of file ecvPointCloudLOD.h.

References m_lastIndexMap.

◆ getState()

State ccPointCloudLOD::getState ( )
inline

Returns the current state.

Definition at line 62 of file ecvPointCloudLOD.h.

References lock(), m_state, and unlock().

Referenced by isBroken(), isInitialized(), isNull(), and isUnderConstruction().

◆ init()

bool ccPointCloudLOD::init ( ccPointCloud cloud)

Initializes the construction process (asynchronous)

◆ isBroken()

bool ccPointCloudLOD::isBroken ( )
inline

Returns whether the structure is broken or not.

Definition at line 88 of file ecvPointCloudLOD.h.

References BROKEN, and getState().

◆ isInitialized()

bool ccPointCloudLOD::isInitialized ( )
inline

Returns whether the structure is initialized or not.

Definition at line 80 of file ecvPointCloudLOD.h.

References getState(), and INITIALIZED.

◆ isNull()

bool ccPointCloudLOD::isNull ( )
inline

Returns whether the structure is null (i.e. not under construction or initialized) or not

Definition at line 77 of file ecvPointCloudLOD.h.

References getState(), and NOT_INITIALIZED.

◆ isUnderConstruction()

bool ccPointCloudLOD::isUnderConstruction ( )
inline

Returns whether the structure is initialized or not.

Definition at line 83 of file ecvPointCloudLOD.h.

References getState(), and UNDER_CONSTRUCTION.

◆ lock()

void ccPointCloudLOD::lock ( )
inline

Locks the structure.

Definition at line 57 of file ecvPointCloudLOD.h.

References m_mutex.

Referenced by getState(), and setState().

◆ maxLevel()

unsigned char ccPointCloudLOD::maxLevel ( )
inline

Returns the maximum accessible level.

Definition at line 91 of file ecvPointCloudLOD.h.

References INITIALIZED, m_levels, m_mutex, and m_state.

◆ memory()

size_t ccPointCloudLOD::memory ( ) const

Returns the memory used by the structure (in bytes)

◆ newCell()

int32_t ccPointCloudLOD::newCell ( unsigned char  level)
protected

Reserves a new cell at a given level.

Returns
the new cell index in the array corresponding to this level (see m_levels)

◆ node() [1/2]

Node& ccPointCloudLOD::node ( int32_t  index,
unsigned char  level 
)
inline

Definition at line 134 of file ecvPointCloudLOD.h.

References m_levels.

Referenced by PointCloudLODRenderer::render(), and root().

◆ node() [2/2]

const Node& ccPointCloudLOD::node ( int32_t  index,
unsigned char  level 
) const
inline

Definition at line 140 of file ecvPointCloudLOD.h.

References m_levels.

◆ octree()

const ccOctree::Shared& ccPointCloudLOD::octree ( ) const
inline

Returns the associated octree.

Definition at line 73 of file ecvPointCloudLOD.h.

References m_octree.

◆ resetVisibility()

void ccPointCloudLOD::resetVisibility ( )
protected

Updates the max radius per level FOR ALL CELLS.

Resets the internal visibility flags All nodes are flagged as 'INSIDE' (= visible) and their 'visibleCount' attribute is set to 0.

◆ root() [1/2]

Node& ccPointCloudLOD::root ( )
inline

Definition at line 146 of file ecvPointCloudLOD.h.

References node().

◆ root() [2/2]

const Node& ccPointCloudLOD::root ( ) const
inline

Definition at line 148 of file ecvPointCloudLOD.h.

References node().

◆ setState()

void ccPointCloudLOD::setState ( State  state)
inlineprotected

Sets the current state.

Definition at line 185 of file ecvPointCloudLOD.h.

References lock(), m_state, and unlock().

◆ shrink_to_fit()

void ccPointCloudLOD::shrink_to_fit ( )
protected

Shrinks the internal data to its minimum size.

◆ unlock()

void ccPointCloudLOD::unlock ( )
inline

Unlocks the structure.

Definition at line 59 of file ecvPointCloudLOD.h.

References m_mutex.

Referenced by getState(), and setState().

Member Data Documentation

◆ ccPointCloudLODThread

friend ccPointCloudLOD::ccPointCloudLODThread
protected

Definition at line 179 of file ecvPointCloudLOD.h.

◆ m_currentState

RenderParams ccPointCloudLOD::m_currentState
protected

Current rendering state.

Definition at line 251 of file ecvPointCloudLOD.h.

Referenced by allDisplayed().

◆ m_indexMap

LODIndexSet ccPointCloudLOD::m_indexMap
protected

Index map.

Definition at line 254 of file ecvPointCloudLOD.h.

◆ m_lastIndexMap

LODIndexSet ccPointCloudLOD::m_lastIndexMap
protected

Last index map (pointer on)

Definition at line 257 of file ecvPointCloudLOD.h.

Referenced by getLasIndexMap().

◆ m_levels

std::vector<Level> ccPointCloudLOD::m_levels
protected

Per-level cells data.

Definition at line 230 of file ecvPointCloudLOD.h.

Referenced by maxLevel(), and node().

◆ m_mutex

QMutex ccPointCloudLOD::m_mutex
protected

For concurrent access.

Definition at line 266 of file ecvPointCloudLOD.h.

Referenced by lock(), maxLevel(), and unlock().

◆ m_octree

ccOctree::Shared ccPointCloudLOD::m_octree
protected

Associated octree.

Definition at line 260 of file ecvPointCloudLOD.h.

Referenced by octree().

◆ m_state

State ccPointCloudLOD::m_state
protected

State.

Definition at line 269 of file ecvPointCloudLOD.h.

Referenced by getState(), maxLevel(), and setState().

◆ m_thread

ccPointCloudLODThread* ccPointCloudLOD::m_thread
protected

Computing thread.

Definition at line 263 of file ecvPointCloudLOD.h.

◆ UNDEFINED

const unsigned char ccPointCloudLOD::UNDEFINED = 255
static

Undefined visibility flag.

Definition at line 101 of file ecvPointCloudLOD.h.


The documentation for this class was generated from the following file: