|
CubeTwister 2.0alpha141 2011-10-13 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectidx3d.idx3d_Vector
public class idx3d_Vector
defines a 3d vector.
| Field Summary | |
|---|---|
float |
r
|
float |
theta
|
float |
x
|
float |
y
|
float |
z
|
| Constructor Summary | |
|---|---|
idx3d_Vector()
|
|
idx3d_Vector(float xpos,
float ypos,
float zpos)
|
|
| Method Summary | |
|---|---|
static idx3d_Vector |
add(idx3d_Vector a,
idx3d_Vector b)
adds 2 vectors. |
static float |
angle(idx3d_Vector a,
idx3d_Vector b)
returns the angle between 2 vectors. |
void |
buildCartesian()
Builds the cartesian coordinates out of the given cylindric coordinates. |
void |
buildCylindric()
Builds the cylindric coordinates out of the given cartesian coordinates. |
idx3d_Vector |
clone()
|
static float |
dotProduct(idx3d_Vector a,
idx3d_Vector b)
dotProduct product of 2 vectors. |
boolean |
equals(idx3d_Vector that)
|
boolean |
equals(java.lang.Object o)
|
idx3d_Vector |
getClone()
|
static idx3d_Vector |
getNormal(idx3d_Vector a,
idx3d_Vector b)
returns the normal vector of the plane defined by the two vectors. |
static idx3d_Vector |
getNormal(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector c)
returns the normal vector of the plane defined by the two vectors. |
static idx3d_Vector |
getNormalInto(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector c,
idx3d_Vector resultVector)
returns the normal vector of the plane defined by the two vectors. |
int |
hashCode()
|
static float |
len(idx3d_Vector a)
length of vector. |
float |
length()
Length of this vector. |
idx3d_Vector |
normalize()
Normalizes the vector. |
static float[] |
planeEquation(idx3d_Vector v1,
idx3d_Vector v2,
idx3d_Vector v3)
Computes the plane equation a*x + b*y + c*z + d = 0 from three given points in space. |
static idx3d_Vector |
random(float fact)
returns a random vector. |
idx3d_Vector |
reverse()
Reverses the vector. |
static idx3d_Vector |
scale(float f,
idx3d_Vector a)
substracts 2 vectors. |
void |
setTo(float xpos,
float ypos,
float zpos)
|
static idx3d_Vector |
sub(idx3d_Vector a,
idx3d_Vector b)
subtracts 2 vectors. |
java.lang.String |
toString()
|
idx3d_Vector |
transform(idx3d_Matrix m)
Modifies the vector by matrix m. |
idx3d_Vector |
transformInto(idx3d_Matrix m,
idx3d_Vector resultVector)
Modifies the vector by matrix m. |
static idx3d_Vector |
vectorProduct(idx3d_Vector a,
idx3d_Vector b)
returns a x b. |
static idx3d_Vector |
vectorProduct(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector c)
returns (b-a) x (c-a). |
static idx3d_Vector |
vectorProductInto(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector resultVector)
returns a x b. |
static idx3d_Vector |
vectorProductInto(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector c,
idx3d_Vector resultVector)
returns (b-a) x (c-a). |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public float x
public float y
public float z
public float r
public float theta
| Constructor Detail |
|---|
public idx3d_Vector()
public idx3d_Vector(float xpos,
float ypos,
float zpos)
| Method Detail |
|---|
public void setTo(float xpos,
float ypos,
float zpos)
public idx3d_Vector normalize()
public idx3d_Vector reverse()
public float length()
public idx3d_Vector transform(idx3d_Matrix m)
public idx3d_Vector transformInto(idx3d_Matrix m,
idx3d_Vector resultVector)
public void buildCylindric()
public void buildCartesian()
public static idx3d_Vector getNormal(idx3d_Vector a,
idx3d_Vector b)
public static idx3d_Vector getNormal(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector c)
public static idx3d_Vector getNormalInto(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector c,
idx3d_Vector resultVector)
public static idx3d_Vector vectorProduct(idx3d_Vector a,
idx3d_Vector b)
public static idx3d_Vector vectorProductInto(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector resultVector)
public static idx3d_Vector vectorProduct(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector c)
public static idx3d_Vector vectorProductInto(idx3d_Vector a,
idx3d_Vector b,
idx3d_Vector c,
idx3d_Vector resultVector)
public static float angle(idx3d_Vector a,
idx3d_Vector b)
public static idx3d_Vector add(idx3d_Vector a,
idx3d_Vector b)
public static idx3d_Vector sub(idx3d_Vector a,
idx3d_Vector b)
public static float dotProduct(idx3d_Vector a,
idx3d_Vector b)
public static idx3d_Vector scale(float f,
idx3d_Vector a)
public static float len(idx3d_Vector a)
public static idx3d_Vector random(float fact)
public static float[] planeEquation(idx3d_Vector v1,
idx3d_Vector v2,
idx3d_Vector v3)
v1 - v2 - v3 - public java.lang.String toString()
toString in class java.lang.Objectpublic idx3d_Vector getClone()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean equals(idx3d_Vector that)
public int hashCode()
hashCode in class java.lang.Objectpublic idx3d_Vector clone()
clone in class java.lang.Object
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||