Package javajs.util

Class V3d

All Implemented Interfaces:
Serializable

public class V3d extends T3d
A 3 element vector that is represented by double precision floating point x,y,z coordinates. If this value represents a normal, then it should be normalized.
Version:
specification 1.1, implementation $Revision: 1.9 $, $Date: 2006/07/28 17:01:32 $
Author:
Kenji hiranabe additions by Bob Hanson hansonr@stolaf.edu 9/30/2012 for unique constructor and method names for the optimization of compiled JavaScript using Java2Script
See Also:
  • Constructor Details

    • V3d

      public V3d()
  • Method Details

    • cross

      public final void cross(V3d v1, V3d v2)
      Sets this vector to be the vector cross product of vectors v1 and v2.
      Parameters:
      v1 - the first vector
      v2 - the second vector
    • normalize

      public final void normalize()
      Normalizes this vector in place.
    • angle

      public final double angle(V3d v1)
    • dot

      public final double dot(V3d v)
      Computes the dot product of the this vector and vector v.
      Parameters:
      v - the other vector
      Returns:
      this.dot.v
    • lengthSquared

      public final double lengthSquared()
      Returns the squared length of this vector.
      Returns:
      the squared length of this vector
    • length

      public final double length()
      Returns the length of this vector.
      Returns:
      the length of this vector