[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Plane.java,1.3,1.4
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-08-31 07:52:35
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28386/src/net/sourceforge/bprocessor/model Modified Files: Plane.java Log Message: Plane.intersection(Edge) implemented Index: Plane.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Plane.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Plane.java 30 Aug 2005 13:11:32 -0000 1.3 --- Plane.java 31 Aug 2005 07:52:28 -0000 1.4 *************** *** 86,89 **** --- 86,101 ---- } } + + /** + * Find the intersection with the edge + * @param edge The edge to intersect + * @return The intersection point + */ + public Vertex intersection(Edge edge) { + Vertex p0 = edge.getFrom(); + Vertex p1 = edge.getTo(); + p1 = p1.minus(p0); + return intersection(p0, p1); + } } |