public class Vec3f extends Object
| Modifier and Type | Field and Description |
|---|---|
static Vec3f |
NEG_X_AXIS |
static Vec3f |
NEG_Y_AXIS |
static Vec3f |
NEG_Z_AXIS |
private float |
x |
static Vec3f |
X_AXIS |
private float |
y |
static Vec3f |
Y_AXIS |
private float |
z |
static Vec3f |
Z_AXIS |
| Constructor and Description |
|---|
Vec3f() |
Vec3f(float x,
float y,
float z) |
Vec3f(Vec3f arg) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Vec3f b)
this = this + b
|
void |
add(Vec3f a,
Vec3f b)
this = a + b
|
Vec3f |
addScaled(float s,
Vec3f arg)
Returns this + s * arg; creates new vector
|
void |
addScaled(Vec3f a,
float s,
Vec3f b)
this = a + s * b
|
void |
componentMul(Vec3f arg)
Sets each component of this vector to the product of the
component with the corresponding component of the argument
vector.
|
Vec3f |
copy() |
Vec3f |
cross(Vec3f arg)
Returns this cross arg; creates new vector
|
void |
cross(Vec3f a,
Vec3f b)
this = a cross b.
|
float |
dot(Vec3f arg) |
float |
get(int i)
Gets the ith component, 0 <= i < 3
|
float |
length() |
float |
lengthSquared() |
Vec3f |
minus(Vec3f arg)
Returns this - arg; creates new vector
|
void |
normalize() |
Vec3f |
plus(Vec3f arg)
Returns this + arg; creates new vector
|
void |
scale(float val)
this = this * val
|
void |
set(float x,
float y,
float z) |
void |
set(int i,
float val)
Sets the ith component, 0 <= i < 3
|
void |
set(Vec3f arg) |
void |
setX(float x) |
void |
setY(float y) |
void |
setZ(float z) |
void |
sub(Vec3f b)
this = this - b
|
void |
sub(Vec3f a,
Vec3f b)
this = a - b
|
Vec3f |
times(float val)
Returns this * val; creates new vector
|
Vec3d |
toDouble()
Convert to double-precision
|
String |
toString() |
Vecf |
toVecf() |
float |
x() |
float |
y() |
float |
z() |
public static final Vec3f X_AXIS
public static final Vec3f Y_AXIS
public static final Vec3f Z_AXIS
public static final Vec3f NEG_X_AXIS
public static final Vec3f NEG_Y_AXIS
public static final Vec3f NEG_Z_AXIS
private float x
private float y
private float z
public Vec3f()
public Vec3f(Vec3f arg)
public Vec3f(float x,
float y,
float z)
public Vec3f copy()
public Vec3d toDouble()
public void set(Vec3f arg)
public void set(float x,
float y,
float z)
public void set(int i,
float val)
public float get(int i)
public float x()
public float y()
public float z()
public void setX(float x)
public void setY(float y)
public void setZ(float z)
public float dot(Vec3f arg)
public float length()
public float lengthSquared()
public void normalize()
public Vec3f times(float val)
public void scale(float val)
public void add(Vec3f b)
public void sub(Vec3f b)
public void cross(Vec3f a, Vec3f b)
public void componentMul(Vec3f arg)
public Vecf toVecf()
Copyright © 2007–2017 Gephi Consortium. All rights reserved.