示例#1
0
 // construct a plane from three coplanar points
 public Plane(MVVector point0, MVVector point1, MVVector point2) {
   MVVector edge1 = point1.minus(point0);
   MVVector edge2 = point2.minus(point0);
   normal = MVVector.cross(edge1, edge2);
   normal.normalize();
   d = -normal.dotProduct(point0);
 }
示例#2
0
 // provide a version of the constructor that handles integer Points
 public Plane(Point intPoint0, Point intPoint1, Point intPoint2) {
   MVVector point0 = new MVVector(intPoint0);
   MVVector point1 = new MVVector(intPoint1);
   MVVector point2 = new MVVector(intPoint2);
   MVVector edge1 = point1.minus(point0);
   MVVector edge2 = point2.minus(point0);
   normal = MVVector.cross(edge1, edge2);
   normal.normalize();
   d = -normal.dotProduct(point0);
 }
示例#3
0
 // construct a plane from the normal and a point on the plane
 public Plane(MVVector normal, MVVector point) {
   this.normal = normal;
   this.d = -normal.dotProduct(point);
 }