From 99b54dfa2e369109d46eaa836ff4e41cde14e58c Mon Sep 17 00:00:00 2001 From: David Williams Date: Tue, 12 Feb 2008 21:41:24 +0000 Subject: [PATCH] Removed redundant headers - reduced build time. --- include/ForwardDeclarations.h | 20 +++++++++++++++++++- include/IndexedSurfacePatch.h | 3 +-- include/PolyVoxSceneManager.h | 7 +------ include/RegionGeometry.h | 1 + include/SurfaceVertex.h | 3 +-- include/Vector.h | 4 ++-- include/Volume.h | 3 +-- source/IndexedSurfacePatch.cpp | 2 ++ source/PolyVoxSceneManager.cpp | 5 +++++ source/SurfaceEdge.cpp | 4 ++-- source/Volume.cpp | 7 ++++--- source/VolumeIterator.cpp | 1 + 12 files changed, 40 insertions(+), 20 deletions(-) diff --git a/include/ForwardDeclarations.h b/include/ForwardDeclarations.h index b5c3099d..efc02b8b 100644 --- a/include/ForwardDeclarations.h +++ b/include/ForwardDeclarations.h @@ -1,6 +1,8 @@ #ifndef __ForwardDeclarations_H__ #define __ForwardDeclarations_H__ +#include "boost/cstdint.hpp" + namespace PolyVox { class Block; @@ -12,7 +14,23 @@ namespace PolyVox class SurfaceTriange; class SurfaceTypes; class SurfaceVertex; - class Vector; + template class Vector; + typedef Vector<2,float> Vector2DFloat; + typedef Vector<2,double> Vector2DDouble; + typedef Vector<2,boost::int32_t> Vector2DInt32; + typedef Vector<2,boost::uint32_t> Vector2DUint32; + typedef Vector<3,float> Vector3DFloat; + typedef Vector<3,double> Vector3DDouble; + typedef Vector<3,boost::int32_t> Vector3DInt32; + typedef Vector<3,boost::uint32_t> Vector3DUint32; + /*class Vector2DFloat; + class Vector2DDouble; + class Vector2DInt32; + class Vector2DUint32; + class Vector3DFloat; + class Vector3DDouble; + class Vector3DInt32; + class Vector3DUint32;*/ class Volume; class VolumeIterator; } diff --git a/include/IndexedSurfacePatch.h b/include/IndexedSurfacePatch.h index ccb32dc7..170617d9 100644 --- a/include/IndexedSurfacePatch.h +++ b/include/IndexedSurfacePatch.h @@ -6,8 +6,7 @@ #include "boost/cstdint.hpp" #include "Constants.h" -#include "SurfaceTypes.h" -#include "SurfaceVertex.h" +#include "ForwardDeclarations.h" #include "TypeDef.h" namespace PolyVox diff --git a/include/PolyVoxSceneManager.h b/include/PolyVoxSceneManager.h index f53b0380..26ab8b92 100644 --- a/include/PolyVoxSceneManager.h +++ b/include/PolyVoxSceneManager.h @@ -24,13 +24,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "boost/cstdint.hpp" #include "Constants.h" -#include "IndexedSurfacePatch.h" -#include "SurfaceTriangle.h" +#include "ForwardDeclarations.h" #include "TypeDef.h" -#include "Volume.h" -#include "SurfaceVertex.h" -#include "RegionGeometry.h" -#include "Vector.h" namespace PolyVox { diff --git a/include/RegionGeometry.h b/include/RegionGeometry.h index d9f7b823..94c320eb 100644 --- a/include/RegionGeometry.h +++ b/include/RegionGeometry.h @@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #define __RegionGeometry_H__ #include "IndexedSurfacePatch.h" +#include "Vector.h" namespace PolyVox { diff --git a/include/SurfaceVertex.h b/include/SurfaceVertex.h index b4ea57f8..1e7a71a7 100644 --- a/include/SurfaceVertex.h +++ b/include/SurfaceVertex.h @@ -20,9 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef __SurfaceVertex_H__ #define __SurfaceVertex_H__ -#include "TypeDef.h" - #include "SurfaceTypes.h" +#include "TypeDef.h" #include "Vector.h" namespace PolyVox diff --git a/include/Vector.h b/include/Vector.h index 4e8d9b7c..39fad6a8 100644 --- a/include/Vector.h +++ b/include/Vector.h @@ -1,10 +1,10 @@ #ifndef VECTOR_HEADER_INCLUDED #define VECTOR_HEADER_INCLUDED -#include +#include -//#include "..\Base\Typedef.hpp" #include "boost/cstdint.hpp" +#include namespace PolyVox { diff --git a/include/Volume.h b/include/Volume.h index 76b58f54..5cbe9e90 100644 --- a/include/Volume.h +++ b/include/Volume.h @@ -21,9 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "boost/cstdint.hpp" - -#include "Block.h" #include "Constants.h" +#include "ForwardDeclarations.h" #include "TypeDef.h" #include "Vector.h" diff --git a/source/IndexedSurfacePatch.cpp b/source/IndexedSurfacePatch.cpp index 5756add6..8b9caa41 100644 --- a/source/IndexedSurfacePatch.cpp +++ b/source/IndexedSurfacePatch.cpp @@ -1,4 +1,6 @@ #include "IndexedSurfacePatch.h" +#include "SurfaceTypes.h" +#include "SurfaceVertex.h" using namespace boost; diff --git a/source/PolyVoxSceneManager.cpp b/source/PolyVoxSceneManager.cpp index 889b777c..1cee69ff 100644 --- a/source/PolyVoxSceneManager.cpp +++ b/source/PolyVoxSceneManager.cpp @@ -17,8 +17,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ +#include "IndexedSurfacePatch.h" #include "MarchingCubesTables.h" #include "PolyVoxSceneManager.h" +#include "RegionGeometry.h" +#include "SurfaceVertex.h" +#include "Vector.h" +#include "Volume.h" #include "VolumeIterator.h" using namespace boost; diff --git a/source/SurfaceEdge.cpp b/source/SurfaceEdge.cpp index 41a42c89..e491c0ba 100644 --- a/source/SurfaceEdge.cpp +++ b/source/SurfaceEdge.cpp @@ -1,9 +1,9 @@ +#include + #include "SurfaceEdge.h" #include "SurfaceTriangle.h" #include "SurfaceVertex.h" -#include - namespace PolyVox { SurfaceEdge::SurfaceEdge(const SurfaceVertexIterator& targetToSet,const SurfaceVertexIterator& sourceToSet) diff --git a/source/Volume.cpp b/source/Volume.cpp index 72643645..4f3be715 100644 --- a/source/Volume.cpp +++ b/source/Volume.cpp @@ -17,13 +17,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ -#include "Volume.h" -#include "VolumeIterator.h" - #include #include //FIXME - remove this... #include +#include "Block.h" +#include "Volume.h" +#include "VolumeIterator.h" //Maybe this shouldn't be here? + using namespace boost; namespace PolyVox diff --git a/source/VolumeIterator.cpp b/source/VolumeIterator.cpp index 81cbad78..284cbf5d 100644 --- a/source/VolumeIterator.cpp +++ b/source/VolumeIterator.cpp @@ -17,6 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ +#include "block.h" #include "Volume.h" #include "VolumeIterator.h"