Added RegionGeometry.cpp
This commit is contained in:
@ -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
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "Constants.h"
|
||||
#include "ForwardDeclarations.h"
|
||||
#include "SurfaceVertex.h"
|
||||
#include "TypeDef.h"
|
||||
|
||||
namespace PolyVox
|
||||
|
@ -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);
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "IndexedSurfacePatch.h"
|
||||
#include "SurfaceTypes.h"
|
||||
#include "SurfaceVertex.h"
|
||||
|
||||
using namespace boost;
|
||||
|
||||
|
24
source/RegionGeometry.cpp
Normal file
24
source/RegionGeometry.cpp
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user