JNISpice
version 2.0.0

spice.basic
Class Plane

java.lang.Object
  extended by spice.basic.Plane

public class Plane
extends java.lang.Object

Class plane represents planes in 3-dimensional space and supports geometric operations using planes.

Ray-plane intercept computations are performed by class RayPlaneIntercept.

Limb computations are performed by class Ellipse.

Ellipse-plane intersections are performed by class EllipsePlaneIntercept.

Version 1.1.0 17-DEC-2017 (NJB)

Bug fix: in constructor Plane(double[]), now uses double[] variable to capture normal vector contents from input array. This constructor now throws an exception if the input array has the wrong length.

Version 1.0.0 08-DEC-2009 (NJB)


Constructor Summary
Plane(double[] planeArray)
          Contruct a Plane from a double array.
Plane(Plane pl)
          Copy constructor: this constructor creates a deep copy.
Plane(Vector3 normal, double constant)
          Create a Plane from a normal vector and a constant.
Plane(Vector3 normal, Vector3 point)
          Create a Plane from a normal vector and a point.
Plane(Vector3 point, Vector3 span1, Vector3 span2)
          Create a Plane from a point and two spanning vectors.
 
Method Summary
 double getConstant()
          Retrieve a plane constant from a Plane.
 Vector3 getNormal()
          Retrieve a normal vector from a Plane.
 Vector3 getPoint()
          Retrieve a point from a Plane.
 Vector3[] getSpanningVectors()
          Retrieve two spanning vectors from a plane.
 Vector3 project(Vector3 v)
          Project a vector orthogonally onto a Plane.
 double[] toArray()
          Extract contents of a Plane into a double array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plane

public Plane(Plane pl)
Copy constructor: this constructor creates a deep copy.


Plane

public Plane(Vector3 normal,
             double constant)
      throws SpiceException
Create a Plane from a normal vector and a constant. The Plane represents a 3-dimensional plane satisfying the plane equation
      < x, normal >  = constant
   

Throws:
SpiceException

Plane

public Plane(Vector3 normal,
             Vector3 point)
      throws SpiceException
Create a Plane from a normal vector and a point. The Plane represents a 3-dimensional plane satisfying the plane equation
      < x, normal >  =  < point, normal >
   

Throws:
SpiceException

Plane

public Plane(Vector3 point,
             Vector3 span1,
             Vector3 span2)
      throws SpiceException
Create a Plane from a point and two spanning vectors. The Plane represents a 3-dimensional plane consisting of the set of points
      point  +  s1 * span1  +  s2 * span2
   
where s1, s2 are scalars.

Throws:
SpiceException

Plane

public Plane(double[] planeArray)
      throws SpiceException
Contruct a Plane from a double array. The order of elements is the same as that used in SPICELIB planes.

Throws:
SpiceException
Method Detail

getNormal

public Vector3 getNormal()
Retrieve a normal vector from a Plane. The vector has unit length and points away from the origin.


getConstant

public double getConstant()
Retrieve a plane constant from a Plane. The constant represents the distance of the Plane from the origin. The plane is the set of points `x' satisfying the plane equation
      < x, normal >  = constant
   
where `normal' is the vector returned by `getNormal'.


getPoint

public Vector3 getPoint()
                 throws SpiceException
Retrieve a point from a Plane. The point closest to the origin is returned.

Throws:
SpiceException

getSpanningVectors

public Vector3[] getSpanningVectors()
                             throws SpiceException
Retrieve two spanning vectors from a plane.

Throws:
SpiceException

project

public Vector3 project(Vector3 v)
                throws SpiceException
Project a vector orthogonally onto a Plane. The projection is the closest point in the plane to the input vector.

Throws:
SpiceException

toArray

public double[] toArray()
Extract contents of a Plane into a double array. The order of elements is the same as that used in SPICELIB planes.


JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)