Classes | Public Member Functions

PolyVox::RawVolume< VoxelType > Class Template Reference

#include <RawVolume.h>

Inheritance diagram for PolyVox::RawVolume< VoxelType >:
Collaboration diagram for PolyVox::RawVolume< VoxelType >:

List of all members.

Classes

class  Sampler

Public Member Functions

 RawVolume (const Region &regValid)
 Constructor for creating a fixed size volume.
 ~RawVolume ()
 Destructor.
VoxelType getBorderValue (void) const
 Gets the value used for voxels which are outside the volume.
VoxelType getVoxelAt (int32_t uXPos, int32_t uYPos, int32_t uZPos) const
 Gets a voxel at the position given by x,y,z coordinates.
VoxelType getVoxelAt (const Vector3DInt32 &v3dPos) const
 Gets a voxel at the position given by a 3D vector.
void setBorderValue (const VoxelType &tBorder)
 Sets the value used for voxels which are outside the volume.
bool setVoxelAt (int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue)
 Sets the voxel at the position given by x,y,z coordinates.
bool setVoxelAt (const Vector3DInt32 &v3dPos, VoxelType tValue)
 Sets the voxel at the position given by a 3D vector.
uint32_t calculateSizeInBytes (void)
 Calculates approximatly how many bytes of memory the volume is currently using.
void resize (const Region &regValidRegion)
 Deprecated - I don't think we should expose this function? Let us know if you disagree...

Detailed Description

template<typename VoxelType>
class PolyVox::RawVolume< VoxelType >

Definition at line 41 of file RawVolume.h.


Constructor & Destructor Documentation

template<typename VoxelType >
PolyVox::RawVolume< VoxelType >::RawVolume ( const Region regValid  ) 

Constructor for creating a fixed size volume.

This constructor creates a volume with a fixed size which is specified as a parameter.

By default this constructor will not enable paging but you can override this if desired. If you do wish to enable paging then you are required to provide the call back function (see the other RawVolume constructor).

Parameters:
regValid Specifies the minimum and maximum valid voxel positions.
dataRequiredHandler The callback function which will be called when PolyVox tries to use data which is not currently in momory.
dataOverflowHandler The callback function which will be called when PolyVox has too much data and needs to remove some from memory.
bPagingEnabled Controls whether or not paging is enabled for this RawVolume.
uBlockSideLength The size of the blocks making up the volume. Small blocks will compress/decompress faster, but there will also be more of them meaning voxel access could be slower.

Definition at line 36 of file RawVolume.inl.

template<typename VoxelType >
PolyVox::RawVolume< VoxelType >::~RawVolume (  ) 

Destructor.

Destroys the volume.

Definition at line 51 of file RawVolume.inl.


Member Function Documentation

template<typename VoxelType >
uint32_t PolyVox::RawVolume< VoxelType >::calculateSizeInBytes ( void   ) 

Calculates approximatly how many bytes of memory the volume is currently using.

Note: This function needs reviewing for accuracy...

Reimplemented from PolyVox::BaseVolume< VoxelType >.

Definition at line 186 of file RawVolume.inl.

Here is the call graph for this function:

template<typename VoxelType >
VoxelType PolyVox::RawVolume< VoxelType >::getBorderValue ( void   )  const

Gets the value used for voxels which are outside the volume.

The border value is returned whenever an attempt is made to read a voxel which is outside the extents of the volume.

Returns:
The value used for voxels outside of the volume

Reimplemented from PolyVox::BaseVolume< VoxelType >.

Definition at line 63 of file RawVolume.inl.

Referenced by PolyVox::RawVolume< VoxelType >::getVoxelAt().

template<typename VoxelType >
VoxelType PolyVox::RawVolume< VoxelType >::getVoxelAt ( int32_t  uXPos,
int32_t  uYPos,
int32_t  uZPos 
) const

Gets a voxel at the position given by x,y,z coordinates.

Parameters:
uXPos The x position of the voxel
uYPos The y position of the voxel
uZPos The z position of the voxel
Returns:
The voxel value

Reimplemented from PolyVox::BaseVolume< VoxelType >.

Definition at line 75 of file RawVolume.inl.

Referenced by PolyVox::LowPassFilter< SrcVolumeType, DestVolumeType, VoxelType >::executeSAT(), and PolyVox::RawVolume< VoxelType >::getVoxelAt().

Here is the call graph for this function:

template<typename VoxelType >
VoxelType PolyVox::RawVolume< VoxelType >::getVoxelAt ( const Vector3DInt32 v3dPos  )  const

Gets a voxel at the position given by a 3D vector.

Parameters:
v3dPos The 3D position of the voxel
Returns:
The voxel value

Reimplemented from PolyVox::BaseVolume< VoxelType >.

Definition at line 102 of file RawVolume.inl.

Here is the call graph for this function:

template<typename VoxelType >
void PolyVox::RawVolume< VoxelType >::resize ( const Region regValidRegion  ) 

Deprecated - I don't think we should expose this function? Let us know if you disagree...

This function should probably be made internal...

Definition at line 164 of file RawVolume.inl.

Here is the call graph for this function:

template<typename VoxelType >
void PolyVox::RawVolume< VoxelType >::setBorderValue ( const VoxelType &  tBorder  ) 

Sets the value used for voxels which are outside the volume.

Parameters:
tBorder The value to use for voxels outside the volume.

Reimplemented from PolyVox::BaseVolume< VoxelType >.

Definition at line 111 of file RawVolume.inl.

template<typename VoxelType >
bool PolyVox::RawVolume< VoxelType >::setVoxelAt ( const Vector3DInt32 v3dPos,
VoxelType  tValue 
)

Sets the voxel at the position given by a 3D vector.

Parameters:
v3dPos the 3D position of the voxel
tValue the value to which the voxel will be set
Returns:
whether the requested position is inside the volume

Reimplemented from PolyVox::BaseVolume< VoxelType >.

Definition at line 155 of file RawVolume.inl.

Here is the call graph for this function:

template<typename VoxelType >
bool PolyVox::RawVolume< VoxelType >::setVoxelAt ( int32_t  uXPos,
int32_t  uYPos,
int32_t  uZPos,
VoxelType  tValue 
)

Sets the voxel at the position given by x,y,z coordinates.

Parameters:
uXPos the x position of the voxel
uYPos the y position of the voxel
uZPos the z position of the voxel
tValue the value to which the voxel will be set
Returns:
whether the requested position is inside the volume

Reimplemented from PolyVox::BaseVolume< VoxelType >.

Definition at line 124 of file RawVolume.inl.

Referenced by PolyVox::LowPassFilter< SrcVolumeType, DestVolumeType, VoxelType >::executeSAT(), and PolyVox::RawVolume< VoxelType >::setVoxelAt().

Here is the call graph for this function:


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