java.lang.Object
javax.vecmath.Tuple2f
javax.vecmath.Vector2f
gov.nih.mipav.view.renderer.J3D.surfaceview.brainflattenerview.MjVector2f
All Implemented Interfaces:
Serializable, Cloneable

public class MjVector2f extends javax.vecmath.Vector2f
Add methods which make the Vector2f 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 MjVector2f
    Special vectors.

    Fields inherited from class javax.vecmath.Tuple2f

    x, y
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    (package private) float
    kross(javax.vecmath.Vector2f kV)
    Returns Cross((x,y,0),(V.x,V.y,0)) = x*V.y - y*V.x.
    (package private) void
    Normalize this vector in place.
    (package private) void
    normalizeSafe(javax.vecmath.Vector2f kVector)
    Sets the value of this vector to the normalization of the specified vector.
    (package private) void
    perp(javax.vecmath.Vector2f kVector)
    Set this vector to the 'perp' of the specified vector.

    Methods inherited from class javax.vecmath.Vector2f

    angle, dot, length, lengthSquared, normalize, normalize

    Methods inherited from class javax.vecmath.Tuple2f

    absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, getX, getY, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, setX, setY, 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 MjVector2f ZERO
      Special vectors.
  • Constructor Details

    • MjVector2f

      public MjVector2f()
      Constructors.
    • MjVector2f

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

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

    • kross

      float kross(javax.vecmath.Vector2f kV)
      Returns Cross((x,y,0),(V.x,V.y,0)) = x*V.y - y*V.x.
      Parameters:
      kV - DOCUMENT ME!
      Returns:
      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.Vector2f 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!
    • perp

      void perp(javax.vecmath.Vector2f kVector)
      Set this vector to the 'perp' of the specified vector.
      Parameters:
      kVector - DOCUMENT ME!