diff --git a/CMakeLists.txt b/CMakeLists.txt index a5fe9a2d..cbe70ce6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,12 +42,11 @@ SOURCE_GROUP("Sources" FILES ${SRC_FILES}) SOURCE_GROUP("Headers" FILES ${INC_FILES}) #Tell CMake the paths -LINK_DIRECTORIES(${OGRE_LIB_DIR}) -INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) #Build ADD_LIBRARY(PolyVoxSceneManager SHARED ${SRC_FILES} ${INC_FILES}) -TARGET_LINK_LIBRARIES(PolyVoxSceneManager ${OGRE_LIBRARIES}) +TARGET_LINK_LIBRARIES(PolyVoxSceneManager) SET_TARGET_PROPERTIES(PolyVoxSceneManager PROPERTIES VERSION ${THERMITE_VERSION} SOVERSION ${THERMITE_VERSION_MAJOR}) #Install diff --git a/include/IndexedSurfacePatch.h b/include/IndexedSurfacePatch.h index 7a420ba5..de1b7c72 100644 --- a/include/IndexedSurfacePatch.h +++ b/include/IndexedSurfacePatch.h @@ -6,6 +6,8 @@ //#include //#include +#include + #include "Constants.h" #include "IntegralVector3.h" #include "SurfaceTypes.h" diff --git a/include/IntegralVector3.h b/include/IntegralVector3.h index c83e7034..4c5ab244 100644 --- a/include/IntegralVector3.h +++ b/include/IntegralVector3.h @@ -21,8 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "boost/cstdint.hpp" -#include - #include "Vector.hpp" namespace Ogre diff --git a/include/PolyVoxSceneManager.h b/include/PolyVoxSceneManager.h index eadab41b..2a7c38c0 100644 --- a/include/PolyVoxSceneManager.h +++ b/include/PolyVoxSceneManager.h @@ -19,9 +19,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef __PolyVoxSceneManager_H__ #define __PolyVoxSceneManager_H__ -#include "boost/cstdint.hpp" +#include -#include "OgreSceneManager.h" +#include "boost/cstdint.hpp" #include "Constants.h" #include "IndexedSurfacePatch.h" @@ -55,7 +55,7 @@ namespace Ogre //Getters boost::uint8_t getMaterialIndexAt(boost::uint16_t uX, boost::uint16_t uY, boost::uint16_t uZ); - const String& getTypeName(void) const; + const std::string& getTypeName(void) const; boost::uint16_t getSideLength(void); @@ -66,7 +66,7 @@ namespace Ogre std::list getChangedRegionGeometry(void); void setAllUpToDateFlagsTo(bool newUpToDateValue); - void createSphereAt(Vector3DFloat centre, Real radius, boost::uint8_t value, bool painting); + void createSphereAt(Vector3DFloat centre, float radius, boost::uint8_t value, bool painting); void generateLevelVolume(void); diff --git a/include/SurfaceEdge.h b/include/SurfaceEdge.h index df43d2f7..f6f2ca1e 100644 --- a/include/SurfaceEdge.h +++ b/include/SurfaceEdge.h @@ -33,7 +33,7 @@ namespace Ogre friend bool operator < (const SurfaceEdge& lhs, const SurfaceEdge& rhs); - std::string toString(void); + std::string tostring(void); bool isDegenerate(void); diff --git a/include/SurfaceTriangle.h b/include/SurfaceTriangle.h index b0d5324a..1e593188 100644 --- a/include/SurfaceTriangle.h +++ b/include/SurfaceTriangle.h @@ -36,7 +36,7 @@ namespace Ogre void setEdge(const SurfaceEdgeIterator& edgeToSet); - //std::string toString(void); + //std::string tostring(void); private: SurfaceEdgeIterator edge; diff --git a/include/SurfaceVertex.h b/include/SurfaceVertex.h index 0debe5bf..f692a901 100644 --- a/include/SurfaceVertex.h +++ b/include/SurfaceVertex.h @@ -22,8 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "TypeDef.h" - -#include "OgreVector3.h" #include "IntegralVector3.h" #include "SurfaceTypes.h" @@ -50,7 +48,7 @@ namespace Ogre void setMaterial(float materialToSet); void setNormal(const Vector3DFloat& normalToSet); - std::string toString(void) const; + std::string tostring(void) const; private: UIntVector3 position; diff --git a/source/Block.cpp b/source/Block.cpp index 0e808de1..09e3fa0d 100644 --- a/source/Block.cpp +++ b/source/Block.cpp @@ -17,8 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -#include "OgreVector3.h" - #include "Block.h" using namespace boost; diff --git a/source/PolyVoxSceneManager.cpp b/source/PolyVoxSceneManager.cpp index 8838c621..d34968c7 100644 --- a/source/PolyVoxSceneManager.cpp +++ b/source/PolyVoxSceneManager.cpp @@ -96,7 +96,7 @@ namespace Ogre } } - void PolyVoxSceneManager::createSphereAt(Vector3DFloat centre, Real radius, uint8_t value, bool painting) + void PolyVoxSceneManager::createSphereAt(Vector3DFloat centre, float radius, uint8_t value, bool painting) { int firstX = static_cast(std::floor(centre.x() - radius)); int firstY = static_cast(std::floor(centre.y() - radius)); @@ -106,7 +106,7 @@ namespace Ogre int lastY = static_cast(std::ceil(centre.y() + radius)); int lastZ = static_cast(std::ceil(centre.z() + radius)); - Real radiusSquared = radius * radius; + float radiusSquared = radius * radius; //Check bounds firstX = std::max(firstX,0); diff --git a/source/SurfaceEdge.cpp b/source/SurfaceEdge.cpp index 3a11b440..2a35e347 100644 --- a/source/SurfaceEdge.cpp +++ b/source/SurfaceEdge.cpp @@ -2,6 +2,8 @@ #include "SurfaceTriangle.h" #include "SurfaceVertex.h" +#include + namespace Ogre { SurfaceEdge::SurfaceEdge(const SurfaceVertexIterator& targetToSet,const SurfaceVertexIterator& sourceToSet) @@ -10,10 +12,10 @@ namespace Ogre source = sourceToSet; } - std::string SurfaceEdge::toString(void) + std::string SurfaceEdge::tostring(void) { std::stringstream ss; - ss << "SurfaceEdge: Target Vertex = " << target->toString() << "Source Vertex = " << source->toString(); + ss << "SurfaceEdge: Target Vertex = " << target->tostring() << "Source Vertex = " << source->tostring(); return ss.str(); } diff --git a/source/SurfaceTriangle.cpp b/source/SurfaceTriangle.cpp index 12f17b8a..ff428a62 100644 --- a/source/SurfaceTriangle.cpp +++ b/source/SurfaceTriangle.cpp @@ -18,7 +18,7 @@ namespace Ogre edge = edgeToSet; } - /*std::string SurfaceTriangle::toString(void) + /*std::string SurfaceTriangle::tostring(void) { std::stringstream ss; @@ -27,10 +27,10 @@ namespace Ogre ss << "SurfaceTriangle:"; do { - ss << "\n Edge " << ct << " = " << edgeIter->toString(); + ss << "\n Edge " << ct << " = " << edgeIter->tostring(); if(edgeIter->hasOtherHalfEdge) { - ss << "\n Opp Edge " << ct << " = " << edgeIter->otherHalfEdge->toString(); + ss << "\n Opp Edge " << ct << " = " << edgeIter->otherHalfEdge->tostring(); } else { diff --git a/source/SurfaceVertex.cpp b/source/SurfaceVertex.cpp index 80000974..6c50787b 100644 --- a/source/SurfaceVertex.cpp +++ b/source/SurfaceVertex.cpp @@ -1,10 +1,10 @@ +#include + #include "Constants.h" #include "SurfaceVertex.h" #include "SurfaceTriangle.h" #include "SurfaceEdge.h" -#include "OgreStringConverter.h" - namespace Ogre { SurfaceVertex::SurfaceVertex() @@ -73,7 +73,7 @@ namespace Ogre normal.normalise(); } - std::string SurfaceVertex::toString(void) const + std::string SurfaceVertex::tostring(void) const { std::stringstream ss; ss << "SurfaceVertex: Position = (" << position.x << "," << position.y << "," << position.z << "), Normal = " << normal; diff --git a/source/Volume.cpp b/source/Volume.cpp index f986fbbd..85366955 100644 --- a/source/Volume.cpp +++ b/source/Volume.cpp @@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "Volume.h" #include "VolumeIterator.h" -#include "OgreVector3.h" - +#include #include //FIXME - remove this... +#include using namespace boost; @@ -326,7 +326,7 @@ namespace Ogre { if(mBlocks[ct]->isHomogeneous()) { - //LogManager::getSingleton().logMessage("Got homogeneous block with value " + StringConverter::toString(mBlocks[ct]->getVoxelAt(0,0,0))); + //LogManager::getSingleton().logMessage("Got homogeneous block with value " + stringConverter::tostring(mBlocks[ct]->getVoxelAt(0,0,0))); const uint8_t homogeneousValue = mBlocks[ct]->getVoxelAt(0,0,0); SharedPtr& homogeneousBlock = mHomogeneousBlocks[homogeneousValue];