Renamed IndexedSurfacePatch to SurfaceMesh.
This commit is contained in:
@ -55,7 +55,7 @@ namespace PolyVox
|
||||
template <typename VoxelType>
|
||||
Vector3DFloat computeSmoothSobelGradient(VolumeSampler<VoxelType>& volIter);
|
||||
|
||||
POLYVOXCORE_API void computeNormalsForVertices(Volume<uint8_t>* volumeData, IndexedSurfacePatch& isp, NormalGenerationMethod normalGenerationMethod);
|
||||
POLYVOXCORE_API void computeNormalsForVertices(Volume<uint8_t>* volumeData, SurfaceMesh& mesh, NormalGenerationMethod normalGenerationMethod);
|
||||
POLYVOXCORE_API Vector3DFloat computeNormal(Volume<uint8_t>* volumeData, const Vector3DFloat& v3dPos, NormalGenerationMethod normalGenerationMethod);
|
||||
}
|
||||
|
||||
|
@ -40,8 +40,8 @@ namespace PolyVox
|
||||
{
|
||||
public:
|
||||
|
||||
void buildFromISP(IndexedSurfacePatch* pIsp);
|
||||
void fillISP(IndexedSurfacePatch* pIsp);
|
||||
void buildFromMesh(SurfaceMesh* pMesh);
|
||||
void fillMesh(SurfaceMesh* pMesh);
|
||||
void matchEdgePairs(void);
|
||||
void computeEdgeCosts(void);
|
||||
|
||||
|
@ -43,7 +43,7 @@ namespace PolyVox
|
||||
//MeshEdge* m_pEdge;
|
||||
//std::set<MeshFace*> m_faces;
|
||||
//std::set<MeshEdge*> m_edges; //Edges which have this vertex as the src
|
||||
long int m_index; //Bit wasteful to store this the whle time, as it's only used when converting to ISPs?
|
||||
long int m_index; //Bit wasteful to store this the whle time, as it's only used when converting to Meshs?
|
||||
|
||||
bool isSane(void);
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ namespace PolyVox
|
||||
class MeshVertex;
|
||||
//---------------------------------
|
||||
|
||||
class IndexedSurfacePatch;
|
||||
class SurfaceMesh;
|
||||
class Region;
|
||||
class SurfaceVertex;
|
||||
class SurfaceExtractor;
|
||||
|
@ -45,7 +45,7 @@ namespace PolyVox
|
||||
|
||||
void setLodLevel(uint8_t uLodLevel);
|
||||
|
||||
POLYVOX_SHARED_PTR<IndexedSurfacePatch> extractSurfaceForRegion(Region region);
|
||||
POLYVOX_SHARED_PTR<SurfaceMesh> extractSurfaceForRegion(Region region);
|
||||
|
||||
private:
|
||||
//Extract the surface for a particular LOD level
|
||||
@ -106,7 +106,7 @@ namespace PolyVox
|
||||
uint32_t m_uNoOfOccupiedCells;
|
||||
|
||||
//The surface patch we are currently filling.
|
||||
IndexedSurfacePatch* m_ispCurrent;
|
||||
SurfaceMesh* m_meshCurrent;
|
||||
|
||||
//Information about the region we are currently processing
|
||||
Region m_regInputCropped;
|
||||
|
@ -23,8 +23,8 @@ freely, subject to the following restrictions:
|
||||
*******************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef __PolyVox_IndexedSurfacePatch_H__
|
||||
#define __PolyVox_IndexedSurfacePatch_H__
|
||||
#ifndef __PolyVox_SurfaceMesh_H__
|
||||
#define __PolyVox_SurfaceMesh_H__
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
@ -45,11 +45,11 @@ namespace PolyVox
|
||||
int endIndex; //Let's put it just past the end STL style
|
||||
};
|
||||
|
||||
class POLYVOXCORE_API IndexedSurfacePatch
|
||||
class POLYVOXCORE_API SurfaceMesh
|
||||
{
|
||||
public:
|
||||
IndexedSurfacePatch();
|
||||
~IndexedSurfacePatch();
|
||||
SurfaceMesh();
|
||||
~SurfaceMesh();
|
||||
|
||||
const std::vector<uint32_t>& getIndices(void) const;
|
||||
uint32_t getNoOfIndices(void) const;
|
||||
@ -67,7 +67,7 @@ namespace PolyVox
|
||||
void smoothPositions(float fAmount, bool bIncludeGeometryEdgeVertices = false);
|
||||
void sumNearbyNormals(bool bNormaliseResult = true);
|
||||
|
||||
POLYVOX_SHARED_PTR<IndexedSurfacePatch> extractSubset(std::set<uint8_t> setMaterials);
|
||||
POLYVOX_SHARED_PTR<SurfaceMesh> extractSubset(std::set<uint8_t> setMaterials);
|
||||
|
||||
void generateAveragedFaceNormals(bool bNormalise, bool bIncludeEdgeVertices = false);
|
||||
|
||||
@ -110,4 +110,4 @@ namespace PolyVox
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* __IndexedSurfacePatch_H__ */
|
||||
#endif /* __SurfaceMesh_H__ */
|
@ -46,7 +46,7 @@ namespace PolyVox
|
||||
/// by a three dimensional (x,y,z) coordinate, rather than the two dimensional (x,y)
|
||||
/// coordinate which is used to identify an element (pixel) in a normal image. Within
|
||||
/// PolyVox, the Volume class is used to store and manipulate our data before we extract
|
||||
/// our SurfacePatch's from it.
|
||||
/// our SurfaceMeshs from it.
|
||||
///
|
||||
/// <b>Data Representaion - feel free to skip</b>
|
||||
/// If stored carelessly, volume data can take up a huge amount of memory. For example, a
|
||||
|
Reference in New Issue
Block a user