Removed OgrePrerequisites.h from main library.

This commit is contained in:
David Williams
2008-02-07 21:33:11 +00:00
parent 8fbcd99ef8
commit f29af2f8d4
16 changed files with 345 additions and 330 deletions

View File

@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __Block_H__
#define __Block_H__
#include "OgrePrerequisites.h"
#include "boost/cstdint.hpp"
#include "Constants.h"
@ -43,13 +43,13 @@ namespace Ogre
//bool isHomogeneous(void);
uchar getVoxelAt(const uint xPosition, const uint yPosition, const uint zPosition) const;
void setVoxelAt(const uint xPosition, const uint yPosition, const uint zPosition, const uchar value);
boost::uint8_t getVoxelAt(const boost::uint16_t xPosition, const boost::uint16_t yPosition, const boost::uint16_t zPosition) const;
void setVoxelAt(const boost::uint16_t xPosition, const boost::uint16_t yPosition, const boost::uint16_t zPosition, const boost::uint8_t value);
//void fillWithValue(const uchar value);
//void fillWithValue(const uint8_t value);
private:
uchar mData[OGRE_NO_OF_VOXELS_IN_BLOCK];
boost::uint8_t mData[OGRE_NO_OF_VOXELS_IN_BLOCK];
};
}

View File

@ -1,25 +1,27 @@
#ifndef __Constants_H__
#define __Constants_H__
#include "boost/cstdint.hpp"
namespace Ogre
{
//FIXME - i think we can define mod using a bitmask which flattens the upper bits. Should define that here.
const unsigned int OGRE_BLOCK_SIDE_LENGTH_POWER = 5;
const unsigned int OGRE_BLOCK_SIDE_LENGTH = (0x0001 << OGRE_BLOCK_SIDE_LENGTH_POWER);
const unsigned int OGRE_NO_OF_VOXELS_IN_BLOCK = (OGRE_BLOCK_SIDE_LENGTH * OGRE_BLOCK_SIDE_LENGTH * OGRE_BLOCK_SIDE_LENGTH);
const boost::uint32_t OGRE_BLOCK_SIDE_LENGTH_POWER = 5;
const boost::uint32_t OGRE_BLOCK_SIDE_LENGTH = (0x0001 << OGRE_BLOCK_SIDE_LENGTH_POWER);
const boost::uint32_t OGRE_NO_OF_VOXELS_IN_BLOCK = (OGRE_BLOCK_SIDE_LENGTH * OGRE_BLOCK_SIDE_LENGTH * OGRE_BLOCK_SIDE_LENGTH);
const unsigned int OGRE_VOLUME_SIDE_LENGTH_POWER = 8;
const unsigned int OGRE_VOLUME_SIDE_LENGTH = (0x0001 << OGRE_VOLUME_SIDE_LENGTH_POWER);
const unsigned int OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS = (OGRE_VOLUME_SIDE_LENGTH >> OGRE_BLOCK_SIDE_LENGTH_POWER);
const unsigned int OGRE_NO_OF_BLOCKS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS * OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS * OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS);
const unsigned int OGRE_NO_OF_VOXELS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH * OGRE_VOLUME_SIDE_LENGTH * OGRE_VOLUME_SIDE_LENGTH);
const boost::uint32_t OGRE_VOLUME_SIDE_LENGTH_POWER = 8;
const boost::uint32_t OGRE_VOLUME_SIDE_LENGTH = (0x0001 << OGRE_VOLUME_SIDE_LENGTH_POWER);
const boost::uint32_t OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS = (OGRE_VOLUME_SIDE_LENGTH >> OGRE_BLOCK_SIDE_LENGTH_POWER);
const boost::uint32_t OGRE_NO_OF_BLOCKS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS * OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS * OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS);
const boost::uint32_t OGRE_NO_OF_VOXELS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH * OGRE_VOLUME_SIDE_LENGTH * OGRE_VOLUME_SIDE_LENGTH);
const unsigned int OGRE_REGION_SIDE_LENGTH_POWER = 4;
const unsigned int OGRE_REGION_SIDE_LENGTH = (0x0001 << OGRE_REGION_SIDE_LENGTH_POWER);
const unsigned int OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS = (OGRE_VOLUME_SIDE_LENGTH >> OGRE_REGION_SIDE_LENGTH_POWER);
const unsigned int OGRE_NO_OF_REGIONS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS * OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS * OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS);
const boost::uint32_t OGRE_REGION_SIDE_LENGTH_POWER = 4;
const boost::uint32_t OGRE_REGION_SIDE_LENGTH = (0x0001 << OGRE_REGION_SIDE_LENGTH_POWER);
const boost::uint32_t OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS = (OGRE_VOLUME_SIDE_LENGTH >> OGRE_REGION_SIDE_LENGTH_POWER);
const boost::uint32_t OGRE_NO_OF_REGIONS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS * OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS * OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS);
const unsigned long OGRE_MAX_VOXELS_TO_BURN_PER_FRAME = 1000;
const boost::uint32_t OGRE_MAX_VOXELS_TO_BURN_PER_FRAME = 1000;
}
#endif

