net.sf.tankbattles.scene
Class ModelHelper
java.lang.Object
net.sf.tankbattles.scene.ModelHelper
public class ModelHelper
- extends java.lang.Object
Simple helper class for loading 3D model files in diferent formats.
Encapsulates the details for handling diferent extensions and path details.
- Author:
- Erick B Passos
Method Summary |
static com.jme.scene.Node |
loadJMEModel(java.lang.String modelPath)
Loads a jME binary 3D model. |
static void |
milkToJME(java.lang.String origin,
java.lang.String destination)
Converts a MilkShape3D generated model to the jME binary format. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModelHelper
public ModelHelper()
milkToJME
public static void milkToJME(java.lang.String origin,
java.lang.String destination)
- Converts a MilkShape3D generated model to the jME binary format.
- Parameters:
origin
- the path to the model to be converted.destination
- the path to the new model to be saved.
- Throws:
java.io.IOException
loadJMEModel
public static com.jme.scene.Node loadJMEModel(java.lang.String modelPath)
- Loads a jME binary 3D model.
Also creates a bounding box for the newly loaded model.
- Parameters:
path
- the file path for the model.
- Returns:
- The loaded model, as a jME scene Node.
- Throws:
java.io.IOException