Replaced 'm_region' with 'm_offset' and demonstrated its use.

This commit is contained in:
David Williams
2014-06-02 17:30:41 +02:00
parent 9fd52e3494
commit 31e5a6e346
5 changed files with 23 additions and 7 deletions

View File

@ -130,8 +130,9 @@ int main(int argc, char *argv[])
// The returned mesh needs to be decoded to be appropriate for GPU rendering.
auto decodedMesh = decode(mesh);
//Pass the surface to the OpenGL window
openGLWidget.addMesh(decodedMesh, Vector3DInt32(x, y, z));
// Pass the surface to the OpenGL window. Note that we are also passing an offset in this multi-mesh example. This is because
// the surface extractors return a mesh with 'local space' positions to reduce storage requirements and precision problems.
openGLWidget.addMesh(decodedMesh, decodedMesh.getOffset());
meshCounter++;
}