Added RegionGeometry.cpp
This commit is contained in:
@ -6,6 +6,7 @@ SET(SRC_FILES
|
|||||||
source/IndexedSurfacePatch.cpp
|
source/IndexedSurfacePatch.cpp
|
||||||
source/MarchingCubesTables.cpp
|
source/MarchingCubesTables.cpp
|
||||||
source/PolyVoxSceneManager.cpp
|
source/PolyVoxSceneManager.cpp
|
||||||
|
source/RegionGeometry.cpp
|
||||||
source/SurfaceEdge.cpp
|
source/SurfaceEdge.cpp
|
||||||
source/SurfaceTriangle.cpp
|
source/SurfaceTriangle.cpp
|
||||||
source/SurfaceVertex.cpp
|
source/SurfaceVertex.cpp
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
#include "ForwardDeclarations.h"
|
#include "ForwardDeclarations.h"
|
||||||
|
#include "SurfaceVertex.h"
|
||||||
#include "TypeDef.h"
|
#include "TypeDef.h"
|
||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
|
@ -20,15 +20,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
#ifndef __RegionGeometry_H__
|
#ifndef __RegionGeometry_H__
|
||||||
#define __RegionGeometry_H__
|
#define __RegionGeometry_H__
|
||||||
|
|
||||||
#include "IndexedSurfacePatch.h"
|
#include "ForwardDeclarations.h"
|
||||||
|
#include "TypeDef.h"
|
||||||
#include "Vector.h"
|
#include "Vector.h"
|
||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
class RegionGeometry
|
class POLYVOX_API RegionGeometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RegionGeometry(){};
|
RegionGeometry();
|
||||||
|
|
||||||
bool m_bIsEmpty;
|
bool m_bIsEmpty;
|
||||||
bool m_bContainsSingleMaterialPatch;
|
bool m_bContainsSingleMaterialPatch;
|
||||||
@ -38,19 +39,7 @@ namespace PolyVox
|
|||||||
IndexedSurfacePatch* m_patchSingleMaterial;
|
IndexedSurfacePatch* m_patchSingleMaterial;
|
||||||
IndexedSurfacePatch* m_patchMultiMaterial;
|
IndexedSurfacePatch* m_patchMultiMaterial;
|
||||||
|
|
||||||
long int getSizeInBytes(void)
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "IndexedSurfacePatch.h"
|
#include "IndexedSurfacePatch.h"
|
||||||
#include "SurfaceTypes.h"
|
#include "SurfaceTypes.h"
|
||||||
#include "SurfaceVertex.h"
|
|
||||||
|
|
||||||
using namespace boost;
|
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