org.jagatoo.loaders.models.ase
Class AseNode

java.lang.Object
  extended by org.jagatoo.loaders.models.ase.AseNode
Direct Known Subclasses:
AseFile, AseGeom, AseMap, AseMaterial, AseMesh

public class AseNode
extends java.lang.Object

Base node for all ASE nodes. Any node that inherits from this need only define the method variables and assign them to the parse list and the node will automatically parse itself.


Field Summary
protected static java.lang.Boolean debug
           
protected  java.util.Map<java.lang.String,java.lang.String> properties
           
 
Constructor Summary
AseNode()
           
 
Method Summary
 void parse(AseReader in)
           
 boolean parseProperty(AseReader in, org.jagatoo.loaders.models.ase.AseFileLine line)
          This is a generic parser method for any AseNodes.
 void trashBlock(AseReader in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static final java.lang.Boolean debug

properties

protected java.util.Map<java.lang.String,java.lang.String> properties
Constructor Detail

AseNode

public AseNode()
Method Detail

parseProperty

public boolean parseProperty(AseReader in,
                             org.jagatoo.loaders.models.ase.AseFileLine line)
This is a generic parser method for any AseNodes. Some might need to override this in order to handle the parse properly (Like MESH_FACENORMAL). Basically this reads a line and if it has a key it is looked up in the properties hash. If it finds a match it then checks the type of the class property using reflection and then parses the input based on type. An example is Colorf. If a property is of type Colorf then it will assume that there will be 3 floats as parameters to this line, in which case it will parse it.


trashBlock

public void trashBlock(AseReader in)

parse

public void parse(AseReader in)