|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AVLoader
The definition of a class that is capable of parsing a file format and turning it into an Aviatrix3D scene graph.
Loaders provide a common interface regardless of the type of file format that is being loaded. The flags allow you to control exactly what should be created from a loading process. For example, many applications only want the static geometry to be loaded, while ignoring any animation data provided. Many of the more complex model formats, such as those that come from modelling tools like 3DS Max or Maya include a wealth of useful renderable structure, and also a lot of useless stuff, such as parameters for the editor configuration or raytracing parameters. These are ignored by the loader interface as it focuses on working with realtime model data only.
Behavioural Requirements The default behaviour of a loader implementation, should the user not set any flags shall be as follows:
load()
is independent. No state is kept
between calls other than flag settings.
Field Summary | |
---|---|
static int |
BACKGROUNDS
Load the background(s) defined in the file |
static int |
FOGS
Load the fogs defined in the file |
static int |
GEOMETRY
Load the geometry and structural portions of the file |
static int |
LAYERS
Load the layers defined in the file |
static int |
LIGHTS
Load the lights defined in the file |
static int |
LOAD_ALL
Load everything in the file |
static int |
RUNTIMES
Load code that will handling any runtime capabilities (such as animation) defined in the file. |
static int |
VIEWPOINTS
Load the viewpoints defined in the file |
Method Summary | |
---|---|
int |
getLoadFlags()
Get the current set collection of load flags. |
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(java.io.File file)
Load a model from the given file. |
AVModel |
load(java.io.InputStream stream)
Load a model from the given input stream. |
AVModel |
load(java.net.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. |
Field Detail |
---|
static final int GEOMETRY
static final int BACKGROUNDS
static final int VIEWPOINTS
static final int RUNTIMES
static final int FOGS
static final int LIGHTS
static final int LAYERS
static final int LOAD_ALL
Method Detail |
---|
AVModel load(java.net.URL url) throws java.io.IOException
url
- The url to load the model from
java.io.IOException
- something went wrong while reading the fileAVModel load(java.io.InputStream stream) throws java.io.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.
stream
- The stream to load the model from
java.io.IOException
- something went wrong while reading the fileAVModel load(java.io.File file) throws java.io.IOException
file
- The file instance to load the model from
java.io.IOException
- something went wrong while reading the filevoid setLoadFlags(int flags)
flags
- The collection of flags to useint getLoadFlags()
void keepInternalModel(boolean enable)
AVModel.getRawModel()
method and cast to
the appropriate class type.
enable
- true to enable keeping the raw model, false otherwiseboolean isInternalModelKept()
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |