![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
L.O.D. (Level of Detail) structure. More...
#include <ecvPointCloudLOD.h>

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::Shared & | octree () 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... | |
| Node & | node (int32_t index, unsigned char level) |
| const Node & | node (int32_t index, unsigned char level) const |
| Node & | root () |
| const Node & | root () const |
| uint32_t | flagVisibility (const Frustum &frustum, ccClipPlaneSet *clipPlanes=0) |
| 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. More... | |
| const LODIndexSet & | getLasIndexMap () 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< Level > | m_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... | |
| ccPointCloudLODThread * | m_thread |
| Computing thread. More... | |
| QMutex | m_mutex |
| For concurrent access. More... | |
| State | m_state |
| State. More... | |
L.O.D. (Level of Detail) structure.
Definition at line 43 of file ecvPointCloudLOD.h.
Structure initialization state.
| Enumerator | |
|---|---|
| NOT_INITIALIZED | |
| UNDER_CONSTRUCTION | |
| INITIALIZED | |
| BROKEN | |
Definition at line 46 of file ecvPointCloudLOD.h.
| ccPointCloudLOD::ccPointCloudLOD | ( | ) |
Default constructor.
Definition at line 381 of file ecvPointCloudLOD.cpp.
References clearData().
Referenced by memory().
|
virtual |
|
protected |
Adds a given number of points to the active index map (should be dispatched among the children cells)
Definition at line 667 of file ecvPointCloudLOD.cpp.
References cloudViewer::utility::ceil(), ccPointCloudLOD::Node::childCount, ccPointCloudLOD::Node::childIndexes, count, ccPointCloudLOD::Node::displayedPointCount, ccPointCloudLOD::Node::firstCodeIndex, ccPointCloudLOD::Node::intersection, ccPointCloudLOD::Node::level, m_indexMap, m_octree, node(), Frustum::OUTSIDE, and ccPointCloudLOD::Node::pointCount.
Referenced by getIndexMap().
|
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.
| void ccPointCloudLOD::clear | ( | ) |
Clears the structure.
Definition at line 507 of file ecvPointCloudLOD.cpp.
References m_levels, m_mutex, m_state, m_thread, and NOT_INITIALIZED.
Referenced by ccPointCloud::clearLOD(), and ~ccPointCloudLOD().
|
protected |
Clears the internal (nodes) data.
Definition at line 427 of file ecvPointCloudLOD.cpp.
References m_levels.
Referenced by ccPointCloudLOD(), and ccPointCloudLODThread::run().
|
protected |
Clears the structure (with more options)
| uint32_t ccPointCloudLOD::flagVisibility | ( | const Frustum & | frustum, |
| ccClipPlaneSet * | clipPlanes = 0 |
||
| ) |
Test all cells visibility with a given frustum.
Automatically calls resetVisibility
Definition at line 646 of file ecvPointCloudLOD.cpp.
References PointCloudLODVisibilityFlagger::flag(), INITIALIZED, m_currentState, m_levels, m_state, resetVisibility(), root(), PointCloudLODVisibilityFlagger::setClipPlanes(), and ccPointCloudLOD::RenderParams::visiblePoints.
| LODIndexSet & ccPointCloudLOD::getIndexMap | ( | unsigned char | level, |
| unsigned & | maxCount, | ||
| unsigned & | remainingPointsAtThisLevel | ||
| ) |
Builds an index map with the remaining visible points.
Definition at line 738 of file ecvPointCloudLOD.cpp.
References addNPointsToIndexMap(), cloudViewer::utility::ceil(), ccPointCloudLOD::Node::childCount, ccPointCloudLOD::Level::data, ccPointCloudLOD::Node::displayedPointCount, ccPointCloudLOD::RenderParams::displayedPoints, INITIALIZED, ccPointCloudLOD::Node::intersection, m_currentState, m_indexMap, m_lastIndexMap, m_levels, m_octree, m_state, node(), Frustum::OUTSIDE, ccPointCloudLOD::Node::pointCount, UNDEFINED, ccPointCloudLOD::RenderParams::unfinishedLevel, ccPointCloudLOD::RenderParams::unfinishedPoints, and ccPointCloudLOD::RenderParams::visiblePoints.
|
inline |
Returns the last index map.
Definition at line 168 of file ecvPointCloudLOD.h.
References m_lastIndexMap.
|
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().
| bool ccPointCloudLOD::init | ( | ccPointCloud * | cloud | ) |
Initializes the construction process (asynchronous)
Definition at line 405 of file ecvPointCloudLOD.cpp.
References ccPointCloudLODThread, isBroken(), and m_thread.
Referenced by ccPointCloud::initLOD().
|
inline |
Returns whether the structure is broken or not.
Definition at line 88 of file ecvPointCloudLOD.h.
References BROKEN, and getState().
Referenced by init().
|
inline |
Returns whether the structure is initialized or not.
Definition at line 80 of file ecvPointCloudLOD.h.
References getState(), and INITIALIZED.
|
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.
|
inline |
Returns whether the structure is initialized or not.
Definition at line 83 of file ecvPointCloudLOD.h.
References getState(), and UNDER_CONSTRUCTION.
|
inline |
Locks the structure.
Definition at line 57 of file ecvPointCloudLOD.h.
References m_mutex.
Referenced by getState(), and setState().
|
inline |
Returns the maximum accessible level.
Definition at line 91 of file ecvPointCloudLOD.h.
References INITIALIZED, m_levels, m_mutex, and m_state.
| size_t ccPointCloudLOD::memory | ( | ) | const |
Returns the memory used by the structure (in bytes)
Definition at line 392 of file ecvPointCloudLOD.cpp.
References ccPointCloudLOD(), and m_levels.
Referenced by ccPointCloudLODThread::run().
|
protected |
Reserves a new cell at a given level.
Definition at line 457 of file ecvPointCloudLOD.cpp.
References ccPointCloudLOD::Level::data, and m_levels.
Referenced by ccPointCloudLODThread::fillNode(), and ccPointCloudLODThread::run().
|
inline |
Definition at line 134 of file ecvPointCloudLOD.h.
References m_levels.
Referenced by addNPointsToIndexMap(), ccPointCloudLODThread::fillNode(), PointCloudLODVisibilityFlagger::flag(), getIndexMap(), PointCloudLODVisibilityFlagger::propagateFlag(), PointCloudLODRenderer::render(), root(), and ccPointCloudLODThread::run().
|
inline |
Definition at line 140 of file ecvPointCloudLOD.h.
References m_levels.
|
inline |
Returns the associated octree.
Definition at line 73 of file ecvPointCloudLOD.h.
References m_octree.
|
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.
Definition at line 526 of file ecvPointCloudLOD.cpp.
References data, INITIALIZED, Frustum::INSIDE, m_currentState, m_levels, and m_state.
Referenced by flagVisibility().
|
inline |
Definition at line 146 of file ecvPointCloudLOD.h.
References node().
Referenced by flagVisibility(), and ccPointCloudLODThread::run().
|
inline |
Definition at line 148 of file ecvPointCloudLOD.h.
References node().
|
inlineprotected |
Sets the current state.
Definition at line 185 of file ecvPointCloudLOD.h.
References lock(), m_state, and unlock().
Referenced by ccPointCloudLODThread::run().
|
protected |
Shrinks the internal data to its minimum size.
Definition at line 489 of file ecvPointCloudLOD.cpp.
References data, m_levels, and m_mutex.
Referenced by ccPointCloudLODThread::run().
|
inline |
Unlocks the structure.
Definition at line 59 of file ecvPointCloudLOD.h.
References m_mutex.
Referenced by getState(), and setState().
|
protected |
Definition at line 179 of file ecvPointCloudLOD.h.
Referenced by init().
|
protected |
Current rendering state.
Definition at line 251 of file ecvPointCloudLOD.h.
Referenced by allDisplayed(), flagVisibility(), getIndexMap(), and resetVisibility().
|
protected |
Index map.
Definition at line 254 of file ecvPointCloudLOD.h.
Referenced by addNPointsToIndexMap(), and getIndexMap().
|
protected |
Last index map (pointer on)
Definition at line 257 of file ecvPointCloudLOD.h.
Referenced by getIndexMap(), and getLasIndexMap().
|
protected |
Per-level cells data.
Definition at line 230 of file ecvPointCloudLOD.h.
Referenced by clear(), clearData(), flagVisibility(), getIndexMap(), maxLevel(), memory(), newCell(), node(), resetVisibility(), ccPointCloudLODThread::run(), and shrink_to_fit().
|
protected |
For concurrent access.
Definition at line 266 of file ecvPointCloudLOD.h.
Referenced by clear(), lock(), maxLevel(), shrink_to_fit(), and unlock().
|
protected |
Associated octree.
Definition at line 260 of file ecvPointCloudLOD.h.
Referenced by addNPointsToIndexMap(), getIndexMap(), and octree().
|
protected |
State.
Definition at line 269 of file ecvPointCloudLOD.h.
Referenced by clear(), flagVisibility(), getIndexMap(), getState(), maxLevel(), resetVisibility(), and setState().
|
protected |
Computing thread.
Definition at line 263 of file ecvPointCloudLOD.h.
|
static |
Undefined visibility flag.
Definition at line 101 of file ecvPointCloudLOD.h.
Referenced by getIndexMap().