com.jmex.model.converters
Class MilkToJme
java.lang.Object
com.jmex.model.converters.FormatConverter
com.jmex.model.converters.MilkToJme
public class MilkToJme
- extends FormatConverter
Started Date: Jun 8, 2004
This class converts a .ms3d file to jME's binary format. The way it converts
is by first building the .ms3d scenegraph object, then saving that object to
binary format via com.jmex.model.XMLparser.JmeBinaryWriter
. This
requires a DisplaySystem
to function correctly
(as all loaders do).
This will normally be provided within a game environment (such as
SimpleGame
). However if you wish to use this in a
stand-alone environment, such as part of a tool conversion utility, you
should create a DummyDisplaySystem
before using this class.
- Author:
- Jack Lindamood
Method Summary |
void |
convert(java.io.InputStream MSFile,
java.io.OutputStream o)
This class's only public function. |
static JointController |
findController(Node model)
This function returns the controller of a loaded Milkshape3D model. |
static void |
main(java.lang.String[] args)
Converts a MS3D file to jME format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MilkToJme
public MilkToJme()
main
public static void main(java.lang.String[] args)
- Converts a MS3D file to jME format. The syntax is: "MilkToJme runner.ms3d out.jme".
- Parameters:
args
- The array of parameters
convert
public void convert(java.io.InputStream MSFile,
java.io.OutputStream o)
throws java.io.IOException
- This class's only public function. It creates a node from a .ms3d stream and then writes that node to the given
OutputStream in binary format
- Specified by:
convert
in class FormatConverter
- Parameters:
MSFile
- An inputStream that is the .ms3d fileo
- The Stream to write it's jME binary equivalent to
- Throws:
java.io.IOException
- If anything funky goes wrong with reading information
findController
public static JointController findController(Node model)
- This function returns the controller of a loaded Milkshape3D model. Will return
null if a correct JointController could not be found, or if one does not exist.
- Parameters:
model
- The model that was loaded.
- Returns:
- The controller for that milkshape model.