#include <SimpleVolume.h>
Classes | |
class | Block |
class | Sampler |
Public Member Functions | |
SimpleVolume (const Region ®Valid, uint16_t uBlockSideLength=32) | |
Constructor for creating a fixed size volume. | |
SimpleVolume (int32_t dont_use_this_constructor_1, int32_t dont_use_this_constructor_2, int32_t dont_use_this_constructor_3) | |
Deprecated constructor - do not use. | |
~SimpleVolume () | |
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, uint16_t uBlockSideLength) |
Deprecated - I don't think we should expose this function? Let us know if you disagree... |
Definition at line 44 of file SimpleVolume.h.
PolyVox::SimpleVolume< VoxelType >::SimpleVolume | ( | const Region & | regValid, | |
uint16_t | uBlockSideLength = 32 | |||
) |
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 SimpleVolume 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 SimpleVolume. | |
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 57 of file SimpleVolume.inl.
PolyVox::SimpleVolume< VoxelType >::SimpleVolume | ( | int32_t | dont_use_this_constructor_1, | |
int32_t | dont_use_this_constructor_2, | |||
int32_t | dont_use_this_constructor_3 | |||
) |
Deprecated constructor - do not use.
Deprecated - do not use this constructor.
Definition at line 31 of file SimpleVolume.inl.
PolyVox::SimpleVolume< VoxelType >::~SimpleVolume | ( | ) |
uint32_t PolyVox::SimpleVolume< 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 255 of file SimpleVolume.inl.
VoxelType PolyVox::SimpleVolume< VoxelType >::getBorderValue | ( | void | ) | const |
Gets the value used for voxels which are outside the volume.
The border value is returned whenever an atempt is made to read a voxel which is outside the extents of the volume.
Reimplemented from PolyVox::BaseVolume< VoxelType >.
Definition at line 83 of file SimpleVolume.inl.
Referenced by PolyVox::SimpleVolume< VoxelType >::getVoxelAt().
VoxelType PolyVox::SimpleVolume< 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 95 of file SimpleVolume.inl.
Referenced by PolyVox::SimpleVolume< VoxelType >::getVoxelAt().
VoxelType PolyVox::SimpleVolume< 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 122 of file SimpleVolume.inl.
void PolyVox::SimpleVolume< VoxelType >::resize | ( | const Region & | regValidRegion, | |
uint16_t | uBlockSideLength | |||
) |
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 181 of file SimpleVolume.inl.
void PolyVox::SimpleVolume< 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 131 of file SimpleVolume.inl.
bool PolyVox::SimpleVolume< 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 172 of file SimpleVolume.inl.
bool PolyVox::SimpleVolume< 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 146 of file SimpleVolume.inl.
Referenced by PolyVox::SimpleVolume< VoxelType >::setVoxelAt().