|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.j3d.loaders.LoaderBase
org.j3d.renderer.java3d.loaders.HeightMapLoader
org.j3d.renderer.java3d.loaders.BTLoader
Loader for the VTerrain Project's BT file format.
The mesh produced is, by default, triangle strip arrays. The X axis represents East-West and the Z-axis represents North-South. +X is east, -Z is North. Texture coordinates are generated for the extents based on a single 0-1 scale for the width of the object.
The loader produces a single mesh that represents the file's contents. No further processing is performed in the current implementation to break the points into smaller tiles or use multi-resolution terrain structures.
The definition of the file format can be found at: http://www.vterrain.org/Implementation/BT.html
| Field Summary |
| Fields inherited from class com.sun.j3d.loaders.LoaderBase |
basePath, baseUrl, loadFlags |
| Fields inherited from interface com.sun.j3d.loaders.Loader |
LOAD_ALL, LOAD_BACKGROUND_NODES, LOAD_BEHAVIOR_NODES, LOAD_FOG_NODES, LOAD_LIGHT_NODES, LOAD_SOUND_NODES, LOAD_VIEW_GROUPS |
| Constructor Summary | |
BTLoader()
Construct a new default loader with no flags set |
|
BTLoader(int flags)
Construct a new loader with the given flags set. |
|
| Method Summary | |
float[] |
getGridStep()
Fetch information about the real-world stepping sizes that this grid uses. |
BTHeader |
getHeader()
Get the header used to describe the last stream parsed. |
float[][] |
getHeights()
Return the height map created for the last stream parsed. |
com.sun.j3d.loaders.Scene |
load(java.io.InputStream is)
Load the scene from the given reader. |
com.sun.j3d.loaders.Scene |
load(java.io.Reader reader)
Load the scene from the given reader. |
com.sun.j3d.loaders.Scene |
load(java.lang.String filename)
Load a scene from the given filename. |
com.sun.j3d.loaders.Scene |
load(java.net.URL url)
Load a scene from the named URL. |
void |
setCapabilityOverrideMap(java.util.Map capBits,
java.util.Map freqBits)
Provide the set of mappings that override anything that the loader might set. |
void |
setCapabilityRequiredMap(java.util.Map capBits,
java.util.Map freqBits)
Set the mapping of capability bits that the user would like to make sure is set. |
| Methods inherited from class com.sun.j3d.loaders.LoaderBase |
getBasePath, getBaseUrl, getFlags, setBasePath, setBaseUrl, setFlags |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.j3d.loaders.Loader |
getBasePath, getBaseUrl, getFlags, setBasePath, setBaseUrl, setFlags |
| Constructor Detail |
public BTLoader()
public BTLoader(int flags)
flags - The list of flags to be set| Method Detail |
public void setCapabilityOverrideMap(java.util.Map capBits,
java.util.Map freqBits)
If the key is set, but the value is null or zero length, then all capabilities on that node will be disabled. If the key is set the values override all settings that the loader may wish to normally make. This can be very dangerous if the loader is used for a file format that includes its own internal animation engine, so be very careful with this request.
setCapabilityOverrideMap in interface ManagedLoadercapBits - The capability bits to be setfreqBits - The frequency bits to be set
public void setCapabilityRequiredMap(java.util.Map capBits,
java.util.Map freqBits)
If the map contains a key, but the value is null or zero length, the request is ignored.
setCapabilityRequiredMap in interface ManagedLoadercapBits - The capability bits to be setfreqBits - The frequency bits to be set
public com.sun.j3d.loaders.Scene load(java.io.InputStream is)
throws com.sun.j3d.loaders.IncorrectFormatException,
com.sun.j3d.loaders.ParsingErrorException
load in interface BinaryLoaderis - The source of input characters
com.sun.j3d.loaders.IncorrectFormatException - The file is binary
com.sun.j3d.loaders.ParsingErrorException - Syntax and/or semantic parsing problems
public com.sun.j3d.loaders.Scene load(java.io.Reader reader)
throws com.sun.j3d.loaders.IncorrectFormatException
load in interface com.sun.j3d.loaders.Loaderreader - The source of input characters
com.sun.j3d.loaders.IncorrectFormatException - The file is binary
public com.sun.j3d.loaders.Scene load(java.lang.String filename)
throws java.io.FileNotFoundException,
com.sun.j3d.loaders.IncorrectFormatException,
com.sun.j3d.loaders.ParsingErrorException
load in interface com.sun.j3d.loaders.Loaderfilename - The name of the file to load
java.io.FileNotFoundException - The reader can't find the file
com.sun.j3d.loaders.IncorrectFormatException - The file is not one our loader
understands
com.sun.j3d.loaders.ParsingErrorException - An error parsing the file
public com.sun.j3d.loaders.Scene load(java.net.URL url)
throws java.io.FileNotFoundException,
com.sun.j3d.loaders.IncorrectFormatException,
com.sun.j3d.loaders.ParsingErrorException
load in interface com.sun.j3d.loaders.Loaderurl - The URL instance to load data from
java.io.FileNotFoundException - The reader can't find the file
com.sun.j3d.loaders.IncorrectFormatException - The file is not one our loader
understands
com.sun.j3d.loaders.ParsingErrorException - An error parsing the filepublic float[][] getHeights()
getHeights in interface HeightMapSourcepublic float[] getGridStep()
getGridStep in interface HeightMapSourcepublic BTHeader getHeader()
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||