Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3380/src/net/sourceforge/bprocessor/model
Modified Files:
CoordinateSystem.java
Log Message:
New coplanar test on CoordinateSystem
Index: CoordinateSystem.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** CoordinateSystem.java 18 Jul 2007 13:35:39 -0000 1.54
--- CoordinateSystem.java 11 Sep 2007 10:59:59 -0000 1.55
***************
*** 743,746 ****
--- 743,763 ----
/**
+ * Returns true if this CoordinateSystem is coplanar with the other
+ * @param other CoordinateSystem to test
+ * @return true if this CoordinateSystem is coplanar with the other
+ */
+ public boolean coplanar(CoordinateSystem other) {
+ if (plane().contains(other.getOrigin())) {
+ Vertex n1 = this.n;
+ Vertex n2 = other.n;
+ Vertex cross = n1.cross(n2);
+ if (cross.isZero()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
* {@inheritDoc}
*
|