Removed more Ogre stuff from core library...
This commit is contained in:
parent
9138ae51da
commit
a518afff41
@ -42,12 +42,11 @@ SOURCE_GROUP("Sources" FILES ${SRC_FILES})
|
|||||||
SOURCE_GROUP("Headers" FILES ${INC_FILES})
|
SOURCE_GROUP("Headers" FILES ${INC_FILES})
|
||||||
|
|
||||||
#Tell CMake the paths
|
#Tell CMake the paths
|
||||||
LINK_DIRECTORIES(${OGRE_LIB_DIR})
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
||||||
|
|
||||||
#Build
|
#Build
|
||||||
ADD_LIBRARY(PolyVoxSceneManager SHARED ${SRC_FILES} ${INC_FILES})
|
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})
|
SET_TARGET_PROPERTIES(PolyVoxSceneManager PROPERTIES VERSION ${THERMITE_VERSION} SOVERSION ${THERMITE_VERSION_MAJOR})
|
||||||
|
|
||||||
#Install
|
#Install
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
//#include <set>
|
//#include <set>
|
||||||
//#include <list>
|
//#include <list>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
#include "IntegralVector3.h"
|
#include "IntegralVector3.h"
|
||||||
#include "SurfaceTypes.h"
|
#include "SurfaceTypes.h"
|
||||||
|
@ -21,8 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
|
|
||||||
#include "boost/cstdint.hpp"
|
#include "boost/cstdint.hpp"
|
||||||
|
|
||||||
#include <OgreVector3.h>
|
|
||||||
|
|
||||||
#include "Vector.hpp"
|
#include "Vector.hpp"
|
||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
|
@ -19,9 +19,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
#ifndef __PolyVoxSceneManager_H__
|
#ifndef __PolyVoxSceneManager_H__
|
||||||
#define __PolyVoxSceneManager_H__
|
#define __PolyVoxSceneManager_H__
|
||||||
|
|
||||||
#include "boost/cstdint.hpp"
|
#include <list>
|
||||||
|
|
||||||
#include "OgreSceneManager.h"
|
#include "boost/cstdint.hpp"
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
#include "IndexedSurfacePatch.h"
|
#include "IndexedSurfacePatch.h"
|
||||||
@ -55,7 +55,7 @@ namespace Ogre
|
|||||||
|
|
||||||
//Getters
|
//Getters
|
||||||
boost::uint8_t getMaterialIndexAt(boost::uint16_t uX, boost::uint16_t uY, boost::uint16_t uZ);
|
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);
|
boost::uint16_t getSideLength(void);
|
||||||
|
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ namespace Ogre
|
|||||||
std::list<RegionGeometry> getChangedRegionGeometry(void);
|
std::list<RegionGeometry> getChangedRegionGeometry(void);
|
||||||
|
|
||||||
void setAllUpToDateFlagsTo(bool newUpToDateValue);
|
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);
|
void generateLevelVolume(void);
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace Ogre
|
|||||||
friend bool operator < (const SurfaceEdge& lhs, const SurfaceEdge& rhs);
|
friend bool operator < (const SurfaceEdge& lhs, const SurfaceEdge& rhs);
|
||||||
|
|
||||||
|
|
||||||
std::string toString(void);
|
std::string tostring(void);
|
||||||
|
|
||||||
bool isDegenerate(void);
|
bool isDegenerate(void);
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace Ogre
|
|||||||
|
|
||||||
void setEdge(const SurfaceEdgeIterator& edgeToSet);
|
void setEdge(const SurfaceEdgeIterator& edgeToSet);
|
||||||
|
|
||||||
//std::string toString(void);
|
//std::string tostring(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SurfaceEdgeIterator edge;
|
SurfaceEdgeIterator edge;
|
||||||
|
@ -22,8 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
|
|
||||||
#include "TypeDef.h"
|
#include "TypeDef.h"
|
||||||
|
|
||||||
|
|
||||||
#include "OgreVector3.h"
|
|
||||||
#include "IntegralVector3.h"
|
#include "IntegralVector3.h"
|
||||||
#include "SurfaceTypes.h"
|
#include "SurfaceTypes.h"
|
||||||
|
|
||||||
@ -50,7 +48,7 @@ namespace Ogre
|
|||||||
void setMaterial(float materialToSet);
|
void setMaterial(float materialToSet);
|
||||||
void setNormal(const Vector3DFloat& normalToSet);
|
void setNormal(const Vector3DFloat& normalToSet);
|
||||||
|
|
||||||
std::string toString(void) const;
|
std::string tostring(void) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UIntVector3 position;
|
UIntVector3 position;
|
||||||
|
@ -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.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "OgreVector3.h"
|
|
||||||
|
|
||||||
#include "Block.h"
|
#include "Block.h"
|
||||||
|
|
||||||
using namespace boost;
|
using namespace boost;
|
||||||
|
@ -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 firstX = static_cast<int>(std::floor(centre.x() - radius));
|
||||||
int firstY = static_cast<int>(std::floor(centre.y() - 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 lastY = static_cast<int>(std::ceil(centre.y() + radius));
|
||||||
int lastZ = static_cast<int>(std::ceil(centre.z() + radius));
|
int lastZ = static_cast<int>(std::ceil(centre.z() + radius));
|
||||||
|
|
||||||
Real radiusSquared = radius * radius;
|
float radiusSquared = radius * radius;
|
||||||
|
|
||||||
//Check bounds
|
//Check bounds
|
||||||
firstX = std::max(firstX,0);
|
firstX = std::max(firstX,0);
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
#include "SurfaceTriangle.h"
|
#include "SurfaceTriangle.h"
|
||||||
#include "SurfaceVertex.h"
|
#include "SurfaceVertex.h"
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
{
|
{
|
||||||
SurfaceEdge::SurfaceEdge(const SurfaceVertexIterator& targetToSet,const SurfaceVertexIterator& sourceToSet)
|
SurfaceEdge::SurfaceEdge(const SurfaceVertexIterator& targetToSet,const SurfaceVertexIterator& sourceToSet)
|
||||||
@ -10,10 +12,10 @@ namespace Ogre
|
|||||||
source = sourceToSet;
|
source = sourceToSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SurfaceEdge::toString(void)
|
std::string SurfaceEdge::tostring(void)
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
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();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ namespace Ogre
|
|||||||
edge = edgeToSet;
|
edge = edgeToSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*std::string SurfaceTriangle::toString(void)
|
/*std::string SurfaceTriangle::tostring(void)
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|
||||||
@ -27,10 +27,10 @@ namespace Ogre
|
|||||||
ss << "SurfaceTriangle:";
|
ss << "SurfaceTriangle:";
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ss << "\n Edge " << ct << " = " << edgeIter->toString();
|
ss << "\n Edge " << ct << " = " << edgeIter->tostring();
|
||||||
if(edgeIter->hasOtherHalfEdge)
|
if(edgeIter->hasOtherHalfEdge)
|
||||||
{
|
{
|
||||||
ss << "\n Opp Edge " << ct << " = " << edgeIter->otherHalfEdge->toString();
|
ss << "\n Opp Edge " << ct << " = " << edgeIter->otherHalfEdge->tostring();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
#include "SurfaceVertex.h"
|
#include "SurfaceVertex.h"
|
||||||
#include "SurfaceTriangle.h"
|
#include "SurfaceTriangle.h"
|
||||||
#include "SurfaceEdge.h"
|
#include "SurfaceEdge.h"
|
||||||
|
|
||||||
#include "OgreStringConverter.h"
|
|
||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
{
|
{
|
||||||
SurfaceVertex::SurfaceVertex()
|
SurfaceVertex::SurfaceVertex()
|
||||||
@ -73,7 +73,7 @@ namespace Ogre
|
|||||||
normal.normalise();
|
normal.normalise();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SurfaceVertex::toString(void) const
|
std::string SurfaceVertex::tostring(void) const
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "SurfaceVertex: Position = (" << position.x << "," << position.y << "," << position.z << "), Normal = " << normal;
|
ss << "SurfaceVertex: Position = (" << position.x << "," << position.y << "," << position.z << "), Normal = " << normal;
|
||||||
|
@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
#include "Volume.h"
|
#include "Volume.h"
|
||||||
#include "VolumeIterator.h"
|
#include "VolumeIterator.h"
|
||||||
|
|
||||||
#include "OgreVector3.h"
|
#include <fstream>
|
||||||
|
|
||||||
#include <iostream> //FIXME - remove this...
|
#include <iostream> //FIXME - remove this...
|
||||||
|
#include <queue>
|
||||||
|
|
||||||
using namespace boost;
|
using namespace boost;
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ namespace Ogre
|
|||||||
{
|
{
|
||||||
if(mBlocks[ct]->isHomogeneous())
|
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);
|
const uint8_t homogeneousValue = mBlocks[ct]->getVoxelAt(0,0,0);
|
||||||
SharedPtr<Block>& homogeneousBlock = mHomogeneousBlocks[homogeneousValue];
|
SharedPtr<Block>& homogeneousBlock = mHomogeneousBlocks[homogeneousValue];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user