|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object crystalspace.jbind.impl.csNativeObject crystalspace.jbind.impl.csgeom.vector4.csVector4
A 4D vector.
Field Summary |
Fields inherited from class crystalspace.jbind.impl.csNativeObject |
ImplFactory, nPointer |
Constructor Summary | |
csVector4()
Make a new vector. |
|
csVector4(csDVector4 v)
Copy from a double-vector. |
|
csVector4(csVector3 v)
Convert from csVector3. |
|
csVector4(csVector4 v)
Copy Constructor. |
|
csVector4(float m)
Make a new initialized vector. |
|
csVector4(float ix,
float iy)
Make a new vector and initialize with the given values. |
|
csVector4(float ix,
float iy,
float iz)
Make a new vector and initialize with the given values. |
|
csVector4(float ix,
float iy,
float iz,
float iw)
Make a new vector and initialize with the given values. |
|
csVector4(iPointer nPointer)
|
Method Summary | |
csVector4 |
add()
Unary + operator. |
static csDVector4 |
add(csDVector4 v1,
csVector4 v2)
Add two vectors of differing type, raise the csVector4 to DVector3. |
csVector4 |
add(csVector4 v)
Add another vector to this vector. |
static csDVector4 |
add(csVector4 v1,
csDVector4 v2)
Add two vectors of differing type, raise the csVector4 to DVector3. |
static csVector4 |
add(csVector4 v1,
csVector4 v2)
Add two vectors. |
void |
cross(csVector4 v1,
csVector4 v2)
Take cross product of two vectors and put result in this vector. |
static csDVector4 |
div(csVector4 v,
double f)
Divide a vector by a scalar double. |
static csVector4 |
div(csVector4 v,
float f)
Divide a vector by a scalar. |
static csVector4 |
div(csVector4 v,
int f)
Divide a vector by a scalar int. |
csVector4 |
div(float f)
Divide this vector by a scalar. |
static boolean |
equals(csVector4 v1,
csVector4 v2)
Check if two vectors are equal. |
static boolean |
greater(float f,
csVector4 v)
Test if each component of a vector is less than a small epsilon value. |
protected boolean |
isNativePointerValidSafe(long pointer)
|
boolean |
isZero()
Query if the vector is zero. |
boolean |
isZero(float precision)
Query if the vector is zero. |
float |
item(int n)
Returns n-th component of the vector. |
void |
item(int n,
float f)
Set n-th component of the vector. |
static boolean |
less(csVector4 v,
float f)
Test if each component of a vector is less than a small epsilon value. |
csVector4 |
minus()
Unary - operator. |
static csDVector4 |
minus(csDVector4 v1,
csVector4 v2)
Subtract two vectors of differing type, cast to double. |
csVector4 |
minus(csVector4 v)
Subtract another vector from this vector. |
static csDVector4 |
minus(csVector4 v1,
csDVector4 v2)
Subtract two vectors of differing type, cast to double. |
static csVector4 |
minus(csVector4 v1,
csVector4 v2)
Subtract two vectors. |
static csVector4 |
mod(csVector4 v1,
csVector4 v2)
Take the cross product of two vectors. |
static float |
mul(csVector4 v1,
csVector4 v2)
Take the dot product of two vectors. |
static csDVector4 |
mul(csVector4 v,
double f)
Multiply a vector and a scalar double. |
static csVector4 |
mul(csVector4 v,
float f)
Multiply a vector and a scalar. |
static csVector4 |
mul(csVector4 v,
int f)
Multiply a vector and a scalar int. |
static csDVector4 |
mul(double f,
csVector4 v)
Multiply a vector and a scalar double. |
csVector4 |
mul(float f)
Multiply this vector by a scalar. |
static csVector4 |
mul(float f,
csVector4 v)
Multiply a vector and a scalar. |
static csVector4 |
mul(int f,
csVector4 v)
Multiply a vector and a scalar int. |
protected void |
nDelete(long pointer)
|
static boolean |
nEquals(csVector4 v1,
csVector4 v2)
Check if two vectors are not equal. |
float |
norm()
Returns the norm of this vector. |
static float |
norm(csVector4 v)
Returns the norm (magnitude) of a vector. |
void |
normalize()
Scale this vector to length = 1.0;. |
static csVector4 |
projectl(csVector4 v1,
csVector4 v2)
Project one vector onto another. |
static csVector4 |
projectr(csVector4 v1,
csVector4 v2)
Project one vector onto another. |
void |
set(csVector4 v)
Set the value of this vector. |
void |
set(float sx,
float sy,
float sz,
float sw)
Set the value of this vector. |
float |
squaredNorm()
Return the squared norm (magnitude) of this vector. |
csVector4 |
unit()
Returns the unit vector in the direction of this vector. |
static csVector4 |
unit(csVector4 v)
Normalizes a vector to a unit vector. |
float |
w()
The W component of the vector. |
void |
w(float W)
The W component of the vector. |
float |
x()
The X component of the vector. |
void |
x(float X)
The X component of the vector. |
float |
y()
The Y component of the vector. |
void |
y(float Y)
The Y component of the vector. |
float |
z()
The Z component of the vector. |
void |
z(float Z)
The Z component of the vector. |
Methods inherited from class crystalspace.jbind.impl.csNativeObject |
changePointer, equals, finalize, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public csVector4(iPointer nPointer)
nPointer
- public csVector4()
public csVector4(float m)
m
- public csVector4(float ix, float iy)
ix
- iy
- public csVector4(float ix, float iy, float iz)
ix
- iy
- iz
- public csVector4(float ix, float iy, float iz, float iw)
ix
- iy
- iz
- iw
- public csVector4(csVector4 v)
v
- public csVector4(csDVector4 v)
v
- public csVector4(csVector3 v)
v
- Method Detail |
protected void nDelete(long pointer)
nDelete
in class csNativeObject
csNativeObject.nDelete(long)
protected boolean isNativePointerValidSafe(long pointer)
isNativePointerValidSafe
in class csNativeObject
csNativeObject.isNativePointerValidSafe(long)
public void cross(csVector4 v1, csVector4 v2)
v1
- v2
- public boolean isZero()
public boolean isZero(float precision)
precision
-
public static float norm(csVector4 v)
v
-
public float norm()
public void normalize()
public csVector4 mul(float f)
f
-
public csVector4 add()
public csVector4 add(csVector4 v)
v
-
public csVector4 minus()
public csVector4 minus(csVector4 v)
v
-
public csVector4 div(float f)
f
-
public float item(int n)
n
-
public void item(int n, float f)
n
- f
- public void set(csVector4 v)
v
- public void set(float sx, float sy, float sz, float sw)
sx
- sy
- sz
- sw
- public float squaredNorm()
public static csVector4 unit(csVector4 v)
v
-
public csVector4 unit()
public static csVector4 mul(int f, csVector4 v)
f
-
public static csVector4 mul(csVector4 v, int f)
v
- f
-
public static csDVector4 mul(double f, csVector4 v)
f
- v
-
public static csDVector4 mul(csVector4 v, double f)
v
- f
-
public static csVector4 mul(float f, csVector4 v)
f
- v
-
public static csVector4 mul(csVector4 v, float f)
v
- f
-
public static float mul(csVector4 v1, csVector4 v2)
v1
- v2
-
public static boolean nEquals(csVector4 v1, csVector4 v2)
v1
- v2
-
public static csVector4 mod(csVector4 v1, csVector4 v2)
v1
- v2
-
public static csDVector4 add(csVector4 v1, csDVector4 v2)
v1
- v2
-
public static csDVector4 add(csDVector4 v1, csVector4 v2)
v1
- v2
-
public static csVector4 add(csVector4 v1, csVector4 v2)
v1
- v2
-
public static csDVector4 minus(csDVector4 v1, csVector4 v2)
v1
- v2
-
public static csDVector4 minus(csVector4 v1, csDVector4 v2)
v1
- v2
-
public static csVector4 minus(csVector4 v1, csVector4 v2)
v1
- v2
-
public static csVector4 div(csVector4 v, int f)
v
- f
-
public static csDVector4 div(csVector4 v, double f)
v
- f
-
public static csVector4 div(csVector4 v, float f)
v
- f
-
public static boolean less(csVector4 v, float f)
v
- f
-
public static csVector4 projectl(csVector4 v1, csVector4 v2)
v1
- v2
-
public static boolean equals(csVector4 v1, csVector4 v2)
v1
- v2
-
public static boolean greater(float f, csVector4 v)
f
- v
-
public static csVector4 projectr(csVector4 v1, csVector4 v2)
v1
- v2
-
public float w()
public void w(float W)
W
- public float x()
public void x(float X)
X
- public float y()
public void y(float Y)
Y
- public float z()
public void z(float Z)
Z
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |