Thread: [Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.247, 1.248 Display.java,
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-10-12 13:14:40
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30650/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Display.java Log Message: Changes to the displayed attributes of CoordinateSystem Ð editable displayed, normal displayed even when only plane Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Display.java 12 Oct 2007 11:06:53 -0000 1.31 --- Display.java 12 Oct 2007 13:14:42 -0000 1.32 *************** *** 14,17 **** --- 14,18 ---- import java.util.LinkedList; import java.util.List; + import java.util.Map; import java.util.Set; *************** *** 55,58 **** --- 56,61 ---- private static Collection<? extends Geometric> extras; private static Collection<GlObject> glos; + private static Map<Geometric, float[]> colors; + private static float[] targetColor; private static Grid grid; private static boolean intersecting; *************** *** 193,196 **** --- 196,215 ---- /** + * + * @param value colors + */ + public static void colors(Map<Geometric, float[]> value) { + colors = value; + } + + /** + * + * @param value target color + */ + public static void targetColor(float[] value) { + targetColor = value; + } + + /** * Returns the value of intersecting * @return intersecting *************** *** 867,871 **** paint((Vertex) current, redish, 9.0f); } else { ! paint((Vertex) current, blueish, 6.0f); } } --- 886,894 ---- paint((Vertex) current, redish, 9.0f); } else { ! if (targetColor != null) { ! paint((Vertex) current, targetColor, 6.0f); ! } else { ! paint((Vertex) current, blueish, 6.0f); ! } } } *************** *** 983,987 **** selectVertices(vertices); } else { ! paintVertices(vertices, black, 9.0f); } --- 1006,1016 ---- selectVertices(vertices); } else { ! for (Vertex current : vertices) { ! float[] color = colors.get(current); ! if (color == null) { ! color = middleblue; ! } ! paint(current, color, 9.0f); ! } } Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.247 retrieving revision 1.248 diff -C2 -d -r1.247 -r1.248 *** View.java 12 Oct 2007 11:06:52 -0000 1.247 --- View.java 12 Oct 2007 13:14:42 -0000 1.248 *************** *** 39,43 **** import net.sourceforge.bprocessor.model.Vertex; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.Entity; import net.sourceforge.bprocessor.model.Transform; --- 39,42 ---- *************** *** 134,138 **** /** Used for target objects */ ! public static final float[] TARGET_COLOR = new float[] {0.8f, 0.8f, 0.1f}; /** Used for vertices on edges */ --- 133,137 ---- /** Used for target objects */ ! public static final float[] TARGET_COLOR = new float[] {0.5f, 0.2f, 0.1f}; /** Used for vertices on edges */ *************** *** 143,147 **** /** Used for vertices on surface */ ! public static final float[] SURFACE_ON_COLOR = new float[] {0.6f, 0.2f, 0.1f}; /** Used for vertices on edges */ --- 142,146 ---- /** Used for vertices on surface */ ! public static final float[] SURFACE_ON_COLOR = new float[] {0.6f, 0.6f, 0.1f}; /** Used for vertices on edges */ *************** *** 371,375 **** /** Maps entities to a color */ ! private Map colorMap; /** Maps edges to a set of attributes */ --- 370,374 ---- /** Maps entities to a color */ ! private Map<Geometric, float[]> colorMap; /** Maps edges to a set of attributes */ *************** *** 719,722 **** --- 718,723 ---- initNames(gl); Display.objects(objectTable); + Display.colors(colorMap); + Display.targetColor(targetColor); if (target instanceof Geometric) { Display.target((Geometric) target); *************** *** 3200,3204 **** * @param color the color */ ! public void changeColor(Entity e, float[] color) { colorMap.put(e, color); } --- 3201,3205 ---- * @param color the color */ ! public void changeColor(Geometric e, float[] color) { colorMap.put(e, color); } *************** *** 3208,3212 **** * @param e the entity */ ! public void clearColor(Entity e) { colorMap.remove(e); } --- 3209,3213 ---- * @param e the entity */ ! public void clearColor(Geometric e) { colorMap.remove(e); } |