|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jagatoo.loaders.models.ase.AseNode
org.jagatoo.loaders.models.ase.AseFile
public class AseFile
Loader for the ase file format. Once the data is loaded, several methods can
be used to build the Xith3D Scenegraph object. If the ase file represents a
single object which is always treated as one (i.e. no moving parts within it)
then the getModel method is the simplest way. Alternativly, to load each ase
node as it's own Group with it's geometry relitive to it's pivot point
(allowing for easy rotation) use the getNamedNodesMap and
getTransformGroupTree methods. The former gives you a map containing just the
named GEOM nodes, infact it just calls getTransformGroupTree passing a few
flags to get this behaviour. The most useful and customisable method is
getTransformGroupTree. All groups and geometry are loaded relitive to their
pivot points, transformed into place and grouped into TransformGroupS. This
is the most true representation of the file data as the pivots group concepts
are preserved.
The Getting Started Guide
has some tutorials to illustrate how to use the ASE loader, including a
chapter on
TransformGroup trees by the author of that method which diagramatically
describes how that method works.
| Field Summary | |
|---|---|
java.util.Map<java.lang.String,AseNode> |
allTopLevelObjects
Field used by the parser to store all Ase objects read in by the top-level parser. |
org.jagatoo.loaders.models.ase.AseGraph |
aseGraph
Field used by the parser to store the ase graph |
java.lang.String |
comment
Field used by the parser to store ASE information |
int |
materialCount
Field used by the parser to store ASE information |
java.util.List<AseMaterial> |
materials
Field used by the parser to store materials |
java.util.Map<java.lang.String,AseNode> |
objects
Field used by the parser to store all Ase objects. |
float |
version
Field used by the parser to store ASE information |
| Fields inherited from class org.jagatoo.loaders.models.ase.AseNode |
|---|
debug, properties |
| Constructor Summary | |
|---|---|
AseFile()
Creates an empty AseFile object to which data from the file will be read into. |
|
| Method Summary | |
|---|---|
void |
parse(AseReader in)
Overrides the default parse method because the top level of an ASE file has various nodes of different types, and its easier to handle them explicitly |
static void |
updateHierarchyFromNodeParent(java.util.Map<java.lang.String,AseNode> objects,
java.util.Map<java.lang.String,AseNode> allTopLevelObjects,
AseGeom geom)
Updates the hierarchy based on the NODE_PARENT field of the given AseGeom node. |
| Methods inherited from class org.jagatoo.loaders.models.ase.AseNode |
|---|
parseProperty, trashBlock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float version
public java.lang.String comment
public org.jagatoo.loaders.models.ase.AseGraph aseGraph
public java.util.Map<java.lang.String,AseNode> objects
public java.util.Map<java.lang.String,AseNode> allTopLevelObjects
public java.util.List<AseMaterial> materials
public int materialCount
| Constructor Detail |
|---|
public AseFile()
Creates an empty AseFile object to which data from the file will be read into. To read the data, use the parse method passing an AseReader object.
Example:
AseFile ase = new AseFile();
ase.parse(new BufferedReader(new FileReader("CUBE.ASE"));
| Method Detail |
|---|
public static void updateHierarchyFromNodeParent(java.util.Map<java.lang.String,AseNode> objects,
java.util.Map<java.lang.String,AseNode> allTopLevelObjects,
AseGeom geom)
public void parse(AseReader in)
parse in class AseNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||