org.simtk.geometry3d
Class Plane3D

java.lang.Object
  extended by org.simtk.geometry3d.Plane3D

public class Plane3D
extends java.lang.Object


Constructor Summary
Plane3D()
           
 
Method Summary
static Plane3D bestPlane3D(java.util.Collection<Vector3D> bagOfPoints)
          Create a plane that minimizes the sum of squared distances to a set of points
static Plane3D bestPlane3D(Vector3D[] coordinates, double[] weights)
           
 double distance(Vector3D p)
          Distance between a point and a plane
 Vector3D getNormal()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plane3D

public Plane3D()
Method Detail

distance

public double distance(Vector3D p)
Distance between a point and a plane

Returns:
the shortest distance between the point and the plane

getNormal

public Vector3D getNormal()

bestPlane3D

public static Plane3D bestPlane3D(java.util.Collection<Vector3D> bagOfPoints)
                           throws InsufficientPointsException
Create a plane that minimizes the sum of squared distances to a set of points

Parameters:
bagOfPoints -
Returns:
the best plane
Throws:
InsufficientPointsException

bestPlane3D

public static Plane3D bestPlane3D(Vector3D[] coordinates,
                                  double[] weights)
                           throws InsufficientPointsException
Throws:
InsufficientPointsException