[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Line.java, 1.34, 1.35 CoordinateSyst
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-10-02 12:38:07
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2906/src/net/sourceforge/bprocessor/model Modified Files: Line.java CoordinateSystem.java Constructor.java Log Message: constructor drawing Index: Constructor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constructor.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Constructor.java 18 Jul 2007 13:35:39 -0000 1.21 --- Constructor.java 2 Oct 2007 12:37:56 -0000 1.22 *************** *** 114,117 **** --- 114,128 ---- } + /** + * Return edges that functions as guidelines for this + * constructor. + * @param length length of guide + * @return collection of edges + */ + public Collection<Edge> guides(double length) { + Collection<Edge> guides = new LinkedList(); + return guides; + } + /** {@inheritDoc} */ @Override Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** CoordinateSystem.java 27 Sep 2007 10:41:25 -0000 1.56 --- CoordinateSystem.java 2 Oct 2007 12:37:56 -0000 1.57 *************** *** 819,822 **** --- 819,858 ---- /** + * Returns the x axis + * @return x axis + */ + public Axis xaxis() { + return new Axis(origin, i); + } + + /** + * Returns the y axis + * @return y axis + */ + public Axis yaxis() { + return new Axis(origin, j); + } + + + /** + * Returns the z axis + * @return z axis + */ + public Axis zaxis() { + return new Axis(origin, n); + } + + /** + * {@inheritDoc} + */ + public Collection<Edge> guides(double length) { + Collection<Edge> guides = super.guides(length); + guides.add(xaxis().edge(length)); + guides.add(yaxis().edge(length)); + guides.add(zaxis().edge(length)); + return guides; + } + + /** * Tip */ *************** *** 860,863 **** --- 896,917 ---- } + private class Axis extends Line { + /** + * Constructs Axis + * @param origin origin + * @param direction direction + */ + public Axis(Vertex origin, Vertex direction) { + super(origin, direction); + } + /** + * Parent + * @return This line + */ + public Geometric parent() { + return CoordinateSystem.this; + } + } + /** * Guide Index: Line.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Line.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Line.java 18 Jul 2007 13:35:38 -0000 1.34 --- Line.java 2 Oct 2007 12:37:56 -0000 1.35 *************** *** 244,247 **** --- 244,256 ---- return constructor; } + + /** + * {@inheritDoc} + */ + public Collection<Edge> guides(double length) { + Collection<Edge> guides = super.guides(length); + guides.add(edge(length)); + return guides; + } /** |