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