crystalspace.jbind.impl.csgeom.transfrm
Class csReversibleTransform

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csgeom.transfrm.csTransform
          extended bycrystalspace.jbind.impl.csgeom.transfrm.csReversibleTransform
All Implemented Interfaces:
iPointer

public class csReversibleTransform
extends csTransform

A class which defines a reversible transformation from one coordinate system to another by maintaining an inverse transformation matrix.

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csReversibleTransform()
          Initialize with the identity transformation.
csReversibleTransform(csMatrix3 o2t, csVector3 pos)
          Initialize with the given transformation.
csReversibleTransform(csReversibleTransform t)
          Initialize with the given transformation.
csReversibleTransform(csTransform t)
          Initialize with the given transformation.
csReversibleTransform(iPointer pointer)
          Create a java csReversibleTransform object which points to the native csReversibleTransform nPointer.
 
Method Summary
static csPlane3 div(csPlane3 p, csReversibleTransform t)
          Reverse a transformation on a Plane.
static csReversibleTransform div(csReversibleTransform t1, csReversibleTransform t2)
          Combine two transforms, reversing t2 then applying t1
static csSphere div(csSphere p, csReversibleTransform t)
          Reverse a transformation on a sphere.
static csVector3 div(csVector3 v, csReversibleTransform t)
          Reverse a transformation on a 3D vector.
static csPlane3 dive(csPlane3 p, csReversibleTransform t)
          Reverse a transformation on a Plane.
static csReversibleTransform dive(csReversibleTransform t1, csReversibleTransform t2)
          Combine two transforms, reversing t2 then applying t1.
static csVector3 dive(csVector3 v, csReversibleTransform t)
          Reverse a transformation on a 3D vector.
 csReversibleTransform getInverse()
          Get the inverse of this transform.
 csMatrix3 getT2O()
          Get 'this' to 'other' transformation matrix.
 csVector3 getT2OTranslation()
          Get 'this' to 'other' translation.
protected  boolean isNativePointerValidSafe(long nPointer)
           
 void lookAt(csVector3 v, csVector3 up)
          Let this transform look at the given (x,y,z) point, using up as the up-vector.
static csReversibleTransform mul(csReversibleTransform t1, csReversibleTransform t2)
          Combine two transforms, rightmost first.
static csReversibleTransform mule(csReversibleTransform t1, csReversibleTransform t2)
          Combine two transforms, rightmost first.
protected  void nDelete(long pointer)
           
 void rotateOther(csMatrix3 m)
          Use the given transformation matrix, in other space, to reorient the transformation.
 void rotateOther(csVector3 v, float angle)
          Rotate the transform by the angle (radians) around the given vector, in other coordinates.
 void rotateThis(csMatrix3 m)
          Use the given transformation matrix, in this space, to reorient the transformation.
 void rotateThis(csVector3 v, float angle)
          Rotate the transform by the angle (radians) around the given vector, in these coordinates.
 void setT2O(csMatrix3 m)
          Set 'other' to 'this' transformation matrix.
 csPlane3 this2Other(csPlane3 p)
          Convert a plane in 'this' space to 'other' space.
 void this2Other(csPlane3 p, csVector3 point, csPlane3 result)
          Convert a plane in 'this' space to 'other' space.
 csSphere this2Other(csSphere s)
          Convert a sphere in 'this' space to 'other' space.
 csVector3 this2Other(csVector3 v)
          Convert vector v in 'this' space to 'other' space.
 csPlane3 this2OtherRelative(csPlane3 p)
          Convert a plane in 'this' space to 'other' space.
 csVector3 this2OtherRelative(csVector3 v)
          Convert vector v in 'this' space to a vector in 'other' space, relative to local origin.
 
Methods inherited from class crystalspace.jbind.impl.csgeom.transfrm.csTransform
getO2T, getO2TTranslation, getOrigin, getReflect, identity, isIdentity, mul, mul, mul, mul, mul, mul, mul, mul, mul, mule, mule, mule, mule, other2This, other2This, other2This, other2This, other2ThisRelative, other2ThisRelative, setO2T, setO2TTranslation, setOrigin, translate
 
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

csReversibleTransform

public csReversibleTransform(iPointer pointer)
Create a java csReversibleTransform object which points to the native csReversibleTransform nPointer.

Parameters:
pointer -

csReversibleTransform

public csReversibleTransform()
Initialize with the identity transformation.


csReversibleTransform

public csReversibleTransform(csMatrix3 o2t,
                             csVector3 pos)
Initialize with the given transformation.

Parameters:
o2t -
pos -

csReversibleTransform

public csReversibleTransform(csTransform t)
Initialize with the given transformation.

Parameters:
t -

csReversibleTransform

public csReversibleTransform(csReversibleTransform t)
Initialize with the given transformation.

Parameters:
t -
Method Detail

getT2O

public final csMatrix3 getT2O()
Get 'this' to 'other' transformation matrix.

Returns:

getT2OTranslation

public final csVector3 getT2OTranslation()
Get 'this' to 'other' translation.

Returns:

getInverse

public final csReversibleTransform getInverse()
Get the inverse of this transform.

Returns:

setT2O

public final void setT2O(csMatrix3 m)
Set 'other' to 'this' transformation matrix.

Parameters:
m -

this2Other

public final csVector3 this2Other(csVector3 v)
Convert vector v in 'this' space to 'other' space.

Parameters:
v -
Returns:

this2OtherRelative

public final csVector3 this2OtherRelative(csVector3 v)
Convert vector v in 'this' space to a vector in 'other' space, relative to local origin.

Parameters:
v -
Returns:

this2Other

public final csPlane3 this2Other(csPlane3 p)
Convert a plane in 'this' space to 'other' space.

Parameters:
p -
Returns:

this2OtherRelative

public final csPlane3 this2OtherRelative(csPlane3 p)
Convert a plane in 'this' space to 'other' space.

Parameters:
p -
Returns:

this2Other

public final void this2Other(csPlane3 p,
                             csVector3 point,
                             csPlane3 result)
Convert a plane in 'this' space to 'other' space.

Parameters:
p -
point -
result -

this2Other

public final csSphere this2Other(csSphere s)
Convert a sphere in 'this' space to 'other' space.

Parameters:
s -
Returns:

rotateOther

public final void rotateOther(csVector3 v,
                              float angle)
Rotate the transform by the angle (radians) around the given vector, in other coordinates.

Parameters:
v -
angle -

rotateThis

public final void rotateThis(csVector3 v,
                             float angle)
Rotate the transform by the angle (radians) around the given vector, in these coordinates.

Parameters:
v -
angle -

rotateOther

public final void rotateOther(csMatrix3 m)
Use the given transformation matrix, in other space, to reorient the transformation.

Parameters:
m -

rotateThis

public final void rotateThis(csMatrix3 m)
Use the given transformation matrix, in this space, to reorient the transformation.

Parameters:
m -

lookAt

public final void lookAt(csVector3 v,
                         csVector3 up)
Let this transform look at the given (x,y,z) point, using up as the up-vector.

Parameters:
v -
up -

div

public static final csVector3 div(csVector3 v,
                                  csReversibleTransform t)
Reverse a transformation on a 3D vector.

Parameters:
v -
t -
Returns:

dive

public static final csVector3 dive(csVector3 v,
                                   csReversibleTransform t)
Reverse a transformation on a 3D vector.

Parameters:
v -
t -
Returns:

div

public static final csPlane3 div(csPlane3 p,
                                 csReversibleTransform t)
Reverse a transformation on a Plane.

Parameters:
p -
t -
Returns:

dive

public static final csPlane3 dive(csPlane3 p,
                                  csReversibleTransform t)
Reverse a transformation on a Plane.

Parameters:
p -
t -
Returns:

div

public static final csSphere div(csSphere p,
                                 csReversibleTransform t)
Reverse a transformation on a sphere.

Parameters:
p -
t -
Returns:

mule

public static final csReversibleTransform mule(csReversibleTransform t1,
                                               csReversibleTransform t2)
Combine two transforms, rightmost first.

Parameters:
t1 -
t2 -
Returns:

mul

public static final csReversibleTransform mul(csReversibleTransform t1,
                                              csReversibleTransform t2)
Combine two transforms, rightmost first.

Parameters:
t1 -
t2 -
Returns:

dive

public static final csReversibleTransform dive(csReversibleTransform t1,
                                               csReversibleTransform t2)
Combine two transforms, reversing t2 then applying t1.

Parameters:
t1 -
t2 -
Returns:

div

public static final csReversibleTransform div(csReversibleTransform t1,
                                              csReversibleTransform t2)
Combine two transforms, reversing t2 then applying t1

Parameters:
t1 -
t2 -
Returns:

nDelete

protected void nDelete(long pointer)
Overrides:
nDelete in class csTransform
See Also:
csNativeObject.nDelete(long)

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long nPointer)
Overrides:
isNativePointerValidSafe in class csTransform
See Also:
crystalspace.jbind.impl.csNativeObject#isNativePointerValidSafe()