Class V3d
java.lang.Object
javajs.util.T3d
javajs.util.V3d
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal doublefinal voidSets this vector to be the vector cross product of vectors v1 and v2.final doubleComputes the dot product of the this vector and vector v.final doublelength()Returns the length of this vector.final doubleReturns the squared length of this vector.final voidNormalizes this vector in place.
-
Constructor Details
-
V3d
public V3d()
-
-
Method Details
-
cross
-
normalize
public final void normalize()Normalizes this vector in place. -
angle
-
dot
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
-