Thread: [Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.124, 1.125
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2006-08-02 12:25:38
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4023/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Added mothods for changing colors and commented out som lines in drawObject to see if it is better regarding drawing selected edges hidden by other geometry Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -d -r1.124 -r1.125 *** View.java 27 Jul 2006 11:20:20 -0000 1.124 --- View.java 2 Aug 2006 12:25:34 -0000 1.125 *************** *** 110,125 **** public static final float[] EDGE_INTERSECTION_COLOR = new float[] {0.8f, 0.1f, 0.8f}; - /** Used for constructor objects */ public static final float [] CONSTRUCTOR_COLOR = new float[] {0.8f, 0.7f, 0.6f, 0.50f}; /** Front color for surfaces */ ! protected static float[] frontColor = new float[] {0.90f, 0.90f, 0.90f}; /** NONE color for surfaces */ ! protected static float[] noneColor = new float[] {0.40f, 0.58f, 0.93f}; /** Back color for surfaces */ ! protected static float[] backColor = new float[] {0.96f, 0.87f, 0.70f}; /** Select mode for selecting edges */ --- 110,133 ---- public static final float[] EDGE_INTERSECTION_COLOR = new float[] {0.8f, 0.1f, 0.8f}; /** Used for constructor objects */ public static final float [] CONSTRUCTOR_COLOR = 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}; ! ! /** Front color for surfaces */ ! protected static float[] frontColor; ! ! /** NONE color for surfaces */ ! protected static float[] noneColor; /** Back color for surfaces */ ! protected static float[] backColor; /** Select mode for selecting edges */ *************** *** 416,419 **** --- 424,430 ---- gridColor = GRID_COLOR; constructorColor = CONSTRUCTOR_COLOR; + frontColor = FRONT_COLOR; + backColor = BACK_COLOR; + noneColor = NONE_COLOR; tempEdges = new HashSet(); tempSurfaces = new HashSet(); *************** *** 962,966 **** private void drawObject(Object o) { if (o instanceof Vertex) { ! gl.glDisable(GL.GL_DEPTH_TEST); Vertex v = (Vertex) o; gl.glPointSize(9.0f); --- 973,977 ---- private void drawObject(Object o) { if (o instanceof Vertex) { ! //gl.glDisable(GL.GL_DEPTH_TEST); Vertex v = (Vertex) o; gl.glPointSize(9.0f); *************** *** 969,978 **** gl.glEnd(); gl.glPointSize(1.0f); ! gl.glEnable(GL.GL_DEPTH_TEST); } else if (o instanceof Edge) { ! gl.glDisable(GL.GL_DEPTH_TEST); Edge e = (Edge) o; drawEdge(e); ! gl.glEnable(GL.GL_DEPTH_TEST); } else if (o instanceof Surface) { gl.glEnable(GL.GL_POLYGON_STIPPLE); --- 980,991 ---- gl.glEnd(); gl.glPointSize(1.0f); ! //gl.glEnable(GL.GL_DEPTH_TEST); } else if (o instanceof Edge) { ! //gl.glDisable(GL.GL_DEPTH_TEST); Edge e = (Edge) o; + gl.glLineWidth(1.5f); drawEdge(e); ! gl.glLineWidth(1.0f); ! //gl.glEnable(GL.GL_DEPTH_TEST); } else if (o instanceof Surface) { gl.glEnable(GL.GL_POLYGON_STIPPLE); *************** *** 2601,2605 **** * @param color the color. */ ! public void setBGColor(float[] color) { bgColor = color; } --- 2614,2618 ---- * @param color the color. */ ! public static void setBGColor(float[] color) { bgColor = color; } *************** *** 2608,2612 **** * @param color the color. */ ! public void setLineColor(float[] color) { lineColor = color; } --- 2621,2625 ---- * @param color the color. */ ! public static void setLineColor(float[] color) { lineColor = color; } *************** *** 2616,2620 **** * @param color the color. */ ! public void setGridColor(float[] color) { gridColor = color; } --- 2629,2633 ---- * @param color the color. */ ! public static void setGridColor(float[] color) { gridColor = color; } *************** *** 2625,2629 **** */ ! public void setNoneColor(float[] color) { noneColor = color; } --- 2638,2642 ---- */ ! public static void setNoneColor(float[] color) { noneColor = color; } *************** *** 2633,2637 **** * @param color the color */ ! public void setConstructorColor(float[] color) { constructorColor = color; } --- 2646,2650 ---- * @param color the color */ ! public static void setConstructorColor(float[] color) { constructorColor = color; } *************** *** 2869,2871 **** --- 2882,2954 ---- } } + + /** + * @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. + */ + public static float[] getBgColor() { + return bgColor; + } + + /** + * @param bgColor The bgColor to set. + */ + public static void setBgColor(float[] bgColor) { + View.bgColor = bgColor; + } + + /** + * @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. + */ + public static float[] getGridColor() { + return gridColor; + } + + /** + * @return Returns the lineColor. + */ + public static float[] getLineColor() { + return lineColor; + } + + /** + * @return Returns the noneColor. + */ + public static float[] getNoneColor() { + return noneColor; + } + + /** + * @return Returns the constructorColor. + */ + public static float[] getConstructorColor() { + return constructorColor; + } } |