Got mesh smoothing working.

Cleaning up code.
Various changes made without internet access.
This commit is contained in:
David Williams
2008-05-16 20:53:41 +00:00
parent 1e73d4013d
commit 28dda03cb3
27 changed files with 1155 additions and 353 deletions

View File

@@ -1,5 +1,6 @@
#pragma region License
/******************************************************************************
This file is part of a voxel plugin for OGRE
This file is part of the PolyVox library
Copyright (C) 2006 David Williams
This program is free software; you can redistribute it and/or
@@ -16,15 +17,16 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
#pragma endregion
#ifndef __PolyVox_Volume_H__
#define __PolyVox_Volume_H__
#include "boost/cstdint.hpp"
#include "Constants.h"
#pragma region Headers
#include "PolyVoxForwardDeclarations.h"
#include "TypeDef.h"
#include "Vector.h"
#include "boost/cstdint.hpp"
#pragma endregion
namespace PolyVox
{
@@ -34,30 +36,24 @@ namespace PolyVox
//Make VolumeIterator a friend
friend class VolumeIterator<VoxelType>;
//Volume interface
public:
Volume(boost::uint8_t uSideLengthPower, boost::uint8_t uBlockSideLengthPower = 5);
~Volume();
private:
Volume(const Volume& rhs);
~Volume();
Volume& operator=(const Volume& rhs);
public:
bool containsPoint(Vector3DFloat pos, float boundary);
bool containsPoint(Vector3DInt32 pos, boost::uint16_t boundary);
boost::uint16_t getSideLength(void);
boost::uint8_t getSideLengthPower(void);
boost::uint16_t getSideLengthInBlocks(void);
VoxelType getVoxelAt(boost::uint16_t uXPos, boost::uint16_t uYPos, boost::uint16_t uZPos) const;
VoxelType getVoxelAt(const Vector3DUint16& v3dPos) const;
boost::uint16_t getBlockSideLength(void);
boost::uint16_t getBlockSideLengthPower(void);
void setVoxelAt(boost::uint16_t uXPos, boost::uint16_t uYPos, boost::uint16_t uZPos, VoxelType tValue);
void setVoxelAt(const Vector3DUint16& v3dPos, VoxelType tValue);
void tidy(void);
bool containsPoint(Vector3DFloat pos, float boundary) const;
bool containsPoint(Vector3DInt32 pos, boost::uint16_t boundary) const;
private:
Block<VoxelType>* getBlock(boost::uint16_t index);
Block<VoxelType>** mBlocks;
boost::uint32_t m_uNoOfBlocksInVolume;
boost::uint16_t m_uSideLengthInBlocks;