Renamed PolyVoxSceneManager to VolumeChangeTracker

This commit is contained in:
David Williams 2008-05-24 18:58:32 +00:00
parent ff39fed7f8
commit c4debf2ca7
4 changed files with 26 additions and 26 deletions

View File

@ -4,11 +4,11 @@ PROJECT(PolyVox)
SET(SRC_FILES
source/IndexedSurfacePatch.cpp
source/MarchingCubesTables.cpp
source/PolyVoxSceneManager.cpp
source/RegionGeometry.cpp
source/SurfaceExtractors.cpp
source/SurfaceVertex.cpp
source/Utility.cpp
source/VolumeChangeTracker.cpp
)
#Projects headers files
@ -26,14 +26,14 @@ SET(INC_FILES
include/IndexedSurfacePatch.h
include/MarchingCubesTables.h
include/PolyVoxForwardDeclarations.h
include/PolyVoxSceneManager.h
include/RegionGeometry.h
include/SurfaceExtractors.h
include/SurfaceVertex.h
include/TypeDef.h
include/Utility.h
include/Vector.h
include/Vector.inl
include/Vector.inl
include/VolumeChangeTracker.h
include/VolumeIterator.h
include/VolumeIterator.inl
)

View File

@ -37,7 +37,7 @@ namespace PolyVox
class IndexedSurfacePatch;
class IntegrealVector3;
template <typename VoxelType> class LinearVolume;
class PolyVoxSceneManager;
class VolumeChangeTracker;
class RegionGeometry;
class SurfaceVertex;
template <boost::uint32_t Size, typename Type> class Vector;

View File

