bprocessor-commit Mailing List for B-processor (Page 83)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
| 2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
| 2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
| 2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
| 2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
| 2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
| 2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Nordholt <nor...@us...> - 2006-12-21 14:21:36
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8011/src/net/sourceforge/bprocessor/model Modified Files: Entity.java Log Message: added parameterblocks to entities Index: Entity.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Entity.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Entity.java 30 Nov 2006 22:03:46 -0000 1.11 --- Entity.java 21 Dec 2006 14:21:26 -0000 1.12 *************** *** 21,24 **** --- 21,43 ---- protected Long id; + /** Parameterblock for extra parameters */ + private ParameterBlock parameters = new ParameterBlock(); + + /** + * Getter for the parameterblock + * @return the current parameterblock + */ + public ParameterBlock getParameters() { + return parameters; + } + + /** + * setter for the parameterblock + * @param parameters the new parameterblock + */ + public void setParameters(ParameterBlock parameters) { + this.parameters = parameters; + } + /** * Find the maximum id of entities in the collection |
|
From: Michael L. <he...@us...> - 2006-12-21 13:33:11
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20436/src/net/sourceforge/bprocessor/model Modified Files: SurfaceAnalysis.java Log Message: Fixed bug in surface-analysis Index: SurfaceAnalysis.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceAnalysis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SurfaceAnalysis.java 19 Dec 2006 09:32:53 -0000 1.3 --- SurfaceAnalysis.java 21 Dec 2006 13:33:02 -0000 1.4 *************** *** 524,586 **** if (!edges.isEmpty()) { ! List left = new LinkedList(); ! List right = new LinkedList(); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! EdgeNode current = (EdgeNode) iter.next(); ! VertexNode other = current.other(this); ! Vertex delta = other.vertex.minus(vertex); ! double dx = system.getI().dot(delta); ! double dy = system.getJ().dot(delta); ! Entry entry = new Entry(current, dx, dy); ! if (dx == 0) { ! if (dy < 0) { ! right.add(entry); ! } ! if (dy > 0) { ! left.add(entry); ! } ! } else { ! if (dx > 0) { ! right.add(entry); ! } ! if (dx < 0) { ! left.add(entry); } } - } ! Object[] rights = right.toArray(); ! Arrays.sort(rights); ! Object[] lefts = left.toArray(); ! Arrays.sort(lefts); ! List result = new LinkedList(); ! for (int i = 0; i < rights.length; i++) { ! result.add(((Entry) rights[i]).node); ! } ! for (int i = 0; i < lefts.length; i++) { ! result.add(((Entry) lefts[i]).node); ! } ! edges = result; ! } ! { ! EdgeNode previous = (EdgeNode) edges.get(edges.size() - 1); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! EdgeNode current = (EdgeNode) iter.next(); ! if (previous.to == this) { ! previous.toSucc = current; ! } ! if (previous.from == this) { ! previous.fromSucc = current; } ! if (current.to == this) { ! current.toPred = previous; } ! if (current.from == this) { ! current.fromPred = previous; } - previous = current; } } --- 524,588 ---- if (!edges.isEmpty()) { ! { ! List left = new LinkedList(); ! List right = new LinkedList(); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! EdgeNode current = (EdgeNode) iter.next(); ! VertexNode other = current.other(this); ! Vertex delta = other.vertex.minus(vertex); ! double dx = system.getI().dot(delta); ! double dy = system.getJ().dot(delta); ! Entry entry = new Entry(current, dx, dy); ! if (dx == 0) { ! if (dy < 0) { ! right.add(entry); ! } ! if (dy > 0) { ! left.add(entry); ! } ! } else { ! if (dx > 0) { ! right.add(entry); ! } ! if (dx < 0) { ! left.add(entry); ! } } } ! Object[] rights = right.toArray(); ! Arrays.sort(rights); ! Object[] lefts = left.toArray(); ! Arrays.sort(lefts); ! List result = new LinkedList(); ! for (int i = 0; i < rights.length; i++) { ! result.add(((Entry) rights[i]).node); } ! for (int i = 0; i < lefts.length; i++) { ! result.add(((Entry) lefts[i]).node); } ! edges = result; ! } ! { ! EdgeNode previous = (EdgeNode) edges.get(edges.size() - 1); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! EdgeNode current = (EdgeNode) iter.next(); ! if (previous.to == this) { ! previous.toSucc = current; ! } ! if (previous.from == this) { ! previous.fromSucc = current; ! } ! if (current.to == this) { ! current.toPred = previous; ! } ! if (current.from == this) { ! current.fromPred = previous; ! } ! previous = current; } } } |
|
From: Michael L. <he...@us...> - 2006-12-20 08:58:57
|
Update of /cvsroot/bprocessor/bprocessor/.settings In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv423/.settings Modified Files: org.eclipse.core.resources.prefs Log Message: Changed build in test to copy the .txt files from bprocessor Index: org.eclipse.core.resources.prefs =================================================================== RCS file: /cvsroot/bprocessor/bprocessor/.settings/org.eclipse.core.resources.prefs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** org.eclipse.core.resources.prefs 17 Nov 2006 14:28:06 -0000 1.1 --- org.eclipse.core.resources.prefs 20 Dec 2006 08:58:56 -0000 1.2 *************** *** 1,4 **** ! #Fri Nov 17 15:24:21 CET 2006 eclipse.preferences.version=1 encoding/constructions.txt=ISO-8859-1 encoding/functionals.txt=ISO-8859-1 --- 1,6 ---- ! #Wed Dec 20 09:43:20 CET 2006 eclipse.preferences.version=1 + encoding/construction2.txt=ISO-8859-1 encoding/constructions.txt=ISO-8859-1 encoding/functionals.txt=ISO-8859-1 + encoding/typer.txt=ISO-8859-1 |
|
From: Michael L. <he...@us...> - 2006-12-20 08:58:55
|
Update of /cvsroot/bprocessor/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv413 Modified Files: build.xml .cvsignore Removed Files: constructions.txt construction2.txt functionals.txt typer.txt Log Message: Changed build in test to copy the .txt files from bprocessor Index: .cvsignore =================================================================== RCS file: /cvsroot/bprocessor/test/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 5 Dec 2006 20:42:01 -0000 1.1 --- .cvsignore 20 Dec 2006 08:58:52 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- dist build + *.txt Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/test/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 4 Dec 2006 14:45:53 -0000 1.1 --- build.xml 20 Dec 2006 08:58:52 -0000 1.2 *************** *** 10,13 **** --- 10,14 ---- <property name="tools.dir" value="${basedir}/../tools"/> <property name="gui.dir" value="${basedir}/../gui"/> + <property name="bproc.dir" value="${basedir}/../bprocessor"/> <property name="build.dir" value="${basedir}/build"/> *************** *** 18,22 **** <property name="lib.dir" value="${basedir}/lib"/> <property name="dist.dir" value="${basedir}/dist"/> ! <property name="checkstyle-results" value="${build.dir}/checkstyle-results.txt" /> --- 19,23 ---- <property name="lib.dir" value="${basedir}/lib"/> <property name="dist.dir" value="${basedir}/dist"/> ! <property name="checkstyle-results" value="${build.dir}/checkstyle-results.txt" /> *************** *** 37,40 **** --- 38,42 ---- <fileset dir="${basedir}" defaultexcludes="no"> <include name="**/*~"/> + <include name="*.txt"/> </fileset> </delete> *************** *** 86,89 **** --- 88,96 ---- </fileset> </copy> + <copy todir="${basedir}"> + <fileset dir="${bproc.dir}"> + <include name="*.txt"/> + </fileset> + </copy> </target> --- construction2.txt DELETED --- --- typer.txt DELETED --- --- functionals.txt DELETED --- --- constructions.txt DELETED --- |
|
From: Nikolaj B. <nbr...@us...> - 2006-12-19 13:20:33
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27118/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: now uses the correct file with types for constructions Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** Project.java 18 Dec 2006 12:11:14 -0000 1.102 --- Project.java 19 Dec 2006 13:20:32 -0000 1.103 *************** *** 797,801 **** if (construction) { bf = new BufferedReader ! (new InputStreamReader(new FileInputStream("constructions.txt"), "ISO-8859-1")); clas = new Classification(0); parent = new Classification(0); --- 797,801 ---- if (construction) { bf = new BufferedReader ! (new InputStreamReader(new FileInputStream("construction2.txt"), "ISO-8859-1")); clas = new Classification(0); parent = new Classification(0); |
|
From: Nikolaj B. <nbr...@us...> - 2006-12-19 13:16:57
|
Update of /cvsroot/bprocessor/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25485 Added Files: typer.txt Log Message: produkt types --- NEW FILE: typer.txt --- (This appears to be a binary file; contents omitted.) |
|
From: Nikolaj B. <nbr...@us...> - 2006-12-19 13:16:40
|
Update of /cvsroot/bprocessor/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25468 Added Files: construction2.txt Log Message: Constructions with types included --- NEW FILE: construction2.txt --- (This appears to be a binary file; contents omitted.) |
|
From: Nikolaj B. <nbr...@us...> - 2006-12-19 13:16:16
|
Update of /cvsroot/bprocessor/bprocessor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25242 Added Files: construction2.txt Log Message: Constructions with types included --- NEW FILE: construction2.txt --- (This appears to be a binary file; contents omitted.) |
|
From: Michael L. <he...@us...> - 2006-12-19 11:22:59
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9743/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Started work on new mechanism for space-drawing Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** View.java 18 Dec 2006 14:48:04 -0000 1.167 --- View.java 19 Dec 2006 11:22:49 -0000 1.168 *************** *** 107,110 **** --- 107,113 ---- /** the std line color*/ public static final float[] STD_LINE_COLOR = new float[] {0.1f, 0.1f, 0.1f}; + + /** the std line color*/ + public static final float[] GREY_LINE_COLOR = new float[] {0.7f, 0.7f, 0.7f}; /** Used for the actual drawing line */ *************** *** 357,360 **** --- 360,366 ---- private int maxClippingPlanes; + /** */ + private static final boolean DRAW_ALL = true; + static { setTransparency(100); *************** *** 892,900 **** Collection selection = Selection.primary(); gl.glEnable(GL.GL_DEPTH_TEST); - // draw selection gl.glColor3fv(SELECTED_COLOR, 0); invisibles = new HashSet(); highligts = new HashSet(); - { Iterator iter = selection.iterator(); --- 898,904 ---- *************** *** 926,931 **** } ! Space active = Project.getInstance().getActiveSpace(); ! drawSpace(active, gld); //Draw edges --- 930,940 ---- } ! if (DRAW_ALL) { ! drawSpace(Project.getInstance().world(), gld, true); ! } else { ! Space active = Project.getInstance().getActiveSpace(); ! drawSpace(active, gld, false); ! Object o; ! } //Draw edges *************** *** 1096,1101 **** * @param gld GLDrawable * @param space The Space */ ! private void drawSpace(Space space, GLAutoDrawable gld) { gl.glPushMatrix(); transform(space.getTransformations()); --- 1105,1114 ---- * @param gld GLDrawable * @param space The Space + * @param dodge dodge the colors */ ! private void drawSpace(Space space, GLAutoDrawable gld, boolean dodge) { ! if (space == Project.getInstance().getActiveSpace()) { ! dodge = false; ! } gl.glPushMatrix(); transform(space.getTransformations()); *************** *** 1109,1118 **** gl.glCullFace(GL.GL_BACK); ! gl.glColor3fv(Defaults.getFrontColor(), 0); ! drawSurfaces(gld, surfaces, FRONT); gl.glCullFace(GL.GL_FRONT); ! gl.glColor3fv(Defaults.getBackColor(), 0); ! drawSurfaces(gld, surfaces, BACK); gl.glDisable(GL.GL_CULL_FACE); --- 1122,1129 ---- gl.glCullFace(GL.GL_BACK); ! drawSurfaces(gld, surfaces, FRONT, dodge); gl.glCullFace(GL.GL_FRONT); ! drawSurfaces(gld, surfaces, BACK, dodge); gl.glDisable(GL.GL_CULL_FACE); *************** *** 1129,1133 **** gl.glPolygonOffset(1.0f, 1.0f); gl.glColor3fv(SURFACE_COLOR, 0); ! drawSurfaces(gld, surfaces, BOTH); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); break; --- 1140,1144 ---- gl.glPolygonOffset(1.0f, 1.0f); gl.glColor3fv(SURFACE_COLOR, 0); ! drawSurfaces(gld, surfaces, BOTH, dodge); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); break; *************** *** 1135,1139 **** } if (doDrawEdges) { ! drawGeneralEdges(gld, space.getEdges()); } Collection elements = space.getElements(); --- 1146,1150 ---- } if (doDrawEdges) { ! drawGeneralEdges(gld, space.getEdges(), dodge); } Collection elements = space.getElements(); *************** *** 1141,1145 **** while (iter.hasNext()) { Space current = (Space) iter.next(); ! drawSpace(current, gld); } gl.glPopMatrix(); --- 1152,1156 ---- while (iter.hasNext()) { Space current = (Space) iter.next(); ! drawSpace(current, gld, dodge); } gl.glPopMatrix(); *************** *** 1211,1220 **** private void drawEdges(GLAutoDrawable gld) { disableClipplanes(); ! drawGeneralEdges(gld, tempEdges); enableClipplanes(); ! Space active = Project.getInstance().getActiveSpace(); ! if (active != Project.getInstance().world()) { ! Collection edges = collectSupportingEdges(active); ! drawConstructionEdges(gld, edges); } } --- 1222,1234 ---- private void drawEdges(GLAutoDrawable gld) { disableClipplanes(); ! drawGeneralEdges(gld, tempEdges, false); enableClipplanes(); ! ! if (!DRAW_ALL) { ! Space active = Project.getInstance().getActiveSpace(); ! if (active != Project.getInstance().world()) { ! Collection edges = collectSupportingEdges(active); ! drawConstructionEdges(gld, edges); ! } } } *************** *** 1539,1544 **** * @param gld The GLDrawable * @param edges The edges */ ! public void drawGeneralEdges(GLAutoDrawable gld, Collection edges) { gl.glLineWidth(1.0f); gl.glColor3fv(lineColor, 0); --- 1553,1559 ---- * @param gld The GLDrawable * @param edges The edges + * @param dodge dodge colors */ ! public void drawGeneralEdges(GLAutoDrawable gld, Collection edges, boolean dodge) { gl.glLineWidth(1.0f); gl.glColor3fv(lineColor, 0); *************** *** 1561,1566 **** --- 1576,1587 ---- gl.glColor3fv(lineColor, 0); } else { + if (dodge) { + gl.glColor3fv(GREY_LINE_COLOR, 0); + } drawEdge(current); } + if (dodge) { + gl.glColor3fv(lineColor, 0); + } } } *************** *** 1582,1595 **** } - - /** - * @param gld The GLDrawable - * @param space The space - * @param side The side - */ - public void drawSpaceSurfaces(GLAutoDrawable gld, Space space, int side) { - drawSurfaces(gld, space.getSurfaces(), side); - } - /** * --- 1603,1606 ---- *************** *** 1606,1617 **** * @param surfaces The surfaces to draw * @param side The side of the Surface to draw */ ! private void drawSurfaces(GLAutoDrawable gld, Collection surfaces, int side) { GL gl = gld.getGL(); Iterator it = surfaces.iterator(); while (it.hasNext()) { Surface s = (Surface)it.next(); ! if (!hide(s)) { boolean visible = isVisible(s); if (side == BOTH) { if (visible) { --- 1617,1630 ---- * @param surfaces The surfaces to draw * @param side The side of the Surface to draw + * @param dodge dodge colors */ ! private void drawSurfaces(GLAutoDrawable gld, Collection surfaces, int side, boolean dodge) { GL gl = gld.getGL(); Iterator it = surfaces.iterator(); while (it.hasNext()) { Surface s = (Surface)it.next(); ! if (!hide(s) && !dodge) { boolean visible = isVisible(s); + if (side == BOTH) { if (visible) { |
|
From: Michael L. <he...@us...> - 2006-12-19 11:22:54
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9743/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: Started work on new mechanism for space-drawing Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** GLView.java 19 Dec 2006 10:34:47 -0000 1.45 --- GLView.java 19 Dec 2006 11:22:50 -0000 1.46 *************** *** 23,27 **** import java.awt.event.ActionListener; - import javax.media.opengl.GL; import javax.media.opengl.GLCanvas; import javax.media.opengl.GLCapabilities; --- 23,26 ---- |
|
From: Michael L. <he...@us...> - 2006-12-19 10:34:48
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21914/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: Fixed bus error in GLView constructor Ð attempted to print some version string from the OpenGL driver before connecting to the driver Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** GLView.java 18 Dec 2006 14:48:04 -0000 1.44 --- GLView.java 19 Dec 2006 10:34:47 -0000 1.45 *************** *** 29,32 **** --- 29,33 ---- import javax.media.opengl.GLException; + import javax.swing.JTextField; import javax.swing.JPanel; *************** *** 63,67 **** GLCapabilities glCap = new GLCapabilities(); glc = new GLCanvas(glCap); ! log.info("Using JOGL version " + glc.getGL().glGetString(GL.GL_VERSION)); Selection.primary().addObserver(this); Project.getInstance().addObserver(this); --- 64,68 ---- GLCapabilities glCap = new GLCapabilities(); glc = new GLCanvas(glCap); ! log.info("Using JOGL version official"); Selection.primary().addObserver(this); Project.getInstance().addObserver(this); |
|
From: Michael L. <he...@us...> - 2006-12-19 09:33:04
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28757/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Edge and Surface attributes Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** GUI.java 5 Dec 2006 09:05:57 -0000 1.55 --- GUI.java 19 Dec 2006 09:32:56 -0000 1.56 *************** *** 111,115 **** instance = this; Thread sc = new SpaceChecker(); ! sc.start(); } --- 111,115 ---- instance = this; Thread sc = new SpaceChecker(); ! //sc.start(); } |
|
From: Michael L. <he...@us...> - 2006-12-19 09:33:02
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28769/src/net/sourceforge/bprocessor/gl/view Added Files: EdgeAttributes.java SurfaceAttributes.java Log Message: Edge and Surface attributes --- NEW FILE: EdgeAttributes.java --- //--------------------------------------------------------------------------------- // $Id: EdgeAttributes.java,v 1.1 2006/12/19 09:33:00 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gl.view; /** * */ public class EdgeAttributes { private float[] color; private boolean visible; private float width; } --- NEW FILE: SurfaceAttributes.java --- //--------------------------------------------------------------------------------- // $Id: SurfaceAttributes.java,v 1.1 2006/12/19 09:33:00 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gl.view; /** * */ public class SurfaceAttributes { /** */ public static final int NORMAL = 1; /** */ public static final int NEUTRAL = 2; /** */ public static final int ALPHA = 3; private float[] frontColor; private float[] backColor; private float[] neutralColor; private float alpha; private int mode; } |
|
From: Michael L. <he...@us...> - 2006-12-19 09:33:01
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28733/src/net/sourceforge/bprocessor/model Modified Files: SurfaceAnalysis.java Log Message: Edge and Surface attributes Index: SurfaceAnalysis.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceAnalysis.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SurfaceAnalysis.java 12 Dec 2006 10:09:32 -0000 1.2 --- SurfaceAnalysis.java 19 Dec 2006 09:32:53 -0000 1.3 *************** *** 311,316 **** if (emap.containsKey(current)) { EdgeNode node = (EdgeNode) emap.get(current); ! node.left = null; ! node.right = null; } } --- 311,316 ---- if (emap.containsKey(current)) { EdgeNode node = (EdgeNode) emap.get(current); ! // node.left = null; ! // node.right = null; } } *************** *** 522,526 **** } } ! { List left = new LinkedList(); List right = new LinkedList(); --- 522,527 ---- } } ! ! if (!edges.isEmpty()) { List left = new LinkedList(); List right = new LinkedList(); |
|
From: Nordholt <nor...@us...> - 2006-12-18 18:20:31
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24184/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: Using the new offset methods to get nice even widths on facades frame. Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NetFacadeModellor.java 5 Dec 2006 15:28:05 -0000 1.5 --- NetFacadeModellor.java 18 Dec 2006 18:20:19 -0000 1.6 *************** *** 249,254 **** Surface field = (Surface)fields.next(); Surface fcopy = field.copyall(space); ! Surface h = new Surface(Edge.offset(fcopy.getEdges(), fcopy, -frameWidth)); ! h = space.insert(h); Geometry.holeAnalysis(h); assignSame(front, fcopy, space, frame); --- 249,260 ---- Surface field = (Surface)fields.next(); Surface fcopy = field.copyall(space); ! Iterator fEdges = fcopy.getEdges().iterator(); ! Map offsetMap = new HashMap(); ! while (fEdges.hasNext()) { ! Edge e = (Edge)fEdges.next(); ! offsetMap.put(e, Double.valueOf(-frameWidth)); ! } ! Surface h = new Surface(Edge.placeOffset(fcopy.getEdges(), fcopy, offsetMap)); ! h = space.insert(h); Geometry.holeAnalysis(h); assignSame(front, fcopy, space, frame); *************** *** 273,279 **** if (net != null) { List outlineCopies = new LinkedList(); ! Iterator outline = netOutline(net).iterator(); ! while (outline.hasNext()) { ! outlineCopies.add(((Edge)outline.next()).copy()); } if (!outlineCopies.isEmpty()) { --- 279,286 ---- if (net != null) { List outlineCopies = new LinkedList(); ! List outline = netOutline(net); ! Iterator it = outline.iterator(); ! while (it.hasNext()) { ! outlineCopies.add(((Edge)it.next()).copy()); } if (!outlineCopies.isEmpty()) { *************** *** 284,294 **** Set sides1 = new HashSet(); extrudeIntoSpace(frameSurface, depth, sides1); ! /* Put holes int the shell */ Iterator fields = net.getSurfaces().iterator(); while (fields.hasNext()) { Surface field = (Surface)fields.next(); ! Surface fcopy = field.copyall(space); ! fcopy.delete(); ! Surface hole = new Surface(Edge.offset(fcopy.getEdges(), fcopy, -frameWidth)); hole = space.insert(hole); Geometry.holeAnalysis(hole); --- 291,309 ---- Set sides1 = new HashSet(); extrudeIntoSpace(frameSurface, depth, sides1); ! /* Put holes into the shell */ Iterator fields = net.getSurfaces().iterator(); while (fields.hasNext()) { Surface field = (Surface)fields.next(); ! Map offsetMap = new HashMap(); ! Iterator fieldEdges = field.getEdges().iterator(); ! while (fieldEdges.hasNext()) { ! Edge e = (Edge)fieldEdges.next(); ! if (outline.contains(e)) { ! offsetMap.put(e, Double.valueOf(-frameWidth)); ! } else { ! offsetMap.put(e, Double.valueOf(-frameWidth / 2)); ! } ! } ! Surface hole = new Surface(Edge.placeOffset(field.getEdges(), field, offsetMap)); hole = space.insert(hole); Geometry.holeAnalysis(hole); |
|
From: Nordholt <nor...@us...> - 2006-12-18 18:17:54
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22721/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Log Message: New methods for offsetting. One simply get the directions the vertices should move, and one to do a copy of the edges and place them. Both support variable offsets for each edge. Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** Edge.java 16 Nov 2006 14:25:42 -0000 1.66 --- Edge.java 18 Dec 2006 18:17:39 -0000 1.67 *************** *** 14,17 **** --- 14,19 ---- import java.util.HashSet; import java.util.Iterator; + import java.util.LinkedHashMap; + import java.util.LinkedList; import java.util.List; import java.util.Map; *************** *** 628,631 **** --- 630,791 ---- /** + * Makes a map from a vertex to the direction the vertex should move + * in order to make an offset. The edges must all belong to + * the same surface. + * @param which the edges to offset + * @param inner the surface the edges belong to + * @param offset the amount to offset + * @return an offset-direction map for each vertex + */ + public static Map offsetDirections(List which, Surface inner, double offset) { + Map offsets = new HashMap(); + Iterator it = which.iterator(); + while (it.hasNext()) { + offsets.put(it.next(), Double.valueOf(offset)); + } + return offsetDirections(which, inner, offsets); + } + + /** + * Makes a map from a vertex to the direction the vertex should move + * in order to make an offset. The amount each edge should be offset is given in + * an offset map, from an edge to a double value. The edges must all belong to + * the same surface. + * @param which the edges to offset + * @param inner the surface the edges belong to + * @param offsetMap map from edges to its offset + * @return an offset-direction map for each vertex + */ + public static Map offsetDirections(List which, Surface inner, Map offsetMap) { + Map v2Dir = new HashMap(); + Edge e1 = null; + Edge e2 = null; + Edge first = null; + Vertex work; + boolean done = false; + Iterator edges2 = inner.getEdges().iterator(); + if (edges2.hasNext()) { + first = (Edge)edges2.next(); + e1 = first; + } + if (edges2.hasNext()) { + e2 = (Edge)edges2.next(); + } else { + done = true; + } + Vertex normal = inner.normal(); + while (!done) { + work = commonVertex(e1, e2); + if (which.contains(e1) || which.contains(e2)) { + Vertex dir1 = work.minus(e1.otherVertex(work)); + Vertex dir2 = e2.otherVertex(work).minus(work); + Vertex org1 = new Vertex(0, 0, 0); + Vertex org2 = new Vertex(0, 0, 0);; + if (which.contains(e1)) { + org1 = dir1.cross(normal); + org1.normalize(); + org1.scale(((Double)offsetMap.get(e1)).doubleValue()); + } + if (which.contains(e2)) { + org2 = dir2.cross(normal); + org2.normalize(); + org2.scale(((Double)offsetMap.get(e2)).doubleValue()); + } + org1 = org1.add(work); + org2 = org2.add(work); + + Line l1 = new Line(org1, dir1); + Line l2 = new Line(org2, dir2); + Vertex mainDir = work.minus(l1.intersection(l2)); + v2Dir.put(work, mainDir); + + e1 = e2; + if (edges2.hasNext()) { + e2 = (Edge)edges2.next(); + } else if (e2 != first) { + e2 = first; + } else { + done = true; + } + } + } + return v2Dir; + } + /** + * Makes a copy of a list of edges and places it at a specified offset. + * The offset for each edge is given in the offset map. + * @param which the edges to offset + * @param inner the surface the edges belong to + * @param offsetMap map from edges to its offset + * @return a list of the constructed edges. + */ + public static List placeOffset(List which, Surface inner, Map offsetMap) { + Map v2v = new HashMap(); + Map e2e = new LinkedHashMap(); + Iterator it = which.iterator(); + while (it.hasNext()) { + Edge e = (Edge)it.next(); + Vertex from = e.getFrom(); + Vertex to = e.getTo(); + if (v2v.get(from) == null) { + v2v.put(from, from.copy()); + } + if (v2v.get(to) == null) { + v2v.put(to, to.copy()); + } + e2e.put(e, new Edge((Vertex)v2v.get(from), (Vertex)v2v.get(to))); + } + Map directions = offsetDirections(which, inner, offsetMap); + Edge e1 = null; + Edge e2 = null; + Edge first = null; + Vertex work; + boolean done = false; + Iterator edges2 = inner.getEdges().iterator(); + if (edges2.hasNext()) { + first = (Edge)edges2.next(); + e1 = first; + } + if (edges2.hasNext()) { + e2 = (Edge)edges2.next(); + } else { + done = true; + } + Vertex normal = inner.normal(); + while (!done) { + work = commonVertex(e1, e2); + if (which.contains(e1)) { + Vertex dir1 = work.minus(e1.otherVertex(work)); + dir1 = dir1.cross(normal); + dir1.normalize(); + Vertex workDir = (Vertex)directions.get(work); + workDir.normalize(); + workDir.scale(((Double)offsetMap.get(e1)).doubleValue() / + workDir.dot(dir1)); + ((Vertex)v2v.get(work)).move(workDir.getX(), workDir.getY(), workDir.getZ()); + } else if (which.contains(e2)) { + Vertex dir2 = e2.otherVertex(work).minus(work); + dir2 = dir2.cross(normal); + dir2.normalize(); + Vertex workDir = (Vertex)directions.get(work); + workDir.normalize(); + workDir.scale(((Double)offsetMap.get(e2)).doubleValue() / + workDir.dot(dir2)); + ((Vertex)v2v.get(work)).move(workDir.getX(), workDir.getY(), workDir.getZ()); + } + e1 = e2; + if (edges2.hasNext()) { + e2 = (Edge)edges2.next(); + } else if (e2 != first) { + e2 = first; + } else { + done = true; + } + } + return new LinkedList(e2e.values()); + } + + + /** * Create a offset from a list of lines and a surface * PRECONDITION: all the edges have to be in the given surface and the edges *************** *** 640,644 **** return offset(which, inner, offset, null); } ! /** * Create a offset from a list of lines and a surface --- 800,804 ---- return offset(which, inner, offset, null); } ! /** * Create a offset from a list of lines and a surface *************** *** 651,654 **** --- 811,832 ---- */ public static List offset(List which, Surface inner, double offset, Map directions) { + Map offsetMap = new HashMap(); + Iterator it = which.iterator(); + while (it.hasNext()) { + offsetMap.put(it.next(), Double.valueOf(offset)); + } + return offset(which, inner, offsetMap, directions); + } + + /** + * Create a offset from a list of lines and a surface + * PRECONDITION: all the edges have to be in the given surface. + * @param which The list of edges in inner that are going to be offset + * @param inner The surface + * @param offsetMap mapping each edge to the amount it should be offset + * @param directions The movement directions send a empty list to retrieve direction map + * @return The generated list of Edges + */ + public static List offset(List which, Surface inner, Map offsetMap, Map directions) { HashSet edges = new HashSet(which); ArrayList res = new ArrayList(); *************** *** 661,665 **** Edge prevEdge = null; Edge firstEdge = null; ! // Find all the affected vertices and make the edges Iterator iter = inner.getEdges().iterator(); while (iter.hasNext()) { --- 839,843 ---- Edge prevEdge = null; Edge firstEdge = null; ! // Find all the affected vertices and make the new edges Iterator iter = inner.getEdges().iterator(); while (iter.hasNext()) { *************** *** 746,750 **** dir.scale(-1); dir = dir.copy(); ! dir.scale(offset); cur.getVertex().move(dir.getX(), dir.getY(), dir.getZ()); } --- 924,928 ---- dir.scale(-1); dir = dir.copy(); ! dir.scale(((Double)offsetMap.values().iterator().next()).doubleValue()); cur.getVertex().move(dir.getX(), dir.getY(), dir.getZ()); } |
|
From: rimestad <rim...@us...> - 2006-12-18 14:49:49
|
Update of /cvsroot/bprocessor/tools/jogl/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2434/jogl/win32 Modified Files: jogl_cg.dll jogl.dll Added Files: jogl_awt.dll Log Message: Changed implementation to JOGL 1.0.0 with lots of new binary files in tools/jogl still need to add support for Sparc!!!!! Made changes to GLView and GLObject and View to support the new jogl and fixed rotation tool to work better (fix was to use isNaN on a double object not double != Double.NaN) --- NEW FILE: jogl_awt.dll --- (This appears to be a binary file; contents omitted.) Index: jogl_cg.dll =================================================================== RCS file: /cvsroot/bprocessor/tools/jogl/win32/jogl_cg.dll,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs9m7dEq and /tmp/cvsSnIt02 differ Index: jogl.dll =================================================================== RCS file: /cvsroot/bprocessor/tools/jogl/win32/jogl.dll,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsMABO3w and /tmp/cvsGYEdH9 differ |
|
From: rimestad <rim...@us...> - 2006-12-18 14:49:49
|
Update of /cvsroot/bprocessor/tools/jogl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2434/jogl Modified Files: jogl.jar Log Message: Changed implementation to JOGL 1.0.0 with lots of new binary files in tools/jogl still need to add support for Sparc!!!!! Made changes to GLView and GLObject and View to support the new jogl and fixed rotation tool to work better (fix was to use isNaN on a double object not double != Double.NaN) Index: jogl.jar =================================================================== RCS file: /cvsroot/bprocessor/tools/jogl/jogl.jar,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvs2lVHwY and /tmp/cvs6ddswA differ |
|
From: rimestad <rim...@us...> - 2006-12-18 14:49:49
|
Update of /cvsroot/bprocessor/tools/jogl/macosx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2434/jogl/macosx Modified Files: libjogl.jnilib libjogl_cg.jnilib Added Files: libjogl_awt.jnilib Log Message: Changed implementation to JOGL 1.0.0 with lots of new binary files in tools/jogl still need to add support for Sparc!!!!! Made changes to GLView and GLObject and View to support the new jogl and fixed rotation tool to work better (fix was to use isNaN on a double object not double != Double.NaN) Index: libjogl.jnilib =================================================================== RCS file: /cvsroot/bprocessor/tools/jogl/macosx/libjogl.jnilib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsV8b4PN and /tmp/cvsvpyshr differ --- NEW FILE: libjogl_awt.jnilib --- (This appears to be a binary file; contents omitted.) Index: libjogl_cg.jnilib =================================================================== RCS file: /cvsroot/bprocessor/tools/jogl/macosx/libjogl_cg.jnilib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsNlOKP3 and /tmp/cvsJmlKrH differ |
|
From: rimestad <rim...@us...> - 2006-12-18 14:49:49
|
Update of /cvsroot/bprocessor/tools/jogl/linux In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2434/jogl/linux Modified Files: libjogl.so libjogl_cg.so Added Files: libjogl_awt.so libjogl_drihack.so Log Message: Changed implementation to JOGL 1.0.0 with lots of new binary files in tools/jogl still need to add support for Sparc!!!!! Made changes to GLView and GLObject and View to support the new jogl and fixed rotation tool to work better (fix was to use isNaN on a double object not double != Double.NaN) Index: libjogl.so =================================================================== RCS file: /cvsroot/bprocessor/tools/jogl/linux/libjogl.so,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsu2E0BY and /tmp/cvsMXTxCA differ Index: libjogl_cg.so =================================================================== RCS file: /cvsroot/bprocessor/tools/jogl/linux/libjogl_cg.so,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsi15NKl and /tmp/cvs2bbA0X differ --- NEW FILE: libjogl_awt.so --- (This appears to be a binary file; contents omitted.) --- NEW FILE: libjogl_drihack.so --- (This appears to be a binary file; contents omitted.) |
|
From: rimestad <rim...@us...> - 2006-12-18 14:48:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2048/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Transformation.java Log Message: Changed implementation to JOGL 1.0.0 with lots of new binary files in tools/jogl still need to add support for Sparc!!!!! Made changes to GLView and GLObject and View to support the new jogl and fixed rotation tool to work better (fix was to use isNaN on a double object not double != Double.NaN) Index: Transformation.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Transformation.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Transformation.java 19 Dec 2005 07:51:30 -0000 1.6 --- Transformation.java 18 Dec 2006 14:48:04 -0000 1.7 *************** *** 12,17 **** import java.util.List; - import net.java.games.jogl.GLU; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Surface; --- 12,18 ---- import java.util.List; + import javax.media.opengl.glu.GLU; + import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Surface; *************** *** 110,114 **** double z = vertex.getZ(); double[] view = new double[3]; ! boolean success = glu.gluProject(x, y, z, modelview, projection, viewport, view); if (!success) { log.error("error projecting"); --- 111,116 ---- double z = vertex.getZ(); double[] view = new double[3]; ! boolean success = ! glu.gluProject(x, y, z, modelview, 0, projection, 0, viewport, 0, view, 0); if (!success) { log.error("error projecting"); *************** *** 163,167 **** double z = vertex.getZ(); double[] view = new double[3]; ! boolean success = glu.gluUnProject(x, y, z, modelview, projection, viewport, view); if (!success) { log.error("error un-projecting"); --- 165,170 ---- double z = vertex.getZ(); double[] view = new double[3]; ! boolean success = ! glu.gluUnProject(x, y, z, modelview, 0, projection, 0, viewport, 0, view, 0); if (!success) { log.error("error un-projecting"); Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** View.java 13 Dec 2006 17:42:10 -0000 1.166 --- View.java 18 Dec 2006 14:48:04 -0000 1.167 *************** *** 52,55 **** --- 52,64 ---- import java.nio.IntBuffer; + import javax.media.opengl.DebugGL; + import javax.media.opengl.GL; + import javax.media.opengl.GLAutoDrawable; + import javax.media.opengl.GLEventListener; + import javax.media.opengl.glu.GLU; + import javax.media.opengl.glu.GLUquadric; + import javax.media.opengl.glu.GLUtessellator; + import javax.media.opengl.glu.GLUtessellatorCallback; + import javax.media.opengl.glu.GLUtessellatorCallbackAdapter; import javax.swing.AbstractAction; import javax.swing.Action; *************** *** 58,73 **** import javax.swing.ButtonGroup; - import net.java.games.jogl.GL; - import net.java.games.jogl.GLDrawable; - import net.java.games.jogl.GLU; - import net.java.games.jogl.GLUquadric; - import net.java.games.jogl.util.BufferUtils; - import net.java.games.jogl.util.GLUT; - import net.java.games.jogl.GLUtesselatorCallbackAdapter; - import net.java.games.jogl.GLUtesselatorCallback; - import net.java.games.jogl.GLUtesselator; - import net.java.games.jogl.GLEventListener; - import org.apache.log4j.Logger; /** * The 3D view listener --- 67,74 ---- import javax.swing.ButtonGroup; import org.apache.log4j.Logger; + + import com.sun.opengl.util.BufferUtil; + import com.sun.opengl.util.GLUT; /** * The 3D view listener *************** *** 502,518 **** * @param gld The GLDrawable object */ ! public void init(GLDrawable gld) { if (log.isDebugEnabled()) { log.debug("[init]"); } gl = gld.getGL(); ! glu = gld.getGLU(); int[] maxplanes = new int[1]; ! gl.glGetIntegerv(GL.GL_MAX_CLIP_PLANES, maxplanes); maxClippingPlanes = maxplanes[0]; ! View.width = gld.getSize().getWidth(); ! View.height = gld.getSize().getHeight(); View.aspect = View.width / View.height; --- 503,521 ---- * @param gld The GLDrawable object */ ! public void init(GLAutoDrawable gld) { if (log.isDebugEnabled()) { log.debug("[init]"); } gl = gld.getGL(); ! //ENABLE FOR DEBUG ! gld.setGL(new DebugGL(gld.getGL())); ! glu = new GLU(); int[] maxplanes = new int[1]; ! gl.glGetIntegerv(GL.GL_MAX_CLIP_PLANES, maxplanes, 0); maxClippingPlanes = maxplanes[0]; ! View.width = gld.getWidth(); ! View.height = gld.getHeight(); View.aspect = View.width / View.height; *************** *** 526,532 **** gl.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE, 1); gl.glLightModeli(GL.GL_LIGHT_MODEL_LOCAL_VIEWER, 1); ! gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, new float[] {0.3f, 0.3f, 0.3f, 1.0f}); ! gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, new float[] {0.7f, 0.7f, 0.7f, 1.0f}); ! gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] {0.0f, 0.0f, 0.0f, 1.0f}); gl.glEnable(GL.GL_LINE_SMOOTH); --- 529,535 ---- gl.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE, 1); gl.glLightModeli(GL.GL_LIGHT_MODEL_LOCAL_VIEWER, 1); ! gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, new float[] {0.3f, 0.3f, 0.3f, 1.0f}, 0); ! gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, new float[] {0.7f, 0.7f, 0.7f, 1.0f}, 0); ! gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] {0.0f, 0.0f, 0.0f, 1.0f}, 0); gl.glEnable(GL.GL_LINE_SMOOTH); *************** *** 560,564 **** * @param gld The GLDrawable object */ ! public void display(GLDrawable gld) { boolean hitdetection = false; --- 563,567 ---- * @param gld The GLDrawable object */ ! public void display(GLAutoDrawable gld) { boolean hitdetection = false; *************** *** 567,574 **** gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); ! glu = gld.getGLU(); gl.glViewport(0, 0, (int)width, (int)height); if (picking > 0) { ! selectBuffer = BufferUtils.newIntBuffer(selectionLength); gl.glSelectBuffer(selectionLength, selectBuffer); gl.glRenderMode(GL.GL_SELECT); --- 570,577 ---- gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); ! glu = new GLU(); gl.glViewport(0, 0, (int)width, (int)height); if (picking > 0) { ! selectBuffer = BufferUtil.newIntBuffer(selectionLength); gl.glSelectBuffer(selectionLength, selectBuffer); gl.glRenderMode(GL.GL_SELECT); *************** *** 582,586 **** enableClipplanes(); ! gl.glColor3fv(lineColor); gl.glLineWidth(1.0f); --- 585,589 ---- enableClipplanes(); ! gl.glColor3fv(lineColor, 0); gl.glLineWidth(1.0f); *************** *** 600,606 **** } else { if (selection.contains(cp)) { ! gl.glColor3fv(SELECTED_COLOR); } else { ! gl.glColor3fv(CLIP_PLANE_COLOR); } drawClipplane(cp); --- 603,609 ---- } else { if (selection.contains(cp)) { ! gl.glColor3fv(SELECTED_COLOR, 0); } else { ! gl.glColor3fv(CLIP_PLANE_COLOR, 0); } drawClipplane(cp); *************** *** 614,618 **** if (hitdetection) { int[] viewport = new int[] {0, 0, (int)width, (int)height}; ! glu.gluPickMatrix(x, viewport[3] - y, 5, 5, viewport); } glu.gluOrtho2D(0, width, 0, height); --- 617,621 ---- if (hitdetection) { int[] viewport = new int[] {0, 0, (int)width, (int)height}; ! glu.gluPickMatrix(x, viewport[3] - y, 5, 5, viewport, 0); } glu.gluOrtho2D(0, width, 0, height); *************** *** 634,638 **** if (hitdetection) { int[] viewport = new int[] {0, 0, (int)width, (int)height}; ! glu.gluPickMatrix(x, viewport[3] - y, 5, 5, viewport); } glu.gluOrtho2D(0, width, 0, height); --- 637,641 ---- if (hitdetection) { int[] viewport = new int[] {0, 0, (int)width, (int)height}; ! glu.gluPickMatrix(x, viewport[3] - y, 5, 5, viewport, 0); } glu.gluOrtho2D(0, width, 0, height); *************** *** 689,696 **** ClippingPlane cp = (ClippingPlane)clipit.next(); if (cp.isActive()) { ! gl.glClipPlane(GL.GL_CLIP_PLANE0 + cp.getNumber(), cp.getPlane().getDoublev()); gl.glEnable(GL.GL_CLIP_PLANE0 + cp.getNumber()); if (cp.isSlice()) { ! gl.glClipPlane(GL.GL_CLIP_PLANE5, cp.getPlane().negate().getDoublev()); gl.glEnable(GL.GL_CLIP_PLANE5); cp.getPlane().negate(); --- 692,699 ---- ClippingPlane cp = (ClippingPlane)clipit.next(); if (cp.isActive()) { ! gl.glClipPlane(GL.GL_CLIP_PLANE0 + cp.getNumber(), cp.getPlane().getDoublev(), 0); gl.glEnable(GL.GL_CLIP_PLANE0 + cp.getNumber()); if (cp.isSlice()) { ! gl.glClipPlane(GL.GL_CLIP_PLANE5, cp.getPlane().negate().getDoublev(), 0); gl.glEnable(GL.GL_CLIP_PLANE5); cp.getPlane().negate(); *************** *** 704,713 **** * @param gld The GLDrawable object */ ! public void initCamera(GLDrawable gld) { if (log.isDebugEnabled()) { log.debug("[display]"); } gl = gld.getGL(); ! glu = gld.getGLU(); gl.glMatrixMode(GL.GL_PROJECTION); --- 707,716 ---- * @param gld The GLDrawable object */ ! public void initCamera(GLAutoDrawable gld) { if (log.isDebugEnabled()) { log.debug("[display]"); } gl = gld.getGL(); ! glu = new GLU(); gl.glMatrixMode(GL.GL_PROJECTION); *************** *** 716,720 **** if (picking > 0) { int[] viewport = new int[] {0, 0, (int)width, (int)height}; ! glu.gluPickMatrix(x, viewport[3] - y, selectionSize[0], selectionSize[1], viewport); } --- 719,723 ---- if (picking > 0) { int[] viewport = new int[] {0, 0, (int)width, (int)height}; ! glu.gluPickMatrix(x, viewport[3] - y, selectionSize[0], selectionSize[1], viewport, 0); } *************** *** 751,757 **** if (picking == 0) { ! gl.glGetIntegerv(GL.GL_VIEWPORT, screenport); ! gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, projMatrix); ! gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, modelMatrix); } } --- 754,760 ---- if (picking == 0) { ! gl.glGetIntegerv(GL.GL_VIEWPORT, screenport, 0); ! gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, projMatrix, 0); ! gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, modelMatrix, 0); } } *************** *** 764,768 **** double size = View.gridSize(); gl.glLineWidth(0.5f); ! gl.glColor4fv(gridColor); //gl.glDisable(GL.GL_DEPTH_TEST); gl.glBegin(GL.GL_LINES); --- 767,771 ---- double size = View.gridSize(); gl.glLineWidth(0.5f); ! gl.glColor4fv(gridColor, 0); //gl.glDisable(GL.GL_DEPTH_TEST); gl.glBegin(GL.GL_LINES); *************** *** 795,802 **** gl.glBegin(GL.GL_LINES); gl.glDisable(GL.GL_DEPTH_TEST); ! gl.glColor3fv(X_AXIS_COLOR); gl.glVertex3d(0.0, 0.0, 0.0); gl.glVertex3d(size * 2, 0.0, 0.0); ! gl.glColor3fv(Y_AXIS_COLOR); gl.glVertex3d(0.0, 0.0, 0.0); gl.glVertex3d(0.0, size * 2, 0.0); --- 798,805 ---- gl.glBegin(GL.GL_LINES); gl.glDisable(GL.GL_DEPTH_TEST); ! gl.glColor3fv(X_AXIS_COLOR, 0); gl.glVertex3d(0.0, 0.0, 0.0); gl.glVertex3d(size * 2, 0.0, 0.0); ! gl.glColor3fv(Y_AXIS_COLOR, 0); gl.glVertex3d(0.0, 0.0, 0.0); gl.glVertex3d(0.0, size * 2, 0.0); *************** *** 804,808 **** gl.glEnable(GL.GL_DEPTH_TEST); gl.glBegin(GL.GL_LINES); ! gl.glColor3fv(Z_AXIS_COLOR); gl.glVertex3d(0.0, 0.0, 0.0); gl.glVertex3d(0.0, 0.0, size * 2); --- 807,811 ---- gl.glEnable(GL.GL_DEPTH_TEST); gl.glBegin(GL.GL_LINES); ! gl.glColor3fv(Z_AXIS_COLOR, 0); gl.glVertex3d(0.0, 0.0, 0.0); gl.glVertex3d(0.0, 0.0, size * 2); *************** *** 816,820 **** * @param hitdetection For hitdetection */ ! protected void drawAll(GLDrawable gld, boolean hitdetection) { if (!hitdetection) { drawNormalMode(gld); --- 819,823 ---- * @param hitdetection For hitdetection */ ! protected void drawAll(GLAutoDrawable gld, boolean hitdetection) { if (!hitdetection) { drawNormalMode(gld); *************** *** 886,894 **** * @param gld The GLDrawable */ ! private void drawNormalMode(GLDrawable gld) { Collection selection = Selection.primary(); gl.glEnable(GL.GL_DEPTH_TEST); // draw selection ! gl.glColor3fv(SELECTED_COLOR); invisibles = new HashSet(); highligts = new HashSet(); --- 889,897 ---- * @param gld The GLDrawable */ ! private void drawNormalMode(GLAutoDrawable gld) { Collection selection = Selection.primary(); gl.glEnable(GL.GL_DEPTH_TEST); // draw selection ! gl.glColor3fv(SELECTED_COLOR, 0); invisibles = new HashSet(); highligts = new HashSet(); *************** *** 937,941 **** { ! gl.glColor3fv(SELECTED_COLOR); Iterator highlightIter = highligts.iterator(); while (highlightIter.hasNext()) { --- 940,944 ---- { ! gl.glColor3fv(SELECTED_COLOR, 0); Iterator highlightIter = highligts.iterator(); while (highlightIter.hasNext()) { *************** *** 948,952 **** { ! gl.glColor3fv(constructorColor); Iterator it = tempVertices.iterator(); while (it.hasNext()) { --- 951,955 ---- { ! gl.glColor3fv(constructorColor, 0); Iterator it = tempVertices.iterator(); while (it.hasNext()) { *************** *** 957,961 **** // draw target if (target != null && target instanceof Geometric) { ! gl.glColor3fv(targetColor); gl.glLineWidth(1.5f); // If target is a snap vertex it should be shown regardless of the clip --- 960,964 ---- // draw target if (target != null && target instanceof Geometric) { ! gl.glColor3fv(targetColor, 0); gl.glLineWidth(1.5f); // If target is a snap vertex it should be shown regardless of the clip *************** *** 970,976 **** } } ! ! drawConstructorPlanes(); ! { Iterator it = glObjects3D.iterator(); --- 973,977 ---- } } ! { Iterator it = glObjects3D.iterator(); *************** *** 981,984 **** --- 982,987 ---- } + drawConstructorPlanes(); + gl.glDisable(GL.GL_DEPTH_TEST); { *************** *** 1041,1045 **** gl.glTranslated(5, height - 15, 0.5); gl.glRasterPos2i(0, 0); ! glut.glutBitmapString(gl, GLUT.BITMAP_HELVETICA_12, name); gl.glPopMatrix(); } --- 1044,1048 ---- gl.glTranslated(5, height - 15, 0.5); gl.glRasterPos2i(0, 0); ! glut.glutBitmapString(GLUT.BITMAP_HELVETICA_12, name); gl.glPopMatrix(); } *************** *** 1094,1098 **** * @param space The Space */ ! private void drawSpace(Space space, GLDrawable gld) { gl.glPushMatrix(); transform(space.getTransformations()); --- 1097,1101 ---- * @param space The Space */ ! private void drawSpace(Space space, GLAutoDrawable gld) { gl.glPushMatrix(); transform(space.getTransformations()); *************** *** 1106,1114 **** gl.glCullFace(GL.GL_BACK); ! gl.glColor3fv(Defaults.getFrontColor()); drawSurfaces(gld, surfaces, FRONT); gl.glCullFace(GL.GL_FRONT); ! gl.glColor3fv(Defaults.getBackColor()); drawSurfaces(gld, surfaces, BACK); --- 1109,1117 ---- gl.glCullFace(GL.GL_BACK); ! gl.glColor3fv(Defaults.getFrontColor(), 0); drawSurfaces(gld, surfaces, FRONT); gl.glCullFace(GL.GL_FRONT); ! gl.glColor3fv(Defaults.getBackColor(), 0); drawSurfaces(gld, surfaces, BACK); *************** *** 1125,1129 **** gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1.0f, 1.0f); ! gl.glColor3fv(SURFACE_COLOR); drawSurfaces(gld, surfaces, BOTH); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); --- 1128,1132 ---- gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1.0f, 1.0f); ! gl.glColor3fv(SURFACE_COLOR, 0); drawSurfaces(gld, surfaces, BOTH); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); *************** *** 1176,1180 **** } else if (o instanceof Surface) { gl.glEnable(GL.GL_POLYGON_STIPPLE); ! gl.glPolygonStipple(highlight); Surface s = (Surface) o; drawSurface(s); --- 1179,1183 ---- } else if (o instanceof Surface) { gl.glEnable(GL.GL_POLYGON_STIPPLE); ! gl.glPolygonStipple(highlight, 0); Surface s = (Surface) o; drawSurface(s); *************** *** 1206,1210 **** * @param gld The GLDrawable */ ! private void drawEdges(GLDrawable gld) { disableClipplanes(); drawGeneralEdges(gld, tempEdges); --- 1209,1213 ---- * @param gld The GLDrawable */ ! private void drawEdges(GLAutoDrawable gld) { disableClipplanes(); drawGeneralEdges(gld, tempEdges); *************** *** 1300,1309 **** if (constructor instanceof Point) { if (colorize) { ! gl.glColor3fv(constructorColor); } drawConstructorPoint(((Point)constructor).getOrigin(), dist); } else if (constructor instanceof Line) { if (colorize) { ! gl.glColor3fv(constructorColor); } Line l = (Line)constructor; --- 1303,1312 ---- if (constructor instanceof Point) { if (colorize) { ! gl.glColor3fv(constructorColor, 0); } drawConstructorPoint(((Point)constructor).getOrigin(), dist); } else if (constructor instanceof Line) { if (colorize) { ! gl.glColor3fv(constructorColor, 0); } Line l = (Line)constructor; *************** *** 1337,1341 **** Vertex c = origin.minus(u).add(v); Vertex d = origin.minus(u).minus(v); ! gl.glColor4fv(CLIP_PLANE_INTERIOR_COLOR); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1f, 1f); --- 1340,1344 ---- Vertex c = origin.minus(u).add(v); Vertex d = origin.minus(u).minus(v); ! gl.glColor4fv(CLIP_PLANE_INTERIOR_COLOR, 0); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1f, 1f); *************** *** 1364,1368 **** if (cs.onlyPlane()) { if (colorize) { ! gl.glColor3fv(constructorColor); } if (cs.isEditable()) { --- 1367,1371 ---- if (cs.onlyPlane()) { if (colorize) { ! gl.glColor3fv(constructorColor, 0); } if (cs.isEditable()) { *************** *** 1389,1393 **** Vertex c = origin.minus(u).add(v); Vertex d = origin.minus(u).minus(v); ! gl.glColor4fv(CLIP_PLANE_INTERIOR_COLOR); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1f, 1f); --- 1392,1396 ---- Vertex c = origin.minus(u).add(v); Vertex d = origin.minus(u).minus(v); ! gl.glColor4fv(CLIP_PLANE_INTERIOR_COLOR, 0); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1f, 1f); *************** *** 1402,1406 **** } else { if (colorize) { ! gl.glColor3fv(X_AXIS_COLOR); } if (cs.isEditable()) { --- 1405,1409 ---- } else { if (colorize) { ! gl.glColor3fv(X_AXIS_COLOR, 0); } if (cs.isEditable()) { *************** *** 1411,1415 **** } if (colorize) { ! gl.glColor3fv(Y_AXIS_COLOR); } if (cs.isEditable()) { --- 1414,1418 ---- } if (colorize) { ! gl.glColor3fv(Y_AXIS_COLOR, 0); } if (cs.isEditable()) { *************** *** 1421,1425 **** Vertex n = cs.getN(); if (colorize) { ! gl.glColor3fv(Z_AXIS_COLOR); } if (cs.isEditable()) { --- 1424,1428 ---- Vertex n = cs.getN(); if (colorize) { ! gl.glColor3fv(Z_AXIS_COLOR, 0); } if (cs.isEditable()) { *************** *** 1511,1515 **** gl.glLineWidth(0.5f); gl.glEnable(GL.GL_LINE_STIPPLE); - gl.glBegin(GL.GL_LINE_STRIP); drawConstructorLineGeometry(from, direction, dist); gl.glDisable(GL.GL_LINE_STIPPLE); --- 1514,1517 ---- *************** *** 1527,1531 **** Vertex a = from.minus(dir); Vertex b = from.add(dir); ! gl.glBegin(GL.GL_LINE_STRIP); gl.glVertex3d(a.getX(), a.getY(), a.getZ()); gl.glVertex3d(b.getX(), b.getY(), b.getZ()); --- 1529,1533 ---- Vertex a = from.minus(dir); Vertex b = from.add(dir); ! gl.glBegin(GL.GL_LINES); gl.glVertex3d(a.getX(), a.getY(), a.getZ()); gl.glVertex3d(b.getX(), b.getY(), b.getZ()); *************** *** 1538,1544 **** * @param edges The edges */ ! public void drawGeneralEdges(GLDrawable gld, Collection edges) { gl.glLineWidth(1.0f); ! gl.glColor3fv(lineColor); Iterator iter = edges.iterator(); while (iter.hasNext()) { --- 1540,1546 ---- * @param edges The edges */ ! public void drawGeneralEdges(GLAutoDrawable gld, Collection edges) { gl.glLineWidth(1.0f); ! gl.glColor3fv(lineColor, 0); Iterator iter = edges.iterator(); while (iter.hasNext()) { *************** *** 1547,1551 **** float[] color = (float[])colorMap.get(current); if (color != null) { ! gl.glColor3fv(color); if (current.getStrippled()) { drawConstructor(current); --- 1549,1553 ---- float[] color = (float[])colorMap.get(current); if (color != null) { ! gl.glColor3fv(color, 0); if (current.getStrippled()) { drawConstructor(current); *************** *** 1553,1561 **** drawEdge(current); } ! gl.glColor3fv(lineColor); } else if (current.getStrippled()) { ! gl.glColor3fv(constructorColor); drawConstructor(current); ! gl.glColor3fv(lineColor); } else { drawEdge(current); --- 1555,1563 ---- drawEdge(current); } ! gl.glColor3fv(lineColor, 0); } else if (current.getStrippled()) { ! gl.glColor3fv(constructorColor, 0); drawConstructor(current); ! gl.glColor3fv(lineColor, 0); } else { drawEdge(current); *************** *** 1570,1576 **** * @param edges The edges */ ! public void drawConstructionEdges(GLDrawable gld, Collection edges) { gl.glLineWidth(1.0f); ! gl.glColor3fv(constructorColor); Iterator iter = edges.iterator(); while (iter.hasNext()) { --- 1572,1578 ---- * @param edges The edges */ ! public void drawConstructionEdges(GLAutoDrawable gld, Collection edges) { gl.glLineWidth(1.0f); ! gl.glColor3fv(constructorColor, 0); Iterator iter = edges.iterator(); while (iter.hasNext()) { *************** *** 1586,1590 **** * @param side The side */ ! public void drawSpaceSurfaces(GLDrawable gld, Space space, int side) { drawSurfaces(gld, space.getSurfaces(), side); } --- 1588,1592 ---- * @param side The side */ ! public void drawSpaceSurfaces(GLAutoDrawable gld, Space space, int side) { drawSurfaces(gld, space.getSurfaces(), side); } *************** *** 1605,1609 **** * @param side The side of the Surface to draw */ ! private void drawSurfaces(GLDrawable gld, Collection surfaces, int side) { GL gl = gld.getGL(); Iterator it = surfaces.iterator(); --- 1607,1611 ---- * @param side The side of the Surface to draw */ ! private void drawSurfaces(GLAutoDrawable gld, Collection surfaces, int side) { GL gl = gld.getGL(); Iterator it = surfaces.iterator(); *************** *** 1619,1631 **** if (!visible) { gl.glEnable(GL.GL_POLYGON_STIPPLE); ! gl.glPolygonStipple(seethrough); ! gl.glColor3fv(GRID_COLOR); } else { if (side == FRONT) { if (s.getFrontMaterial() == null) { Space back = s.getFrontDomain(); ! gl.glColor3fv(getSpaceColor(back)); } else { ! gl.glColor3fv(s.getFrontMaterial().getColor()); } } --- 1621,1633 ---- if (!visible) { gl.glEnable(GL.GL_POLYGON_STIPPLE); ! gl.glPolygonStipple(seethrough, 0); ! gl.glColor3fv(GRID_COLOR, 0); } else { if (side == FRONT) { if (s.getFrontMaterial() == null) { Space back = s.getFrontDomain(); ! gl.glColor3fv(getSpaceColor(back), 0); } else { ! gl.glColor3fv(s.getFrontMaterial().getColor(), 0); } } *************** *** 1633,1639 **** if (s.getBackMaterial() == null) { Space front = s.getBackDomain(); ! gl.glColor3fv(getSpaceColor(front)); } else { ! gl.glColor3fv(s.getBackMaterial().getColor()); } } --- 1635,1641 ---- if (s.getBackMaterial() == null) { Space front = s.getBackDomain(); ! gl.glColor3fv(getSpaceColor(front), 0); } else { ! gl.glColor3fv(s.getBackMaterial().getColor(), 0); } } *************** *** 1653,1658 **** */ private void drawSurface(Surface s) { ! GLUtesselator tess = glu.gluNewTess(); ! GLUtesselatorCallback cb = new Callback(); //Setting callbacks --- 1655,1660 ---- */ private void drawSurface(Surface s) { ! GLUtessellator tess = glu.gluNewTess(); ! GLUtessellatorCallback cb = new Callback(); //Setting callbacks *************** *** 1695,1699 **** * @param tess The Tesselator */ ! private void drawContour(Surface surface, GLUtesselator tess) { List vertices = surface.getVertices(); if (vertices.size() > 0) { --- 1697,1701 ---- * @param tess The Tesselator */ ! private void drawContour(Surface surface, GLUtessellator tess) { List vertices = surface.getVertices(); if (vertices.size() > 0) { *************** *** 1704,1711 **** Vertex current = (Vertex) iter.next(); double[] coords = new double[] {current.getX(), current.getY(), current.getZ()}; ! glu.gluTessVertex(tess, coords, new TesselatorPoint(coords[0], coords[1], coords[2])); } double[] coords = new double[] {first.getX(), first.getY(), first.getZ()}; ! glu.gluTessVertex(tess, coords, new TesselatorPoint(coords[0], coords[1], coords[2])); glu.gluTessEndContour(tess); } --- 1706,1713 ---- Vertex current = (Vertex) iter.next(); double[] coords = new double[] {current.getX(), current.getY(), current.getZ()}; ! glu.gluTessVertex(tess, coords, 0, new TesselatorPoint(coords[0], coords[1], coords[2])); } double[] coords = new double[] {first.getX(), first.getY(), first.getZ()}; ! glu.gluTessVertex(tess, coords, 0, new TesselatorPoint(coords[0], coords[1], coords[2])); glu.gluTessEndContour(tess); } *************** *** 1724,1728 **** gl.glPushMatrix(); gl.glRasterPos3d(x, y, z); ! glut.glutBitmapString(gl, GLUT.BITMAP_HELVETICA_12, string); gl.glPopMatrix(); } --- 1726,1730 ---- gl.glPushMatrix(); gl.glRasterPos3d(x, y, z); ! glut.glutBitmapString(GLUT.BITMAP_HELVETICA_12, string); gl.glPopMatrix(); } *************** *** 1758,1762 **** * @param height The new window height */ ! public void reshape(GLDrawable gld, int x, int y, int width, int height) { --- 1760,1764 ---- * @param height The new window height */ ! public void reshape(GLAutoDrawable gld, int x, int y, int width, int height) { *************** *** 1773,1777 **** * @param deviceChanged The new graphical device */ ! public void displayChanged(GLDrawable gld, boolean modeChanged, boolean deviceChanged) { --- 1775,1779 ---- * @param deviceChanged The new graphical device */ ! public void displayChanged(GLAutoDrawable gld, boolean modeChanged, boolean deviceChanged) { *************** *** 1959,1963 **** * @param gld The GLDrawable */ ! private void drawSelectionMode(GLDrawable gld) { Space space = Project.getInstance().getActiveSpace(); --- 1961,1965 ---- * @param gld The GLDrawable */ ! private void drawSelectionMode(GLAutoDrawable gld) { Space space = Project.getInstance().getActiveSpace(); *************** *** 2844,2848 **** * Inner class that defines the callbacks for tessellation */ ! private class Callback extends GLUtesselatorCallbackAdapter { /** --- 2846,2850 ---- * Inner class that defines the callbacks for tessellation */ ! private class Callback extends GLUtessellatorCallbackAdapter { /** |
|
From: rimestad <rim...@us...> - 2006-12-18 14:48:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2048/src/net/sourceforge/bprocessor/gl/tool Modified Files: RotationTool.java Log Message: Changed implementation to JOGL 1.0.0 with lots of new binary files in tools/jogl still need to add support for Sparc!!!!! Made changes to GLView and GLObject and View to support the new jogl and fixed rotation tool to work better (fix was to use isNaN on a double object not double != Double.NaN) Index: RotationTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RotationTool.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** RotationTool.java 13 Dec 2006 17:42:45 -0000 1.22 --- RotationTool.java 18 Dec 2006 14:48:04 -0000 1.23 *************** *** 7,13 **** package net.sourceforge.bprocessor.gl.tool; - import net.java.games.jogl.GL; - import net.java.games.jogl.GLDrawable; - import net.java.games.jogl.GLU; import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.model.GlObject; --- 7,10 ---- *************** *** 28,31 **** --- 25,29 ---- import java.awt.event.MouseEvent; + import java.text.MessageFormat; import java.util.HashSet; import java.util.Iterator; *************** *** 34,37 **** --- 32,39 ---- import java.util.Set; + import javax.media.opengl.GL; + import javax.media.opengl.GLAutoDrawable; + import javax.media.opengl.glu.GLU; + import org.apache.log4j.Logger; *************** *** 93,97 **** angle *= -1; } ! if (angle != Double.NaN) { totalAngle = (totalAngle + angle) % (2 * Math.PI); rotate(angle); --- 95,99 ---- angle *= -1; } ! if (!(new Double(angle).isNaN())) { totalAngle = (totalAngle + angle) % (2 * Math.PI); rotate(angle); *************** *** 109,113 **** } ! /** * Update the length field --- 111,115 ---- } ! /** * Update the length field *************** *** 117,122 **** if (p1 != null && p2 != null && from != null && current != null) { angle = Math.toDegrees(totalAngle); ! setLength(angle / 1000); ! pro.setAngle((int)angle); } } --- 119,124 ---- if (p1 != null && p2 != null && from != null && current != null) { angle = Math.toDegrees(totalAngle); ! glv.setLengthValue(MessageFormat.format("{0,number,###.##}", ! new Object[]{new Double(Math.round(angle * 100.0) / 100.0)})); } } *************** *** 198,202 **** */ public void escape() { ! rotate(-totalAngle); cleanUp(); } --- 200,206 ---- */ public void escape() { ! if (totalAngle != 0) { ! rotate(-totalAngle); ! } cleanUp(); } *************** *** 228,231 **** --- 232,238 ---- edges.add(l); edges.add(onto); + if (from != null) { + edges.addAll(Selection.primary()); + } } } *************** *** 274,286 **** */ private void rotate(double angle) { ! if (angle != Double.NaN) { ! Iterator iter = vertices.iterator(); ! while (iter.hasNext()) { ! Vertex v = (Vertex)iter.next(); ! Geometry.rotate(angle, onto.getDoublev()[Plane.X], ! onto.getDoublev()[Plane.Y], onto.getDoublev()[Plane.Z], v, p1); ! } ! } else { ! log.error("Angle were " + angle); } } --- 281,289 ---- */ private void rotate(double angle) { ! Iterator iter = vertices.iterator(); ! while (iter.hasNext()) { ! Vertex v = (Vertex)iter.next(); ! Geometry.rotate(angle, onto.getDoublev()[Plane.X], ! onto.getDoublev()[Plane.Y], onto.getDoublev()[Plane.Z], v, p1); } } *************** *** 292,297 **** /** The location for the protractor */ private Plane plane; - /** The input rotation angle */ - private int angle; /** The center of the protractor */ private Vertex origin; --- 295,298 ---- *************** *** 309,313 **** */ public GlProtractor(Plane p, Vertex origin) { - angle = 0; plane = p; this.origin = origin; --- 310,313 ---- *************** *** 316,327 **** /** - * Setter of the angle of rotation - * @param angle The rotation angle to visualize - */ - public void setAngle(int angle) { - this.angle = angle; - } - - /** * Setter for the start vertex * @param start the first vertex in the rotation --- 316,319 ---- *************** *** 344,348 **** * @inheritDoc */ ! public void draw(GLDrawable gld) { Camera cam = Project.getInstance().getCurrentCamera(); Vertex camorig = new Vertex(cam.getCamera()); --- 336,341 ---- * @inheritDoc */ ! public void draw(GLAutoDrawable gld) { ! double angle = Math.toDegrees(totalAngle); Camera cam = Project.getInstance().getCurrentCamera(); Vertex camorig = new Vertex(cam.getCamera()); *************** *** 350,354 **** factor = dist / 20; GL gl = gld.getGL(); ! GLU glu = gld.getGLU(); // translate Vertex z = plane.normal(); --- 343,347 ---- factor = dist / 20; GL gl = gld.getGL(); ! GLU glu = new GLU(); // translate Vertex z = plane.normal(); *************** *** 359,375 **** } - /*gl.glColor3d(0, 0, 0); - gl.glLineWidth(2); - Iterator iter = edges.iterator(); - while (iter.hasNext()) { - Line l = (Line) iter.next(); - Vertex from = l.getPointAt(-5); - Vertex to = l.getPointAt(5); - gl.glBegin(GL.GL_LINE_STRIP); - gl.glVertex3d(from.getX(), from.getY(), from.getZ()); - gl.glVertex3d(to.getX(), to.getY(), to.getZ()); - gl.glEnd(); - } - */ // place the axis right if (start != null) { --- 352,355 ---- *************** *** 384,393 **** origin.getX(), origin.getY(), origin.getZ(), 1}; gl.glPushMatrix(); ! gl.glMultMatrixd(m); //draw ! ! ! gl.glColor4fv(new float[] {0.5f, 0.5f, 0.5f, 0.6f}); int sign = 1; if (angle < 0) { --- 364,371 ---- origin.getX(), origin.getY(), origin.getZ(), 1}; gl.glPushMatrix(); ! gl.glMultMatrixd(m, 0); //draw ! gl.glColor4fv(new float[] {0.5f, 0.5f, 0.5f, 0.6f}, 0); int sign = 1; if (angle < 0) { *************** *** 396,403 **** glu.gluPartialDisk( glu.gluNewQuadric(), 0, 2 * factor, 360, 1, 0, sign * (360 - Math.abs(angle))); ! gl.glColor4fv(new float[] {0.0f, 0.0f, 1.0f, 1.0f}); glu.gluPartialDisk(glu.gluNewQuadric(), 0, 2.2 * factor, 360, 1, 0, -angle); //restore matrix gl.glPopMatrix(); } --- 374,395 ---- glu.gluPartialDisk( glu.gluNewQuadric(), 0, 2 * factor, 360, 1, 0, sign * (360 - Math.abs(angle))); ! gl.glColor4fv(new float[] {0.0f, 0.0f, 1.0f, 1.0f}, 0); glu.gluPartialDisk(glu.gluNewQuadric(), 0, 2.2 * factor, 360, 1, 0, -angle); //restore matrix gl.glPopMatrix(); + + //draw lines + /*gl.glColor3d(0.2, 0.2, 0.2); + gl.glLineWidth(0.1f); + Iterator iter = edges.iterator(); + while (iter.hasNext()) { + Line l = (Line) iter.next(); + Vertex from = l.getPointAt(-1.8 * factor); + Vertex to = l.getPointAt(1.8 * factor); + gl.glBegin(GL.GL_LINE_STRIP); + gl.glVertex3d(from.getX(), from.getY(), from.getZ()); + gl.glVertex3d(to.getX(), to.getY(), to.getZ()); + gl.glEnd(); + }*/ } *************** *** 414,418 **** Edge tmp = new Edge(l.getPointAt(p1), l.getPointAt(p2)); Edge con = e.intersection(tmp); ! if (con.getLength() < 0.05) { if (tmp.coincides(con.getFrom())) { i = con.getFrom(); --- 406,410 ---- Edge tmp = new Edge(l.getPointAt(p1), l.getPointAt(p2)); Edge con = e.intersection(tmp); ! if (con.getLength() < 0.1) { if (tmp.coincides(con.getFrom())) { i = con.getFrom(); |
|
From: rimestad <rim...@us...> - 2006-12-18 14:48:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2048/src/net/sourceforge/bprocessor/gl/model Modified Files: GlObject.java Log Message: Changed implementation to JOGL 1.0.0 with lots of new binary files in tools/jogl still need to add support for Sparc!!!!! Made changes to GLView and GLObject and View to support the new jogl and fixed rotation tool to work better (fix was to use isNaN on a double object not double != Double.NaN) Index: GlObject.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/model/GlObject.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GlObject.java 13 Dec 2006 17:42:13 -0000 1.1 --- GlObject.java 18 Dec 2006 14:48:04 -0000 1.2 *************** *** 7,11 **** package net.sourceforge.bprocessor.gl.model; ! import net.java.games.jogl.GLDrawable; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Vertex; --- 7,12 ---- package net.sourceforge.bprocessor.gl.model; ! ! import javax.media.opengl.GLAutoDrawable; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Vertex; *************** *** 21,25 **** * @param gld the GLDrawable */ ! public void draw(GLDrawable gld); /** --- 22,26 ---- * @param gld the GLDrawable */ ! public void draw(GLAutoDrawable gld); /** |
|
From: rimestad <rim...@us...> - 2006-12-18 14:48:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2048/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: Changed implementation to JOGL 1.0.0 with lots of new binary files in tools/jogl still need to add support for Sparc!!!!! Made changes to GLView and GLObject and View to support the new jogl and fixed rotation tool to work better (fix was to use isNaN on a double object not double != Double.NaN) Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** GLView.java 26 Nov 2006 22:13:51 -0000 1.43 --- GLView.java 18 Dec 2006 14:48:04 -0000 1.44 *************** *** 15,24 **** import net.sourceforge.bprocessor.gui.GUI; - import net.java.games.jogl.GLCanvas; - import net.java.games.jogl.GLCapabilities; - import net.java.games.jogl.GLDrawable; - import net.java.games.jogl.GLDrawableFactory; - import net.java.games.jogl.Version; - import java.awt.Component; import java.awt.Cursor; --- 15,18 ---- *************** *** 29,32 **** --- 23,32 ---- import java.awt.event.ActionListener; + import javax.media.opengl.GL; + import javax.media.opengl.GLCanvas; + import javax.media.opengl.GLCapabilities; + import javax.media.opengl.GLDrawable; + import javax.media.opengl.GLException; + import javax.swing.JTextField; import javax.swing.JPanel; *************** *** 61,71 **** */ public GLView() { ! log.info("Using JOGL version " + Version.getVersion()); Selection.primary().addObserver(this); Project.getInstance().addObserver(this); ! GLCapabilities glCap = new GLCapabilities(); glCap.setDoubleBuffered(true); glCap.setHardwareAccelerated(true); - glc = GLDrawableFactory.getFactory().createGLCanvas(glCap); GUI.getInstance().incrementPB(); --- 61,72 ---- */ public GLView() { ! GLCapabilities glCap = new GLCapabilities(); ! glc = new GLCanvas(glCap); ! log.info("Using JOGL version " + glc.getGL().glGetString(GL.GL_VERSION)); Selection.primary().addObserver(this); Project.getInstance().addObserver(this); ! glCap.setDoubleBuffered(true); glCap.setHardwareAccelerated(true); GUI.getInstance().incrementPB(); *************** *** 185,193 **** */ public void repaint(boolean force) { ! if (force) { ! glc.display(); ! } else { ! glc.repaint(); ! } } --- 186,198 ---- */ public void repaint(boolean force) { ! try { ! if (force) { ! glc.display(); ! } else { ! glc.repaint(); ! } ! } catch (GLException gle) { ! //gle.printStackTrace(); ! } } |
|
From: Nikolaj B. <nbr...@us...> - 2006-12-18 12:11:17
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1026/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: another small fix to avoid compile error Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** Project.java 18 Dec 2006 12:08:27 -0000 1.101 --- Project.java 18 Dec 2006 12:11:14 -0000 1.102 *************** *** 941,944 **** --- 941,951 ---- } + + /** + * this method returns the produkt type + * @param id the id of the type wanted + * @param clas is the classification the type is for + * @return tmep the produkt type + * */ public Classification getProduktType(Classification clas, String id) { Classification temp = getType(clas.getProdukt()); |