PolyVox  0.3.0-dev
Open source voxel management library
Public Member Functions | List of all members
PolyVox::SimpleVolume< VoxelType >::Sampler Class Reference

#include <SimpleVolume.h>

+ Inheritance diagram for PolyVox::SimpleVolume< VoxelType >::Sampler:
+ Collaboration diagram for PolyVox::SimpleVolume< VoxelType >::Sampler:

Public Member Functions

 Sampler (SimpleVolume< VoxelType > *volume)
 Construct a new Sampler.
 
 ~Sampler ()
 
POLYVOX_DEPRECATED VoxelType getSubSampledVoxel (uint8_t uLevel) const
 
VoxelType getVoxel (void) const
 Get the value of the current voxel.
 
void setPosition (const Vector3DInt32 &v3dNewPos)
 Set the current voxel position.
 
void setPosition (int32_t xPos, int32_t yPos, int32_t zPos)
 Set the current voxel position.
 
bool setVoxel (VoxelType tValue)
 Set the value of the current voxel.
 
void movePositiveX (void)
 Increase the x position by 1.
 
void movePositiveY (void)
 Increase the y position by 1.
 
void movePositiveZ (void)
 Increase the z position by 1.
 
void moveNegativeX (void)
 Decrease the x position by 1.
 
void moveNegativeY (void)
 Decrease the y position by 1.
 
void moveNegativeZ (void)
 Decrease the z position by 1.
 
VoxelType peekVoxel1nx1ny1nz (void) const
 
VoxelType peekVoxel1nx1ny0pz (void) const
 
VoxelType peekVoxel1nx1ny1pz (void) const
 
VoxelType peekVoxel1nx0py1nz (void) const
 
VoxelType peekVoxel1nx0py0pz (void) const
 
VoxelType peekVoxel1nx0py1pz (void) const
 
VoxelType peekVoxel1nx1py1nz (void) const
 
VoxelType peekVoxel1nx1py0pz (void) const
 
VoxelType peekVoxel1nx1py1pz (void) const
 
VoxelType peekVoxel0px1ny1nz (void) const
 
VoxelType peekVoxel0px1ny0pz (void) const
 
VoxelType peekVoxel0px1ny1pz (void) const
 
VoxelType peekVoxel0px0py1nz (void) const
 
VoxelType peekVoxel0px0py0pz (void) const
 
VoxelType peekVoxel0px0py1pz (void) const
 
VoxelType peekVoxel0px1py1nz (void) const
 
VoxelType peekVoxel0px1py0pz (void) const
 
VoxelType peekVoxel0px1py1pz (void) const
 
VoxelType peekVoxel1px1ny1nz (void) const
 
VoxelType peekVoxel1px1ny0pz (void) const
 
VoxelType peekVoxel1px1ny1pz (void) const
 
VoxelType peekVoxel1px0py1nz (void) const
 
VoxelType peekVoxel1px0py0pz (void) const
 
VoxelType peekVoxel1px0py1pz (void) const
 
VoxelType peekVoxel1px1py1nz (void) const
 
VoxelType peekVoxel1px1py0pz (void) const
 
VoxelType peekVoxel1px1py1pz (void) const
 

Detailed Description

template<typename VoxelType>
class PolyVox::SimpleVolume< VoxelType >::Sampler

Definition at line 81 of file SimpleVolume.h.

Constructor & Destructor Documentation

template<typename VoxelType >
PolyVox::SimpleVolume< VoxelType >::Sampler::Sampler ( SimpleVolume< VoxelType > *  volume)

Construct a new Sampler.

Parameters
volumeThe SimpleVolume you want to sample

Definition at line 37 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
PolyVox::SimpleVolume< VoxelType >::Sampler::~Sampler ( )

Definition at line 43 of file SimpleVolumeSampler.inl.

Member Function Documentation

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::getSubSampledVoxel ( uint8_t  uLevel) const
Deprecated:

Definition at line 48 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::getVoxel ( void  ) const
inline

Get the value of the current voxel.

Returns
The current voxel

Definition at line 89 of file SimpleVolumeSampler.inl.

