Vertices now know whether they are on the edge of an indexed surface patch. This allows improved smoothing.
This commit is contained in:
@ -53,7 +53,7 @@ namespace PolyVox
|
||||
void clear(void);
|
||||
const bool isEmpty(void) const;
|
||||
|
||||
void smoothPositions(float fAmount, uint8_t uNoRequiredUses = 0);
|
||||
void smoothPositions(float fAmount, bool bIncludeEdgeVertices = false);
|
||||
void sumNearbyNormals(bool bNormaliseResult = true);
|
||||
|
||||
POLYVOX_SHARED_PTR<IndexedSurfacePatch> extractSubset(std::set<uint8_t> setMaterials);
|
||||
|
@ -104,7 +104,7 @@ namespace PolyVox
|
||||
//The surface patch we are currently filling.
|
||||
IndexedSurfacePatch* m_ispCurrent;
|
||||
|
||||
//Information about the region we a re currently processing
|
||||
//Information about the region we are currently processing
|
||||
Region m_regInputCropped;
|
||||
Region m_regInputUncropped;
|
||||
Region m_regVolumeCropped;
|
||||
|
@ -37,7 +37,10 @@ namespace PolyVox
|
||||
float getMaterial(void) const;
|
||||
const Vector3DFloat& getNormal(void) const;
|
||||
const Vector3DFloat& getPosition(void) const;
|
||||
|
||||
bool isEdgeVertex(void) const;
|
||||
|
||||
void setEdgeVertex(bool isEdgeVertex);
|
||||
void setMaterial(float materialToSet);
|
||||
void setNormal(const Vector3DFloat& normalToSet);
|
||||
void setPosition(const Vector3DFloat& positionToSet);
|
||||
@ -46,6 +49,7 @@ namespace PolyVox
|
||||
Vector3DFloat position;
|
||||
Vector3DFloat normal;
|
||||
float material;
|
||||
bool m_bIsEdgeVertex;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user