|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Geom
org.odejava.PlaceableGeom
public abstract class PlaceableGeom
A Geom that is placeable as defined by ODE. These geom's can be moved and rotated.
| Field Summary |
|---|
| Fields inherited from class org.odejava.Geom |
|---|
geomId, isEncapsulated, spaceId |
| Constructor Summary | |
|---|---|
protected |
PlaceableGeom()
Calls the super constructor |
protected |
PlaceableGeom(String name)
Calls the super constructor |
| Method Summary | |
|---|---|
void |
delete()
Destroys the Geom, removing it from ODE. |
boolean |
fixed()
Returns true if this Placeable is dynamic and false if it is static. |
org.openmali.vecmath2.AxisAngle3f |
getAxisAngle()
Returns the axis and angle of rotation which makes up the rotational component of the transform |
org.openmali.vecmath2.AxisAngle3f |
getAxisAngle(org.openmali.vecmath2.AxisAngle3f result)
Returns the axis and angle of rotation which makes up the rotational component of the transform using the provided AxisAngle3f. |
Body |
getBody()
Returns the Body this Geom is attached to. |
org.openmali.vecmath2.Tuple3f |
getPosition()
Returns the current position. |
void |
getPosition(float[] result)
Returns the current position using the provided float array. |
org.openmali.vecmath2.Tuple3f |
getPosition(org.openmali.vecmath2.Tuple3f result)
Returns the current position using the provided Vector3f |
org.openmali.vecmath2.Quaternion4f |
getQuaternion()
Returns the quaternion. |
org.openmali.vecmath2.Quaternion4f |
getQuaternion(org.openmali.vecmath2.Quaternion4f result)
Returns the quaternion using the provided Quad4f |
org.openmali.vecmath2.Matrix3f |
getRotation()
Gets the rotation matrix of the geom |
void |
setAxisAndAngle(org.openmali.vecmath2.AxisAngle3f axisAngle)
Sets the rotation using the given axis and angle. |
void |
setAxisAndAngle(float ax,
float ay,
float az,
float angle)
Sets the rotation using the given axis and angle. |
protected void |
setBody(Body body)
Sets this Geom's body and calls the ODE method void dGeomSetBody (dGeomID, dBodyID). |
void |
setPosition(float x,
float y,
float z)
Sets the position of this transformable |
void |
setPosition(org.openmali.vecmath2.Tuple3f position)
Sets the position of this transformable |
void |
setQuaternion(org.openmali.vecmath2.Quaternion4f quaternion)
Sets the rotation of the geom using a quaternion |
void |
setQuatWXYZ(float w,
float x,
float y,
float z)
Sets the rotation of the geom using a quaternion |
void |
setRotation(org.openmali.vecmath2.Matrix3f r)
Sets the rotation of this geom using a 3x3 rotation matrix |
| 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 |
|---|
protected PlaceableGeom()
protected PlaceableGeom(String name)
name - the name of this geom| Method Detail |
|---|
public void setPosition(org.openmali.vecmath2.Tuple3f position)
setPosition in interface Placeableposition - to set
dGeomSetPosition |
public void setQuatWXYZ(float w,
float x,
float y,
float z)
w - w coordinatex - x coordinatey - y coordinatez - z coordinate
dGeomSetQuaternion |
public void setQuaternion(org.openmali.vecmath2.Quaternion4f quaternion)
setQuaternion in interface Placeablequaternion - the rotation quaternion to use
dGeomSetQuaternion |
public void setRotation(org.openmali.vecmath2.Matrix3f r)
setRotation in interface Placeabler - rotation matrix to use
dGeomSetRotation |
public final void setAxisAndAngle(org.openmali.vecmath2.AxisAngle3f axisAngle)
setAxisAndAngle in interface PlaceableaxisAngle - the axis and angle.
public void setAxisAndAngle(float ax,
float ay,
float az,
float angle)
ax - Axis X componentay - Axis Y componentaz - Axis Z componentangle - angle component
dGeomSetQuaternion |
public org.openmali.vecmath2.AxisAngle3f getAxisAngle()
getAxisAngle in interface Placeablepublic org.openmali.vecmath2.AxisAngle3f getAxisAngle(org.openmali.vecmath2.AxisAngle3f result)
getAxisAngle in interface Placeableresult - the result AxisAngle3f
public org.openmali.vecmath2.Tuple3f getPosition()
getPosition in interface PlaceabledGeomGetPosition |
public org.openmali.vecmath2.Tuple3f getPosition(org.openmali.vecmath2.Tuple3f result)
getPosition in interface Placeableresult - The result Vector3f
dGeomGetPosition |
public void getPosition(float[] result)
result - The result array at least length 3
dGeomGetPosition |
public void setPosition(float x,
float y,
float z)
setPosition in interface Placeablex - X coordinatey - Y coordinatez - Z coordinate
dGeomSetPosition |
public org.openmali.vecmath2.Quaternion4f getQuaternion()
getQuaternion in interface PlaceabledGeomGetQuaternion |
public org.openmali.vecmath2.Quaternion4f getQuaternion(org.openmali.vecmath2.Quaternion4f result)
getQuaternion in interface Placeableresult - the result Quad4f.
dGeomGetQuaternion |
public org.openmali.vecmath2.Matrix3f getRotation()
getRotation in interface PlaceabledGeomGetRotation |
public Body getBody()
Body this Geom is attached to.
Body this Geom is attached to.protected void setBody(Body body)
Sets this Geom's body and calls the ODE method void dGeomSetBody (dGeomID, dBodyID). The position and rotation components of the this Geom and the passed Body are combined so that setting one will also set the other.
If null is passed, the Geom will be set to have no
Body. If it was previously attached to a Body then it's
translation and rotation will be that of the Body when this
method was called. From then on it has its own translation and
rotation.
This method is automatically called by Body.addGeom and Body.removeGeom. It should not be used outside those two methods, and such use may result in errors or ambiguous cases (such as two Bodies thinking they both have this Geom as their child when in actual fact, a Body can only have one parent). In some (but not all) cases - such attempts will cause an AssertionException to be thrown.
body - The body to set.
dGeomSetBody - sets the body of this geom |
public boolean fixed()
Placeable
fixed in interface Placeablepublic void delete()
Geom
delete in class Geom
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||