View File

@ -1,6 +1,8 @@
#ifndef __IndexedSurfacePatch_H__
#define __IndexedSurfacePatch_H__
#include "boost/cstdint.hpp"
//#include <set>
//#include <list>
@ -21,10 +23,10 @@ namespace Ogre
~IndexedSurfacePatch();
void addTriangle(const SurfaceVertex& v0,const SurfaceVertex& v1,const SurfaceVertex& v2);
void fillVertexAndIndexData(std::vector<SurfaceVertex>& vecVertices, std::vector<ushort>& vecIndices);
void fillVertexAndIndexData(std::vector<SurfaceVertex>& vecVertices, std::vector<boost::uint16_t>& vecIndices);
//private:
std::vector<uint> m_vecTriangleIndices;
std::vector<boost::uint16_t> m_vecTriangleIndices;
std::vector<SurfaceVertex> m_vecVertices;
long int vertexIndices[OGRE_REGION_SIDE_LENGTH*2+1][OGRE_REGION_SIDE_LENGTH*2+1][OGRE_REGION_SIDE_LENGTH*2+1];

View File

@ -19,7 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __IntegralVector3_H__
#define __IntegralVector3_H__
#include <OgrePrerequisites.h>
#include "boost/cstdint.hpp"
#include <OgreVector3.h>
namespace Ogre
@ -104,10 +105,10 @@ namespace Ogre
typedef IntegralVector3<int> IntVector3;
typedef IntegralVector3<long> LongVector3;
typedef IntegralVector3<uchar> UCharVector3;
typedef IntegralVector3<ushort> UShortVector3;
typedef IntegralVector3<uint> UIntVector3;
typedef IntegralVector3<ulong> ULongVector3;
typedef IntegralVector3<boost::uint8_t> UCharVector3;
typedef IntegralVector3<boost::uint16_t> UShortVector3;
typedef IntegralVector3<boost::uint16_t> UIntVector3;
typedef IntegralVector3<boost::uint32_t> ULongVector3;
}
#endif

View File

@ -19,7 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __PolyVoxSceneManager_H__
#define __PolyVoxSceneManager_H__
#include "OgrePrerequisites.h"
#include "boost/cstdint.hpp"
#include "OgreSceneManager.h"
#include "Constants.h"
@ -51,9 +52,9 @@ namespace Ogre
~PolyVoxSceneManager();
//Getters
uchar getMaterialIndexAt(uint uX, uint uY, uint uZ);
boost::uint8_t getMaterialIndexAt(boost::uint16_t uX, boost::uint16_t uY, boost::uint16_t uZ);
const String& getTypeName(void) const;
uint getSideLength(void);
boost::uint16_t getSideLength(void);
//Setters
@ -63,14 +64,14 @@ namespace Ogre
std::list<RegionGeometry> getChangedRegionGeometry(void);
void setAllUpToDateFlagsTo(bool newUpToDateValue);
void createSphereAt(Vector3 centre, Real radius, uchar value, bool painting);
void createSphereAt(Vector3 centre, Real radius, boost::uint8_t value, bool painting);
void generateLevelVolume(void);
void generateMeshDataForRegion(uint regionX, uint regionY, uint regionZ, IndexedSurfacePatch* singleMaterialPatch, IndexedSurfacePatch* multiMaterialPatch) const;
void generateMeshDataForRegion(boost::uint16_t regionX,boost:: uint16_t regionY, boost::uint16_t regionZ, IndexedSurfacePatch* singleMaterialPatch, IndexedSurfacePatch* multiMaterialPatch) const;
bool containsPoint(Vector3 pos, float boundary);
bool containsPoint(IntVector3 pos, uint boundary);
bool containsPoint(IntVector3 pos, boost::uint16_t boundary);
@ -83,14 +84,14 @@ namespace Ogre
Vector3 computeNormal(const Vector3& position, NormalGenerationMethod normalGenerationMethod) const;
public:
void markVoxelChanged(uint x, uint y, uint z);
void markRegionChanged(uint firstX, uint firstY, uint firstZ, uint lastX, uint lastY, uint lastZ);
void markVoxelChanged(boost::uint16_t x, boost::uint16_t y, boost::uint16_t z);
void markRegionChanged(boost::uint16_t firstX, boost::uint16_t firstY, boost::uint16_t firstZ, boost::uint16_t lastX, boost::uint16_t lastY, boost::uint16_t lastZ);
static uint fileNo;
static boost::uint16_t fileNo;
bool useNormalSmoothing;
uint normalSmoothingFilterSize;
boost::uint16_t normalSmoothingFilterSize;
NormalGenerationMethod m_normalGenerationMethod;

