|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.xode.XODEObject
public abstract class XODEObject
Base XODE object (as defined in the spec)
| Field Summary | |
|---|---|
protected Node |
node
The DOM objects that represents this XODEObject generated while importing/exporting to/from XML. |
protected Object |
odeObject
The ODE objects created last time buildOde was called. |
| Constructor Summary | |
|---|---|
protected |
XODEObject()
|
protected |
XODEObject(Node node)
Sets the world and space variables, and parses the 'name' attribute. |
|
XODEObject(String name)
|
| Method Summary | |
|---|---|
protected abstract Element |
buildElement(Document doc)
Builds an XML DOM representation of this XODEObject |
abstract void |
buildOde(World world,
Space space,
String namePrefix,
List<Object> odeList)
Constructs the ODE scene based on this XODE structure |
XODEObject |
clone()
Returns a deep copy of this XODEObject |
Node |
getDOMNode()
Returns DOM node represented by this XODEObject or null if no XML import/export functions have been performed on this XODEObject, or the cache was lost by purging or serialization. |
protected Body |
getFirstBodyAncestor()
Recursivly locates then returns the Body of the first XODEBody ancestor or null if there is none. |
protected JointGroup |
getFirstJointGroupAncestor()
Recursivly locates then returns the JointGroup of the first XODEJointGroup ancestor or null if there is none. |
protected Space |
getFirstSpaceAncestor()
Recursivly locates then returns the Space of the first XODESpace ancestor or null if there is none. |
String |
getName()
Returns the name of this XODEObject or null if it has no name. |
Object |
getODEObject()
Returns the Odejava object represented by this XODEObject or null if no Odejava object has been created, or the cache was scrapped. |
XODEContainer |
getParent()
Returns the parent XODEContainer of this XODEObject or null if it does not have a parent. |
void |
setName(String name)
Sets the name to the given new name. |
protected void |
setParent(XODEContainer parent)
Sets the parent of this object. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient Object odeObject
protected transient Node node
| Constructor Detail |
|---|
protected XODEObject()
public XODEObject(String name)
protected XODEObject(Node node)
node - the XML data| Method Detail |
|---|
protected Body getFirstBodyAncestor()
protected JointGroup getFirstJointGroupAncestor()
protected Space getFirstSpaceAncestor()
public Object getODEObject()
public Node getDOMNode()
public abstract void buildOde(World world,
Space space,
String namePrefix,
List<Object> odeList)
world - the World to add created bodiesspace - the Space to add created geometrynamePrefix - string to prefix all namesodeList - list of all created ODE files (will be added to)protected void setParent(XODEContainer parent)
addChild() method
of XODEContainer.
parent - the parent of this object or null if there isn't one
XODEException - if this XODEObject has a parent and a non-null parent was passedXODEContainer.addChild(XODEObject)protected abstract Element buildElement(Document doc)
doc - the Document this Element will be associated with
public XODEContainer getParent()
XODEContainer.addChild(XODEObject)public String getName()
public void setName(String name)
name - the new name to usepublic XODEObject clone()
clone in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||