qCC_db version 2.13.alpha (Qt) - 31 May 2022
CloudCompare 3D entities
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ccPointCloudLOD Class Reference

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

#include <ccPointCloudLOD.h>

Collaboration diagram for ccPointCloudLOD:
Collaboration graph
[legend]

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.
 

Public Member Functions

 ccPointCloudLOD ()
 Default constructor.
 
virtual ~ccPointCloudLOD ()
 Destructor.
 
bool init (ccPointCloud *cloud)
 Initializes the construction process (asynchronous)
 
void lock ()
 Locks the structure.
 
void unlock ()
 Unlocks the structure.
 
State getState ()
 Returns the current state.
 
void clear ()
 Clears the structure.
 
const ccOctree::Sharedoctree () const
 Returns the associated octree.
 
bool isNull ()
 Returns whether the structure is null (i.e. not under construction or initialized) or not.
 
bool isInitialized ()
 Returns whether the structure is initialized or not.
 
bool isUnderConstruction ()
 Returns whether the structure is initialized or not.
 
bool isBroken ()
 Returns whether the structure is broken or not.
 
unsigned char maxLevel ()
 Returns the maximum accessible level.
 
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=nullptr)
 Test all cells visibility with a given frustum. More...
 
LODIndexSet & getIndexMap (unsigned char level, unsigned &maxCount, unsigned &remainingPointsAtThisLevel)
 Builds an index map with the remaining visible points.
 
const LODIndexSet & getLasIndexMap () const
 Returns the last index map.
 
bool allDisplayed () const
 Returns whether all points have been displayed or not.
 
size_t memory () const
 Returns the memory used by the structure (in bytes)
 

Static Public Attributes

static const unsigned char UNDEFINED = 255
 Undefined visibility flag.
 

Protected Member Functions

bool initInternal (ccOctree::Shared octree)
 Reserves memory.
 
void setState (State state)
 Sets the current state.
 
void clearExtended (bool autoStopThread, State newState)
 Clears the structure (with more options)
 
void clearData ()
 Clears the internal (nodes) data.
 
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.
 
void resetVisibility ()
 Updates the max radius per level FOR ALL CELLS. More...
 
uint32_t addNPointsToIndexMap (Node &node, uint32_t count)
 Adds a given number of points to the active index map (should be dispatched among the children cells)
 

Protected Attributes

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

Detailed Description

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

Member Function Documentation

◆ flagVisibility()

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

Test all cells visibility with a given frustum.

Automatically calls resetVisibility

◆ 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)

◆ 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.


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