org.xith3d.loaders.models.util.specific
Class MD2Tools

java.lang.Object
  extended by org.xith3d.loaders.models.util.specific.MD2Tools

public class MD2Tools
extends java.lang.Object

These tools will help you to load MD2-tag files or multipart-MD2-models.

The methods in this class are just tool and nothing more. Everything, that is done by these methods can easily be done manually, too.


Constructor Summary
MD2Tools()
           
 
Method Summary
static Model loadMultipartMD2Model(java.net.URL bodyURL, java.lang.String bodySkin, java.net.URL bodyTagFile, java.lang.String headMount, java.net.URL headURL, java.lang.String headSkin, java.lang.String weaponMount, java.net.URL weaponURL, java.lang.String weaponSkin, float scale)
           This method loads a model from up to three parts: body, head and weapon.
static Model loadMultipartMD2Model(java.net.URL bodyURL, java.lang.String bodySkin, java.net.URL bodyTagFile, java.net.URL headURL, java.lang.String headSkin, java.net.URL weaponURL, java.lang.String weaponSkin)
           This method loads a model from up to three parts: body, head and weapon.
static Model loadMultipartMD2Model(java.net.URL bodyURL, java.lang.String bodySkin, java.net.URL bodyTagFile, java.net.URL headURL, java.lang.String headSkin, java.net.URL weaponURL, java.lang.String weaponSkin, float scale)
           This method loads a model from up to three parts: body, head and weapon.
static void readMD2Tags(java.net.URL tagFileURL, boolean convertZup2Yup, float scale, Model targetModel)
          Loads an MD2 tag file.
static void readMD2Tags(java.net.URL tagFile, Model targetModel)
          Loads an MD2 tag file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD2Tools

public MD2Tools()
Method Detail

readMD2Tags

public static void readMD2Tags(java.net.URL tagFileURL,
                               boolean convertZup2Yup,
                               float scale,
                               Model targetModel)
                        throws java.io.IOException,
                               org.jagatoo.util.errorhandling.IncorrectFormatException,
                               org.jagatoo.util.errorhandling.ParsingException
Loads an MD2 tag file. A file like that contains all the information to build a mount transform with key frames.

Parameters:
tagFileURL -
convertZup2Yup -
scale -
targetModel -
Throws:
java.io.IOException
org.jagatoo.util.errorhandling.IncorrectFormatException
org.jagatoo.util.errorhandling.ParsingException

readMD2Tags

public static void readMD2Tags(java.net.URL tagFile,
                               Model targetModel)
                        throws java.io.IOException,
                               org.jagatoo.util.errorhandling.IncorrectFormatException,
                               org.jagatoo.util.errorhandling.ParsingException
Loads an MD2 tag file. A file like that contains all the information to build a mount transform with key frames.

Parameters:
tagFileURL -
targetModel -
Throws:
java.io.IOException
org.jagatoo.util.errorhandling.IncorrectFormatException
org.jagatoo.util.errorhandling.ParsingException

loadMultipartMD2Model

public static Model loadMultipartMD2Model(java.net.URL bodyURL,
                                          java.lang.String bodySkin,
                                          java.net.URL bodyTagFile,
                                          java.lang.String headMount,
                                          java.net.URL headURL,
                                          java.lang.String headSkin,
                                          java.lang.String weaponMount,
                                          java.net.URL weaponURL,
                                          java.lang.String weaponSkin,
                                          float scale)
                                   throws java.io.IOException,
                                          org.jagatoo.util.errorhandling.IncorrectFormatException,
                                          org.jagatoo.util.errorhandling.ParsingException

This method loads a model from up to three parts: body, head and weapon.

Head and weapon URLs can be null, which makes them be ignored.

Parameters:
bodyURL -
bodySkin -
bodyTagFile -
headMount -
headURL -
headSkin -
weaponMount -
weaponURL -
weaponSkin -
scale -
Returns:
a Model composed of up to three parts.
Throws:
java.io.IOException
org.jagatoo.util.errorhandling.IncorrectFormatException
org.jagatoo.util.errorhandling.ParsingException

loadMultipartMD2Model

public static Model loadMultipartMD2Model(java.net.URL bodyURL,
                                          java.lang.String bodySkin,
                                          java.net.URL bodyTagFile,
                                          java.net.URL headURL,
                                          java.lang.String headSkin,
                                          java.net.URL weaponURL,
                                          java.lang.String weaponSkin,
                                          float scale)
                                   throws java.io.IOException,
                                          org.jagatoo.util.errorhandling.IncorrectFormatException,
                                          org.jagatoo.util.errorhandling.ParsingException

This method loads a model from up to three parts: body, head and weapon.

Head and weapon URLs can be null, which makes them be ignored.

Parameters:
bodyURL -
bodySkin -
bodyTagFile -
headURL -
headSkin -
weaponURL -
weaponSkin -
scale -
Returns:
a Model composed of up to three parts.
Throws:
java.io.IOException
org.jagatoo.util.errorhandling.IncorrectFormatException
org.jagatoo.util.errorhandling.ParsingException

loadMultipartMD2Model

public static Model loadMultipartMD2Model(java.net.URL bodyURL,
                                          java.lang.String bodySkin,
                                          java.net.URL bodyTagFile,
                                          java.net.URL headURL,
                                          java.lang.String headSkin,
                                          java.net.URL weaponURL,
                                          java.lang.String weaponSkin)
                                   throws java.io.IOException,
                                          org.jagatoo.util.errorhandling.IncorrectFormatException,
                                          org.jagatoo.util.errorhandling.ParsingException

This method loads a model from up to three parts: body, head and weapon.

Head and weapon URLs can be null, which makes them be ignored.

Parameters:
bodyURL -
bodySkin -
bodyTagFile -
headURL -
headSkin -
weaponURL -
weaponSkin -
Returns:
a Model composed of up to three parts.
Throws:
java.io.IOException
org.jagatoo.util.errorhandling.IncorrectFormatException
org.jagatoo.util.errorhandling.ParsingException