View File

@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __SurfaceEdge_H__
#define __SurfaceEdge_H__
#include "OgrePrerequisites.h"
#include "SurfaceTypes.h"
namespace Ogre

View File

@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __SurfaceTriangle_H__
#define __SurfaceTriangle_H__
#include "OgrePrerequisites.h"
#include "SurfaceTypes.h"
namespace Ogre

View File

@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "TypeDef.h"
#include "OgrePrerequisites.h"
#include "OgreVector3.h"
#include "IntegralVector3.h"

View File

@ -19,7 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __Volume_H__
#define __Volume_H__
#include "OgrePrerequisites.h"
#include "boost/cstdint.hpp"
#include "Block.h"
#include "Constants.h"
@ -41,15 +42,15 @@ namespace Ogre
Volume& operator=(const Volume& rhs);
Block* getBlock(uint index);
Block* getBlock(boost::uint16_t index);
bool containsPoint(Vector3 pos, float boundary);
bool containsPoint(IntVector3 pos, uint boundary);
bool containsPoint(IntVector3 pos, boost::uint16_t boundary);
bool loadFromFile(const std::string& sFilename);
bool saveToFile(const std::string& sFilename);
void regionGrow(uint xStart, uint yStart, uint zStart, uchar value);
void regionGrow(boost::uint16_t xStart, boost::uint16_t yStart, boost::uint16_t zStart, boost::uint8_t value);
void tidy(void);
private:

View File

