|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiicm.utils3d.Vec3f
public final class Vec3f
Vec3f - small utilities for 3D vectors. Copyright (c) 1997 IICM
Field Summary | |
---|---|
(package private) static float |
slerpN_epsilon
|
float[] |
value_
3D vector of values |
static int |
X
|
static int |
Y
|
static int |
Z
|
Constructor Summary | |
---|---|
Vec3f()
constructor (0, 0, 0) |
|
Vec3f(float[] a)
constructor (a[0], a[1], a[2]). values are copied into internal array. |
|
Vec3f(float x,
float y,
float z)
constructor (x, y, z) |
Method Summary | |
---|---|
void |
assign(float[] a)
assignment (a[0], a[1], a[2]). values are copied into internal array. |
void |
assign(float x,
float y,
float z)
assignment (x, y, z) |
void |
assign(Vec3f b)
assignment (copying, v = b) |
void |
cross(float[] u,
float[] v)
|
void |
cross(Vec3f a,
Vec3f b)
assign cross product a X b to this vector. |
void |
decrease(float[] w)
|
void |
decrease(Vec3f b)
decrease (v -= b) |
static float |
dot(float[] u,
float[] v)
|
static float |
dot(Vec3f a,
Vec3f b)
dot product. |
static void |
getOrthogonalVector(float[] v,
float[] axis)
find a vector that is orthogonal to non-zero vector v. |
static float |
getRotationAngle(Vec3f start)
get the angle which the xy plane must be rotatated about the Y-axis (unchanged) such that the new normal vector (Z-axis) points towards start |
void |
increase(float[] w)
|
void |
increase(Vec3f b)
increase (v += b) |
void |
negate()
negate (v = -v) |
float |
normalize()
normalize. return old length |
static java.lang.String |
print(float[] v)
print a 3D float array (debugging tool) |
void |
rayat(float[] a,
float t,
float[] b)
ray equation (a + t * b) |
void |
scale(float f)
scale by a scalar |
static void |
scale(float[] v,
float f)
|
void |
sincrease(float f,
float[] w)
|
void |
sincrease(float f,
Vec3f b)
sincrease (v += f * b). increase by a scaled vector |
static void |
slerpNorm(float[] a1,
int a1offs,
float[] a2,
int a2offs,
float t,
float[] a,
int aoffs)
spherical linear interpolation of 3D vector. return a vector that lies "at t between a1 and a2", i.e. a1 for t == 0, a2 for t == 1 and an interpolation of a1 and a2 for values between 0 and 1. |
java.lang.String |
toString()
conversion to string: "(x, y, z)". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public float[] value_
public static final int X
public static final int Y
public static final int Z
static final float slerpN_epsilon
Constructor Detail |
---|
public Vec3f()
public Vec3f(float x, float y, float z)
public Vec3f(float[] a)
Method Detail |
---|
public void assign(float x, float y, float z)
public void assign(float[] a)
public void assign(Vec3f b)
public void negate()
public void increase(Vec3f b)
public void increase(float[] w)
public void decrease(Vec3f b)
public void decrease(float[] w)
public void sincrease(float f, Vec3f b)
public void sincrease(float f, float[] w)
public void rayat(float[] a, float t, float[] b)
public void scale(float f)
public static void scale(float[] v, float f)
public static float dot(Vec3f a, Vec3f b)
public static float dot(float[] u, float[] v)
public void cross(Vec3f a, Vec3f b)
public void cross(float[] u, float[] v)
public float normalize()
public static void getOrthogonalVector(float[] v, float[] axis)
public static float getRotationAngle(Vec3f start)
public static void slerpNorm(float[] a1, int a1offs, float[] a2, int a2offs, float t, float[] a, int aoffs)
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String print(float[] v)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |