Modifier and Type  Field and Description 

static double 
MINIMUM_RESOLUTION
Values that are all considered to be essentially zero have a magnitude
less than this.

static double 
MINIMUM_RESOLUTION_CUBED 
static double 
MINIMUM_RESOLUTION_SQUARED
For squared quantities, the bound is squared too.

double 
x 
double 
y 
double 
z 
Constructor and Description 

Vector(double x,
double y,
double z)
Construct from (U.S.) x,y,z coordinates.

Vector(Vector A,
Vector B)
Construct a vector that is perpendicular to
two other (nonzero) vectors.

Modifier and Type  Method and Description 

double 
dotProduct(double x,
double y,
double z)
Do a dot product.

double 
dotProduct(Vector v)
Do a dot product.

boolean 
equals(Object o) 
int 
hashCode() 
boolean 
isWithin(Membership[] bounds,
Membership[] moreBounds)
Determine if this vector, taken from the origin,
describes a point within a set of planes.

double 
linearDistance(double x,
double y,
double z)
Compute the straightline distance to a point described by the
vector taken from the origin.

double 
linearDistance(Vector v)
Compute the straightline distance to a point described by the
vector taken from the origin.

double 
linearDistanceSquared(double x,
double y,
double z)
Compute the square of a straightline distance to a point described by the
vector taken from the origin.

double 
linearDistanceSquared(Vector v)
Compute the square of a straightline distance to a point described by the
vector taken from the origin.

double 
magnitude()
Compute the magnitude of this vector.

double 
normalDistance(double x,
double y,
double z)
Compute the normal (perpendicular) distance to a vector described by a
vector taken from the origin.

double 
normalDistance(Vector v)
Compute the normal (perpendicular) distance to a vector described by a
vector taken from the origin.

double 
normalDistanceSquared(double x,
double y,
double z)
Compute the square of the normal distance to a vector described by a
vector taken from the origin.

double 
normalDistanceSquared(Vector v)
Compute the square of the normal distance to a vector described by a
vector taken from the origin.

Vector 
normalize()
Compute a normalized unit vector based on the current vector.

Vector 
rotateXY(double angle)
Rotate vector counterclockwise in xy by an angle.

Vector 
rotateXY(double sinAngle,
double cosAngle)
Rotate vector counterclockwise in xy by an angle, expressed as sin and cos.

Vector 
rotateXZ(double angle)
Rotate vector counterclockwise in xz by an angle.

Vector 
rotateXZ(double sinAngle,
double cosAngle)
Rotate vector counterclockwise in xz by an angle, expressed as sin and cos.

Vector 
rotateZY(double angle)
Rotate vector counterclockwise in zy by an angle.

Vector 
rotateZY(double sinAngle,
double cosAngle)
Rotate vector counterclockwise in zy by an angle, expressed as sin and cos.

String 
toString() 
Vector 
translate(double xOffset,
double yOffset,
double zOffset)
Translate vector.

public static final double MINIMUM_RESOLUTION
public static final double MINIMUM_RESOLUTION_SQUARED
public static final double MINIMUM_RESOLUTION_CUBED
public final double x
public final double y
public final double z
public Vector(double x, double y, double z)
public Vector normalize()
public double dotProduct(Vector v)
v
 is the vector to multiply.public double dotProduct(double x, double y, double z)
x
 is the x value of the vector to multiply.y
 is the y value of the vector to multiply.z
 is the z value of the vector to multiply.public boolean isWithin(Membership[] bounds, Membership[] moreBounds)
bounds
 is the first part of the set of planes.moreBounds
 is the second part of the set of planes.public Vector translate(double xOffset, double yOffset, double zOffset)
public Vector rotateXY(double angle)
public Vector rotateXY(double sinAngle, double cosAngle)
public Vector rotateXZ(double angle)
public Vector rotateXZ(double sinAngle, double cosAngle)
public Vector rotateZY(double angle)
public Vector rotateZY(double sinAngle, double cosAngle)
public double linearDistanceSquared(Vector v)
v
 is the vector to compute a distance to.public double linearDistanceSquared(double x, double y, double z)
x
 is the x part of the vector to compute a distance to.y
 is the y part of the vector to compute a distance to.z
 is the z part of the vector to compute a distance to.public double linearDistance(Vector v)
v
 is the vector to compute a distance to.public double linearDistance(double x, double y, double z)
x
 is the x part of the vector to compute a distance to.y
 is the y part of the vector to compute a distance to.z
 is the z part of the vector to compute a distance to.public double normalDistanceSquared(Vector v)
v
 is the vector to compute a distance to.public double normalDistanceSquared(double x, double y, double z)
x
 is the x part of the vector to compute a distance to.y
 is the y part of the vector to compute a distance to.z
 is the z part of the vector to compute a distance to.public double normalDistance(Vector v)
v
 is the vector to compute a distance to.public double normalDistance(double x, double y, double z)
x
 is the x part of the vector to compute a distance to.y
 is the y part of the vector to compute a distance to.z
 is the z part of the vector to compute a distance to.public double magnitude()
Copyright © 20002015 Apache Software Foundation. All Rights Reserved.