public class Vector3d extends Object implements Vectord, Comparable<Vector3d>, Serializable, Cloneable
| Modifier and Type | Field and Description |
|---|---|
static Vector3d |
FORWARD |
static Vector3d |
ONE |
static Vector3d |
RIGHT |
static Vector3d |
UNIT_X |
static Vector3d |
UNIT_Y |
static Vector3d |
UNIT_Z |
static Vector3d |
UP |
static Vector3d |
ZERO |
| Constructor and Description |
|---|
Vector3d() |
Vector3d(double x,
double y,
double z) |
Vector3d(float x,
float y,
float z) |
Vector3d(Vector2d v) |
Vector3d(Vector2d v,
double z) |
Vector3d(Vector2d v,
float z) |
Vector3d(Vector3d v) |
Vector3d(Vector4d v) |
Vector3d(VectorNd v) |
| Modifier and Type | Method and Description |
|---|---|
Vector3d |
abs() |
Vector3d |
add(double x,
double y,
double z) |
Vector3d |
add(float x,
float y,
float z) |
Vector3d |
add(Vector3d v) |
Vector3d |
ceil() |
Vector3d |
clone() |
int |
compareTo(Vector3d v) |
static Vector3d |
createDirectionDeg(double theta,
double phi)
Gets the direction vector of a certain theta and phi in degrees.
|
static Vector3d |
createDirectionDeg(float theta,
float phi)
Gets the direction vector of a certain theta and phi in degrees.
|
static Vector3d |
createDirectionRad(double theta,
double phi)
Gets the direction vector of a certain theta and phi in radians.
|
static Vector3d |
createDirectionRad(float theta,
float phi)
Gets the direction vector of a certain theta and phi in radians.
|
static Vector3d |
createRandomDirection(Random random)
Gets the direction vector of a random pitch and yaw using the random specified.
|
Vector3d |
cross(double x,
double y,
double z) |
Vector3d |
cross(float x,
float y,
float z) |
Vector3d |
cross(Vector3d v) |
double |
distance(double x,
double y,
double z) |
double |
distance(float x,
float y,
float z) |
double |
distance(Vector3d v) |
double |
distanceSquared(double x,
double y,
double z) |
double |
distanceSquared(float x,
float y,
float z) |
double |
distanceSquared(Vector3d v) |
Vector3d |
div(double a) |
Vector3d |
div(double x,
double y,
double z) |
Vector3d |
div(float a) |
Vector3d |
div(float x,
float y,
float z) |
Vector3d |
div(Vector3d v) |
double |
dot(double x,
double y,
double z) |
double |
dot(float x,
float y,
float z) |
double |
dot(Vector3d v) |
boolean |
equals(Object o) |
Vector3d |
floor() |
static Vector3d |
from(double n) |
static Vector3d |
from(double x,
double y,
double z) |
int |
getFloorX() |
int |
getFloorY() |
int |
getFloorZ() |
int |
getMaxAxis()
Returns the axis with the maximum value.
|
int |
getMinAxis()
Returns the axis with the minimal value.
|
double |
getX() |
double |
getY() |
double |
getZ() |
int |
hashCode() |
double |
length() |
double |
lengthSquared() |
Vector3d |
max(double x,
double y,
double z) |
Vector3d |
max(float x,
float y,
float z) |
Vector3d |
max(Vector3d v) |
Vector3d |
min(double x,
double y,
double z) |
Vector3d |
min(float x,
float y,
float z) |
Vector3d |
min(Vector3d v) |
Vector3d |
mul(double a) |
Vector3d |
mul(double x,
double y,
double z) |
Vector3d |
mul(float a) |
Vector3d |
mul(float x,
float y,
float z) |
Vector3d |
mul(Vector3d v) |
Vector3d |
negate() |
Vector3d |
normalize() |
Vector3d |
pow(double power) |
Vector3d |
pow(float pow) |
Vector3d |
project(double x,
double y,
double z) |
Vector3d |
project(float x,
float y,
float z) |
Vector3d |
project(Vector3d v) |
Vector3d |
round() |
Vector3d |
sub(double x,
double y,
double z) |
Vector3d |
sub(float x,
float y,
float z) |
Vector3d |
sub(Vector3d v) |
double[] |
toArray() |
Vector3d |
toDouble() |
Vector3f |
toFloat() |
Vector3i |
toInt() |
Vector3l |
toLong() |
String |
toString() |
Vector2d |
toVector2() |
Vector2d |
toVector2(boolean useZ) |
Vector4d |
toVector4() |
Vector4d |
toVector4(double w) |
Vector4d |
toVector4(float w) |
VectorNd |
toVectorN() |
public static final Vector3d ZERO
public static final Vector3d UNIT_X
public static final Vector3d UNIT_Y
public static final Vector3d UNIT_Z
public static final Vector3d ONE
public static final Vector3d RIGHT
public static final Vector3d UP
public static final Vector3d FORWARD
public Vector3d()
public Vector3d(Vector2d v)
public Vector3d(Vector2d v, float z)
public Vector3d(Vector2d v, double z)
public Vector3d(Vector3d v)
public Vector3d(Vector4d v)
public Vector3d(VectorNd v)
public Vector3d(float x,
float y,
float z)
public Vector3d(double x,
double y,
double z)
public double getX()
public double getY()
public double getZ()
public int getFloorX()
public int getFloorY()
public int getFloorZ()
public Vector3d add(float x, float y, float z)
public Vector3d add(double x, double y, double z)
public Vector3d sub(float x, float y, float z)
public Vector3d sub(double x, double y, double z)
public Vector3d mul(float a)
public Vector3d mul(float x, float y, float z)
public Vector3d mul(double x, double y, double z)
public Vector3d div(float a)
public Vector3d div(float x, float y, float z)
public Vector3d div(double x, double y, double z)
public double dot(Vector3d v)
public double dot(float x,
float y,
float z)
public double dot(double x,
double y,
double z)
public Vector3d project(float x, float y, float z)
public Vector3d project(double x, double y, double z)
public Vector3d cross(float x, float y, float z)
public Vector3d cross(double x, double y, double z)
public Vector3d pow(float pow)
public Vector3d min(float x, float y, float z)
public Vector3d min(double x, double y, double z)
public Vector3d max(float x, float y, float z)
public Vector3d max(double x, double y, double z)
public double distanceSquared(Vector3d v)
public double distanceSquared(float x,
float y,
float z)
public double distanceSquared(double x,
double y,
double z)
public double distance(Vector3d v)
public double distance(float x,
float y,
float z)
public double distance(double x,
double y,
double z)
public double lengthSquared()
lengthSquared in interface Vectordpublic int getMinAxis()
getMinAxis in interface Vectordint axis with minimal valuepublic int getMaxAxis()
getMaxAxis in interface Vectordint axis with maximum valuepublic Vector2d toVector2()
public Vector2d toVector2(boolean useZ)
public Vector4d toVector4()
public Vector4d toVector4(float w)
public Vector4d toVector4(double w)
public VectorNd toVectorN()
public int compareTo(Vector3d v)
compareTo in interface Comparable<Vector3d>public static Vector3d from(double n)
public static Vector3d from(double x, double y, double z)
public static Vector3d createRandomDirection(Random random)
random - to usepublic static Vector3d createDirectionDeg(float theta, float phi)
theta - in degreesphi - in degreespublic static Vector3d createDirectionDeg(double theta, double phi)
theta - in degreesphi - in degreespublic static Vector3d createDirectionRad(float theta, float phi)
theta - in radiansphi - in radianspublic static Vector3d createDirectionRad(double theta, double phi)
theta - in radiansphi - in radiansCopyright © 2013–2016 Flow Powered. All rights reserved.