Made SimpleVolume and RawVolume derive from base Volume class.
This commit is contained in:
@@ -26,6 +26,7 @@ freely, subject to the following restrictions:
|
||||
|
||||
#include "PolyVoxCore/Region.h"
|
||||
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
|
||||
#include "PolyVoxCore/Volume.h"
|
||||
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
@@ -33,7 +34,7 @@ freely, subject to the following restrictions:
|
||||
namespace PolyVox
|
||||
{
|
||||
template <typename VoxelType>
|
||||
class SimpleVolume
|
||||
class SimpleVolume : public Volume<VoxelType>
|
||||
{
|
||||
public:
|
||||
#ifndef SWIG
|
||||
@@ -61,7 +62,7 @@ namespace PolyVox
|
||||
uint8_t m_uSideLengthPower;
|
||||
};
|
||||
|
||||
class Sampler
|
||||
class Sampler : public Volume<VoxelType>::Sampler
|
||||
{
|
||||
public:
|
||||
Sampler(SimpleVolume<VoxelType>* volume);
|
||||
@@ -149,20 +150,6 @@ namespace PolyVox
|
||||
|
||||
/// Gets the value used for voxels which are outside the volume
|
||||
VoxelType getBorderValue(void) const;
|
||||
/// Gets a Region representing the extents of the SimpleVolume.
|
||||
Region getEnclosingRegion(void) const;
|
||||
/// Gets the width of the volume in voxels.
|
||||
int32_t getWidth(void) const;
|
||||
/// Gets the height of the volume in voxels.
|
||||
int32_t getHeight(void) const;
|
||||
/// Gets the depth of the volume in voxels.
|
||||
int32_t getDepth(void) const;
|
||||
/// Gets the length of the longest side in voxels
|
||||
int32_t getLongestSideLength(void) const;
|
||||
/// Gets the length of the shortest side in voxels
|
||||
int32_t getShortestSideLength(void) const;
|
||||
/// Gets the length of the diagonal in voxels
|
||||
float getDiagonalLength(void) const;
|
||||
/// Gets a voxel at the position given by <tt>x,y,z</tt> coordinates
|
||||
VoxelType getVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos) const;
|
||||
/// Gets a voxel at the position given by a 3D vector
|
||||
@@ -193,8 +180,7 @@ private:
|
||||
//the VolumeIterator can do it's usual pointer arithmetic without needing to know it's gone outside the volume.
|
||||
VoxelType* m_pUncompressedBorderData;
|
||||
|
||||
//The size of the volume
|
||||
Region m_regValidRegion;
|
||||
//The size of the volume in vlocks
|
||||
Region m_regValidRegionInBlocks;
|
||||
|
||||
//Volume size measured in blocks.
|
||||
@@ -206,11 +192,6 @@ private:
|
||||
//The size of the blocks
|
||||
uint16_t m_uBlockSideLength;
|
||||
uint8_t m_uBlockSideLengthPower;
|
||||
|
||||
//Some useful sizes
|
||||
int32_t m_uLongestSideLength;
|
||||
int32_t m_uShortestSideLength;
|
||||
float m_fDiagonalLength;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user