Tiding up...

This commit is contained in:
David Williams 2008-02-11 20:34:45 +00:00
parent d8dacdadc3
commit abb3def1e7
6 changed files with 12 additions and 32 deletions

View File

@ -1,19 +1,14 @@
#ifndef __IndexedSurfacePatch_H__ #ifndef __IndexedSurfacePatch_H__
#define __IndexedSurfacePatch_H__ #define __IndexedSurfacePatch_H__
#include "boost/cstdint.hpp"
//#include <set>
//#include <list>
#include <vector> #include <vector>
#include "boost/cstdint.hpp"
#include "Constants.h" #include "Constants.h"
#include "SurfaceTypes.h" #include "SurfaceTypes.h"
#include "SurfaceVertex.h" #include "SurfaceVertex.h"
#include "TypeDef.h" #include "TypeDef.h"
#include "VolumeIterator.h"
namespace PolyVox namespace PolyVox
{ {

View File

@ -26,16 +26,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "Constants.h" #include "Constants.h"
#include "IndexedSurfacePatch.h" #include "IndexedSurfacePatch.h"
#include "SurfaceTriangle.h" #include "SurfaceTriangle.h"
//#include "AbstractSurfacePatch.h"
#include "TypeDef.h" #include "TypeDef.h"
#include "Volume.h" #include "Volume.h"
#include "SurfaceVertex.h" #include "SurfaceVertex.h"
#include "RegionGeometry.h" #include "RegionGeometry.h"
#include "Vector.h" #include "Vector.h"
#include <set>
namespace PolyVox namespace PolyVox
{ {
enum NormalGenerationMethod enum NormalGenerationMethod

View File

@ -37,11 +37,13 @@ namespace PolyVox
//Volume interface //Volume interface
public: public:
Volume(); Volume();
Volume(const Volume& rhs);
~Volume(); ~Volume();
private:
Volume(const Volume& rhs);
Volume& operator=(const Volume& rhs); Volume& operator=(const Volume& rhs);
public:
Block* getBlock(boost::uint16_t index); Block* getBlock(boost::uint16_t index);
bool containsPoint(Vector3DFloat pos, float boundary); bool containsPoint(Vector3DFloat pos, float boundary);

View File

@ -21,7 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
using namespace boost; using namespace boost;
namespace PolyVox { namespace PolyVox
{
Block::Block() Block::Block()
{ {

View File

@ -18,14 +18,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/ ******************************************************************************/
#include "MarchingCubesTables.h" #include "MarchingCubesTables.h"
#include "SurfaceVertex.h"
#include "SurfaceEdge.h"
#include "IndexedSurfacePatch.h"
#include "PolyVoxSceneManager.h" #include "PolyVoxSceneManager.h"
#include "VolumeIterator.h" #include "VolumeIterator.h"
#include <list>
using namespace boost; using namespace boost;
namespace PolyVox namespace PolyVox

View File

@ -31,19 +31,6 @@ namespace PolyVox
Volume::Volume() Volume::Volume()
{ {
//FIXME - Add checking...
/*SharedPtr<Block>& homogeneousBlock = mHomogeneousBlocks[0];
if(homogeneousBlock.isNull())
{
homogeneousBlock = SharedPtr<Block>(new Block);
homogeneousBlock->fillWithValue(0);
}*/
/*for(uint16_t i = 0; i < POLYVOX_NO_OF_BLOCKS_IN_VOLUME; ++i)
{
mBlocks[i] = mHomogeneousBlocks[0];
}*/
for(uint16_t i = 0; i < POLYVOX_NO_OF_BLOCKS_IN_VOLUME; ++i) for(uint16_t i = 0; i < POLYVOX_NO_OF_BLOCKS_IN_VOLUME; ++i)
{ {
mBlocks[i] = new Block; mBlocks[i] = new Block;
@ -58,6 +45,10 @@ namespace PolyVox
Volume::~Volume() Volume::~Volume()
{ {
for(uint16_t i = 0; i < POLYVOX_NO_OF_BLOCKS_IN_VOLUME; ++i)
{
delete mBlocks[i];
}
} }
Volume& Volume::operator=(const Volume& rhs) Volume& Volume::operator=(const Volume& rhs)