org.odejava.xode
Class XODEParserDOM
java.lang.Object
org.odejava.xode.XODEParserDOM
public class XODEParserDOM
- extends java.lang.Object
XODE DOM Parser
- Author:
- William Denniss
|
Field Summary |
static org.apache.log4j.Logger |
log
|
static org.apache.log4j.Logger |
odeLog
|
|
Method Summary |
static void |
display(org.w3c.dom.Node start)
|
java.util.List<XODEBody> |
getBodies()
|
org.w3c.dom.Document |
getDocument()
|
java.util.List<XODEGeom> |
getGeoms()
|
java.util.List<XODEJointGroup> |
getJointGroups()
|
java.util.List<XODEJoint> |
getJoints()
|
static void |
main(java.lang.String[] args)
|
XODERoot |
parse(org.xml.sax.InputSource file)
Parses the XODE file so it can be later added to the scene |
XODERoot |
parse(org.xml.sax.InputSource file,
org.openmali.vecmath2.Matrix4f parentTransform)
Parses the XODE file so it can be later added to the scene |
XODERoot |
parse(World world,
Space space,
org.xml.sax.InputSource file)
Parses the XODE file, builds the ODE objects and returns the XODE root. |
XODERoot |
parse(World world,
Space space,
org.xml.sax.InputSource file,
org.openmali.vecmath2.Matrix4f parentTransform)
|
XODERoot |
parse(World world,
Space space,
java.lang.String file)
|
XODERoot |
parse(World world,
Space space,
java.lang.String file,
org.openmali.vecmath2.Matrix4f parentTransform)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static org.apache.log4j.Logger log
odeLog
public static org.apache.log4j.Logger odeLog
XODEParserDOM
public XODEParserDOM(boolean validate)
- Parameters:
validate - causes the XML to be validated if set.
parse
public XODERoot parse(World world,
Space space,
org.xml.sax.InputSource file)
throws java.io.IOException,
org.xml.sax.SAXException
- Parses the XODE file, builds the ODE objects and returns the XODE root.
- Parameters:
world - space - file -
- Returns:
- the root
- Throws:
java.io.IOException
org.xml.sax.SAXException
parse
public XODERoot parse(org.xml.sax.InputSource file)
throws java.io.IOException,
org.xml.sax.SAXException
- Parses the XODE file so it can be later added to the scene
- Parameters:
file -
- Returns:
- the root
- Throws:
java.io.IOException
org.xml.sax.SAXException- See Also:
XODERoot.buildODEScene(org.odejava.World, org.odejava.Space, java.lang.String),
XODERoot.setRootTransform(org.openmali.vecmath2.Matrix4f)
parse
public XODERoot parse(World world,
Space space,
org.xml.sax.InputSource file,
org.openmali.vecmath2.Matrix4f parentTransform)
throws java.io.IOException,
org.xml.sax.SAXException
- Parameters:
world - the world which the bodies will be added.space - the space to which the GeomS will be added. If null,
then they are not added to any Space.file - the XODE file to parse.
- Throws:
java.io.IOException
org.xml.sax.SAXException
parse
public XODERoot parse(org.xml.sax.InputSource file,
org.openmali.vecmath2.Matrix4f parentTransform)
throws java.io.IOException,
org.xml.sax.SAXException
- Parses the XODE file so it can be later added to the scene
- Parameters:
file - parentTransform -
- Returns:
- the root
- Throws:
java.io.IOException
org.xml.sax.SAXException
display
public static void display(org.w3c.dom.Node start)
parse
public XODERoot parse(World world,
Space space,
java.lang.String file,
org.openmali.vecmath2.Matrix4f parentTransform)
throws java.io.IOException,
org.xml.sax.SAXException
- Throws:
java.io.IOException
org.xml.sax.SAXException
parse
public XODERoot parse(World world,
Space space,
java.lang.String file)
throws java.io.IOException,
org.xml.sax.SAXException
- Throws:
java.io.IOException
org.xml.sax.SAXException
getGeoms
public java.util.List<XODEGeom> getGeoms()
getBodies
public java.util.List<XODEBody> getBodies()
getJoints
public java.util.List<XODEJoint> getJoints()
getJointGroups
public java.util.List<XODEJointGroup> getJointGroups()
getDocument
public org.w3c.dom.Document getDocument()
main
public static final void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception