shout3d.core
Interface Shout3DViewer

All Known Implementing Classes:
Shout3DApplet, Shout3DPanel

public abstract interface Shout3DViewer
extends CoreShout3DViewer

An interface that extends CoreShout3DViewer to have Shout3D-specific features


Method Summary
 boolean addRoute(Field fromField, Field toField)
          Adds a route that copies values from 'fromField' to 'toField' each time that fromField's value changes.
 void clearResourceCaches()
          Clears the cache of loaded resources, freeing the memory that holds them.
 boolean deleteRoute(Field fromField, Field toField)
          Removes any existing route from fromField to toField Returns true if a route existed and was removed, false otherwise
 boolean isAntiAliased()
          Returns whether antialiasing is enabled
 boolean isBilinearFiltering()
          Returns whether bilinear filtering is enabled on textures
 boolean isLoadResourcesInSeparateThread()
          Returns whether resources should are being loaded in a separate thread.
 boolean isRouted(Field fromField, Field toField)
          Checks if a route currently exists from fromField to toField
 void setAntiAliased(boolean newVal)
          Sets whether antialiasing is enabled.
 void setBilinearFiltering(boolean newVal)
          Sets whether bilinear filtering is enabled on textures.
 void setLoadResourcesInSeparateThread(boolean newVal)
          Sets resources (textures and sounds) should be loaded in a separate thread from the main thread.
 
Methods inherited from interface shout3d.core.CoreShout3DViewer
getClock, getCurrentBindableNode, getDeviceListener, getNewPicker, getNewSearcher, getNodeByName, getProfile, getRenderer, getResourceListener, getScene, getVersion, loadURL, setScene, setSceneFromURL
 

Method Detail

addRoute

public boolean addRoute(Field fromField,
                        Field toField)
                 throws Shout3DException
Adds a route that copies values from 'fromField' to 'toField' each time that fromField's value changes. Also copies value from fromField to toField. Throws a Shout3DException if the two fields are not of the same type. Will not add a second route if a route already exists. Returns true if a route was added, false otherwise
Parameters:
fromField - the field from which values will be copied
toField - the field to which values will be copied
Returns:
true if the route was added, false otherwise

deleteRoute

public boolean deleteRoute(Field fromField,
                           Field toField)
Removes any existing route from fromField to toField Returns true if a route existed and was removed, false otherwise
Parameters:
fromField - the field from which values will be copied
toField - the field to which values will be copied
Returns:
true if the route was removed, false otherwise

isRouted

public boolean isRouted(Field fromField,
                        Field toField)
Checks if a route currently exists from fromField to toField
Returns:
true if the route exists, false otherwise

clearResourceCaches

public void clearResourceCaches()
Clears the cache of loaded resources, freeing the memory that holds them. Normally, a texture, sound or Shout3d scene that is loaded by the applet is stored in a cache, so that if another node requires that texture (or other resource) the resource does not need to be fetched and loaded again. This method frees those caches, which frees memory while making it so that all resources will be fetched if they are requested anew. Note: Textures and sounds that have already been loaded into nodes will be stored until those nodes are in turn freed. The caches are a separate entity.

setAntiAliased

public void setAntiAliased(boolean newVal)
Sets whether antialiasing is enabled. (Default is false) This performs antialiasing of all geometry against the background.
Parameters:
newVal - whether antialiasing should be enabled

isAntiAliased

public boolean isAntiAliased()
Returns whether antialiasing is enabled
Returns:
whether antialiasing is currently enabled

setBilinearFiltering

public void setBilinearFiltering(boolean newVal)
Sets whether bilinear filtering is enabled on textures. (Default is false) This results in higher quality, but slower rendering of the textures
Parameters:
newVal - whether bilinear filtering should be enabled

isBilinearFiltering

public boolean isBilinearFiltering()
Returns whether bilinear filtering is enabled on textures
Returns:
whether bilinear filtering is currently enabled

setLoadResourcesInSeparateThread

public void setLoadResourcesInSeparateThread(boolean newVal)
Sets resources (textures and sounds) should be loaded in a separate thread from the main thread. (Default is true)
Parameters:
newVal - whether resources should be loaded in a separate thread.

isLoadResourcesInSeparateThread

public boolean isLoadResourcesInSeparateThread()
Returns whether resources should are being loaded in a separate thread.
Returns:
whether resources should are being loaded in a separate thread.