#include <SparseField.h>
template<class Data_T>
class SparseField< Data_T >::const_iterator
- Todo:
- Code duplication between this and iterator!!!!!!!!!!!!!!!!!!!!!!
Definition at line 885 of file SparseField.h.
◆ class_type
◆ Block
◆ const_iterator()
Definition at line 898 of file SparseField.h.
901 :
x(currentPos.x),
y(currentPos.y),
z(currentPos.z),
◆ ~const_iterator()
template<class Data_T >
SparseField< Data_T >::const_iterator::~const_iterator |
( |
| ) |
|
|
inline |
◆ operator++()
◆ operator==()
template<class Data_T >
template<class Iter_T >
bool SparseField< Data_T >::const_iterator::operator== |
( |
const Iter_T & |
rhs | ) |
const |
|
inline |
Definition at line 950 of file SparseField.h.
952 return x == rhs.x &&
y == rhs.y &&
z == rhs.z;
◆ operator!=()
template<class Data_T >
template<class Iter_T >
bool SparseField< Data_T >::const_iterator::operator!= |
( |
const Iter_T & |
rhs | ) |
const |
|
inline |
Definition at line 955 of file SparseField.h.
957 return x != rhs.x ||
y != rhs.y ||
z != rhs.z;
◆ operator*()
template<class Data_T >
const Data_T& SparseField< Data_T >::const_iterator::operator* |
( |
| ) |
const |
|
inline |
◆ operator->()
template<class Data_T >
const Data_T* SparseField< Data_T >::const_iterator::operator-> |
( |
| ) |
const |
|
inline |
◆ setupNextBlock()
template<class Data_T >
void SparseField< Data_T >::const_iterator::setupNextBlock |
( |
int |
i, |
|
|
int |
j, |
|
|
int |
k |
|
) |
| |
|
inlineprivate |
◆ m_p
template<class Data_T >
const Data_T* SparseField< Data_T >::const_iterator::m_p |
|
mutableprivate |
◆ m_isEmptyBlock
template<class Data_T >
bool SparseField< Data_T >::const_iterator::m_isEmptyBlock |
|
private |
Whether we're at an empty block and we don't increment m_p.
Definition at line 1043 of file SparseField.h.
◆ m_blockIsActivated
template<class Data_T >
bool SparseField< Data_T >::const_iterator::m_blockIsActivated |
|
mutableprivate |
Used with delayed-load fields. Check if we've already activated the current blocks.
Definition at line 1046 of file SparseField.h.
◆ m_blockStepsTicker
template<class Data_T >
int SparseField< Data_T >::const_iterator::m_blockStepsTicker |
|
private |
Ticker for how many more steps to take before resetting the pointer.
Definition at line 1048 of file SparseField.h.
◆ m_blockOrder
template<class Data_T >
int SparseField< Data_T >::const_iterator::m_blockOrder |
|
private |
◆ m_blockI
◆ m_blockJ
◆ m_blockK
◆ m_blockId
◆ m_window
◆ m_field
◆ m_manager
Pointer to the singleton file manager.
Definition at line 1058 of file SparseField.h.
The documentation for this class was generated from the following file:
bool m_blockIsActivated
Used with delayed-load fields. Check if we've already activated the current blocks.
void setupNextBlock(int i, int j, int k)
Block * m_blocks
Array of blocks. Not using std::vector since SparseBlock is noncopyable.
int m_blockStepsTicker
Ticker for how many more steps to take before resetting the pointer.
void activateBlock(int fileId, int blockIdx)
Called by SparseField when it's about to read from a block. This should not be called by the user,...
void incBlockRef(int fileId, int blockIdx)
Increments the usage reference count on the specified block, to prevent it from getting unloaded whil...
const class_type * m_field
Reference to field we're traversing.
void getVoxelInBlock(int i, int j, int k, int &vi, int &vj, int &vk) const
Calculates the coordinates in a block for the given voxel index.
int m_blockXYSize
Block array res.x * res.y.
int m_blockI
Current block index.
int m_blockOrder
Block size.
const Data_T * m_p
Current pointed-to element.
SparseFileManager * m_manager
Pointer to the singleton file manager.
int blockId(int blockI, int blockJ, int blockK) const
Calculates the block number based on a block i,j,k index.
int x
Current x/y/z coord.
bool isAllocated
Whether the block is allocated or not.
Sparse::SparseBlock< Data_T > Block
void getBlockCoord(int i, int j, int k, int &bi, int &bj, int &bk) const
Calculates the block coordinates that a given set of voxel coords are in.
void decBlockRef(int fileId, int blockIdx)
Decrements the usage reference count on the specified block, after its value is no longer being used ...
int blockOrder() const
Returns the block order.
V3i m_blockRes
Block array resolution.
void applyDataWindowOffset(int &i, int &j, int &k) const
Applies data window offset.
int m_fileId
File id. Used with m_fileManager if active. Otherwise -1.
size_t m_numBlocks
Number of blocks in field.
SparseFileManager * m_fileManager
Pointer to SparseFileManager. Used when doing dynamic reading. NULL if not in use.
Box3i m_window
Window to traverse.
bool m_isEmptyBlock
Whether we're at an empty block and we don't increment m_p.