GridIteratorInterface< TYPE, iteratorType > Class Template Reference

#include <volumeiterators.h>

Detailed Description

template<typename TYPE, ITERATORTYPE iteratorType>
class maxon::GridIteratorInterface< TYPE, iteratorType >

GridIteratorInterface allows to iterate over the active voxels of a volume.

Public Member Functions

MAXON_METHOD Result< void > Init (const Volume &volumeObject)
 
MAXON_METHOD IntVector32 GetCoords () const
 
MAXON_METHOD TYPE GetValue () const
 
MAXON_METHOD Bool IsNotAtEnd () const
 
MAXON_METHOD void StepNext ()
 
MAXON_METHOD Volume GetVolume () const
 
MAXON_METHOD TREEVOXELLEVEL GetVoxelLevel () const
 

Static Public Member Functions

static MAXON_FUNCTION Result< GridIteratorRef< TYPE, iteratorType > > Create ()
 

Private Member Functions

 MAXON_INTERFACE_SIMPLE_VIRTUAL (GridIteratorInterface, MAXON_REFERENCE_NORMAL)
 

Member Function Documentation

◆ MAXON_INTERFACE_SIMPLE_VIRTUAL()

MAXON_INTERFACE_SIMPLE_VIRTUAL ( GridIteratorInterface< TYPE, iteratorType >  ,
MAXON_REFERENCE_NORMAL   
)
private

◆ Create()

static MAXON_FUNCTION Result<GridIteratorRef<TYPE, iteratorType> > Create ( )
static

◆ Init()

MAXON_METHOD Result<void> Init ( const Volume &  volumeObject)

Initialize the iterator with a volume object.

Parameters
[in]volumeObjectThe volume object to initialize this iterator for.
Returns
True if the accessor was initialized with a volume, false otherse.

◆ GetCoords()

MAXON_METHOD IntVector32 GetCoords ( ) const

Retrieve the index position of the volume at current iterator position.

Returns
The index position at current iterator position.

◆ GetValue()

MAXON_METHOD TYPE GetValue ( ) const

Retrieve the value of the volume at current iterator position.

Returns
The value at current iterator position.

◆ IsNotAtEnd()

MAXON_METHOD Bool IsNotAtEnd ( ) const

Check if the iterator is not at its end.

Returns
True if the iterator is not at the end, false otherwise.

◆ StepNext()

MAXON_METHOD void StepNext ( )

Steps the iterator to the next active voxel.

◆ GetVolume()

MAXON_METHOD Volume GetVolume ( ) const

Get a reference to the volume object this iterator is initialized for.

Returns
The volume object the iterator was initialized with.

◆ GetVoxelLevel()

MAXON_METHOD TREEVOXELLEVEL GetVoxelLevel ( ) const

Returns the voxel tree level of the current voxel.

Returns
The voxel level of the current iterator position.