Added RegionGeometry.cpp

This commit is contained in:
David Williams
2008-02-12 22:14:40 +00:00
parent 99b54dfa2e
commit 5c075c7da2
5 changed files with 31 additions and 17 deletions

View File

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

View File

@ -7,6 +7,7 @@
#include "Constants.h"
#include "ForwardDeclarations.h"
#include "SurfaceVertex.h"
#include "TypeDef.h"
namespace PolyVox

View File

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

View File

@ -1,6 +1,5 @@
#include "IndexedSurfacePatch.h"
#include "SurfaceTypes.h"
#include "SurfaceVertex.h"
using namespace boost;

24
source/RegionGeometry.cpp Normal file
View File

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