Vector3D.Sum, Vector3D.Unit
Modifier and Type | Field and Description |
---|---|
static Vector3D.Unit |
MINUS_X
Negation of unit vector (coordinates: -1, 0, 0).
|
static Vector3D.Unit |
MINUS_Y
Negation of unit vector (coordinates: 0, -1, 0).
|
static Vector3D.Unit |
MINUS_Z
Negation of unit vector (coordinates: 0, 0, -1).
|
static Vector3D.Unit |
PLUS_X
Unit vector (coordinates: 1, 0, 0).
|
static Vector3D.Unit |
PLUS_Y
Unit vector (coordinates: 0, 1, 0).
|
static Vector3D.Unit |
PLUS_Z
Unit vector (coordinates: 0, 0, 1).
|
COORDINATE_ASCENDING_ORDER, NaN, NEGATIVE_INFINITY, POSITIVE_INFINITY, ZERO
Modifier and Type | Method and Description |
---|---|
static Vector3D.Unit |
from(double x,
double y,
double z)
Create a normalized vector.
|
static Vector3D.Unit |
from(Vector3D v)
Create a normalized vector.
|
Vector3D.Unit |
negate() |
double |
norm() |
Vector3D.Unit |
normalize() |
Vector3D.Unit |
normalizeOrNull() |
double |
normSq() |
Vector3D |
withNorm(double mag) |
add, add, angle, centroid, centroid, cross, directionTo, distance, distanceSq, dot, eq, equals, getDimension, getX, getY, getZ, getZero, hashCode, isFinite, isInfinite, isNaN, lerp, max, max, min, min, multiply, of, of, orthogonal, orthogonal, parse, project, reject, subtract, subtract, toArray, toString, transform, vectorTo
getCheckedNorm, isZero
public static final Vector3D.Unit PLUS_X
public static final Vector3D.Unit MINUS_X
public static final Vector3D.Unit PLUS_Y
public static final Vector3D.Unit MINUS_Y
public static final Vector3D.Unit PLUS_Z
public static final Vector3D.Unit MINUS_Z
public double norm()
public double normSq()
public Vector3D.Unit normalize()
public Vector3D.Unit normalizeOrNull()
normalizeOrNull
in interface Vector<Vector3D>
normalizeOrNull
in class Vector3D
public Vector3D.Unit negate()
public static Vector3D.Unit from(double x, double y, double z)
x
- Vector coordinate.y
- Vector coordinate.z
- Vector coordinate.IllegalArgumentException
- if the norm of the given value is zero, NaN,
or infinitepublic static Vector3D.Unit from(Vector3D v)
v
- Vector.IllegalArgumentException
- if the norm of the given value is zero, NaN,
or infiniteCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.