@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
#pragma endregion
#ifndef __PolyVox_PolyVoxSceneManager_H__
#define __PolyVox_PolyVoxSceneManager_H__
#ifndef __PolyVox_VolumeChangeTracker_H__
#define __PolyVox_VolumeChangeTracker_H__
#include <list>
@ -33,12 +33,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace PolyVox
{
/// Voxel scene manager
class POLYVOX_API PolyVoxSceneManager
class POLYVOX_API VolumeChangeTracker
{
public:
//Constructors, etc
PolyVoxSceneManager();
~PolyVoxSceneManager();
VolumeChangeTracker();
~VolumeChangeTracker();
//Getters
boost::uint8_t getMaterialIndexAt(boost::uint16_t uX, boost::uint16_t uY, boost::uint16_t uZ);

View File

@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "IndexedSurfacePatch.h"
#include "LinearVolume.h"
#include "MarchingCubesTables.h"
#include "PolyVoxSceneManager.h"
#include "VolumeChangeTracker.h"
#include "RegionGeometry.h"
#include "SurfaceExtractors.h"
#include "SurfaceVertex.h"
@ -38,9 +38,9 @@ namespace PolyVox
{
//////////////////////////////////////////////////////////////////////////
// PolyVoxSceneManager
// VolumeChangeTracker
//////////////////////////////////////////////////////////////////////////
PolyVoxSceneManager::PolyVoxSceneManager()
VolumeChangeTracker::VolumeChangeTracker()
:volumeData(0)
,useNormalSmoothing(false)
,normalSmoothingFilterSize(1)
@ -50,17 +50,17 @@ namespace PolyVox
//sceneNodes.clear();`
}
PolyVoxSceneManager::~PolyVoxSceneManager()
VolumeChangeTracker::~VolumeChangeTracker()
{
}
void PolyVoxSceneManager::setVolumeData(BlockVolume<boost::uint8_t>* volumeDataToSet)
void VolumeChangeTracker::setVolumeData(BlockVolume<boost::uint8_t>* volumeDataToSet)
{
volumeData = volumeDataToSet;
volSurfaceUpToDate = new LinearVolume<bool>(PolyVox::logBase2(POLYVOX_VOLUME_SIDE_LENGTH_IN_REGIONS));
}
std::list<RegionGeometry> PolyVoxSceneManager::getChangedRegionGeometry(void)
std::list<RegionGeometry> VolumeChangeTracker::getChangedRegionGeometry(void)
{
std::list<RegionGeometry> listChangedRegionGeometry;
@ -98,7 +98,7 @@ namespace PolyVox
return listChangedRegionGeometry;
}
void PolyVoxSceneManager::setAllUpToDateFlagsTo(bool newUpToDateValue)
void VolumeChangeTracker::setAllUpToDateFlagsTo(bool newUpToDateValue)
{
for(uint16_t blockZ = 0; blockZ < POLYVOX_VOLUME_SIDE_LENGTH_IN_REGIONS; ++blockZ)
{
@ -113,7 +113,7 @@ namespace PolyVox
}
}
void PolyVoxSceneManager::createSphereAt(Vector3DFloat centre, float radius, uint8_t value, bool painting)
void VolumeChangeTracker::createSphereAt(Vector3DFloat centre, float radius, uint8_t value, bool painting)
{
int firstX = static_cast<int>(std::floor(centre.x() - radius));
int firstY = static_cast<int>(std::floor(centre.y() - radius));
@ -162,7 +162,7 @@ namespace PolyVox
markRegionChanged(firstX,firstY,firstZ,lastX,lastY,lastZ);
}
void PolyVoxSceneManager::markVoxelChanged(uint16_t x, uint16_t y, uint16_t z)
void VolumeChangeTracker::markVoxelChanged(uint16_t x, uint16_t y, uint16_t z)
{
//If we are not on a boundary, just mark one region.
if((x % POLYVOX_REGION_SIDE_LENGTH != 0) &&
@ -203,7 +203,7 @@ namespace PolyVox
}
}
void PolyVoxSceneManager::markRegionChanged(uint16_t firstX, uint16_t firstY, uint16_t firstZ, uint16_t lastX, uint16_t lastY, uint16_t lastZ)
void VolumeChangeTracker::markRegionChanged(uint16_t firstX, uint16_t firstY, uint16_t firstZ, uint16_t lastX, uint16_t lastY, uint16_t lastZ)
{
const uint16_t firstRegionX = firstX >> POLYVOX_REGION_SIDE_LENGTH_POWER;
const uint16_t firstRegionY = firstY >> POLYVOX_REGION_SIDE_LENGTH_POWER;
@ -226,12 +226,12 @@ namespace PolyVox
}
}
uint16_t PolyVoxSceneManager::getSideLength(void)
uint16_t VolumeChangeTracker::getSideLength(void)
{
return volumeData->getSideLength();
}
uint8_t PolyVoxSceneManager::getMaterialIndexAt(uint16_t uX, uint16_t uY, uint16_t uZ)
uint8_t VolumeChangeTracker::getMaterialIndexAt(uint16_t uX, uint16_t uY, uint16_t uZ)
{
if(volumeData->containsPoint(Vector3DInt32(uX,uY,uZ),0))
{
@ -245,30 +245,30 @@ namespace PolyVox
}
}
void PolyVoxSceneManager::setNormalGenerationMethod(NormalGenerationMethod method)
void VolumeChangeTracker::setNormalGenerationMethod(NormalGenerationMethod method)
{
m_normalGenerationMethod = method;
}
/*bool PolyVoxSceneManager::containsPoint(Vector3DFloat pos, float boundary)
/*bool VolumeChangeTracker::containsPoint(Vector3DFloat pos, float boundary)
{
return volumeData->containsPoint(pos, boundary);
}
bool PolyVoxSceneManager::containsPoint(Vector3DInt32 pos, uint16_t boundary)
bool VolumeChangeTracker::containsPoint(Vector3DInt32 pos, uint16_t boundary)
{
return volumeData->containsPoint(pos, boundary);
}*/
/*
void PolyVoxSceneManager::setAxisVisible(bool visible)
void VolumeChangeTracker::setAxisVisible(bool visible)
{
if(m_axisNode)
m_axisNode->setVisible(visible);
}*/
const BlockVolume<boost::uint8_t>* PolyVoxSceneManager::getVolumeData(void) const
const BlockVolume<boost::uint8_t>* VolumeChangeTracker::getVolumeData(void) const
{
return volumeData;
}