Moved various files from PolyVoxCore to PolyVoxImpl.

This commit is contained in:
David Williams 2009-04-02 20:37:43 +00:00
parent bd1d2b2244
commit 92cf2402e2
7 changed files with 29 additions and 38 deletions

View File

@ -15,7 +15,6 @@ SET(CORE_SRC_FILES
#Projects headers files
SET(CORE_INC_FILES
include/PolyVoxCore/Enums.h
include/PolyVoxCore/GradientEstimators.h
include/PolyVoxCore/GradientEstimators.inl
include/PolyVoxCore/IndexedSurfacePatch.h
@ -42,6 +41,8 @@ SET(IMPL_SRC_FILES
)
SET(IMPL_INC_FILES
include/PolyVoxCore/PolyVoxImpl/Block.h
include/PolyVoxCore/PolyVoxImpl/Block.inl
include/PolyVoxCore/PolyVoxImpl/BlockData.h
include/PolyVoxCore/PolyVoxImpl/BlockData.inl
include/PolyVoxCore/PolyVoxImpl/CPlusPlusZeroXSupport.h

View File

@ -28,6 +28,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace PolyVox
{
enum NormalGenerationMethod
{
SIMPLE, ///<Fastest
CENTRAL_DIFFERENCE,
SOBEL,
CENTRAL_DIFFERENCE_SMOOTHED,
SOBEL_SMOOTHED ///<Smoothest
};
template <typename VoxelType>
Vector3DFloat computeCentralDifferenceGradient(const VolumeIterator<VoxelType>& volIter);

View File

@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __PolyVox_ForwardDeclarations_H__
#define __PolyVox_ForwardDeclarations_H__
#include "Enums.h"
#include "PolyVoxImpl/CPlusPlusZeroXSupport.h"
namespace PolyVox

View File

@ -19,19 +19,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
#pragma endregion
#ifndef __PolyVox_Enums_H__
#define __PolyVox_Enums_H__
#ifndef __PolyVox_Block_H__
#define __PolyVox_Block_H__
#pragma region Headers
#include "PolyVoxForwardDeclarations.h"
#include "PolyVoxImpl/CPlusPlusZeroXSupport.h"
#pragma endregion
namespace PolyVox
{
enum NormalGenerationMethod
template <typename VoxelType>
class Block
{
SIMPLE, ///<Fastest
CENTRAL_DIFFERENCE,
SOBEL,
CENTRAL_DIFFERENCE_SMOOTHED,
SOBEL_SMOOTHED ///<Smoothest
public:
POLYVOX_SHARED_PTR< BlockData<VoxelType> > m_pBlockData;
VoxelType m_pHomogenousValue;
bool m_bIsShared;
bool m_bIsPotentiallySharable;
};
}
#include "Block.inl"
#endif

View File

@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define __PolyVox_Volume_H__
#pragma region Headers
#include "PolyVoxCore/PolyVoxImpl/Block.h"
#include "PolyVoxForwardDeclarations.h"
#include "PolyVoxImpl/CPlusPlusZeroXSupport.h"
@ -32,16 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace PolyVox
{
template <typename VoxelType>
class Block
{
public:
POLYVOX_SHARED_PTR< BlockData<VoxelType> > m_pBlockData;
VoxelType m_pHomogenousValue;
bool m_bIsShared;
bool m_bIsPotentiallySharable;
};
template <typename VoxelType>
class Volume
{
@ -63,10 +54,8 @@ namespace PolyVox
void setVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos, VoxelType tValue);
void setVoxelAt(const Vector3DUint16& v3dPos, VoxelType tValue);
VolumeIterator<VoxelType> firstVoxel(void);
void idle(uint32_t uAmount);
bool isRegionHomogenous(const Region& region);
VolumeIterator<VoxelType> lastVoxel(void);
private:
POLYVOX_SHARED_PTR< BlockData<VoxelType> > getHomogenousBlockData(VoxelType tHomogenousValue) const;

View File

@ -221,14 +221,6 @@ namespace PolyVox
#pragma endregion
#pragma region Other
template <typename VoxelType>
VolumeIterator<VoxelType> Volume<VoxelType>::firstVoxel(void)
{
VolumeIterator<VoxelType> iter(*this);
iter.setPosition(0,0,0);
return iter;
}
template <typename VoxelType>
void Volume<VoxelType>::idle(uint32_t uAmount)
{
@ -283,14 +275,6 @@ namespace PolyVox
return true;
}
template <typename VoxelType>
VolumeIterator<VoxelType> Volume<VoxelType>::lastVoxel(void)
{
VolumeIterator<VoxelType> iter(*this);
iter.setPosition(m_uSideLength-1,m_uSideLength-1,m_uSideLength-1);
return iter;
}
#pragma endregion
#pragma region Private Implementation