Templatised SurfaceMesh class on vertex type.
Replaced 'SurfaceVertex' with PositionMaterial and PositionMaterialNormal classes. Different surface extractors can now work with different vertex types.
This commit is contained in:
@ -24,7 +24,7 @@ freely, subject to the following restrictions:
|
||||
#include "OpenGLWidget.h"
|
||||
|
||||
#include "MaterialDensityPair.h"
|
||||
#include "SurfaceExtractor.h"
|
||||
#include "CubicSurfaceExtractorWithNormals.h"
|
||||
#include "SurfaceMesh.h"
|
||||
#include "Volume.h"
|
||||
|
||||
@ -82,8 +82,8 @@ int main(int argc, char *argv[])
|
||||
createSphereInVolume(volData, 30);
|
||||
|
||||
//Extract the surface
|
||||
SurfaceMesh mesh;
|
||||
SurfaceExtractor<MaterialDensityPair44> surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh);
|
||||
SurfaceMesh<PositionMaterialNormal> mesh;
|
||||
CubicSurfaceExtractorWithNormals<MaterialDensityPair44> surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh);
|
||||
surfaceExtractor.execute();
|
||||
|
||||
//Pass the surface to the OpenGL window
|
||||
|
Reference in New Issue
Block a user