|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcrystalspace.jbind.impl.csNativeObject
crystalspace.jbind.impl.csgeom.vector2.csVector2
Field Summary |
Fields inherited from class crystalspace.jbind.impl.csNativeObject |
ImplFactory, nPointer |
Constructor Summary | |
csVector2()
Make a new vector. |
|
csVector2(float x,
float y)
Make a new vector and initialize with the given values. |
|
csVector2(iPointer nPointer)
Create a java csVector2 object which points to the native csVector2 nPointer. |
Method Summary | |
csVector2 |
add()
Unary + operator. |
csVector2 |
add(csVector2 v)
Add another vector to this vector. |
static csVector2 |
add(csVector2 v1,
csVector2 v2)
Add two vectors. |
static csVector2 |
div(csVector2 v,
float f)
Divide a vector by a scalar. |
csVector2 |
div(float f)
Divide this vector by a scalar. |
static boolean |
equals(csVector2 v1,
csVector2 v2)
Check if two vectors are equal. |
boolean |
equals(java.lang.Object obj)
Check if two vectors are equal. |
static boolean |
greater(float f,
csVector2 v)
Test if each component of a vector is greater than a small epsilon value. |
protected boolean |
isNativePointerValidSafe(long nPointer)
|
static boolean |
less(csVector2 v,
float f)
Test if each component of a vector is less than a small epsilon value. |
csVector2 |
minus()
Unary - operator. |
csVector2 |
minus(csVector2 v)
Subtract another vector from this vector. |
static csVector2 |
minus(csVector2 v1,
csVector2 v2)
Subtract two vectors. |
static float |
mul(csVector2 v1,
csVector2 v2)
Take the dot product of two vectors. |
static csVector2 |
mul(csVector2 v,
float f)
Multiply a vector and a scalar. |
csVector2 |
mul(float f)
Multiply this vector by a scalar. |
static csVector2 |
mul(float f,
csVector2 v)
Multiply a vector and a scalar. |
protected void |
nDelete(long pointer)
|
static boolean |
NEquals(csVector2 v1,
csVector2 v2)
Check if two vectors are not equal. |
float |
norm()
Return the norm (magnitude) of this vector. |
static float |
norm(csVector2 v)
Return the norm (magnitude) of a 2D vector. |
void |
rotate(float angle)
Rotate vector around the origin by a given angle in radians. |
void |
set(csVector2 v)
Set vector to given values. |
void |
set(float ix,
float iy)
Set vector to given values. |
float |
squaredNorm()
Return the squared norm (magnitude) of this vector. |
Methods inherited from class crystalspace.jbind.impl.csNativeObject |
changePointer, 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 csVector2(iPointer nPointer)
nPointer
- public csVector2()
public csVector2(float x, float y)
x
- y
- Method Detail |
protected void nDelete(long pointer)
nDelete
in class csNativeObject
csNativeObject.nDelete(long)
protected boolean isNativePointerValidSafe(long nPointer)
isNativePointerValidSafe
in class csNativeObject
crystalspace.jbind.impl.csNativeObject#isNativePointerValidSafe()
public final void set(float ix, float iy)
ix
- iy
- public final void set(csVector2 v)
v
- public final float norm()
public final float squaredNorm()
public final void rotate(float angle)
angle
- public final csVector2 add(csVector2 v)
v
-
public final csVector2 minus(csVector2 v)
v
-
public final csVector2 mul(float f)
f
-
public final csVector2 div(float f)
f
-
public final csVector2 add()
public final csVector2 minus()
public static final float norm(csVector2 v)
v
-
public static final csVector2 add(csVector2 v1, csVector2 v2)
v1
- v2
-
public static final csVector2 minus(csVector2 v1, csVector2 v2)
v1
- v2
-
public static final float mul(csVector2 v1, csVector2 v2)
v1
- v2
-
public static final csVector2 mul(csVector2 v, float f)
v
- f
-
public static final csVector2 mul(float f, csVector2 v)
f
- v
-
public static final csVector2 div(csVector2 v, float f)
v
- f
-
public static final boolean equals(csVector2 v1, csVector2 v2)
v1
- v2
-
public static final boolean NEquals(csVector2 v1, csVector2 v2)
v1
- v2
-
public static final boolean less(csVector2 v, float f)
v
- f
-
public static final boolean greater(float f, csVector2 v)
f
- v
-
public final boolean equals(java.lang.Object obj)
equals
in class csNativeObject
Object.equals(java.lang.Object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |