[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool AbstractTool.java,1.48,1.49
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2006-01-13 15:57:43
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28897/tool Modified Files: AbstractTool.java Log Message: new kind of constructors to get Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** AbstractTool.java 10 Jan 2006 14:01:48 -0000 1.48 --- AbstractTool.java 13 Jan 2006 15:57:32 -0000 1.49 *************** *** 601,604 **** --- 601,639 ---- } + /** + * Makes constructors parralel to the x y and z-axis, originating + * from a vertex. + * @param v the vertex + * @return a set of XYZ constructors. + */ + protected Set makeXYZConerConstructors(Vertex v) { + if (v != null) { + Edge x = new Edge(xAxis.getFrom().add(v), + xAxis.getTo().add(v)); + x.getFrom().move(50, 0, 0); + x.getTo().move(50, 0, 0); + x.setConstructor(true); + Edge y = new Edge(yAxis.getFrom().add(v), + yAxis.getTo().add(v)); + y.getFrom().move(0, 50, 0); + y.getTo().move(0, 50, 0); + y.setConstructor(true); + Edge z = new Edge(zAxis.getFrom().add(v), + zAxis.getTo().add(v)); + z.getFrom().move(0, 0, 50); + z.getTo().move(0, 0, 50); + z.setConstructor(true); + Set constructors = new HashSet(); + constructors.add(x); + constructors.add(y); + constructors.add(z); + if (showConstructors) { + displayConstructors(constructors); + } + return constructors; + } + return null; + } + /** * Makes constructors parrallel to the edges connected to a vertex. |