[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view AbstractView.java,1.60,1.61
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-11-28 22:25:03
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1777/src/net/sourceforge/bprocessor/gl/view Modified Files: AbstractView.java Log Message: Catmull Clark subdivision Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** AbstractView.java 23 Nov 2005 19:04:38 -0000 1.60 --- AbstractView.java 28 Nov 2005 22:24:50 -0000 1.61 *************** *** 18,21 **** --- 18,22 ---- import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Domain; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Vertex; import net.sourceforge.bprocessor.model.Surface; *************** *** 718,721 **** --- 719,724 ---- gl.glDisable(GL.GL_CULL_FACE); + + drawSpaces(gld); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); gl.glDisable(GL.GL_LIGHTING); *************** *** 1108,1111 **** --- 1111,1136 ---- } } + + /** + * Draw the spaces by running the modellor + * @param gld The GLDrawable + */ + private void drawSpaces(GLDrawable gld) { + Set spaces = Project.getInstance().getDomains(); + Iterator spaceIter = spaces.iterator(); + while (spaceIter.hasNext()) { + Space space = (Space) spaceIter.next(); + if (space.getModellor() != null) { + List surfaces = space.getModellor().generate(); + if (surfaces != null) { + Iterator iter = surfaces.iterator(); + while (iter.hasNext()) { + Surface current = (Surface) iter.next(); + drawSurface(current); + } + } + } + } + } /** |