Update of /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4865/src/net/sourceforge/bprocessor/model
Modified Files:
CoordinateSystem.java
Log Message:
Made the planes, spanned by coordinatesystems when showplane is true, generate a intersection when hitdetection is made
Index: CoordinateSystem.java
===================================================================
RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** CoordinateSystem.java 30 Dec 2007 23:29:06 -0000 1.75
--- CoordinateSystem.java 2 Jan 2008 11:31:03 -0000 1.76
***************
*** 1094,1096 ****
--- 1094,1110 ----
Geometry.rotate(angle, dir.getX(), dir.getY(), dir.getZ(), getN(), zero);
}
+
+ /**
+ * Return a list with four verties at the corners of the plane in XY with size dist:
+ * @param dist the size of the plane
+ * @return The four corners
+ */
+ public List<Vertex> getXYPlane(double dist) {
+ List<Vertex> corners = new LinkedList<Vertex>();
+ corners.add(this.unTranslate(new Vertex(dist / 2, dist / 2, 0)));
+ corners.add(this.unTranslate(new Vertex(dist / 2, -dist / 2, 0)));
+ corners.add(this.unTranslate(new Vertex(-dist / 2, -dist / 2, 0)));
+ corners.add(this.unTranslate(new Vertex(-dist / 2, dist / 2, 0)));
+ return corners;
+ }
}
|