@ -19,7 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __VolumeIterator_H__
#define __VolumeIterator_H__
#include "OgrePrerequisites.h"
#include "boost/cstdint.hpp"
#include "TypeDef.h"
@ -33,96 +34,96 @@ namespace Ogre
VolumeIterator(Volume& volume);
~VolumeIterator();
void setVoxel(uchar value);
uchar getVoxel(void);
void setVoxel(boost::uint8_t value);
boost::uint8_t getVoxel(void);
uchar getVoxelAt(const uint xPosition, const uint yPosition, const uint zPosition) const;
void setVoxelAt(const uint xPosition, const uint yPosition, const uint zPosition, const uchar value);
boost::uint8_t getVoxelAt(const boost::uint16_t xPosition, const boost::uint16_t yPosition, const boost::uint16_t zPosition) const;
void setVoxelAt(const boost::uint16_t xPosition, const boost::uint16_t yPosition, const boost::uint16_t zPosition, const boost::uint8_t value);
float getAveragedVoxelAt(const uint xPosition, const uint yPosition, const uint zPosition, uint size) const;
float getAveragedVoxelAt(const boost::uint16_t xPosition, const boost::uint16_t yPosition, const boost::uint16_t zPosition, boost::uint16_t size) const;
//FIXME - this shouldn't return float vector
Vector3 getCentralDifferenceGradient(void) const;
Vector3 getAveragedCentralDifferenceGradient(void) const;
Vector3 getSobelGradient(void) const;
uint getPosX(void);
uint getPosY(void);
uint getPosZ(void);
boost::uint16_t getPosX(void);
boost::uint16_t getPosY(void);
boost::uint16_t getPosZ(void);
void setPosition(uint xPos, uint yPos, uint zPos);
void setValidRegion(uint xFirst, uint yFirst, uint zFirst, uint xLast, uint yLast, uint zLast);
void setPosition(boost::uint16_t xPos, boost::uint16_t yPos, boost::uint16_t zPos);
void setValidRegion(boost::uint16_t xFirst, boost::uint16_t yFirst, boost::uint16_t zFirst, boost::uint16_t xLast, boost::uint16_t yLast, boost::uint16_t zLast);
void moveForwardInRegion(void);
bool isValidForRegion(void);
uchar peekVoxel1nx1ny1nz(void) const;
uchar peekVoxel1nx1ny0pz(void) const;
uchar peekVoxel1nx1ny1pz(void) const;
uchar peekVoxel1nx0py1nz(void) const;
uchar peekVoxel1nx0py0pz(void) const;
uchar peekVoxel1nx0py1pz(void) const;
uchar peekVoxel1nx1py1nz(void) const;
uchar peekVoxel1nx1py0pz(void) const;
uchar peekVoxel1nx1py1pz(void) const;
boost::uint8_t peekVoxel1nx1ny1nz(void) const;
boost::uint8_t peekVoxel1nx1ny0pz(void) const;
boost::uint8_t peekVoxel1nx1ny1pz(void) const;
boost::uint8_t peekVoxel1nx0py1nz(void) const;
boost::uint8_t peekVoxel1nx0py0pz(void) const;
boost::uint8_t peekVoxel1nx0py1pz(void) const;
boost::uint8_t peekVoxel1nx1py1nz(void) const;
boost::uint8_t peekVoxel1nx1py0pz(void) const;
boost::uint8_t peekVoxel1nx1py1pz(void) const;
uchar peekVoxel0px1ny1nz(void) const;
uchar peekVoxel0px1ny0pz(void) const;
uchar peekVoxel0px1ny1pz(void) const;
uchar peekVoxel0px0py1nz(void) const;
uchar peekVoxel0px0py0pz(void) const;
uchar peekVoxel0px0py1pz(void) const;
uchar peekVoxel0px1py1nz(void) const;
uchar peekVoxel0px1py0pz(void) const;
uchar peekVoxel0px1py1pz(void) const;
boost::uint8_t peekVoxel0px1ny1nz(void) const;
boost::uint8_t peekVoxel0px1ny0pz(void) const;
boost::uint8_t peekVoxel0px1ny1pz(void) const;
boost::uint8_t peekVoxel0px0py1nz(void) const;
boost::uint8_t peekVoxel0px0py0pz(void) const;
boost::uint8_t peekVoxel0px0py1pz(void) const;
boost::uint8_t peekVoxel0px1py1nz(void) const;
boost::uint8_t peekVoxel0px1py0pz(void) const;
boost::uint8_t peekVoxel0px1py1pz(void) const;
uchar peekVoxel1px1ny1nz(void) const;
uchar peekVoxel1px1ny0pz(void) const;
uchar peekVoxel1px1ny1pz(void) const;
uchar peekVoxel1px0py1nz(void) const;
uchar peekVoxel1px0py0pz(void) const;
uchar peekVoxel1px0py1pz(void) const;
uchar peekVoxel1px1py1nz(void) const;
uchar peekVoxel1px1py0pz(void) const;
uchar peekVoxel1px1py1pz(void) const;
boost::uint8_t peekVoxel1px1ny1nz(void) const;
boost::uint8_t peekVoxel1px1ny0pz(void) const;
boost::uint8_t peekVoxel1px1ny1pz(void) const;
boost::uint8_t peekVoxel1px0py1nz(void) const;
boost::uint8_t peekVoxel1px0py0pz(void) const;
boost::uint8_t peekVoxel1px0py1pz(void) const;
boost::uint8_t peekVoxel1px1py1nz(void) const;
boost::uint8_t peekVoxel1px1py0pz(void) const;
boost::uint8_t peekVoxel1px1py1pz(void) const;
private:
//The current volume
Volume& mVolume;
//The current position in the volume
uint mXPosInVolume;
uint mYPosInVolume;
uint mZPosInVolume;
boost::uint16_t mXPosInVolume;
boost::uint16_t mYPosInVolume;
boost::uint16_t mZPosInVolume;
//The position of the current block
uint mXBlock;
uint mYBlock;
uint mZBlock;
boost::uint16_t mXBlock;
boost::uint16_t mYBlock;
boost::uint16_t mZBlock;
//The offset into the current block
uint mXPosInBlock;
uint mYPosInBlock;
uint mZPosInBlock;
boost::uint16_t mXPosInBlock;
boost::uint16_t mYPosInBlock;
boost::uint16_t mZPosInBlock;
//Other current position information
uchar* mCurrentVoxel;
ulong mBlockIndexInVolume;
ulong mVoxelIndexInBlock;
boost::uint8_t* mCurrentVoxel;
boost::uint32_t mBlockIndexInVolume;
boost::uint32_t mVoxelIndexInBlock;
uint mXRegionFirst;
uint mYRegionFirst;
uint mZRegionFirst;
uint mXRegionLast;
uint mYRegionLast;
uint mZRegionLast;
boost::uint16_t mXRegionFirst;
boost::uint16_t mYRegionFirst;
boost::uint16_t mZRegionFirst;
boost::uint16_t mXRegionLast;
boost::uint16_t mYRegionLast;
boost::uint16_t mZRegionLast;
uint mXRegionFirstBlock;
uint mYRegionFirstBlock;
uint mZRegionFirstBlock;
uint mXRegionLastBlock;
uint mYRegionLastBlock;
uint mZRegionLastBlock;
boost::uint16_t mXRegionFirstBlock;
boost::uint16_t mYRegionFirstBlock;
boost::uint16_t mZRegionFirstBlock;
boost::uint16_t mXRegionLastBlock;
boost::uint16_t mYRegionLastBlock;
boost::uint16_t mZRegionLastBlock;
bool mIsValidForRegion;
};