 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
94 ?
static_cast<unsigned char>(
95 std::max<size_t>(1,
m_levels.size())) -
134 inline Node&
node(int32_t index,
unsigned char level) {
135 assert(level <
m_levels.size() && index >= 0 &&
136 index <
m_levels[level].data.size());
140 inline const Node&
node(int32_t index,
unsigned char level)
const {
141 assert(level <
m_levels.size() && index >= 0 &&
142 index <
m_levels[level].data.size());
165 unsigned& remainingPointsAtThisLevel);
201 int32_t
newCell(
unsigned char level);
279 unsigned char maxLevel)
283 if (testVisibility) {
286 testVisibility =
false;
290 testVisibility =
true;
300 for (
int i = 0; i < 8; ++i) {
304 render(childNode, testVisibility);
const Frustum & m_frustum
Definition: ecvPointCloudLOD.h:313
const Node & root() const
Definition: ecvPointCloudLOD.h:148
State getState()
Returns the current state.
Definition: ecvPointCloudLOD.h:62
State m_state
State.
Definition: ecvPointCloudLOD.h:269
Definition: ecvFrustum.h:85
Thread for background computation.
Definition: ecvPointCloudLOD.cpp:19
void clearExtended(bool autoStopThread, State newState)
Clears the structure (with more options)
@ INTERSECT
Definition: ecvFrustum.h:98
Intersection sphereInFrustum(const CCVector3f &c, float r) const
Definition: ecvFrustum.h:113
std::function< void(const ccPointCloudLOD::Node &)> RenderFunc
Definition: ecvPointCloudLOD.h:274
uint32_t firstCodeIndex
Definition: ecvPointCloudLOD.h:111
std::vector< unsigned > LODIndexSet
L.O.D. indexes set.
Definition: ecvPointCloudLOD.h:40
QMutex m_mutex
For concurrent access.
Definition: ecvPointCloudLOD.h:266
bool isBroken()
Returns whether the structure is broken or not.
Definition: ecvPointCloudLOD.h:88
friend ccPointCloudLODThread
Definition: ecvPointCloudLOD.h:179
uint32_t pointCount
Definition: ecvPointCloudLOD.h:107
std::vector< ccClipPlane > ccClipPlaneSet
Definition: ecvDrawableObject.h:21
virtual ~ccPointCloudLOD()
Destructor.
Definition: ecvPointCloudLOD.cpp:390
unsigned unfinishedPoints
Previously unfinished level.
Definition: ecvPointCloudLOD.h:247
static const unsigned char UNDEFINED
Undefined visibility flag.
Definition: ecvPointCloudLOD.h:101
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
size_t memory() const
Returns the memory used by the structure (in bytes)
Definition: ecvPointCloudLOD.cpp:392
bool isNull()
Definition: ecvPointCloudLOD.h:77
unsigned char maxLevel()
Returns the maximum accessible level.
Definition: ecvPointCloudLOD.h:91
int unfinishedLevel
Previously unfinished level.
Definition: ecvPointCloudLOD.h:245
void setState(State state)
Sets the current state.
Definition: ecvPointCloudLOD.h:185
QSharedPointer< ccOctree > Shared
Shared pointer.
Definition: ecvOctree.h:32
LODLevelDesc(unsigned _startIndex, unsigned _count)
Constructor from a start index and a count value.
Definition: ecvPointCloudLOD.h:31
Parameters of the current render state.
Definition: ecvPointCloudLOD.h:233
unsigned startIndex
Start index (refers to the 'indexes' table)
Definition: ecvPointCloudLOD.h:34
ccOctree::Shared m_octree
Associated octree.
Definition: ecvPointCloudLOD.h:260
void render(const ccPointCloudLOD::Node &node, bool testVisibility)
Definition: ecvPointCloudLOD.h:282
State
Structure initialization state.
Definition: ecvPointCloudLOD.h:46
float radius
Definition: ecvPointCloudLOD.h:108
unsigned char m_maxLevel
Definition: ecvPointCloudLOD.h:315
void unlock()
Unlocks the structure.
Definition: ecvPointCloudLOD.h:59
ccPointCloudLOD & m_lod
Definition: ecvPointCloudLOD.h:314
@ OUTSIDE
Definition: ecvFrustum.h:97
uint32_t displayedPoints
Number of already displayed points.
Definition: ecvPointCloudLOD.h:243
Node & root()
Definition: ecvPointCloudLOD.h:146
ccPointCloudLODThread * m_thread
Computing thread.
Definition: ecvPointCloudLOD.h:263
LODLevelDesc()
Default constructor.
Definition: ecvPointCloudLOD.h:29
@ UNDER_CONSTRUCTION
Definition: ecvPointCloudLOD.h:46
uint32_t visiblePoints
Number of visible points (for the last visibility test)
Definition: ecvPointCloudLOD.h:241
const Node & node(int32_t index, unsigned char level) const
Definition: ecvPointCloudLOD.h:140
bool isInitialized()
Returns whether the structure is initialized or not.
Definition: ecvPointCloudLOD.h:80
Octree 'tree' node.
Definition: ecvPointCloudLOD.h:104
void clearData()
Clears the internal (nodes) data.
Definition: ecvPointCloudLOD.cpp:427
bool init(ccPointCloud *cloud)
Initializes the construction process (asynchronous)
Definition: ecvPointCloudLOD.cpp:405
LODIndexSet & getIndexMap(unsigned char level, unsigned &maxCount, unsigned &remainingPointsAtThisLevel)
Builds an index map with the remaining visible points.
Definition: ecvPointCloudLOD.cpp:738
const LODIndexSet & getLasIndexMap() const
Returns the last index map.
Definition: ecvPointCloudLOD.h:168
void resetVisibility()
Updates the max radius per level FOR ALL CELLS.
Definition: ecvPointCloudLOD.cpp:526
uint8_t level
Definition: ecvPointCloudLOD.h:113
L.O.D. (Level of Detail) structure.
Definition: ecvPointCloudLOD.h:43
Level()
Definition: ecvPointCloudLOD.h:221
Node(uint8_t _level=0)
Default constructor.
Definition: ecvPointCloudLOD.h:121
std::vector< Level > m_levels
Per-level cells data.
Definition: ecvPointCloudLOD.h:230
bool allDisplayed() const
Returns whether all points have been displayed or not.
Definition: ecvPointCloudLOD.h:171
PointCloudLODRenderer(ccPointCloudLOD &lod, RenderFunc &func, const Frustum &frustum, unsigned char maxLevel)
Definition: ecvPointCloudLOD.h:276
const ccOctree::Shared & octree() const
Returns the associated octree.
Definition: ecvPointCloudLOD.h:73
RenderFunc m_func
Definition: ecvPointCloudLOD.h:312
LODIndexSet m_indexMap
Index map.
Definition: ecvPointCloudLOD.h:254
@ INITIALIZED
Definition: ecvPointCloudLOD.h:46
@ BROKEN
Definition: ecvPointCloudLOD.h:46
uint8_t childCount
Definition: ecvPointCloudLOD.h:114
ccPointCloudLOD()
Default constructor.
Definition: ecvPointCloudLOD.cpp:381
int count
Definition: FileIOFactory.cpp:132
CCVector3f center
Definition: ecvPointCloudLOD.h:109
uint32_t flagVisibility(const Frustum &frustum, ccClipPlaneSet *clipPlanes=0)
Test all cells visibility with a given frustum.
Definition: ecvPointCloudLOD.cpp:646
void shrink_to_fit()
Shrinks the internal data to its minimum size.
Definition: ecvPointCloudLOD.cpp:489
unsigned count
Index count for this level.
Definition: ecvPointCloudLOD.h:36
Level descriptor.
Definition: ecvPointCloudLOD.h:27
void clear()
Clears the structure.
Definition: ecvPointCloudLOD.cpp:507
std::array< int32_t, 8 > childIndexes
Definition: ecvPointCloudLOD.h:110
int32_t newCell(unsigned char level)
Reserves a new cell at a given level.
Definition: ecvPointCloudLOD.cpp:457
uint32_t displayedPointCount
Definition: ecvPointCloudLOD.h:112
Definition: ecvPointCloudLOD.h:272
uint8_t intersection
Definition: ecvPointCloudLOD.h:115
Definition: ecvPointCloudLOD.h:220
std::vector< Node > data
Definition: ecvPointCloudLOD.h:225
Node & node(int32_t index, unsigned char level)
Definition: ecvPointCloudLOD.h:134
RenderParams m_currentState
Current rendering state.
Definition: ecvPointCloudLOD.h:251
@ INSIDE
Definition: ecvFrustum.h:99
void lock()
Locks the structure.
Definition: ecvPointCloudLOD.h:57
@ NOT_INITIALIZED
Definition: ecvPointCloudLOD.h:46
uint32_t addNPointsToIndexMap(Node &node, uint32_t count)
Definition: ecvPointCloudLOD.cpp:667
LODIndexSet m_lastIndexMap
Last index map (pointer on)
Definition: ecvPointCloudLOD.h:257
RenderParams()
Definition: ecvPointCloudLOD.h:234
bool isUnderConstruction()
Returns whether the structure is initialized or not.
Definition: ecvPointCloudLOD.h:83