diff --git a/CMakeLists.txt b/CMakeLists.txt index 55796f80..eed93741 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ SET(SRC_FILES source/IndexedSurfacePatch.cpp source/MarchingCubesTables.cpp source/PolyVoxSceneManager.cpp + source/RegionGeometry.cpp source/SurfaceEdge.cpp source/SurfaceTriangle.cpp source/SurfaceVertex.cpp diff --git a/include/IndexedSurfacePatch.h b/include/IndexedSurfacePatch.h index 170617d9..161d5c54 100644 --- a/include/IndexedSurfacePatch.h +++ b/include/IndexedSurfacePatch.h @@ -7,6 +7,7 @@ #include "Constants.h" #include "ForwardDeclarations.h" +#include "SurfaceVertex.h" #include "TypeDef.h" namespace PolyVox diff --git a/include/RegionGeometry.h b/include/RegionGeometry.h index 94c320eb..6a8f284e 100644 --- a/include/RegionGeometry.h +++ b/include/RegionGeometry.h @@ -20,15 +20,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef __RegionGeometry_H__ #define __RegionGeometry_H__ -#include "IndexedSurfacePatch.h" +#include "ForwardDeclarations.h" +#include "TypeDef.h" #include "Vector.h" namespace PolyVox { - class RegionGeometry + class POLYVOX_API RegionGeometry { public: - RegionGeometry(){}; + RegionGeometry(); bool m_bIsEmpty; bool m_bContainsSingleMaterialPatch; @@ -38,19 +39,7 @@ namespace PolyVox IndexedSurfacePatch* m_patchSingleMaterial; IndexedSurfacePatch* m_patchMultiMaterial; - long int getSizeInBytes(void) - { - long int size = sizeof(RegionGeometry); - if(m_patchSingleMaterial) - { - size += m_patchSingleMaterial->getSizeInBytes(); - } - if(m_patchMultiMaterial) - { - size += m_patchMultiMaterial->getSizeInBytes(); - } - return size; - } + long int getSizeInBytes(void); }; } diff --git a/source/IndexedSurfacePatch.cpp b/source/IndexedSurfacePatch.cpp index 8b9caa41..0386e9d3 100644 --- a/source/IndexedSurfacePatch.cpp +++ b/source/IndexedSurfacePatch.cpp @@ -1,6 +1,5 @@ #include "IndexedSurfacePatch.h" #include "SurfaceTypes.h" -#include "SurfaceVertex.h" using namespace boost; diff --git a/source/RegionGeometry.cpp b/source/RegionGeometry.cpp new file mode 100644 index 00000000..a7e507cc --- /dev/null +++ b/source/RegionGeometry.cpp @@ -0,0 +1,24 @@ +#include "IndexedSurfacePatch.h" +#include "RegionGeometry.h" + +namespace PolyVox +{ + + RegionGeometry::RegionGeometry() + { + } + + long int RegionGeometry::getSizeInBytes(void) + { + long int size = sizeof(RegionGeometry); + if(m_patchSingleMaterial) + { + size += m_patchSingleMaterial->getSizeInBytes(); + } + if(m_patchMultiMaterial) + { + size += m_patchMultiMaterial->getSizeInBytes(); + } + return size; + } +} \ No newline at end of file