org.j3d.renderer.java3d.loaders
Interface ManagedLoader
- All Superinterfaces:
- com.sun.j3d.loaders.Loader
- All Known Implementing Classes:
- BTLoader, DEMLoader
- public interface ManagedLoader
- extends com.sun.j3d.loaders.Loader
Extension of the Sun Loader definition interface that provides extra
ability to control the scene graph setup.
The methods provided here set the capability bit mappings to be used
during the next run of the loader instance. This allows the parser to
set the user-required capability bits while the loader is parsing, rather
than requiring the user to do their own scene-graph traversal.
The maps here have very specific requirements to their content. Each map
has the same requirement. The key for an entry in the map is the
Class instance for the java3D class that you want to
control. For example, if you want to set capability bits on an
Appearance instance, then the key must be
Appearance.class. The value for that key must be an array
of ints - ie int[]. This always applies, even if you only
want one specific capability set. If you do not, then internally the
code will throw a class cast exception and the parsing process will
stop.
Setting any value through this interface means that the loader is
obligated to follow these rules. If the key is not defined here, then the
loader is free to set exactly what they want. Any other behaviours are
defined in the individual methods.
Note If both required and capability maps are set then override
settings will be use in preference to required settings for that mapping.
So, given the following method calls, override capability bits will be set
but required frequency bits will be used for all subsequent calls to
load().
myLoader.setCapabilityOverrideMap(overrideBits, null);
myLoader.setCapabilityRequiredMap(requiredBits, requiredFreqs);
Calling any method with null will clear that requirement. So, if the user
then called
myLoader.setCapabilityOverrideMap(null, null);
after the two previous calls, the override mappings are gone, but the
required mappings still exist and are valid.
Capability bits are only available in Java3D 1.3. If
the loader is built using java3d 1.2, the frquency bit mapping information
is ignored. C
- Version:
- $Revision: 1.1 $
- Author:
- Justin Couch
| 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 |
|
Method Summary |
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 interface com.sun.j3d.loaders.Loader |
getBasePath, getBaseUrl, getFlags, load, load, load, setBasePath, setBaseUrl, setFlags |
setCapabilityOverrideMap
public void setCapabilityOverrideMap(java.util.Map capBits,
java.util.Map freqBits)
- Provide the set of mappings that override anything that the loader
might set.
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.
- Parameters:
capBits - The capability bits to be setfreqBits - The frequency bits to be set
setCapabilityRequiredMap
public 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. The end output is that the capabilities are the union
of what the loader wants and what the user wants.
If the map contains a key, but the value is null or zero length, the
request is ignored.
- Parameters:
capBits - The capability bits to be setfreqBits - The frequency bits to be set
Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org