edu.sdsc.mbt.viewers.GLViewerImpl
Class Trihedron

java.lang.Object
  extended byedu.sdsc.mbt.viewers.GLViewerImpl.Trihedron

public class Trihedron
extends java.lang.Object

Holds a moving trihedron normalized three-tuple of vectors that represents the basis vectors that define a coordinate system. The tangent represents the direction of a curve, the normal represents the direction of the plane in which the tangen lies, and the binormal is the cross-product of the tangent and normal vectors.


Constructor Summary
Trihedron()
          Primary Constructor.
Trihedron(float[] tan, float[] norm)
          Primary Constructor.
 
Method Summary
 float[] getBinormal()
          Get the binormal vector.
 float[] getNormal()
          Get the normal vector.
 float[] getTangent()
          Get the tangent vector.
 void set(float[] tan, float[] norm)
          Set the tangent and normal vectors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Trihedron

public Trihedron()
Primary Constructor. Constructs a unit-normal cartesian trihedron.


Trihedron

public Trihedron(float[] tan,
                 float[] norm)
Primary Constructor. Constructs a trihedron using the specified tangent and normal vectors.

Method Detail

set

public void set(float[] tan,
                float[] norm)
Set the tangent and normal vectors.

Parameters:
tan - The x,y,z distances defining the tangent vector.
norm - The x,y,z distances defining the normal vector.
Throws:
java.lang.NullPointerException - for null vector.
java.lang.IllegalArgumentException - for zero vector.

getTangent

public float[] getTangent()
Get the tangent vector.

Throws:
java.lang.NullPointerException - for null vector.
java.lang.IllegalArgumentException - for zero vector.

getNormal

public float[] getNormal()
Get the normal vector.

Throws:
java.lang.NullPointerException - for null vector.
java.lang.IllegalArgumentException - for zero vector.

getBinormal

public float[] getBinormal()
Get the binormal vector.

Throws:
java.lang.NullPointerException - for null vector.
java.lang.IllegalArgumentException - for zero vector.