Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.loader
Interface AVModel


public interface AVModel

Representation of a loaded model that came from a AVLoader implementation.

The model contains all of the Aviatrix3D scenegraph structures as requested by the user of the loader interface. For example, if the loader was instructed to only load geometry, then it should not be possible to fetch runtime information from this model instance.

If the user asks the loader to maintain the raw model structure as part of the load process, then that will be available through the getRawModel() method. The returned object type is dependent on the model format and loader implementation. The derived documentation must document what this class is so that the user can cast to the higher level interface.

The order of the structures returned by the methods of this interface are not guaranteed to map to the order they were declared in the source file.

Layers

The behaviour of this class is dependent on layers.

When the user requests that layers are loaded, and some are found in the requested file, then no root model is defined getModelRoot() will return null. All content is accessed through the getLayers() method. Layers are returned in the order of front-most to rear-most. Layers that are defined, but contain no content will still have valid layer object instances. With all layers, unless the file format contains a specific size, the Viewport will have zero size. It is up to the calling application to ensure that viewports are correctly sized before adding them to the scene.

When no layer loading is requested, or the loaded file does not contain any layers, then the getLayers() method will return an empty list and getModelRoot() will return a valid object representing the root of the loaded model.

Version:
$Revision: 1.4 $
Author:
Justin Couch

Method Summary
 java.util.List<Background> getBackgrounds()
          Get the list of backgrounds that are contained in the file.
 java.util.Map<SceneGraphObject,java.lang.Object> getExternallyDefinedFiles()
          Get the listing of the external resources declared as being needed by this file.
 java.util.List<Fog> getFogs()
          Get the list of fogs that are contained in the file.
 java.util.List<Layer> getLayers()
          Get the list of layers that are contained in the file.
 java.util.List<Light> getLights()
          Get the list of lights that are contained in the file.
 Group getModelRoot()
          Get the root of the scene graph structure that represents this model.
 java.util.Map<java.lang.String,SceneGraphObject> getNamedObjects()
          Get a mapping of any internally named objects to their corresponding scene graph structure.
 java.lang.Object getRawModel()
          Get the raw model representation of the scene as defined by a loader-specific set of classes.
 java.util.List<AVRuntimeComponent> getRuntimeComponents()
          Get the list of runtime components that are contained in the file.
 java.util.List getViewpoints()
          Get the list of viewpoints that are contained in the file.
 

Method Detail

getModelRoot

Group getModelRoot()
Get the root of the scene graph structure that represents this model.

If this model contains loaded layers, it will not return a root object.

Returns:
The grouping node that represents the root of the scene graph

getRawModel

java.lang.Object getRawModel()
Get the raw model representation of the scene as defined by a loader-specific set of classes. If the loader was instructed to discard this information, the method returns null.

Returns:
An implementation-specific object that represents the raw model format structure or null

getNamedObjects

java.util.Map<java.lang.String,SceneGraphObject> getNamedObjects()
Get a mapping of any internally named objects to their corresponding scene graph structure. The key of the map is the name defined in the file format, and the value is the aviatrix3D scene graph structure that they map to. The exact mapping that each makes is dependent on the loader implementation.

Returns:
A map of strings to SceneGraphObject instances

getExternallyDefinedFiles

java.util.Map<SceneGraphObject,java.lang.Object> getExternallyDefinedFiles()
Get the listing of the external resources declared as being needed by this file. External resources are keyed by the object to their provided file name string or strings from the file. The value string(s) will be exactly as declared in the file. It is expected the user application will resolve to fully qualified path names to read the rest of the files required. The name map may be either a String or String[] depending on the implementation.

Returns:
a map of the objects to their requested file name(s)

getViewpoints

java.util.List getViewpoints()
Get the list of viewpoints that are contained in the file. The list will contain the Viewpoint instances corresponding to each viewpoint declared in the file. If a file does not declare any viewpoints, or the loader was requested not to load viewpoints, this returns an empty list.

Returns:
A list of the viewpoint instances declared in the file

getBackgrounds

java.util.List<Background> getBackgrounds()
Get the list of backgrounds that are contained in the file. The list will contain the Background instances corresponding to each background declared in the file. If a file does not declare any backgrounds, or the loader was requested not to load backgrounds, this returns an empty list.

Returns:
A list of the background instances declared in the file

getFogs

java.util.List<Fog> getFogs()
Get the list of fogs that are contained in the file. The list will contain the Fog instances corresponding to each fog declared in the file. If a file does not declare any fogs, or the loader was requested not to load fogs, this returns an empty list.

Returns:
A list of the fog instances declared in the file

getLayers

java.util.List<Layer> getLayers()
Get the list of layers that are contained in the file. The list will contain the Layer instances corresponding to each layer declared in the file. If a file does not declare any layers, or the loader was requested not to load layers, this returns an empty list. Unlike the other methods, this method will guarantee to return the layer instances in the order of front to rear.

If this model contains loaded layers, it will not return a root object.

Returns:
A list of the layer instances declared in the file
Since:
Aviatrix3D 2.0

getLights

java.util.List<Light> getLights()
Get the list of lights that are contained in the file. The list will contain the Light instances corresponding to each light declared in the file. If a file does not declare any lights, or the loader was requested not to load lights, this returns an empty list.

Returns:
A list of the light instances declared in the file

getRuntimeComponents

java.util.List<AVRuntimeComponent> getRuntimeComponents()
Get the list of runtime components that are contained in the file. The list will contain the AVRuntimeComponent instances used for controlling animation or any other runtime capabilities inherent to the file format.If a file does not declare any runtime capabilities, or the loader was requested not to load runtimes, this returns an empty list.

Returns:
A list of the AVRuntimeComponent instances declared in the file

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org