|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectVector4
public class Vector4
Class for handeling all vector computations
Field Summary | |
---|---|
float |
w
|
float |
x
|
float |
y
|
float |
z
|
Constructor Summary | |
---|---|
Vector4()
Default constructor |
|
Vector4(float x,
float y,
float z)
Constructor |
|
Vector4(float x,
float y,
float z,
float w)
Constructor |
|
Vector4(Vector4 original)
Copy constructor |
Method Summary | |
---|---|
Vector4 |
add(Vector4 b)
Adds a vector to current vector. |
Vector4 |
crossProduct(Vector4 o)
Compute the cross product between two vectors |
static Vector4 |
crossProduct(Vector4 n,
Vector4 o)
Compute the cross product between two vectors |
float |
dotProduct(Vector4 v)
Compute the dot product of two vectors |
float |
getLength()
Gets the length of a vector |
Vector4 |
negate()
Negate a vector |
static Vector4 |
negate(Vector4 v)
Negate a vector |
Vector4 |
normalize()
Normalize |
Vector4 |
normalize(Vector4 n)
Normalize |
Vector4 |
pixel2world(Camera c)
Convert image coordinates to world coordinates, no projection. |
Vector4 |
project(Camera c)
Projects a point in world coordinates to the origin cameras viewplane. |
Vector4 |
project(Vector4 vect3D,
Camera c)
Projects a point in world coordinates to the origin cameras viewplane. |
void |
setVector4(float x,
float y,
float z,
float w)
Set new values to the vector |
Vector4 |
sub(Vector4 b)
Subtracts a vector from current vector. |
static Vector4 |
sub(Vector4 a,
Vector4 b)
Subtracts a vector from current vector. |
Vector4 |
world2pixel(Camera c)
Convert world coordinates to image coordinates, no projection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float x
public float y
public float z
public float w
Constructor Detail |
---|
public Vector4()
public Vector4(float x, float y, float z, float w)
x
- The vectors x coeficienty
- The vectors y coeficientz
- The vectors z coeficientw
- The vectors w coeficientpublic Vector4(float x, float y, float z)
x
- The vectors x coeficienty
- The vectors y coeficientz
- The vectors z coeficientpublic Vector4(Vector4 original)
original
- The vector to be copiedMethod Detail |
---|
public void setVector4(float x, float y, float z, float w)
x
- x-valuey
- y-valuez
- z-valuew
- w-valuepublic Vector4 negate()
public static Vector4 negate(Vector4 v)
v
- The vector to negate
public float getLength()
public Vector4 normalize()
public Vector4 normalize(Vector4 n)
n
- The vector to normalize
public static Vector4 crossProduct(Vector4 n, Vector4 o)
n
- The first vectoro
- The second vector
public Vector4 crossProduct(Vector4 o)
o
- The second vector
public float dotProduct(Vector4 v)
v
- the second vector
public Vector4 add(Vector4 b)
b
- The vector to add
public Vector4 sub(Vector4 b)
b
- The vector to subtract
public static Vector4 sub(Vector4 a, Vector4 b)
a
- The first vectorb
- The vector to subtract
public Vector4 project(Vector4 vect3D, Camera c)
vect3D
- the 3d-point to projectc
- the camera whose viewplane the point is to be projected to
public Vector4 project(Camera c)
c
- the camera whose viewplane the point is to be projected to
public Vector4 world2pixel(Camera c)
c
- The camera containing the image coordinates.
public Vector4 pixel2world(Camera c)
c
- The camera containing the image coordinates.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |