org.odejava.xode
Class XODEBody

java.lang.Object
  extended by org.odejava.xode.XODEObject
      extended by org.odejava.xode.XODEContainer
          extended by org.odejava.xode.XODEGroup
              extended by org.odejava.xode.XODEBody
All Implemented Interfaces:
Serializable

public class XODEBody
extends XODEGroup
implements Serializable

XODE representation of a Body

Author:
William Denniss
See Also:
Serialized Form

Field Summary
protected  Float finiteRotationAxisX
           
protected  Float finiteRotationAxisY
           
protected  Float finiteRotationAxisZ
           
protected  Float finiteRotationMode
           
protected  Float totalMass
           
 
Fields inherited from class org.odejava.xode.XODEContainer
absoluteTransform, cachedBodyRelTransform, cachedRootTransform, cachedTransform, relTransform, xodeObjects
 
Fields inherited from class org.odejava.xode.XODEObject
node, odeObject
 
Constructor Summary
protected XODEBody()
           
  XODEBody(Body body)
          Creates an XODEBody based on the given ODE body.
  XODEBody(Node xodeData)
           
  XODEBody(String name, org.openmali.vecmath2.Matrix4f transform)
           
 
Method Summary
 Element buildElement(Document doc)
          Builds an XML DOM representation of this XODEObject
 void buildOde(World world, Space space, String namePrefix, List<Object> odeList)
          Constructs the ODE scene based on this XODE structure
 float getTotalMass()
           
 void setTotalMass(float totalMass)
           
 
Methods inherited from class org.odejava.xode.XODEGroup
parseGroup, parseGroupChild
 
Methods inherited from class org.odejava.xode.XODEContainer
addChild, addChildElements, addChildren, addTransformElement, getBodyRelTransform, getChildren, getPosition, getRootTransform, getRotation, getTransform, getTransform, getXODETransform, invalidateTransformCache, isAbsoluteTransformMode, parseTransform, removeChild, scrapDOMObjectCache, scrapODEObjectCache, setAbsolute, setParent, setPosition, setRotation, setTransform
 
Methods inherited from class org.odejava.xode.XODEObject
clone, getDOMNode, getFirstBodyAncestor, getFirstJointGroupAncestor, getFirstSpaceAncestor, getName, getODEObject, getParent, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

finiteRotationMode

protected Float finiteRotationMode

finiteRotationAxisX

protected Float finiteRotationAxisX

finiteRotationAxisY

protected Float finiteRotationAxisY

finiteRotationAxisZ

protected Float finiteRotationAxisZ

totalMass

protected Float totalMass
Constructor Detail

XODEBody

protected XODEBody()

XODEBody

public XODEBody(String name,
                org.openmali.vecmath2.Matrix4f transform)

XODEBody

public XODEBody(Node xodeData)

XODEBody

public XODEBody(Body body)
Creates an XODEBody based on the given ODE body. Also adds child geometry as XODEGeom obejcts.

Parameters:
body - the ODE body to use
Method Detail

buildOde

public void buildOde(World world,
                     Space space,
                     String namePrefix,
                     List<Object> odeList)
Description copied from class: XODEObject
Constructs the ODE scene based on this XODE structure

Overrides:
buildOde in class XODEContainer
Parameters:
world - the World to add created bodies
space - the Space to add created geometry
namePrefix - string to prefix all names
odeList - list of all created ODE files (will be added to)

buildElement

public Element buildElement(Document doc)
Description copied from class: XODEObject
Builds an XML DOM representation of this XODEObject

Overrides:
buildElement in class XODEGroup
Parameters:
doc - the Document this Element will be associated with
Returns:
and XML DOM representation of this XODEObject

getTotalMass

public float getTotalMass()

setTotalMass

public void setTotalMass(float totalMass)