Added support for default parameters.
This commit is contained in:
parent
67ec0d2db8
commit
0755961750
@ -87,8 +87,8 @@ int main(int argc, char *argv[])
|
|||||||
//Execute the surface extractor.
|
//Execute the surface extractor.
|
||||||
//surfaceExtractor.execute();
|
//surfaceExtractor.execute();
|
||||||
|
|
||||||
DefaultIsQuadNeeded< uint8_t > isQuadNeeded;
|
//DefaultIsQuadNeeded< uint8_t > isQuadNeeded;
|
||||||
mesh = extractCubicSurfaceWithNormals< SimpleVolume<uint8_t>, DefaultIsQuadNeeded< uint8_t > >(&volData, volData.getEnclosingRegion(), WrapModes::Border, 0, isQuadNeeded);
|
mesh = extractCubicSurfaceWithNormals< SimpleVolume<uint8_t> >(&volData, volData.getEnclosingRegion());
|
||||||
|
|
||||||
//Pass the surface to the OpenGL window
|
//Pass the surface to the OpenGL window
|
||||||
openGLWidget.setSurfaceMeshToRender(mesh);
|
openGLWidget.setSurfaceMeshToRender(mesh);
|
||||||
|
@ -72,6 +72,13 @@ namespace PolyVox
|
|||||||
extractor.execute();
|
extractor.execute();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename VolumeType>
|
||||||
|
SurfaceMesh<PositionMaterialNormal> extractCubicSurfaceWithNormals(VolumeType* volData, Region region, WrapMode eWrapMode = WrapModes::Border, typename VolumeType::VoxelType tBorderValue = VolumeType::VoxelType())
|
||||||
|
{
|
||||||
|
DefaultIsQuadNeeded<typename VolumeType::VoxelType> isQuadNeeded;
|
||||||
|
return extractCubicSurfaceWithNormals<VolumeType, DefaultIsQuadNeeded<typename VolumeType::VoxelType> >(volData, region, eWrapMode, tBorderValue, isQuadNeeded);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "PolyVoxCore/CubicSurfaceExtractorWithNormals.inl"
|
#include "PolyVoxCore/CubicSurfaceExtractorWithNormals.inl"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user