PolyVox  0.2.1
Open source voxel management library
Public Member Functions
PolyVox::SimpleVolume< VoxelType >::Sampler Class Reference

#include <SimpleVolume.h>

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

List of all members.

Public Member Functions

 Sampler (SimpleVolume< VoxelType > *volume)
 Construct a new Sampler.
 ~Sampler ()
Sampleroperator= (const Sampler &rhs)
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 82 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 35 of file SimpleVolumeSampler.inl.

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

Definition at line 41 of file SimpleVolumeSampler.inl.


Member Function Documentation

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

Definition at line 61 of file SimpleVolumeSampler.inl.

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 102 of file SimpleVolumeSampler.inl.

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

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

Decrease the x position by 1.

Definition at line 227 of file SimpleVolumeSampler.inl.

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

Decrease the y position by 1.

Definition at line 243 of file SimpleVolumeSampler.inl.

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

Decrease the z position by 1.

Definition at line 259 of file SimpleVolumeSampler.inl.

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

Increase the x position by 1.

Definition at line 179 of file SimpleVolumeSampler.inl.

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

Increase the y position by 1.

Definition at line 195 of file SimpleVolumeSampler.inl.

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

Increase the z position by 1.

Definition at line 211 of file SimpleVolumeSampler.inl.

template<typename VoxelType>
SimpleVolume< VoxelType >::Sampler & PolyVox::SimpleVolume< VoxelType >::Sampler::operator= ( const Sampler rhs)

Definition at line 46 of file SimpleVolumeSampler.inl.

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

Definition at line 407 of file SimpleVolumeSampler.inl.

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

Definition at line 397 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 413 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 377 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 367 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 387 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 433 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 423 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 443 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 315 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 305 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 325 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 285 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 275 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 295 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 345 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 335 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 355 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 495 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 485 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 505 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 465 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 455 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 475 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 525 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 515 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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

Definition at line 535 of file SimpleVolumeSampler.inl.

+ Here is the call graph for this function:

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 111 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 122 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 162 of file SimpleVolumeSampler.inl.


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