Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21424/src/net/sourceforge/bprocessor/model
Modified Files:
Plane.java
Log Message:
Plane is not a constructor anymore, is represented by a coordinatesystem now
Index: Plane.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Plane.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Plane.java 12 Jul 2006 14:34:18 -0000 1.22
--- Plane.java 20 Jul 2006 12:56:25 -0000 1.23
***************
*** 9,14 ****
import java.util.Collection;
import java.util.Iterator;
- import java.util.List;
- import java.util.Set;
import org.apache.log4j.Logger;
--- 9,12 ----
***************
*** 22,26 ****
* ax + by + cz - (ah + bi + cj) = 0
*/
! public class Plane extends Constructor {
/** The logger */
private static Logger log = Logger.getLogger(Plane.class);
--- 20,24 ----
* ax + by + cz - (ah + bi + cj) = 0
*/
! public class Plane {
/** The logger */
private static Logger log = Logger.getLogger(Plane.class);
***************
*** 56,60 ****
*/
public Plane(double a, double b, double c, double d) {
- super(new Vertex(-d / a, 0, 0));
this.a = a;
this.b = b;
--- 54,57 ----
***************
*** 64,83 ****
/**
- * Constructor
- * @param a the first vector in the plane
- * @param b the second vector in the plane
- * @param origin a point in the plane
- */
- public Plane(Vertex a, Vertex b, Vertex origin) {
- super(origin);
- Vertex normal = b.cross(a);
- normal.normalize();
- this.a = normal.getX();
- this.b = normal.getY();
- this.c = normal.getZ();
- this.d = -this.a * (origin.getX()) - this.b * (origin.getY()) - this.c * (origin.getZ());
- }
-
- /**
* Return a doublearray {a,b,c,d}
* @return The array
--- 61,64 ----
***************
*** 341,419 ****
log.info(info);
}
-
- /**
- * @see net.sourceforge.bprocessor.model.Geometric#collect()
- */
- public Set collect() {
-
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * @see net.sourceforge.bprocessor.model.Entity#center()
- */
- public Vertex center() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * @see net.sourceforge.bprocessor.model.Entity#delete()
- */
- public void delete() {
- getOwner().delete(this);
- }
-
- /**
- * @see net.sourceforge.bprocessor.model.Parametric#setAttributes()
- */
- public void setAttributes(List attributes) {
- // TODO Auto-generated method stub
- }
-
- /**
- * @see net.sourceforge.bprocessor.model.Parametric#getAttributes()
- */
- public List getAttributes() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * @see net.sourceforge.bprocessor.model.Parametric#getGeneralName()
- */
- public String getGeneralName() {
- return "Constructor-Plane";
- }
-
- /**
- * Return one vector in the plane
- * @return a vector in the plane
- */
- public Vertex getI() {
- Vertex res;
- if (a != 0.0) {
- res = new Vertex(-d / a, 0 , 0);
- } else if (b != 0.0) {
- res = new Vertex(0, -d / b , 0);
- } else {
- res = new Vertex(0, 0 , -d / c);
- }
- res = res.minus(getOrigin());
- res.normalize();
- return res;
- }
-
- /**
- * A vector perpindicular to the one returned in getI that is in the plane
- * @return a vector in the plane perpindicular to the one returned in getI
- */
- public Vertex getJ() {
- Vertex v = getI();
- Vertex res = v.cross(normal());
- res.normalize();
- return res;
-
- }
}
--- 322,324 ----
|