Work on IndexedSurfacePatch

This commit is contained in:
David Williams
2008-07-05 22:11:09 +00:00
parent 75d1136d96
commit 0d3a215637
8 changed files with 93 additions and 443 deletions

View File

@ -39,25 +39,22 @@ namespace PolyVox
IndexedSurfacePatch();
~IndexedSurfacePatch();
void addTriangle(const SurfaceVertex& v0,const SurfaceVertex& v1,const SurfaceVertex& v2);
void fillVertexAndIndexData(std::vector<SurfaceVertex>& vecVertices, std::vector<uint32>& vecIndices);
const std::vector<SurfaceVertex>& getVertices(void) const;
std::vector<SurfaceVertex>& getVertices(void); //FIXME - non const version should be removed.
const std::vector<uint32>& getIndices(void) const;
uint32 getNoOfIndices(void) const;
uint32 getNoOfNonUniformTrianges(void) const;
uint32 getNoOfUniformTrianges(void) const;
uint32 getNoOfVertices(void) const;
std::vector<SurfaceVertex>& getRawVertexData(void); //FIXME - this shoudl be removed
const std::vector<SurfaceVertex>& getVertices(void) const;
const uint32 getNoOfIndices(void) const;
const uint32 getNoOfVertices(void) const;
void addTriangle(uint32 index0, uint32 index1, uint32 index2);
uint32 addVertex(const SurfaceVertex& vertex);
void clear(void);
const bool isEmpty(void) const;
unsigned short getNoNonUniformTrianges(void);
unsigned short getNoUniformTrianges(void);
Vector3DInt32 m_v3dRegionPosition;
Vector3DInt32 m_v3dRegionPosition; //FIXME - remove this?
public:
private:
std::vector<uint32> m_vecTriangleIndices;
std::vector<SurfaceVertex> m_vecVertices;
};

View File

@ -39,10 +39,6 @@ namespace PolyVox
uint32 computeDecimatedBitmaskForSliceFromPrevious(BlockVolumeIterator<uint8>& volIter, uint8 uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8 *bitmask, uint8 *previousBitmask);
void generateDecimatedIndicesForSlice(BlockVolumeIterator<uint8>& volIter, uint8 uLevel, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8* bitmask0, uint8* bitmask1, int32 vertexIndicesX0[],int32 vertexIndicesY0[],int32 vertexIndicesZ0[], int32 vertexIndicesX1[],int32 vertexIndicesY1[],int32 vertexIndicesZ1[]);
void generateDecimatedVerticesForSlice(BlockVolumeIterator<uint8>& volIter, uint8 uLevel, Region& regSlice, const Vector3DFloat& offset, uint8* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32 vertexIndicesX[],int32 vertexIndicesY[],int32 vertexIndicesZ[]);
void generateDecimatedMeshDataForRegionSlow(BlockVolume<uint8>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch);
Vector3DFloat computeDecimatedNormal(BlockVolume<uint8>* volumeData, const Vector3DFloat& position, NormalGenerationMethod normalGenerationMethod);
}
#endif