|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--md3.md3model.MD3ModelFactory
This is a factory class that follows the Abstract Factory pattern. The MD3 model related classes in the package cannot be instantiated directely. Use the factory methods provided here to obtain the necessary instances of those classes.
Subclass this class if you want the MD3 model construction process to create and use instances of your own subclasses. The default implementations provided here return instances of the default MD3 model classes provided in the md3.md3model package.
The factory methods that return empty objects can be used when creating your own models.
Constructor Summary | |
MD3ModelFactory()
|
Method Summary | |
static MD3ModelFactory |
getFactory()
Return the currently used factory, null if none. |
AnimationCfg |
makeAnimationCfg()
Creates an empty AnimationCfg resource object. |
AnimationCfg |
makeAnimationCfg(java.io.InputStream in)
Load animation.cfg data from the given input stream into the internal data stuctures of an AnimationCfg object. |
AnimationCfg |
makeAnimationCfg(java.lang.String filename)
Load an animation.cfg file into the internal data stuctures of an AnimationCfg object. |
MD3Animation |
makeMD3Animation()
Creates an empty, uninitialized MD3Animation object. |
MD3Animation |
makeMD3Animation(java.lang.String line)
Factory method that creates a new MD3Animation object and initialize it with the data in the specified string. |
MD3BoneFrame |
makeMD3BoneFrame(int tagNum)
Create an empty bone frame with the specified amount of tag positions. |
MD3BoneFrame |
makeMD3BoneFrame(int tagNum,
java.io.DataInput din)
Read a bone frame object with the specified amount of tag positions from the given input stream. |
MD3Mesh |
makeMD3Mesh()
Creates an empty, uninitialized MD3Mesh object. |
MD3Mesh |
makeMD3Mesh(java.io.DataInput din)
Create a new MD3Mesh object and initialize it with data read from the specified input stream. |
MD3Model |
makeMD3Model()
Create a new, uninitialized MD3Model object. |
MD3Model |
makeMD3Model(java.lang.String filename)
Factory method that loads an MD3 model from a file and sets up an MD3Model object with the read information. |
MD3Model |
makeMD3Model(java.lang.String name,
java.io.InputStream in)
Factory method that loads an MD3 model from a specified input stream and sets up an MD3Model object with the read information. |
MD3Skin |
makeMD3Skin()
Creates an empty MD3Skin resource object. |
MD3Skin |
makeMD3Skin(java.io.InputStream in)
Load data from the specified input stream and put it in an MD3Skin resource object. |
MD3Skin |
makeMD3Skin(java.lang.String filename)
Load data from the specified skin file and put it in an MD3Skin resource object. |
MD3Tag |
makeMD3Tag()
Create a new, uninitialized MD3Tag object. |
MD3Tag |
makeMD3Tag(java.io.DataInput din)
Read a MD3Tag object from the specified input stream. |
MD3Texture |
makeMD3Texture()
Creates an empty, uninitialized MD3Texture object. |
MD3Texture |
makeMD3Texture(java.lang.String name,
java.lang.String loadFilename)
Factory method that loads a texture from a file. |
MD3Texture |
makeMD3Texture(java.lang.String name,
java.lang.String loadFilename,
java.io.InputStream in)
Factory method that loads a texture from an input stream. |
static void |
setFactory(MD3ModelFactory factory)
Set the factory that will be used during the MD3Model object creation process. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MD3ModelFactory()
Method Detail |
public static void setFactory(MD3ModelFactory factory)
Set the factory that will be used during the MD3Model object creation process.
public static MD3ModelFactory getFactory()
Return the currently used factory, null if none.
public MD3Model makeMD3Model(java.lang.String filename) throws java.io.IOException
Factory method that loads an MD3 model from a file and sets up an MD3Model object with the read information.
filename
- Name of file to load.public MD3Model makeMD3Model(java.lang.String name, java.io.InputStream in) throws java.io.IOException
Factory method that loads an MD3 model from a specified input stream and sets up an MD3Model object with the read information. The given name will be stored as the model's loadFilename.
name
- Name of the model.in
- Stream to read data from.public MD3Model makeMD3Model()
Create a new, uninitialized MD3Model object.
public MD3BoneFrame makeMD3BoneFrame(int tagNum, java.io.DataInput din) throws java.io.IOException
Read a bone frame object with the specified amount of tag positions from the given input stream. Note that the tag information itself will NOT be initialized. This has to be done separately!
public MD3BoneFrame makeMD3BoneFrame(int tagNum)
Create an empty bone frame with the specified amount of tag positions.
public MD3Tag makeMD3Tag(java.io.DataInput din) throws java.io.IOException
Read a MD3Tag object from the specified input stream.
public MD3Tag makeMD3Tag()
Create a new, uninitialized MD3Tag object.
public MD3Mesh makeMD3Mesh(java.io.DataInput din) throws java.io.IOException
Create a new MD3Mesh object and initialize it with data read from the specified input stream.
public MD3Mesh makeMD3Mesh()
Creates an empty, uninitialized MD3Mesh object.
public MD3Texture makeMD3Texture(java.lang.String name, java.lang.String loadFilename) throws java.io.IOException
Factory method that loads a texture from a file.
name
- Name of the texture as specified in .md3 or .skin file.loadFilename
- Full name of file from which texture data will be loaded.public MD3Texture makeMD3Texture(java.lang.String name, java.lang.String loadFilename, java.io.InputStream in) throws java.io.IOException
Factory method that loads a texture from an input stream.
name
- Name of the texture as specified in .md3 or .skin file.loadFilename
- Full name of file from which texture is (supposedly) loaded.in
- Stream to load texture data from.public MD3Texture makeMD3Texture()
Creates an empty, uninitialized MD3Texture object.
public MD3Animation makeMD3Animation(java.lang.String line) throws java.io.IOException
Factory method that creates a new MD3Animation object and initialize it with the data in the specified string. Note that the name and type of the animation are NOT initialized! This has to be done separately!
public MD3Animation makeMD3Animation()
Creates an empty, uninitialized MD3Animation object.
public AnimationCfg makeAnimationCfg(java.lang.String filename) throws java.io.IOException
Load an animation.cfg file into the internal data stuctures of an AnimationCfg object.
filename
- Name of the file to open.public AnimationCfg makeAnimationCfg(java.io.InputStream in) throws java.io.IOException
Load animation.cfg data from the given input stream into the internal data stuctures of an AnimationCfg object.
in
- Stream to load data from.public AnimationCfg makeAnimationCfg()
Creates an empty AnimationCfg resource object.
public MD3Skin makeMD3Skin(java.lang.String filename) throws java.io.IOException
Load data from the specified skin file and put it in an MD3Skin resource object.
public MD3Skin makeMD3Skin(java.io.InputStream in) throws java.io.IOException
Load data from the specified input stream and put it in an MD3Skin resource object.
public MD3Skin makeMD3Skin()
Creates an empty MD3Skin resource object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |