java.lang.Object
javax.vecmath.Tuple3f
javax.vecmath.Vector3f
gov.nih.mipav.view.renderer.J3D.surfaceview.brainflattenerview.MjVector3f
All Implemented Interfaces:
Serializable, Cloneable

public class MjVector3f extends javax.vecmath.Vector3f
Add methods which make the Vector3f more robust and flexible to use.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final long
    Use serialVersionUID for interoperability.
    static final MjVector3f
    Special vectors.

    Fields inherited from class javax.vecmath.Tuple3f

    x, y, z
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructors.
    MjVector3f(float fX, float fY, float fZ)
    Creates a new MjVector3f object.
    MjVector3f(javax.vecmath.Tuple3f kTuple)
    Creates a new MjVector3f object.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static void
    generateOrthonormalBasis(MjVector3f kU, MjVector3f kV, MjVector3f kW, boolean bUnitLengthW)
    Input W must be initialized to a nonzero vector, output is {U,V,W}, an orthonormal basis.
    (package private) void
    Normalize this vector in place.
    (package private) void
    normalizeSafe(javax.vecmath.Vector3f kVector)
    Sets the value of this vector to the normalization of the specified vector.

    Methods inherited from class javax.vecmath.Vector3f

    angle, cross, dot, length, lengthSquared, normalize, normalize

    Methods inherited from class javax.vecmath.Tuple3f

    absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, getX, getY, getZ, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, setX, setY, setZ, sub, sub, toString

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • ZERO

      public static final MjVector3f ZERO
      Special vectors.
  • Constructor Details

    • MjVector3f

      public MjVector3f()
      Constructors.
    • MjVector3f

      public MjVector3f(javax.vecmath.Tuple3f kTuple)
      Creates a new MjVector3f object.
      Parameters:
      kTuple - DOCUMENT ME!
    • MjVector3f

      public MjVector3f(float fX, float fY, float fZ)
      Creates a new MjVector3f object.
      Parameters:
      fX - DOCUMENT ME!
      fY - DOCUMENT ME!
      fZ - DOCUMENT ME!
  • Method Details

    • generateOrthonormalBasis

      static void generateOrthonormalBasis(MjVector3f kU, MjVector3f kV, MjVector3f kW, boolean bUnitLengthW)
      Input W must be initialized to a nonzero vector, output is {U,V,W}, an orthonormal basis. A hint is provided about whether or not W is already unit length.
      Parameters:
      kU - DOCUMENT ME!
      kV - DOCUMENT ME!
      kW - DOCUMENT ME!
      bUnitLengthW - DOCUMENT ME!
    • normalizeSafe

      void normalizeSafe()
      Normalize this vector in place. If the vector is very close to zero length, then this vector is stored as the zero vector.
    • normalizeSafe

      void normalizeSafe(javax.vecmath.Vector3f kVector)
      Sets the value of this vector to the normalization of the specified vector. If the vector is very close to zero length, then this vector is stored as the zero vector.
      Parameters:
      kVector - DOCUMENT ME!