#include <RawVolume.h>
Classes | |
class | Sampler |
Public Member Functions | |
RawVolume (const Region ®Valid) | |
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 ®ValidRegion) |
Deprecated - I don't think we should expose this function? Let us know if you disagree... |
Definition at line 41 of file RawVolume.h.
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).
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.
PolyVox::RawVolume< VoxelType >::~RawVolume | ( | ) |
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.
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.
Reimplemented from PolyVox::BaseVolume< VoxelType >.
Definition at line 63 of file RawVolume.inl.
Referenced by PolyVox::RawVolume< VoxelType >::getVoxelAt().
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.
uXPos | The x position of the voxel | |
uYPos | The y position of the voxel | |
uZPos | The z position of the voxel |
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().
VoxelType PolyVox::RawVolume< VoxelType >::getVoxelAt | ( | const Vector3DInt32 & | v3dPos | ) | const |
Gets a voxel at the position given by a 3D vector.
v3dPos | The 3D position of the voxel |
Reimplemented from PolyVox::BaseVolume< VoxelType >.
Definition at line 102 of file RawVolume.inl.
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.
void PolyVox::RawVolume< VoxelType >::setBorderValue | ( | const VoxelType & | tBorder | ) |
Sets the value used for voxels which are outside the volume.
tBorder | The value to use for voxels outside the volume. |
Reimplemented from PolyVox::BaseVolume< VoxelType >.
Definition at line 111 of file RawVolume.inl.
bool PolyVox::RawVolume< VoxelType >::setVoxelAt | ( | const Vector3DInt32 & | v3dPos, | |
VoxelType | tValue | |||
) |
Sets the voxel at the position given by a 3D vector.
v3dPos | the 3D position of the voxel | |
tValue | the value to which the voxel will be set |
Reimplemented from PolyVox::BaseVolume< VoxelType >.
Definition at line 155 of file RawVolume.inl.
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.
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 |
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().