com.jme.scene.model.XMLparser.Converters
Class Md2ToJme
java.lang.Object
com.jme.scene.model.XMLparser.Converters.FormatConverter
com.jme.scene.model.XMLparser.Converters.Md2ToJme
- public class Md2ToJme
- extends FormatConverter
Started Date: Jun 14, 2004
This class converts a .md2 file to jME's binary format.
- Author:
- Jack Lindamood
|
Method Summary |
void |
convert(java.io.InputStream Md2Stream,
java.io.OutputStream o)
It creates a node from a .md2 stream and then writes that
node to the given OutputStream in jME's binary format. |
static KeyframeController |
findController(Node model)
This function returns the KeyframeController that animates an MD2 converted mesh. |
static void |
main(java.lang.String[] args)
Converts an Md2 file to jME format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Md2ToJme
public Md2ToJme()
main
public static void main(java.lang.String[] args)
- Converts an Md2 file to jME format. The syntax is: "Md2ToJme drfreak.md2 outfile.jme".
- Parameters:
args - The array of parameters
convert
public void convert(java.io.InputStream Md2Stream,
java.io.OutputStream o)
throws java.io.IOException
- It creates a node from a .md2 stream and then writes that
node to the given OutputStream in jME's binary format.
- Specified by:
convert in class FormatConverter
- Parameters:
Md2Stream - A stream representing the .md2 fileo - The stream to write it's binary equivalent to
- Throws:
java.io.IOException - If anything funky goes wrong with reading information
findController
public static KeyframeController findController(Node model)
- This function returns the KeyframeController that animates an MD2 converted mesh.
Null is returned if a KeyframeController cannot be found.
- Parameters:
model - The MD2 mesh.
- Returns:
- This mesh's controller.