[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Line.java, 1.10, 1.11
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-07-18 21:50:46
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2519/src/net/sourceforge/bprocessor/model Modified Files: Line.java Log Message: Accurately computes to the placement of the tip of a vector for hit-detection to be able to rotate a vector by moving the tip Index: Line.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Line.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Line.java 18 Jul 2006 14:04:37 -0000 1.10 --- Line.java 18 Jul 2006 21:50:41 -0000 1.11 *************** *** 134,140 **** */ public Vertex tip() { ! double x = getOrigin().getX() + dir.getX(); ! double y = getOrigin().getY() + dir.getY(); ! double z = getOrigin().getZ() + dir.getZ(); return new Tip(x, y, z); } --- 134,149 ---- */ public Vertex tip() { ! return tip(1.0); ! } ! ! /** ! * Tip ! * @param distance Distance from origin ! * @return A vertex representing the tip ! */ ! public Vertex tip(double distance) { ! double x = getOrigin().getX() + dir.getX() * distance; ! double y = getOrigin().getY() + dir.getY() * distance; ! double z = getOrigin().getZ() + dir.getZ() * distance; return new Tip(x, y, z); } |