Work on custom thresholds in SurfaceExtractionController.
This commit is contained in:
@ -109,6 +109,17 @@ namespace PolyVox
|
||||
typedef Type DensityType;
|
||||
typedef float MaterialType;
|
||||
|
||||
SurfaceExtractionController(void)
|
||||
{
|
||||
// Default to a threshold value halfway between the min and max possible values.
|
||||
m_tThreshold = (Density<Type>::getMinDensity() + Density<Type>::getMaxDensity()) / 2;
|
||||
}
|
||||
|
||||
SurfaceExtractionController(DensityType tThreshold)
|
||||
{
|
||||
m_tThreshold = tThreshold;
|
||||
}
|
||||
|
||||
DensityType convertToDensity(Density<Type> voxel)
|
||||
{
|
||||
return voxel.getDensity();
|
||||
@ -120,10 +131,12 @@ namespace PolyVox
|
||||
}
|
||||
|
||||
DensityType getThreshold(void)
|
||||
{
|
||||
// Returns a threshold value halfway between the min and max possible values.
|
||||
return (Density<Type>::getMinDensity() + Density<Type>::getMaxDensity()) / 2;
|
||||
{
|
||||
return m_tThreshold;
|
||||
}
|
||||
|
||||
private:
|
||||
DensityType m_tThreshold;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user