org.xith3d.resources
Class ResBag

java.lang.Object
  extended by org.xith3d.resources.ResBag

public class ResBag
extends java.lang.Object

This is a "shortcut" to the singleton instance of ResourceBag.

See Also:
ResourceBag, ResourceBag.setSingletonInstance(ResourceBag), ResourceBag.getInstance()

Method Summary
static Model getModel(java.lang.String name)
          Retrieves the given Model resource from the ResourceBag.
static Model getModelInstance(java.lang.String name)
          Retrieves a new shared instance of the given Model resource from the ResourceBag.
static java.util.Collection<Model> getModels()
          Returns a Collection of all Models stored in the ResourceBag.
static Shader getShader(java.lang.String name)
          Retrieves the given Shader resource from the ResourceBag.
static java.util.Collection<Shader> getShaders()
          Returns a Collection of all Shaders stored in the ResourceBag.
static SoundContainer getSound(java.lang.String name)
          Retrieves the given SoundContainer resource from the ResourceBag.
static java.util.Collection<SoundContainer> getSounds()
          Returns a Collection of all SoundContainer resources stored in the ResourceBag.
static Texture getTexture(java.lang.String name)
          Retrieves the given Texture resource from the ResourceBag.
static java.util.Collection<Texture> getTextures()
          Returns a Collection of all Textures stored in the ResourceBag.
static int numModels()
          Returns the number of Model resources stored in this ResourceBag.
static int numResources()
          Return the total number of all resources stored in this ResourceBag.
static int numShaders()
          Returns the number of Shader resources stored in this ResourceBag.
static int numSounds()
          Return the number of SoundContainer resources stored in this ResourceBag.
static int numTextures()
          Returns the number of Texture resources stored in this ResourceBag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTexture

public static Texture getTexture(java.lang.String name)
Retrieves the given Texture resource from the ResourceBag.

Parameters:
name - the name to use as the key
Returns:
the retrieved Texture resource or null, if the name does not exist in the bag

getTextures

public static java.util.Collection<Texture> getTextures()
Returns a Collection of all Textures stored in the ResourceBag.

Returns:
the Collection of Textures

numTextures

public static int numTextures()
Returns the number of Texture resources stored in this ResourceBag.

Returns:
the number of Texture resources

getModel

public static Model getModel(java.lang.String name)
Retrieves the given Model resource from the ResourceBag.

Parameters:
name - the name to use as the key
Returns:
the Model resource or null if the resource with the name does not exist in the bag

getModelInstance

public static Model getModelInstance(java.lang.String name)
Retrieves a new shared instance of the given Model resource from the ResourceBag.

Parameters:
name - the name to use as the key
Returns:
the shared instance of the Model resource or null if the resource with the name does not exist in the bag

getModels

public static java.util.Collection<Model> getModels()
Returns a Collection of all Models stored in the ResourceBag.

Returns:
the Collection of Models

numModels

public static int numModels()
Returns the number of Model resources stored in this ResourceBag.

Returns:
the number of Model resources

getSound

public static SoundContainer getSound(java.lang.String name)
Retrieves the given SoundContainer resource from the ResourceBag.

Parameters:
name - the name to use as the key
Returns:
the SoundContainer resource or null if the resource with the name does not exist in the bag

getSounds

public static java.util.Collection<SoundContainer> getSounds()
Returns a Collection of all SoundContainer resources stored in the ResourceBag.

Returns:
the Collection of SoundContainer resources

numSounds

public static int numSounds()
Return the number of SoundContainer resources stored in this ResourceBag.

Returns:
the number of SoundContainer resources

getShader

public static Shader getShader(java.lang.String name)
Retrieves the given Shader resource from the ResourceBag.

Parameters:
name - the name to use as the key
Returns:
the Shader resource or null if the resource with the name does not exist in the bag

getShaders

public static java.util.Collection<Shader> getShaders()
Returns a Collection of all Shaders stored in the ResourceBag.

Returns:
the Collection of Shaders

numShaders

public static int numShaders()
Returns the number of Shader resources stored in this ResourceBag.

Returns:
the number of Shader resources

numResources

public static int numResources()
Return the total number of all resources stored in this ResourceBag.

Returns:
the number of all resources