Moved some stuff from VolumeChangeTracker to SurfaceExtractors.

This commit is contained in:
David Williams
2008-05-25 21:06:58 +00:00
parent 29d1cd8ad1
commit 22fd38b255
6 changed files with 46 additions and 61 deletions

View File

@ -45,7 +45,7 @@ namespace PolyVox
BlockVolume& operator=(const BlockVolume& rhs);
Region getEnclosingRegion(void);
Region getEnclosingRegion(void) const;
boost::uint16_t getSideLength(void) const;
VoxelType getVoxelAt(boost::uint16_t uXPos, boost::uint16_t uYPos, boost::uint16_t uZPos) const;
VoxelType getVoxelAt(const Vector3DUint16& v3dPos) const;

View File

@ -121,7 +121,7 @@ namespace PolyVox
#pragma region Getters
template <typename VoxelType>
Region BlockVolume<VoxelType>::getEnclosingRegion(void)
Region BlockVolume<VoxelType>::getEnclosingRegion(void) const
{
return Region(Vector3DInt32(0,0,0), Vector3DInt32(m_uSideLength-1,m_uSideLength-1,m_uSideLength-1));
}

View File

@ -24,17 +24,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#pragma region Headers
#include "PolyVoxForwardDeclarations.h"
#include "TypeDef.h"
#include "boost/cstdint.hpp"
#include <list>
#pragma endregion
namespace PolyVox
{
void generateRoughMeshDataForRegion(BlockVolume<boost::uint8_t>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch, IndexedSurfacePatch* multiMaterialPatch);
Vector3DFloat computeNormal(BlockVolume<boost::uint8_t>* volumeData, const Vector3DFloat& position, NormalGenerationMethod normalGenerationMethod);
POLYVOX_API std::list<RegionGeometry> getChangedRegionGeometry(VolumeChangeTracker& volume);
void generateSmoothMeshDataForRegion(BlockVolume<boost::uint8_t>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch, IndexedSurfacePatch* multiMaterialPatch);
Vector3DFloat computeSmoothNormal(BlockVolume<boost::uint8_t>* volumeData, const Vector3DFloat& position, NormalGenerationMethod normalGenerationMethod);
POLYVOX_API void generateRoughMeshDataForRegion(BlockVolume<boost::uint8_t>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch, IndexedSurfacePatch* multiMaterialPatch);
POLYVOX_API Vector3DFloat computeNormal(BlockVolume<boost::uint8_t>* volumeData, const Vector3DFloat& position, NormalGenerationMethod normalGenerationMethod);
POLYVOX_API void generateSmoothMeshDataForRegion(BlockVolume<boost::uint8_t>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch, IndexedSurfacePatch* multiMaterialPatch);
POLYVOX_API Vector3DFloat computeSmoothNormal(BlockVolume<boost::uint8_t>* volumeData, const Vector3DFloat& position, NormalGenerationMethod normalGenerationMethod);
}
#endif

View File

@ -42,11 +42,10 @@ namespace PolyVox
~VolumeChangeTracker();
//Getters
std::list<RegionGeometry> getChangedRegionGeometry(void);
void getChangedRegions(std::list<Region>& listToFill);
Region getEnclosingRegion(void);
void getChangedRegions(std::list<Region>& listToFill) const;
Region getEnclosingRegion(void) const;
boost::uint16_t getSideLength(void);
const BlockVolume<boost::uint8_t>* getVolumeData(void) const;
BlockVolume<boost::uint8_t>* getVolumeData(void) const;
boost::uint8_t getVoxelAt(const Vector3DUint16& pos);
boost::uint8_t getVoxelAt(boost::uint16_t uX, boost::uint16_t uY, boost::uint16_t uZ);