Referenced by PolyVox::AmbientOcclusionCalculatorRaycastCallback< IsVoxelTransparentCallback >::operator()().

+ Here is the call graph for this function:

template<typename VoxelType >
void PolyVox::SimpleVolume< VoxelType >::Sampler::moveNegativeX ( void  )

Decrease the x position by 1.

Definition at line 236 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
void PolyVox::SimpleVolume< VoxelType >::Sampler::moveNegativeY ( void  )

Decrease the y position by 1.

Definition at line 258 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
void PolyVox::SimpleVolume< VoxelType >::Sampler::moveNegativeZ ( void  )

Decrease the z position by 1.

Definition at line 280 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
void PolyVox::SimpleVolume< VoxelType >::Sampler::movePositiveX ( void  )

Increase the x position by 1.

Definition at line 170 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
void PolyVox::SimpleVolume< VoxelType >::Sampler::movePositiveY ( void  )

Increase the y position by 1.

Definition at line 192 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
void PolyVox::SimpleVolume< VoxelType >::Sampler::movePositiveZ ( void  )

Increase the z position by 1.

Definition at line 214 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px0py0pz ( void  ) const
inline

Definition at line 434 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px0py1nz ( void  ) const
inline

Definition at line 424 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px0py1pz ( void  ) const
inline

Definition at line 444 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px1ny0pz ( void  ) const
inline

Definition at line 404 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px1ny1nz ( void  ) const
inline

Definition at line 394 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px1ny1pz ( void  ) const
inline

Definition at line 414 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px1py0pz ( void  ) const
inline

Definition at line 464 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px1py1nz ( void  ) const
inline

Definition at line 454 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel0px1py1pz ( void  ) const
inline

Definition at line 474 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx0py0pz ( void  ) const
inline

Definition at line 342 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx0py1nz ( void  ) const
inline

Definition at line 332 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx0py1pz ( void  ) const
inline

Definition at line 352 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx1ny0pz ( void  ) const
inline

Definition at line 312 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx1ny1nz ( void  ) const
inline

Definition at line 302 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx1ny1pz ( void  ) const
inline

Definition at line 322 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx1py0pz ( void  ) const
inline

Definition at line 372 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx1py1nz ( void  ) const
inline

Definition at line 362 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1nx1py1pz ( void  ) const
inline

Definition at line 382 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px0py0pz ( void  ) const
inline

Definition at line 526 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px0py1nz ( void  ) const
inline

Definition at line 516 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px0py1pz ( void  ) const
inline

Definition at line 536 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px1ny0pz ( void  ) const
inline

Definition at line 496 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px1ny1nz ( void  ) const
inline

Definition at line 486 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px1ny1pz ( void  ) const
inline

Definition at line 506 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px1py0pz ( void  ) const
inline

Definition at line 556 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px1py1nz ( void  ) const
inline

Definition at line 546 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
VoxelType PolyVox::SimpleVolume< VoxelType >::Sampler::peekVoxel1px1py1pz ( void  ) const
inline

Definition at line 566 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
void PolyVox::SimpleVolume< VoxelType >::Sampler::setPosition ( const Vector3DInt32 v3dNewPos)

Set the current voxel position.

Parameters
v3dNewPosThe position to set to

Definition at line 105 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

template<typename VoxelType >
void PolyVox::SimpleVolume< VoxelType >::Sampler::setPosition ( int32_t  xPos,
int32_t  yPos,
int32_t  zPos 
)

Set the current voxel position.

Parameters
xPosThe x position to set to
yPosThe y position to set to
zPosThe z position to set to

Definition at line 116 of file SimpleVolumeSampler.inl.

template<typename VoxelType >
bool PolyVox::SimpleVolume< VoxelType >::Sampler::setVoxel ( VoxelType  tValue)
inline

Set the value of the current voxel.

This function checks that the current voxel position that you're trying to set is not outside the volume. If it is, this function returns false, otherwise it will return true.

Parameters
tValueThe value to set to voxel to

Definition at line 156 of file SimpleVolumeSampler.inl.


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