More work adding base volume class.
This commit is contained in:
parent
f7c511b2c6
commit
84c78f6839
@ -135,7 +135,7 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
VoxelType LargeVolume<VoxelType>::getVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos) const
|
||||
{
|
||||
if(Volume<VoxelType>::m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)))
|
||||
if(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)))
|
||||
{
|
||||
const int32_t blockX = uXPos >> m_uBlockSideLengthPower;
|
||||
const int32_t blockY = uYPos >> m_uBlockSideLengthPower;
|
||||
@ -238,7 +238,7 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
bool LargeVolume<VoxelType>::setVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue)
|
||||
{
|
||||
assert(Volume<VoxelType>::m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)));
|
||||
assert(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)));
|
||||
|
||||
const int32_t blockX = uXPos >> m_uBlockSideLengthPower;
|
||||
const int32_t blockY = uYPos >> m_uBlockSideLengthPower;
|
||||
@ -424,10 +424,10 @@ namespace PolyVox
|
||||
m_pLastAccessedBlock = 0;
|
||||
m_bCompressionEnabled = true;
|
||||
|
||||
Volume<VoxelType>::m_regValidRegion = regValidRegion;
|
||||
this->m_regValidRegion = regValidRegion;
|
||||
|
||||
m_regValidRegionInBlocks.setLowerCorner(Volume<VoxelType>::m_regValidRegion.getLowerCorner() / static_cast<int32_t>(uBlockSideLength));
|
||||
m_regValidRegionInBlocks.setUpperCorner(Volume<VoxelType>::m_regValidRegion.getUpperCorner() / static_cast<int32_t>(uBlockSideLength));
|
||||
m_regValidRegionInBlocks.setLowerCorner(this->m_regValidRegion.getLowerCorner() / static_cast<int32_t>(uBlockSideLength));
|
||||
m_regValidRegionInBlocks.setUpperCorner(this->m_regValidRegion.getUpperCorner() / static_cast<int32_t>(uBlockSideLength));
|
||||
|
||||
setMaxNumberOfUncompressedBlocks(m_uMaxNumberOfUncompressedBlocks);
|
||||
|
||||
@ -446,9 +446,9 @@ namespace PolyVox
|
||||
std::fill(m_pUncompressedBorderData, m_pUncompressedBorderData + m_uBlockSideLength * m_uBlockSideLength * m_uBlockSideLength, VoxelType());
|
||||
|
||||
//Other properties we might find useful later
|
||||
Volume<VoxelType>::m_uLongestSideLength = (std::max)((std::max)(Volume<VoxelType>::getWidth(),Volume<VoxelType>::getHeight()),Volume<VoxelType>::getDepth());
|
||||
Volume<VoxelType>::m_uShortestSideLength = (std::min)((std::min)(Volume<VoxelType>::getWidth(),Volume<VoxelType>::getHeight()),Volume<VoxelType>::getDepth());
|
||||
Volume<VoxelType>::m_fDiagonalLength = sqrtf(static_cast<float>(Volume<VoxelType>::getWidth() * Volume<VoxelType>::getWidth() + Volume<VoxelType>::getHeight() * Volume<VoxelType>::getHeight() + Volume<VoxelType>::getDepth() * Volume<VoxelType>::getDepth()));
|
||||
this->m_uLongestSideLength = (std::max)((std::max)(this->getWidth(),this->getHeight()),this->getDepth());
|
||||
this->m_uShortestSideLength = (std::min)((std::min)(this->getWidth(),this->getHeight()),this->getDepth());
|
||||
this->m_fDiagonalLength = sqrtf(static_cast<float>(this->getWidth() * this->getWidth() + this->getHeight() * this->getHeight() + this->getDepth() * this->getDepth()));
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
|
@ -39,7 +39,7 @@ namespace PolyVox
|
||||
//:mVolume(volume)
|
||||
{
|
||||
//Dodgy doing this - need to find how to call base constructor
|
||||
mVolume = volume;
|
||||
this->mVolume = volume;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
|
@ -83,18 +83,18 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
VoxelType RawVolume<VoxelType>::getVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos) const
|
||||
{
|
||||
if(Volume<VoxelType>::m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)))
|
||||
if(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)))
|
||||
{
|
||||
return m_pData
|
||||
[
|
||||
uXPos +
|
||||
uYPos * Volume<VoxelType>::getWidth() +
|
||||
uZPos * Volume<VoxelType>::getWidth() * Volume<VoxelType>::getHeight()
|
||||
uYPos * this->getWidth() +
|
||||
uZPos * this->getWidth() * this->getHeight()
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
return Volume<VoxelType>::getBorderValue();
|
||||
return this->getBorderValue();
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,13 +127,13 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
bool RawVolume<VoxelType>::setVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue)
|
||||
{
|
||||
assert(Volume<VoxelType>::m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)));
|
||||
assert(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)));
|
||||
|
||||
m_pData
|
||||
[
|
||||
uXPos +
|
||||
uYPos * Volume<VoxelType>::getWidth() +
|
||||
uZPos * Volume<VoxelType>::getWidth() * Volume<VoxelType>::getHeight()
|
||||
uYPos * this->getWidth() +
|
||||
uZPos * this->getWidth() * this->getHeight()
|
||||
] = tValue;
|
||||
|
||||
//Return true to indicate that we modified a voxel.
|
||||
@ -157,20 +157,20 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
void RawVolume<VoxelType>::resize(const Region& regValidRegion)
|
||||
{
|
||||
Volume<VoxelType>::m_regValidRegion = regValidRegion;
|
||||
this->m_regValidRegion = regValidRegion;
|
||||
|
||||
//Ensure dimensions of the specified Region are valid
|
||||
assert(Volume<VoxelType>::getWidth() > 0);
|
||||
assert(Volume<VoxelType>::getHeight() > 0);
|
||||
assert(Volume<VoxelType>::getDepth() > 0);
|
||||
assert(this->getWidth() > 0);
|
||||
assert(this->getHeight() > 0);
|
||||
assert(this->getDepth() > 0);
|
||||
|
||||
//Create the data
|
||||
m_pData = new VoxelType[Volume<VoxelType>::getWidth() * Volume<VoxelType>::getHeight()* Volume<VoxelType>::getDepth()];
|
||||
m_pData = new VoxelType[this->getWidth() * this->getHeight()* this->getDepth()];
|
||||
|
||||
//Other properties we might find useful later
|
||||
Volume<VoxelType>::m_uLongestSideLength = (std::max)((std::max)(Volume<VoxelType>::getWidth(),Volume<VoxelType>::getHeight()),Volume<VoxelType>::getDepth());
|
||||
Volume<VoxelType>::m_uShortestSideLength = (std::min)((std::min)(Volume<VoxelType>::getWidth(),Volume<VoxelType>::getHeight()),Volume<VoxelType>::getDepth());
|
||||
Volume<VoxelType>::m_fDiagonalLength = sqrtf(static_cast<float>(Volume<VoxelType>::getWidth() * Volume<VoxelType>::getWidth() + Volume<VoxelType>::getHeight() * Volume<VoxelType>::getHeight() + Volume<VoxelType>::getDepth() * Volume<VoxelType>::getDepth()));
|
||||
this->m_uLongestSideLength = (std::max)((std::max)(this->getWidth(),this->getHeight()),this->getDepth());
|
||||
this->m_uShortestSideLength = (std::min)((std::min)(this->getWidth(),this->getHeight()),this->getDepth());
|
||||
this->m_fDiagonalLength = sqrtf(static_cast<float>(this->getWidth() * this->getWidth() + this->getHeight() * this->getHeight() + this->getDepth() * this->getDepth()));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -179,7 +179,7 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
uint32_t RawVolume<VoxelType>::calculateSizeInBytes(void)
|
||||
{
|
||||
return Volume<VoxelType>::getWidth() * Volume<VoxelType>::getHeight() * Volume<VoxelType>::getDepth() * sizeof(VoxelType);
|
||||
return this->getWidth() * this->getHeight() * this->getDepth() * sizeof(VoxelType);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ namespace PolyVox
|
||||
,m_bIsCurrentPositionValid(false)
|
||||
{
|
||||
//Dodgy doing this - need to find how to call base constructor
|
||||
mVolume = volume;
|
||||
this->mVolume = volume;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
|
@ -105,7 +105,7 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
VoxelType SimpleVolume<VoxelType>::getVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos) const
|
||||
{
|
||||
if(Volume<VoxelType>::m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)))
|
||||
if(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)))
|
||||
{
|
||||
const int32_t blockX = uXPos >> m_uBlockSideLengthPower;
|
||||
const int32_t blockY = uYPos >> m_uBlockSideLengthPower;
|
||||
@ -156,7 +156,7 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
bool SimpleVolume<VoxelType>::setVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue)
|
||||
{
|
||||
assert(Volume<VoxelType>::m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)));
|
||||
assert(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)));
|
||||
|
||||
const int32_t blockX = uXPos >> m_uBlockSideLengthPower;
|
||||
const int32_t blockY = uYPos >> m_uBlockSideLengthPower;
|
||||
@ -207,10 +207,10 @@ namespace PolyVox
|
||||
m_uBlockSideLength = uBlockSideLength;
|
||||
m_pUncompressedBorderData = 0;
|
||||
|
||||
Volume<VoxelType>::m_regValidRegion = regValidRegion;
|
||||
this->m_regValidRegion = regValidRegion;
|
||||
|
||||
m_regValidRegionInBlocks.setLowerCorner(Volume<VoxelType>::m_regValidRegion.getLowerCorner() / static_cast<int32_t>(uBlockSideLength));
|
||||
m_regValidRegionInBlocks.setUpperCorner(Volume<VoxelType>::m_regValidRegion.getUpperCorner() / static_cast<int32_t>(uBlockSideLength));
|
||||
m_regValidRegionInBlocks.setLowerCorner(this->m_regValidRegion.getLowerCorner() / static_cast<int32_t>(uBlockSideLength));
|
||||
m_regValidRegionInBlocks.setUpperCorner(this->m_regValidRegion.getUpperCorner() / static_cast<int32_t>(uBlockSideLength));
|
||||
|
||||
//Compute the block side length
|
||||
m_uBlockSideLength = uBlockSideLength;
|
||||
@ -234,9 +234,9 @@ namespace PolyVox
|
||||
std::fill(m_pUncompressedBorderData, m_pUncompressedBorderData + m_uBlockSideLength * m_uBlockSideLength * m_uBlockSideLength, VoxelType());
|
||||
|
||||
//Other properties we might find useful later
|
||||
Volume<VoxelType>::m_uLongestSideLength = (std::max)((std::max)(Volume<VoxelType>::getWidth(),Volume<VoxelType>::getHeight()),Volume<VoxelType>::getDepth());
|
||||
Volume<VoxelType>::m_uShortestSideLength = (std::min)((std::min)(Volume<VoxelType>::getWidth(),Volume<VoxelType>::getHeight()),Volume<VoxelType>::getDepth());
|
||||
Volume<VoxelType>::m_fDiagonalLength = sqrtf(static_cast<float>(Volume<VoxelType>::getWidth() * Volume<VoxelType>::getWidth() + Volume<VoxelType>::getHeight() * Volume<VoxelType>::getHeight() + Volume<VoxelType>::getDepth() * Volume<VoxelType>::getDepth()));
|
||||
this->m_uLongestSideLength = (std::max)((std::max)(this->getWidth(),this->getHeight()),this->getDepth());
|
||||
this->m_uShortestSideLength = (std::min)((std::min)(this->getWidth(),this->getHeight()),this->getDepth());
|
||||
this->m_fDiagonalLength = sqrtf(static_cast<float>(this->getWidth() * this->getWidth() + this->getHeight() * this->getHeight() + this->getDepth() * this->getDepth()));
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
|
@ -39,7 +39,7 @@ namespace PolyVox
|
||||
//:mVolume(volume)
|
||||
{
|
||||
//Dodgy doing this - need to find how to call base constructor
|
||||
mVolume = volume;
|
||||
this->mVolume = volume;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
|
@ -89,6 +89,10 @@ namespace PolyVox
|
||||
|
||||
protected:
|
||||
DerivedVolumeType* mVolume;
|
||||
|
||||
int32_t mXPos;
|
||||
int32_t mYPos;
|
||||
int32_t mZPos;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -33,160 +33,151 @@ namespace PolyVox
|
||||
template <typename DerivedVolumeType>
|
||||
int32_t Volume<VoxelType>::Sampler<DerivedVolumeType>::getPosX(void) const
|
||||
{
|
||||
assert(false);
|
||||
return 0;
|
||||
return mXPos;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
int32_t Volume<VoxelType>::Sampler<DerivedVolumeType>::getPosY(void) const
|
||||
{
|
||||
assert(false);
|
||||
return 0;
|
||||
return mYPos;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
int32_t Volume<VoxelType>::Sampler<DerivedVolumeType>::getPosZ(void) const
|
||||
{
|
||||
assert(false);
|
||||
return 0;
|
||||
return mZPos;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::getVoxel(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos, mYPos, mZPos);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
void Volume<VoxelType>::Sampler<DerivedVolumeType>::setPosition(const Vector3DInt32& v3dNewPos)
|
||||
{
|
||||
assert(false);
|
||||
mXPos = v3dNewPos.getX();
|
||||
mYPos = v3dNewPos.getY();
|
||||
mZPos = v3dNewPos.getZ();
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
void Volume<VoxelType>::Sampler<DerivedVolumeType>::setPosition(int32_t xPos, int32_t yPos, int32_t zPos)
|
||||
{
|
||||
assert(false);
|
||||
mXPos = xPos;
|
||||
mYPos = yPos;
|
||||
mZPos = zPos;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
void Volume<VoxelType>::Sampler<DerivedVolumeType>::movePositiveX(void)
|
||||
{
|
||||
assert(false);
|
||||
mXPos++;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
void Volume<VoxelType>::Sampler<DerivedVolumeType>::movePositiveY(void)
|
||||
{
|
||||
assert(false);
|
||||
mYPos++;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
void Volume<VoxelType>::Sampler<DerivedVolumeType>::movePositiveZ(void)
|
||||
{
|
||||
assert(false);
|
||||
mZPos++;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
void Volume<VoxelType>::Sampler<DerivedVolumeType>::moveNegativeX(void)
|
||||
{
|
||||
assert(false);
|
||||
mXPos--;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
void Volume<VoxelType>::Sampler<DerivedVolumeType>::moveNegativeY(void)
|
||||
{
|
||||
assert(false);
|
||||
mYPos--;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
void Volume<VoxelType>::Sampler<DerivedVolumeType>::moveNegativeZ(void)
|
||||
{
|
||||
assert(false);
|
||||
mZPos--;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx1ny1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos - 1, mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx1ny0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos - 1, mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx1ny1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos - 1, mZPos + 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx0py1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos , mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx0py0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos , mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx0py1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos , mZPos + 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx1py1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos + 1, mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx1py0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos + 1, mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1nx1py1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos - 1, mYPos + 1, mZPos + 1);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -195,72 +186,63 @@ namespace PolyVox
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px1ny1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos - 1, mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px1ny0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos - 1, mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px1ny1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos - 1, mZPos + 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px0py1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos , mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px0py0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos , mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px0py1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos , mZPos + 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px1py1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos + 1, mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px1py0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos + 1, mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel0px1py1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos , mYPos + 1, mZPos + 1);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -269,71 +251,62 @@ namespace PolyVox
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px1ny1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos - 1, mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px1ny0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos - 1, mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px1ny1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos - 1, mZPos + 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px0py1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos , mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px0py0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos , mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px0py1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos , mZPos + 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px1py1nz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos + 1, mZPos - 1);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px1py0pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos + 1, mZPos );
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
template <typename DerivedVolumeType>
|
||||
VoxelType Volume<VoxelType>::Sampler<DerivedVolumeType>::peekVoxel1px1py1pz(void) const
|
||||
{
|
||||
assert(false);
|
||||
return VoxelType();
|
||||
mVolume->getVoxelAt(mXPos + 1, mYPos + 1, mZPos + 1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user