|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.joglutils.msg.math.Vec3f
public class Vec3f
3-element single-precision vector
Field Summary | |
---|---|
static Vec3f |
NEG_X_AXIS
|
static Vec3f |
NEG_Y_AXIS
|
static Vec3f |
NEG_Z_AXIS
|
static Vec3f |
X_AXIS
|
static Vec3f |
Y_AXIS
|
static Vec3f |
Z_AXIS
|
Constructor Summary | |
---|---|
Vec3f()
|
|
Vec3f(float x,
float y,
float z)
|
|
Vec3f(Vec3f arg)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public Vec3f()
public Vec3f(Vec3f arg)
public Vec3f(float x, float y, float z)
Method Detail |
---|
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 Vec3f plus(Vec3f arg)
public void add(Vec3f b)
public void add(Vec3f a, Vec3f b)
public Vec3f addScaled(float s, Vec3f arg)
public void addScaled(Vec3f a, float s, Vec3f b)
public Vec3f minus(Vec3f arg)
public void sub(Vec3f b)
public void sub(Vec3f a, Vec3f b)
public Vec3f cross(Vec3f arg)
public void cross(Vec3f a, Vec3f b)
public void componentMul(Vec3f arg)
public Vecf toVecf()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |