|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Geom
org.odejava.PlaceableGeom
org.odejava.GeomTransform
public class GeomTransform
The GeomTransform is a geom which encapsulates a Geom, allowing the encapsulated Geom to be transformed relative to it. The GeomTransform can then be added to a Body.
Please refer to the ODE Documentation for more information. An example in ODE code exists here
It is a non-placable geometry, therefor the transform setters must not be called. However the transform getters may be called. As it is non-placable, the getters don't simply delegate the call to ODE. Rather they return the world transform of the encapsulated Geom (that is, the transform of the parent body multiplied by that of the encapsulated Geom). Subsiquently, you can bind GeomTransform objects to Display objects.
| Field Summary |
|---|
| Fields inherited from class org.odejava.Geom |
|---|
geomId, isEncapsulated, spaceId |
| Constructor Summary | |
|---|---|
GeomTransform()
Creates a GeomTransform with no name. |
|
GeomTransform(PlaceableGeom encapsulatedGeom)
Creates a GeomTransform with no name. |
|
GeomTransform(String name)
Greats a GeomTransform with the given name |
|
GeomTransform(String name,
PlaceableGeom encapsulatedGeom)
Greats a GeomTransform with the given name |
|
| Method Summary | |
|---|---|
PlaceableGeom |
getEncapsulatedGeom()
Returns the encapsulated geometry. |
org.openmali.vecmath2.Tuple3f |
getPosition()
Returns the world position of the encapsulated geometry. |
org.openmali.vecmath2.Tuple3f |
getPosition(org.openmali.vecmath2.Tuple3f result)
Returns the world position of the encapsulated geometry. |
org.openmali.vecmath2.Quaternion4f |
getQuaternion()
Returns the world quaternion of the encapsulated geometry. |
org.openmali.vecmath2.Quaternion4f |
getQuaternion(org.openmali.vecmath2.Quaternion4f result)
Returns the world quaternion of the encapsulated geometry. |
org.openmali.vecmath2.Matrix3f |
getRotation()
Returns the world rotation of the encapsulated geometry. |
org.openmali.vecmath2.Matrix3f |
getRotation(org.openmali.vecmath2.Matrix3f result)
Returns the world rotation of the encapsulated geometry. |
org.openmali.vecmath2.Matrix4f |
getTransform()
Returns the world transform of the encapsulated geometry. |
org.openmali.vecmath2.Matrix4f |
getTransform(org.openmali.vecmath2.Matrix4f result)
Returns the world transform of the encapsulated geometry. |
void |
removeEncapsulatedGeom()
Removes the encapsulate Geom. |
void |
setEncapsulatedGeom(PlaceableGeom obj)
Sets the encapsulated Geom. |
protected void |
updateCachedTransform()
Called by the transform getters. |
| Methods inherited from class org.odejava.PlaceableGeom |
|---|
delete, fixed, getAxisAngle, getAxisAngle, getBody, getPosition, setAxisAndAngle, setAxisAndAngle, setBody, setPosition, setPosition, setQuaternion, setQuatWXYZ, setRotation |
| Methods inherited from class org.odejava.Geom |
|---|
addToSpace, finalize, getGeomFromNativeAddr, getId, getID, getName, getNativeAddr, getUserData, isEnabled, removeFromSpace, setCategoryBits, setCollideBits, setEnabled, setName, setUserData, updateNativeAddr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.odejava.Placeable |
|---|
getName |
| Constructor Detail |
|---|
public GeomTransform(String name,
PlaceableGeom encapsulatedGeom)
name - the name of this GeomencapsulatedGeom - the geom this GeomTransform encapsulates.
This Geom should not be added to any Space or associated
with any Body.
dCreateGeomTransform - creates the object |
public GeomTransform(PlaceableGeom encapsulatedGeom)
encapsulatedGeom - the geom this GeomTransform encapsulates.
This Geom should not be added to any Space or associated
with any Body.
dCreateGeomTransform - creates the object |
public GeomTransform()
dCreateGeomTransform - creates the object |
public GeomTransform(String name)
name - the name of this Geom
dCreateGeomTransform - creates the object |
| Method Detail |
|---|
public void setEncapsulatedGeom(PlaceableGeom obj)
obj - the geom this GeomTransform encapsulates.
This Geom should not be added to any Space or associated
with any Body.
dGeomTransformSetGeom - sets the encapsulated geom |
public void removeEncapsulatedGeom()
dGeomTransformSetGeom |
public PlaceableGeom getEncapsulatedGeom()
public org.openmali.vecmath2.Tuple3f getPosition()
getPosition in interface PlaceablegetPosition in class PlaceableGeomIllegalOdejavaOperation - if this GeomTransform doesn't
have a parent body or doesn't have an encapsulated GeomupdateCachedTransform()public org.openmali.vecmath2.Tuple3f getPosition(org.openmali.vecmath2.Tuple3f result)
getPosition in interface PlaceablegetPosition in class PlaceableGeomresult - Vector3f to write the result to
IllegalOdejavaOperation - if this GeomTransform doesn't
have a parent body or doesn't have an encapsulated GeomupdateCachedTransform()public org.openmali.vecmath2.Quaternion4f getQuaternion()
getQuaternion in interface PlaceablegetQuaternion in class PlaceableGeomIllegalOdejavaOperation - if this GeomTransform doesn't
have a parent body or doesn't have an encapsulated GeomupdateCachedTransform()public org.openmali.vecmath2.Quaternion4f getQuaternion(org.openmali.vecmath2.Quaternion4f result)
getQuaternion in interface PlaceablegetQuaternion in class PlaceableGeomresult - the result Quad4f.
IllegalOdejavaOperation - if this GeomTransform doesn't
have a parent body or doesn't have an encapsulated GeomupdateCachedTransform()public org.openmali.vecmath2.Matrix3f getRotation()
getRotation in interface PlaceablegetRotation in class PlaceableGeomIllegalOdejavaOperation - if this GeomTransform doesn't
have a parent body or doesn't have an encapsulated Geom
* @see updateCachedTransformpublic org.openmali.vecmath2.Matrix3f getRotation(org.openmali.vecmath2.Matrix3f result)
result - Matrix3f to write the result to
IllegalOdejavaOperation - if this GeomTransform doesn't
have a parent body or doesn't have an encapsulated GeomupdateCachedTransform()protected void updateCachedTransform()
IllegalOdejavaOperation - if this GeomTransform doesn't
have a parent body or doesn't have an encapsulated Geompublic org.openmali.vecmath2.Matrix4f getTransform()
public org.openmali.vecmath2.Matrix4f getTransform(org.openmali.vecmath2.Matrix4f result)
result - Matrix4f to write the result to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||