j3d.org Code

org.j3d.loaders.discreet
Class MaxParser

java.lang.Object
  extended by org.j3d.loaders.discreet.MaxParser

public class MaxParser
extends java.lang.Object

A low-level parser for the Discreet 3DS Max file format.

The definition this works from is can be found at: http://www.the-labs.com/Blender/3DS-details.html http://www.spacesimulator.net/tut4_3dsloader.html

Version:
$Revision: 1.9 $
Author:
Justin Couch

Constructor Summary
MaxParser()
          Construct a new parser with no stream set.
MaxParser(java.io.InputStream is)
          Construct a new parser using the given stream to source the data from.
 
Method Summary
 ObjectMesh getObjectMesh()
          Get the last decoded mesh.
 ObjectMesh parse()
          Do all the parsing work.
 void reset(java.io.InputStream is)
          Reset the parser to use the new stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxParser

public MaxParser()
Construct a new parser with no stream set.


MaxParser

public MaxParser(java.io.InputStream is)
Construct a new parser using the given stream to source the data from.

Parameters:
is - The stream to read data from
Method Detail

reset

public void reset(java.io.InputStream is)
Reset the parser to use the new stream. After calling this method all header and height information is reset to empty.

Parameters:
is - The new stream to use

getObjectMesh

public ObjectMesh getObjectMesh()
Get the last decoded mesh. If the stream has been reset or hasn't been parsed for the first time, the method returns null.

Returns:
The last decoded mesh instance or null

parse

public ObjectMesh parse()
                 throws java.io.IOException
Do all the parsing work. Convenience method for all to call internally

Returns:
A completed object mesh representative of the file
Throws:
java.io.IOException

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org