The CubicSurfaceExtractor now generates vertices of type PositionMaterialNormal rather than PositionMaterial. The normal property is just a dummy and is not filled in, though conceptually we could put something in there in the future (average normal of surrounding faces?)

The point of this change is to move towards having a single vertex class with known properties (including normal). This makes it simpler to write code which uses the vertices because we always know which properties are present. This will probably be useful when working with vertex buffer objects.
This commit is contained in:
David Williams
2014-05-05 20:53:47 +02:00
parent 2da902d5f9
commit 5dfa7e2562
7 changed files with 12 additions and 12 deletions

View File

@ -78,7 +78,7 @@ int main(int argc, char *argv[])
createSphereInVolume(volData, 30);
//A mesh object to hold the result of surface extraction
SurfaceMesh<PositionMaterial> mesh;
SurfaceMesh<PositionMaterialNormal> mesh;
//Create a surface extractor. Comment out one of the following two lines to decide which type gets created.
CubicSurfaceExtractor< SimpleVolume<uint8_t> > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh);