|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjautil.geometry.Vector3f
public class Vector3f
A 3-dimensional cartesian vector with float coordinates, including a variety of standard operations.
Constructor Summary | |
---|---|
Vector3f()
Constructs this Vector3f with zeros. |
|
Vector3f(float[] ff)
Constructs this Vector3f from the given array. |
|
Vector3f(float a,
float b,
float c)
Constructs this Vector3f from the given arguments. |
|
Vector3f(JAInputStream jins)
Constructs this Vector3f from the given stream. |
|
Vector3f(Vector3f v)
Constructs this Vector3f from the given arguments. |
Method Summary | |
---|---|
Vector3f |
crossProd(Vector3f v)
Returns the vector product of this Vector3f with the given one. |
Vector3f |
divScalar(float f)
Returns a new Vector3f obtained by dividing this one by the given scalar. |
Vector3f |
divScalarEq(float f)
Returns this Vector3f after dividing it by a given scalar. |
float |
dotProd(Vector3f v)
Returns the inner product of this Vector3f with the given one. |
void |
incrX(float ix)
Increments the x-component of this vector. |
void |
incrY(float iy)
Increments the y-component of this vector. |
void |
incrZ(float iz)
Increments the z-component of this vector. |
float |
length()
Returns the length of this Vector3f. |
Vector3f |
minus(Vector3f v)
Returns a new Vector3f obtained by subtracting the given one from this one. |
Vector3f |
minusEq(Vector3f v)
Subtracts the given Vector3f from this one (and returns this one). |
Vector3f |
multScalar(float f)
Returns a new Vector3f obtained by multiplying this one by the given scalar. |
Vector3f |
multScalarEq(float f)
Returns this Vector3f after multiplying it by a given scalar. |
Vector3f |
negate()
Returns a new Vector3f obtained by negating this one. |
Vector3f |
negateEq()
Returns this Vector3f after negating it. |
Vector3f |
plus(float[] vf)
Returns a new Vector3f obtained by adding the given value array to this vector. |
Vector3f |
plus(Vector3f v)
Returns a new Vector3f obtained by adding the given one to this one. |
Vector3f |
plusEq(float[] vf)
Adds the vector defined by the given values to this one (and returns this one). |
Vector3f |
plusEq(float xx,
float yy,
float zz)
Adds the vector defined by the given values to this one (and returns this one). |
Vector3f |
plusEq(Vector3f v)
Adds the given Vector3f to this one (and returns this one). |
float |
projectionOn(Vector3f v)
Returns the projection of this Vector3f on the given Vector3f, v. |
void |
save(JAOutputStream jouts)
Writes this Vector3f to the given stream. |
float |
select(int i)
Returns the value of the field selected by i (zero-based). |
void |
set(float[] v)
Sets this Vector3f's state from the given arguments. |
void |
set(float[] v,
int i)
Sets this Vector3f's state from the given array, starting at the given position. |
void |
set(float a,
float b,
float c)
Sets this Vector3f's state from the given arguments. |
void |
set(Vector3f v)
Sets this Vector3f's state from the given one. |
void |
setX(float x)
Sets the x-component of this vector. |
void |
setY(float y)
Sets the y-component of this vector. |
void |
setZ(float z)
Sets the z-component of this vector. |
void |
setZero()
Sets this Vector3f to zero. |
float |
squaredLength()
Returns the square of the length of this Vector3f. |
float[] |
toFloats()
Returns a new array of floats containing the (x,y,z) component values for this Vector. |
void |
toFloats(float[] ff)
Copy the components of this Vector3f to the given array. |
Vector3f |
unitCrossProd(Vector3f v)
Returns the vector product of this Vector3f with the given one, scaled to unit length. |
float |
unitize()
Scale this Vector3f to be a unit vector, with a standard tolerance value (1.0e-06). |
float |
unitize(float tolerance)
Scales this Vector3f to be a unit vector, provided its length exceeds the given tolerance, and returns the length. |
float |
x()
Returns the x-component of this vector. |
float |
y()
Returns the y-component of this vector. |
float |
z()
Returns the z-component of this vector. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Vector3f()
public Vector3f(float a, float b, float c)
public Vector3f(float[] ff)
public Vector3f(Vector3f v)
public Vector3f(JAInputStream jins) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public float[] toFloats()
public void toFloats(float[] ff)
public void setZero()
public void set(float a, float b, float c)
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 void incrX(float ix)
public void incrY(float iy)
public void incrZ(float iz)
public void set(Vector3f v)
public void set(float[] v)
public void set(float[] v, int i)
public void save(JAOutputStream jouts) throws java.io.IOException
java.io.IOException
public float select(int i)
public Vector3f plus(Vector3f v)
public Vector3f plus(float[] vf)
public Vector3f minus(Vector3f v)
public Vector3f multScalar(float f)
public Vector3f divScalar(float f)
public Vector3f negate()
public Vector3f plusEq(Vector3f v)
public Vector3f plusEq(float[] vf)
public Vector3f plusEq(float xx, float yy, float zz)
public Vector3f minusEq(Vector3f v)
public Vector3f multScalarEq(float f)
public Vector3f divScalarEq(float f)
public Vector3f negateEq()
public float unitize(float tolerance)
public float unitize()
public float squaredLength()
public float length()
public float dotProd(Vector3f v)
public Vector3f crossProd(Vector3f v)
public Vector3f unitCrossProd(Vector3f v)
public float projectionOn(Vector3f v)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |