org.odejava.xode
Class XODEParserDOM
java.lang.Object
org.odejava.xode.XODEParserDOM
public class XODEParserDOM
- extends 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(Node start)
|
List<XODEBody> |
getBodies()
|
Document |
getDocument()
|
List<XODEGeom> |
getGeoms()
|
List<XODEJointGroup> |
getJointGroups()
|
List<XODEJoint> |
getJoints()
|
static void |
main(String[] args)
|
XODERoot |
parse(InputSource file)
Parses the XODE file so it can be later added to the scene |
XODERoot |
parse(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,
InputSource file)
Parses the XODE file, builds the ODE objects and returns the XODE root. |
XODERoot |
parse(World world,
Space space,
InputSource file,
org.openmali.vecmath2.Matrix4f parentTransform)
|
XODERoot |
parse(World world,
Space space,
String file)
|
XODERoot |
parse(World world,
Space space,
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,
InputSource file)
throws IOException,
SAXException
- Parses the XODE file, builds the ODE objects and returns the XODE root.
- Parameters:
world - space - file -
- Returns:
- the root
- Throws:
IOException
SAXException
parse
public XODERoot parse(InputSource file)
throws IOException,
SAXException
- Parses the XODE file so it can be later added to the scene
- Parameters:
file -
- Returns:
- the root
- Throws:
IOException
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,
InputSource file,
org.openmali.vecmath2.Matrix4f parentTransform)
throws IOException,
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:
IOException
SAXException
parse
public XODERoot parse(InputSource file,
org.openmali.vecmath2.Matrix4f parentTransform)
throws IOException,
SAXException
- Parses the XODE file so it can be later added to the scene
- Parameters:
file - parentTransform -
- Returns:
- the root
- Throws:
IOException
SAXException
display
public static void display(Node start)
parse
public XODERoot parse(World world,
Space space,
String file,
org.openmali.vecmath2.Matrix4f parentTransform)
throws IOException,
SAXException
- Throws:
IOException
SAXException
parse
public XODERoot parse(World world,
Space space,
String file)
throws IOException,
SAXException
- Throws:
IOException
SAXException
getGeoms
public List<XODEGeom> getGeoms()
getBodies
public List<XODEBody> getBodies()
getJoints
public List<XODEJoint> getJoints()
getJointGroups
public List<XODEJointGroup> getJointGroups()
getDocument
public Document getDocument()
main
public static final void main(String[] args)
throws Exception
- Throws:
Exception