com.jme.scene.model.XMLparser.Converters
Class MilkToJme

java.lang.Object
  extended bycom.jme.scene.model.XMLparser.Converters.FormatConverter
      extended bycom.jme.scene.model.XMLparser.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 JmeBinaryWriter

Author:
Jack Lindamood

Constructor Summary
MilkToJme()
           
 
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 com.jme.scene.model.XMLparser.Converters.FormatConverter
attemptFileConvert, clearProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MilkToJme

public MilkToJme()
Method Detail

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 file
o - 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.