public class DEMLoader extends Object implements AVLoader, org.j3d.loaders.HeightMapSource
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.
DEM models do not contain layers or anything else other than the raw geometry. All the model list and map methods will return empty collections.
BACKGROUNDS, FOGS, GEOMETRY, LAYERS, LIGHTS, LOAD_ALL, RUNTIMES, VIEWPOINTS| Constructor and Description |
|---|
DEMLoader()
Construct a new default loader with no flags set
|
| Modifier and Type | Method and Description |
|---|---|
float[] |
getGridStep()
Fetch information about the real-world stepping sizes that this
grid uses.
|
float[][] |
getHeights()
Return the height map created for the last stream parsed.
|
int |
getLoadFlags()
Get the current set collection of load flags.
|
org.j3d.loaders.HeightMapSourceOrigin |
getOriginLocation() |
org.j3d.loaders.dem.DEMTypeARecord |
getTypeARecord()
Get the header used to describe the last stream parsed.
|
org.j3d.loaders.dem.DEMTypeBRecord[] |
getTypeBRecords()
Fetch all of the type B records that were registered in this file.
|
org.j3d.loaders.dem.DEMTypeCRecord |
getTypeCRecord()
Get the type C record from the file.
|
boolean |
isInternalModelKept()
Check to see whether the loader should be currently keeping the internal
model.
|
void |
keepInternalModel(boolean enable)
Define whether this loader should also keep around it's internal
representation of the file format, if it has one.
|
AVModel |
load(File file)
Load a model from the given file.
|
AVModel |
load(InputStream stream)
Load a model from the given input stream.
|
AVModel |
load(URL url)
Load a model from the given URL.
|
void |
setLoadFlags(int flags)
Set the flags for which parts of the file that should be loaded.
|
public AVModel load(URL url) throws IOException
load in interface AVLoaderurl - The url to load the model fromIOException - something went wrong while reading the filepublic AVModel load(InputStream stream) throws IOException
Reader interface, then use the
InputStreamReader to convert this stream to the desired
type. The caller will be responsible for closing down the stream at the
end of this process.load in interface AVLoaderstream - The stream to load the model fromIOException - something went wrong while reading the filepublic AVModel load(File file) throws IOException
load in interface AVLoaderfile - The file instance to load the model fromIOException - something went wrong while reading the filepublic void setLoadFlags(int flags)
setLoadFlags in interface AVLoaderflags - The collection of flags to usepublic int getLoadFlags()
getLoadFlags in interface AVLoaderpublic void keepInternalModel(boolean enable)
AVModel.getRawModel() method and cast to
the appropriate class type.keepInternalModel in interface AVLoaderenable - true to enable keeping the raw model, false otherwisepublic boolean isInternalModelKept()
isInternalModelKept in interface AVLoaderpublic float[][] getHeights()
getHeights in interface org.j3d.loaders.HeightMapSourcepublic float[] getGridStep()
getGridStep in interface org.j3d.loaders.HeightMapSourcepublic org.j3d.loaders.HeightMapSourceOrigin getOriginLocation()
getOriginLocation in interface org.j3d.loaders.HeightMapSourcepublic org.j3d.loaders.dem.DEMTypeARecord getTypeARecord()
public org.j3d.loaders.dem.DEMTypeBRecord[] getTypeBRecords()
public org.j3d.loaders.dem.DEMTypeCRecord getTypeCRecord()
Copyright © 2001 - 2015 j3d.org