[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view Display.java, 1.109, 1.110
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2011-05-05 10:22:57
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory vz-cvs-2.sog:/tmp/cvs-serv28622/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Save corner property of vertex New splash screen Show the normal of selected surface Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** Display.java 6 Mar 2011 23:13:31 -0000 1.109 --- Display.java 5 May 2011 10:22:55 -0000 1.110 *************** *** 613,616 **** --- 613,627 ---- } + private static void drawNormal(Surface surface) { + Vertex n = surface.normal(); + Vertex c = surface.center(); + Line line = new Line(c, n); + Vertex from = line.getOrigin(); + double dist = camera.distance(from); + Vertex to = line.tip(dist); + drawVectorBase(from, to); + drawVectorTip(from, to); + } + private static void draw(Surface surface, boolean reverse) { if (surface.getEdges().size() == 4 && surface.getHoles().size() == 0) { *************** *** 1381,1384 **** --- 1392,1402 ---- } + private static void drawNormals(Collection<Geometric> geometrics) { + for (Geometric current : geometrics) { + if (current instanceof Surface) { + drawNormal((Surface) current); + } + } + } private static void hiliteSpaces(Collection<Geometric> geometrics) { enable(GL.GL_DEPTH_TEST); *************** *** 1398,1401 **** --- 1416,1420 ---- if (current instanceof Surface) { draw((Surface) current, false); + } } *************** *** 1539,1542 **** --- 1558,1562 ---- if (!selecting()) { hiliteSpaces(geometrics); + drawNormals(geometrics); disableClipplanes(); hiliteVertices(geometrics); |