[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.217, 1.218
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2007-06-26 02:04:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25699/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: some clean up Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.217 retrieving revision 1.218 diff -C2 -d -r1.217 -r1.218 *** View.java 26 Jun 2007 00:43:29 -0000 1.217 --- View.java 26 Jun 2007 02:04:17 -0000 1.218 *************** *** 84,88 **** private static Logger log = Logger.getLogger(View.class); - private static final boolean FALSE = false; private static final boolean DISP = false; --- 84,87 ---- *************** *** 154,163 **** //new float[] {0.8f, 0.7f, 0.6f, 0.50f}; - /** Front color for surfaces */ - public static final float[] FRONT_COLOR = new float[] {0.90f, 0.90f, 0.90f}; - - /** Back color for surfaces */ - public static final float[] BACK_COLOR = new float[] {0.96f, 0.87f, 0.70f}; - /** NONE color for surfaces */ public static final float[] NONE_COLOR = new float[] {0.40f, 0.58f, 0.93f}; --- 153,156 ---- *************** *** 387,390 **** --- 380,385 ---- private boolean debug = false; + + private Edge lockingEdge; static { *************** *** 491,503 **** gridColor = GRID_COLOR; constructorColor = CONSTRUCTOR_COLOR; - frontColor = FRONT_COLOR; - backColor = BACK_COLOR; noneColor = NONE_COLOR; ! tempConstructors = new HashSet(); ! tempEdges = new HashSet(); ! tempSurfaces = new HashSet(); ! tempVertices = new HashSet(); colorMap = new HashMap(); ! glObjects3D = new HashSet(); widgets = new LinkedList<Widget>(); --- 486,496 ---- gridColor = GRID_COLOR; constructorColor = CONSTRUCTOR_COLOR; noneColor = NONE_COLOR; ! tempConstructors = new HashSet<Constructor>(); ! tempEdges = new HashSet<Edge>(); ! tempSurfaces = new HashSet<Surface>(); ! tempVertices = new HashSet<Vertex>(); colorMap = new HashMap(); ! glObjects3D = new HashSet<GlObject>(); widgets = new LinkedList<Widget>(); *************** *** 1058,1062 **** Space active = Project.getInstance().getActiveSpace(); Space world = Project.getInstance().world(); ! LinkedList path = new LinkedList(); path.add(active); while (active != world) { --- 1051,1055 ---- Space active = Project.getInstance().getActiveSpace(); Space world = Project.getInstance().world(); ! LinkedList<Space> path = new LinkedList<Space>(); path.add(active); while (active != world) { *************** *** 2327,2356 **** } - - - /** - * Collect edges from surface - * @param surface The surface - * @param result The result - */ - void collectEdges(Surface surface, Collection result) { - Iterator iter = surface.getEdges().iterator(); - while (iter.hasNext()) { - result.add(iter.next()); - } - } - - /** - * Collect edges from surfaces - * @param surfaces The surfaces - * @param result The result - */ - void collectEdges(List surfaces, Collection result) { - Iterator iter = surfaces.iterator(); - while (iter.hasNext()) { - collectEdges((Surface) iter.next(), result); - } - } - /** * Setter for target that uses default target color --- 2320,2323 ---- *************** *** 2439,2443 **** Object object = null; ! Collection edges = new HashSet(); for (int i = 0; i < hits; i++) { --- 2406,2410 ---- Object object = null; ! Collection<Edge> edges = new HashSet<Edge>(); for (int i = 0; i < hits; i++) { *************** *** 2476,2480 **** } } else if (current instanceof Edge) { ! edges.add(current); if (near < nearestEdge) { nearestEdge = near; --- 2443,2447 ---- } } else if (current instanceof Edge) { ! edges.add((Edge)current); if (near < nearestEdge) { nearestEdge = near; *************** *** 2504,2510 **** bufferOffset += 3; } ! } ! ! if (surface != null) { --- 2471,2475 ---- bufferOffset += 3; } ! } if (surface != null) { *************** *** 2530,2536 **** } } ! } ! ! if (edge != null && vertex != null) { --- 2495,2499 ---- } } ! } if (edge != null && vertex != null) { *************** *** 3229,3246 **** /** - * @return Returns the backColor. - */ - public static float[] getBackColor() { - return backColor; - } - - /** - * @param backColor The backColor to set. - */ - public static void setBackColor(float[] backColor) { - View.backColor = backColor; - } - - /** * @return Returns the bgColor. */ --- 3192,3195 ---- *************** *** 3257,3274 **** /** - * @return Returns the frontColor. - */ - public static float[] getFrontColor() { - return frontColor; - } - - /** - * @param frontColor The frontColor to set. - */ - public static void setFrontColor(float[] frontColor) { - View.frontColor = frontColor; - } - - /** * @return Returns the gridColor. */ --- 3206,3209 ---- *************** *** 3415,3417 **** --- 3350,3360 ---- } } + + /** + * Sets the current locking edge + * @param lockingEdge the new locking edge + */ + public void setLockingEdge(Edge lockingEdge) { + this.lockingEdge = lockingEdge; + } } |