#include <BaseVolume.h>
Classes | |
class | Sampler |
Public Member Functions | |
BaseVolume (const Region ®Valid) | |
Constructor for creating a fixed size volume. | |
~BaseVolume () | |
Destructor. | |
VoxelType | getBorderValue (void) const |
Gets the value used for voxels which are outside the volume. | |
Region | getEnclosingRegion (void) const |
Gets a Region representing the extents of the Volume. | |
int32_t | getWidth (void) const |
Gets the width of the volume in voxels. | |
int32_t | getHeight (void) const |
Gets the height of the volume in voxels. | |
int32_t | getDepth (void) const |
Gets the depth of the volume in voxels. | |
int32_t | getLongestSideLength (void) const |
Gets the length of the longest side in voxels. | |
int32_t | getShortestSideLength (void) const |
Gets the length of the shortest side in voxels. | |
float | getDiagonalLength (void) const |
Gets the length of the diagonal in voxels. | |
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. | |
Protected Attributes | |
Region | m_regValidRegion |
int32_t | m_uLongestSideLength |
int32_t | m_uShortestSideLength |
float | m_fDiagonalLength |
Definition at line 37 of file BaseVolume.h.
PolyVox::BaseVolume< VoxelType >::BaseVolume | ( | const Region & | regValid | ) |
Constructor for creating a fixed size volume.
Definition at line 28 of file BaseVolume.inl.
PolyVox::BaseVolume< VoxelType >::~BaseVolume | ( | ) |
uint32_t PolyVox::BaseVolume< VoxelType >::calculateSizeInBytes | ( | void | ) |
Calculates approximatly how many bytes of memory the volume is currently using.
Note: This function needs reviewing for accuracy...
Reimplemented in PolyVox::LargeVolume< VoxelType >, PolyVox::RawVolume< VoxelType >, PolyVox::SimpleVolume< VoxelType >, and PolyVox::LargeVolume< int32_t >.
Definition at line 191 of file BaseVolume.inl.
VoxelType PolyVox::BaseVolume< 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 in PolyVox::LargeVolume< VoxelType >, PolyVox::RawVolume< VoxelType >, PolyVox::SimpleVolume< VoxelType >, and PolyVox::LargeVolume< int32_t >.
Definition at line 49 of file BaseVolume.inl.
int32_t PolyVox::BaseVolume< VoxelType >::getDepth | ( | void | ) | const |
Gets the depth of the volume in voxels.
Definition at line 89 of file BaseVolume.inl.
Referenced by PolyVox::RawVolume< VoxelType >::calculateSizeInBytes(), PolyVox::BaseVolume< VoxelType >::calculateSizeInBytes(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::RawVolume< VoxelType >::resize(), and PolyVox::LargeVolume< VoxelType >::resize().
float PolyVox::BaseVolume< VoxelType >::getDiagonalLength | ( | void | ) | const |
Gets the length of the diagonal in voxels.
Definition at line 123 of file BaseVolume.inl.
Region PolyVox::BaseVolume< VoxelType >::getEnclosingRegion | ( | void | ) | const |
Gets a Region representing the extents of the Volume.
Definition at line 59 of file BaseVolume.inl.
int32_t PolyVox::BaseVolume< VoxelType >::getHeight | ( | void | ) | const |
Gets the height of the volume in voxels.
Definition at line 79 of file BaseVolume.inl.
Referenced by PolyVox::RawVolume< VoxelType >::calculateSizeInBytes(), PolyVox::BaseVolume< VoxelType >::calculateSizeInBytes(), PolyVox::RawVolume< VoxelType >::getVoxelAt(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::RawVolume< VoxelType >::resize(), PolyVox::LargeVolume< VoxelType >::resize(), and PolyVox::RawVolume< VoxelType >::setVoxelAt().
int32_t PolyVox::BaseVolume< VoxelType >::getLongestSideLength | ( | void | ) | const |
Gets the length of the longest side in voxels.
Definition at line 111 of file BaseVolume.inl.
int32_t PolyVox::BaseVolume< VoxelType >::getShortestSideLength | ( | void | ) | const |
Gets the length of the shortest side in voxels.
Definition at line 100 of file BaseVolume.inl.
VoxelType PolyVox::BaseVolume< 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 in PolyVox::LargeVolume< VoxelType >, PolyVox::RawVolume< VoxelType >, PolyVox::SimpleVolume< VoxelType >, and PolyVox::LargeVolume< int32_t >.
Definition at line 135 of file BaseVolume.inl.
VoxelType PolyVox::BaseVolume< 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 in PolyVox::LargeVolume< VoxelType >, PolyVox::RawVolume< VoxelType >, PolyVox::SimpleVolume< VoxelType >, and PolyVox::LargeVolume< int32_t >.
Definition at line 146 of file BaseVolume.inl.
int32_t PolyVox::BaseVolume< VoxelType >::getWidth | ( | void | ) | const |
Gets the width of the volume in voxels.
Definition at line 69 of file BaseVolume.inl.
Referenced by PolyVox::RawVolume< VoxelType >::calculateSizeInBytes(), PolyVox::BaseVolume< VoxelType >::calculateSizeInBytes(), PolyVox::RawVolume< VoxelType >::getVoxelAt(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::RawVolume< VoxelType >::resize(), PolyVox::LargeVolume< VoxelType >::resize(), and PolyVox::RawVolume< VoxelType >::setVoxelAt().
void PolyVox::BaseVolume< 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 in PolyVox::LargeVolume< VoxelType >, PolyVox::RawVolume< VoxelType >, PolyVox::SimpleVolume< VoxelType >, and PolyVox::LargeVolume< int32_t >.
Definition at line 156 of file BaseVolume.inl.
bool PolyVox::BaseVolume< 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 in PolyVox::LargeVolume< VoxelType >, PolyVox::RawVolume< VoxelType >, PolyVox::SimpleVolume< VoxelType >, and PolyVox::LargeVolume< int32_t >.
Definition at line 169 of file BaseVolume.inl.
bool PolyVox::BaseVolume< 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 in PolyVox::LargeVolume< VoxelType >, PolyVox::RawVolume< VoxelType >, PolyVox::SimpleVolume< VoxelType >, and PolyVox::LargeVolume< int32_t >.
Definition at line 181 of file BaseVolume.inl.
float PolyVox::BaseVolume< VoxelType >::m_fDiagonalLength [protected] |
Definition at line 152 of file BaseVolume.h.
Referenced by PolyVox::BaseVolume< VoxelType >::getDiagonalLength(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::RawVolume< VoxelType >::resize(), and PolyVox::LargeVolume< VoxelType >::resize().
Region PolyVox::BaseVolume< VoxelType >::m_regValidRegion [protected] |
Definition at line 147 of file BaseVolume.h.
Referenced by PolyVox::BaseVolume< VoxelType >::getDepth(), PolyVox::BaseVolume< VoxelType >::getEnclosingRegion(), PolyVox::BaseVolume< VoxelType >::getHeight(), PolyVox::SimpleVolume< VoxelType >::getVoxelAt(), PolyVox::RawVolume< VoxelType >::getVoxelAt(), PolyVox::LargeVolume< VoxelType >::getVoxelAt(), PolyVox::BaseVolume< VoxelType >::getWidth(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::RawVolume< VoxelType >::resize(), PolyVox::LargeVolume< VoxelType >::resize(), PolyVox::SimpleVolume< VoxelType >::setVoxelAt(), PolyVox::RawVolume< VoxelType >::setVoxelAt(), and PolyVox::LargeVolume< VoxelType >::setVoxelAt().
int32_t PolyVox::BaseVolume< VoxelType >::m_uLongestSideLength [protected] |
Definition at line 150 of file BaseVolume.h.
Referenced by PolyVox::BaseVolume< VoxelType >::getLongestSideLength(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::RawVolume< VoxelType >::resize(), and PolyVox::LargeVolume< VoxelType >::resize().
int32_t PolyVox::BaseVolume< VoxelType >::m_uShortestSideLength [protected] |
Definition at line 151 of file BaseVolume.h.
Referenced by PolyVox::BaseVolume< VoxelType >::getShortestSideLength(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::RawVolume< VoxelType >::resize(), and PolyVox::LargeVolume< VoxelType >::resize().