|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Geom
public abstract class Geom
Geometry objects (or geoms for short) are the fundamental objects in the collision system. A geom can represents a single rigid shape (such as a sphere or box), or it can represents a group of other geoms - this is a special kind of geom called a space.
Any geom can be collided against any other geom to yield zero or more contact points. Spaces have the extra capability of being able to collide their contained geoms together to yield internal contact points.
The rotation matrix, just like a rigid body, that can be changed during the simulation. A non-placeable geom does not have this capability - for example, it may represent some static feature of the environment that can not be moved. Spaces are non-placeable geoms, because each contained geom may have its own position and orientation but it does not make sense for the space itself to have a position and orientation.
To use the collision engine in a rigid body simulation, placeable geoms are associated with rigid body objects. This allows the collision engine to get the position and orientation of the geoms from the bodies. Note that geoms are distinct from rigid bodies in that a geom has geometrical properties (size, shape, position and orientation) but no dynamical properties (such as velocity or mass). A body and a geom together represent all the properties of the simulated object.
Created 16.12.2003 (dd.mm.yyyy)
| Field Summary | |
|---|---|
protected org.odejava.ode.SWIGTYPE_p_dGeomID |
geomId
|
protected boolean |
isEncapsulated
|
protected org.odejava.ode.SWIGTYPE_p_dSpaceID |
spaceId
|
| Constructor Summary | |
|---|---|
protected |
Geom()
Create a generic geometry item with no associated name. |
protected |
Geom(String name)
Create a generic items of geometry with an associated name. |
| Method Summary | |
|---|---|
protected void |
addToSpace(Space space)
Removes this Geom from the ZERO space and adds it to the given one. |
void |
delete()
Destroys the Geom, removing it from ODE. |
protected void |
finalize()
Calls the delete() method to clean up native resources if it hasn't already been called on this Geom. |
static Geom |
getGeomFromNativeAddr(long nativeAddress)
Performs lookup of a WeakHashMap and returns the Geom with the native address equal to the one passed or null if none exist. |
org.odejava.ode.SWIGTYPE_p_dGeomID |
getId()
|
long |
getID()
|
String |
getName()
Returns the name of the Geom. |
long |
getNativeAddr()
Native address can be used to compare against contact information values which are also native addresses. |
Object |
getUserData()
|
boolean |
isEnabled()
|
protected void |
removeFromSpace()
Removes this Geom from its space and adds it to the empty space. |
void |
setCategoryBits(long bits)
|
void |
setCollideBits(long bits)
|
void |
setEnabled(boolean enabled)
Diables or Enables this geom. |
void |
setName(String n)
Sets the name of the Geom |
void |
setUserData(Object userData)
|
protected void |
updateNativeAddr()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.odejava.ode.SWIGTYPE_p_dSpaceID spaceId
protected org.odejava.ode.SWIGTYPE_p_dGeomID geomId
protected boolean isEncapsulated
| Constructor Detail |
|---|
protected Geom()
protected Geom(String name)
name - A name to associate with this geometry| Method Detail |
|---|
public org.odejava.ode.SWIGTYPE_p_dGeomID getId()
public final long getID()
public void setCategoryBits(long bits)
public void setCollideBits(long bits)
public String getName()
public void setName(String n)
n - The name of the Geom.public void delete()
dGeomDestory |
protected void finalize()
finalize in class Objectpublic void setEnabled(boolean enabled)
enabled -
dGeomEnable - (if true is passed) |
dGeomDiable - (if false is passed) |
public boolean isEnabled()
dGeomEnable - (if true is passed) |
dGeomDiable - (if false is passed) |
protected void updateNativeAddr()
public static Geom getGeomFromNativeAddr(long nativeAddress)
nativeAddress - the native address to lookup
public long getNativeAddr()
Native address can be used to compare against contact information values which are also native addresses.
UNSUPPORTED - use of this method is better avoided. No guarantees are made that this method won't change or even exist in future versions.
protected void removeFromSpace()
Space.remove(org.odejava.Geom)
dSpaceRemove - removes the Geom from the current Space |
protected void addToSpace(Space space)
Space.addGeom(org.odejava.Geom)
dSpaceAdd - adds the geom to the given space |
public final Object getUserData()
public final void setUserData(Object userData)
userData - The userData to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||