org.jagatoo.loaders.models.tds
Class TDSFile

java.lang.Object
  extended by org.jagatoo.loaders.models.tds.TDSFile

public class TDSFile
extends java.lang.Object

Responsbile for handling the reading of the data file


Method Summary
 void close()
           
 boolean convertZup2Yup()
           
 java.net.URL getBaseURL()
           
 ModelContext getContext()
           
 boolean hiddenObject(java.lang.String name)
           
static TDSFile load(java.io.InputStream in, java.net.URL baseURL, AppearanceFactory appFactory, GeometryFactory geomFactory, boolean convertZup2Yup, NodeFactory nodeFactory, AnimationFactory animFactory, SpecialItemsHandler siHandler, NamedObject rootGroup)
           
 TDSChunkType processChunk()
           
 byte readByte()
           
 float[] readColor(boolean readChunkID, int[] chunkID)
           
 float readFloat()
           
 int readInt()
           
 java.lang.String readMatName(boolean readChunkID)
           
 java.lang.String readName()
           
 float readPercentage(boolean readChunkID, int[] chunkID)
           
 short readUnsignedByte()
           
 int readUnsignedInt()
           
 int readUnsignedShort()
           
 void skipBytes(int bytesToSkip)
           
 void skipChunk(int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBaseURL

public final java.net.URL getBaseURL()

convertZup2Yup

public final boolean convertZup2Yup()

getContext

public final ModelContext getContext()

readByte

public final byte readByte()
                    throws java.io.IOException
Throws:
java.io.IOException

readUnsignedByte

public final short readUnsignedByte()
                             throws java.io.IOException
Throws:
java.io.IOException

readUnsignedShort

public final int readUnsignedShort()
                            throws java.io.IOException
Throws:
java.io.IOException

readInt

public final int readInt()
                  throws java.io.IOException
Throws:
java.io.IOException

readUnsignedInt

public final int readUnsignedInt()
                          throws java.io.IOException
Throws:
java.io.IOException

readFloat

public final float readFloat()
                      throws java.io.IOException
Throws:
java.io.IOException

skipBytes

public final void skipBytes(int bytesToSkip)
                     throws java.io.IOException
Throws:
java.io.IOException

skipChunk

public final void skipChunk(int length)
                     throws java.io.IOException
Throws:
java.io.IOException

hiddenObject

public final boolean hiddenObject(java.lang.String name)

readPercentage

public final float readPercentage(boolean readChunkID,
                                  int[] chunkID)
                           throws java.io.IOException
Throws:
java.io.IOException

readName

public final java.lang.String readName()
                                throws java.io.IOException
Throws:
java.io.IOException

readMatName

public final java.lang.String readMatName(boolean readChunkID)
                                   throws java.io.IOException
Throws:
java.io.IOException

readColor

public final float[] readColor(boolean readChunkID,
                               int[] chunkID)
                        throws java.io.IOException
Throws:
java.io.IOException

processChunk

public TDSChunkType processChunk()
                          throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

load

public static final TDSFile load(java.io.InputStream in,
                                 java.net.URL baseURL,
                                 AppearanceFactory appFactory,
                                 GeometryFactory geomFactory,
                                 boolean convertZup2Yup,
                                 NodeFactory nodeFactory,
                                 AnimationFactory animFactory,
                                 SpecialItemsHandler siHandler,
                                 NamedObject rootGroup)
                          throws java.io.IOException,
                                 IncorrectFormatException,
                                 ParsingException
Throws:
java.io.IOException
IncorrectFormatException
ParsingException