com.jmex.model.ogrexml
Class OgreLoader

java.lang.Object
  extended by com.jmex.model.ogrexml.OgreLoader

public class OgreLoader
extends java.lang.Object

Loads Ogre MESH.XML and SKELETON.XML files
You must call OgreLoader.setMaterials otherwise OgreLoader won't find the materials.

Author:
Momoko_Fan
See Also:
Ogre's *.mesh.xml DTD., Ogre's *.skeleton.xml DTD.

Constructor Summary
OgreLoader()
           
 
Method Summary
 OgreEntityNode loadModel(java.net.URL url)
          Legacy wrapper.
 OgreEntityNode loadModel(java.net.URL url, java.lang.String nodeName)
          Load a MESH.XML model from the specified URL, automatically adding the containing directory to the Model resource locator paths for the duration of the load (in order to pull in reference skeletons files).
 void println(java.lang.String str)
          Deprecated. If you want to see debugging messages, you should use the logging infrastructure which is there for this purpose. This allows you to specify when to see messages declaratively, without changing any source code.
 void setMaterials(java.util.Map<java.lang.String,Material> materials)
          Specify the mapping of materials to use when reading submeshes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OgreLoader

public OgreLoader()
Method Detail

println

@Deprecated
public void println(java.lang.String str)
Deprecated. If you want to see debugging messages, you should use the logging infrastructure which is there for this purpose. This allows you to specify when to see messages declaratively, without changing any source code.

Print a debugging message to standard output.


setMaterials

public void setMaterials(java.util.Map<java.lang.String,Material> materials)
Specify the mapping of materials to use when reading submeshes.

Parameters:
materials -

loadModel

public OgreEntityNode loadModel(java.net.URL url)
                         throws java.io.IOException,
                                ModelFormatException
Legacy wrapper.

Throws:
java.io.IOException
ModelFormatException
See Also:
loadModel(URL, String)

loadModel

public OgreEntityNode loadModel(java.net.URL url,
                                java.lang.String nodeName)
                         throws java.io.IOException,
                                ModelFormatException
Load a MESH.XML model from the specified URL, automatically adding the containing directory to the Model resource locator paths for the duration of the load (in order to pull in reference skeletons files).

Parameters:
url - The URL that specifies the mesh.xml file
nodeName - The name of the generated OgreNode. If null, then will use the last segment of the URL.
Returns:
The model loaded
Throws:
java.io.IOException
ModelFormatException
See Also:
RelativeResourceLocator