math
Class OrthonormalBasis

java.lang.Object
  extended by math.OrthonormalBasis

public class OrthonormalBasis
extends java.lang.Object

an orthonormal basis


Field Summary
 Vector3D u
           
 Vector3D v
           
 Vector3D w
           
 
Constructor Summary
OrthonormalBasis()
          constructor
OrthonormalBasis(OrthonormalBasis b)
          copy constructor
OrthonormalBasis(Vector3D u, Vector3D v, Vector3D w)
          constructor with three given vectors
 
Method Summary
 void createFromU(Vector3D u)
          create the onb from form the u vector
 void createFromW(Vector3D w)
          create the onb from form the w vector
 void flipW()
          flips the orthonormal basis and keeps the helicity
 Matrix4x4 getBasisToCanonicalMatrix()
          creates the basis transformation matrix to change from the local basis to the canonical basis
 Matrix4x4 getCanonicalToBasisMatrix()
          creates the basis transformation matrix to change from the canonical basis to the local basis
 Vector3D transform(Vector3D v)
          transforms a vector
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

u

public Vector3D u

v

public Vector3D v

w

public Vector3D w
Constructor Detail

OrthonormalBasis

public OrthonormalBasis()
constructor


OrthonormalBasis

public OrthonormalBasis(Vector3D u,
                        Vector3D v,
                        Vector3D w)
constructor with three given vectors

Parameters:
u - [in] u vector
v - [in] v vector
w - [in] w vector

OrthonormalBasis

public OrthonormalBasis(OrthonormalBasis b)
copy constructor

Parameters:
b - [in] the onb to copy
Method Detail

createFromU

public void createFromU(Vector3D u)
create the onb from form the u vector

Parameters:
u - [in] u vector

createFromW

public void createFromW(Vector3D w)
create the onb from form the w vector

Parameters:
w - [in] w vector

getBasisToCanonicalMatrix

public Matrix4x4 getBasisToCanonicalMatrix()
creates the basis transformation matrix to change from the local basis to the canonical basis

Returns:
transformation matrix

getCanonicalToBasisMatrix

public Matrix4x4 getCanonicalToBasisMatrix()
creates the basis transformation matrix to change from the canonical basis to the local basis

Returns:
transformation matrix

transform

public Vector3D transform(Vector3D v)
transforms a vector

Parameters:
v - [in] vector to transform
Returns:
transformed vector

flipW

public void flipW()
flips the orthonormal basis and keeps the helicity