md3.md3model
Class MD3Skin

java.lang.Object
  |
  +--md3.md3model.MD3Skin

public class MD3Skin
extends java.lang.Object

The MD3Skin class provides access tot the .skin files that accompany player models. MD3Skin objects are nothing more than mappings between mesh names and MD3Texture objects, as specified in a .skin file.

Author:
Erwin Vervaet (erwin@cs.kuleuven.ac.be)

Constructor Summary
protected MD3Skin()
          Create an empty MD3Skin resource object.
protected MD3Skin(java.io.InputStream in)
          Create a new MD3Skin resource object and initialize it with data coming from the specified input stream.
protected MD3Skin(java.lang.String filename)
          Create a new MD3Skin resource object and initialize it with data coming from the specified .skin file.
 
Method Summary
 MD3Texture getTexture(java.lang.String meshName)
          Return the texture associated with the specified mesh in this skin.
 void putTexture(java.lang.String meshName, MD3Texture tex)
          Add a mesh to texture mapping to this MD3Skin object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD3Skin

protected MD3Skin(java.lang.String filename)
           throws java.io.IOException

Create a new MD3Skin resource object and initialize it with data coming from the specified .skin file.


MD3Skin

protected MD3Skin(java.io.InputStream in)
           throws java.io.IOException

Create a new MD3Skin resource object and initialize it with data coming from the specified input stream.


MD3Skin

protected MD3Skin()

Create an empty MD3Skin resource object.

Method Detail

getTexture

public MD3Texture getTexture(java.lang.String meshName)

Return the texture associated with the specified mesh in this skin. This will return null if there is no mapping for the given mesh.

Note that only the first part of the mesh names have to match! So if you request l_legs_2, a mapping for l_legs might be returned.


putTexture

public void putTexture(java.lang.String meshName,
                       MD3Texture tex)

Add a mesh to texture mapping to this MD3Skin object. Use this when creating you own skins.