Removed more Ogre stuff from core library...

This commit is contained in:
David Williams 2008-02-10 11:22:10 +00:00
parent 9138ae51da
commit a518afff41
13 changed files with 26 additions and 29 deletions

View File

@ -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

View File

@ -6,6 +6,8 @@
//#include <set>
//#include <list>
#include <vector>
#include "Constants.h"
#include "IntegralVector3.h"
#include "SurfaceTypes.h"

View File

@ -21,8 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "boost/cstdint.hpp"
#include <OgreVector3.h>
#include "Vector.hpp"
namespace Ogre

View File

@ -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 <list>
#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<RegionGeometry> 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);

View File

@ -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);

View File

@ -36,7 +36,7 @@ namespace Ogre
void setEdge(const SurfaceEdgeIterator& edgeToSet);
//std::string toString(void);
//std::string tostring(void);
private:
SurfaceEdgeIterator edge;

View File

@ -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;

View File

@ -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;

View File

@ -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<int>(std::floor(centre.x() - radius));
int firstY = static_cast<int>(std::floor(centre.y() - radius));
@ -106,7 +106,7 @@ namespace Ogre
int lastY = static_cast<int>(std::ceil(centre.y() + radius));
int lastZ = static_cast<int>(std::ceil(centre.z() + radius));
Real radiusSquared = radius * radius;
float radiusSquared = radius * radius;
//Check bounds
firstX = std::max(firstX,0);

View File

@ -2,6 +2,8 @@
#include "SurfaceTriangle.h"
#include "SurfaceVertex.h"
#include <sstream>
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();
}

View File

@ -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
{

View File

@ -1,10 +1,10 @@
#include <sstream>
#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;

View File

@ -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 <fstream>
#include <iostream> //FIXME - remove this...
#include <queue>
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<Block>& homogeneousBlock = mHomogeneousBlocks[homogeneousValue];