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:
David Williams
2010-10-17 21:13:46 +00:00
parent 56ec37f5e2
commit 9e1de4ba72
28 changed files with 460 additions and 176 deletions

View File

@ -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