From 03f0f97c23d856007e18a978964e777f7d82b8d8 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Thu, 28 Apr 2011 18:33:43 +0000 Subject: [PATCH] octree box visualization --- libsrc/csg/vscsg.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/libsrc/csg/vscsg.cpp b/libsrc/csg/vscsg.cpp index 839452d3..a49f3a0d 100644 --- a/libsrc/csg/vscsg.cpp +++ b/libsrc/csg/vscsg.cpp @@ -358,10 +358,30 @@ namespace netgen glColor3d (1, 0, 0); glBegin (GL_LINES); + int edges[12][2] = + { { 0, 1 }, + { 2, 3 }, + { 4, 5 }, + { 6, 7 }, + { 0, 2 }, + { 1, 3 }, + { 4, 6 }, + { 5, 7 }, + { 0, 4 }, + { 1, 5 }, + { 2, 6 }, + { 3, 7 } }; for (int i = 0; i < boxes.Size(); i++) { + for (int j = 0; j < 12; j++) + { + glVertex3dv ( boxes[i].GetPointNr(edges[j][0]) ); + glVertex3dv ( boxes[i].GetPointNr(edges[j][1]) ); + } + /* glVertex3dv ( boxes[i].PMin() ); glVertex3dv ( boxes[i].PMax() ); + */ } glEnd(); @@ -465,7 +485,9 @@ namespace netgen } - + + + glPopMatrix();