org.xith3d.resources
Class ModelResourceRequest

java.lang.Object
  extended by org.xith3d.resources.ModelResourceRequest
All Implemented Interfaces:
org.jagatoo.datatypes.NamedObject, ResourceRequest

public class ModelResourceRequest
extends java.lang.Object
implements ResourceRequest

This is a ResourceRequest for a Model resource to be loaded with ModelLoader.


Constructor Summary
ModelResourceRequest(java.lang.String name, java.lang.String bagName)
          Creates a new ModelResourceRequest.
ModelResourceRequest(java.lang.String name, java.lang.String bagName, float scale)
          Creates a new ModelResourceRequest.
ModelResourceRequest(java.lang.String name, java.lang.String bagName, java.net.URL baseURL)
          Creates a new ModelResourceRequest.
ModelResourceRequest(java.lang.String name, java.lang.String bagName, java.net.URL baseURL, int flags)
          Creates a new ModelResourceRequest.
ModelResourceRequest(java.lang.String name, java.lang.String bagName, java.net.URL baseURL, int flags, float scale)
          Creates a new ModelResourceRequest.
ModelResourceRequest(java.lang.String name, java.lang.String bagName, java.net.URL baseURL, int flags, java.lang.String skin)
          Creates a new ModelResourceRequest.
ModelResourceRequest(java.lang.String name, java.lang.String bagName, java.net.URL baseURL, int flags, java.lang.String skin, float scale)
          Creates a new ModelResourceRequest.
 
Method Summary
 java.lang.String getBagName()
          
 java.net.URL getBaseURL()
           
 int getLoadFlags()
           
 java.lang.String getName()
          
 float getScale()
           
 java.lang.String getSkin()
           
 java.lang.Object loadResource(ResourceLocator resLoc, ResourceBag resBag)
          Loads the resource and stores it into the ResourceBag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelResourceRequest

public ModelResourceRequest(java.lang.String name,
                            java.lang.String bagName,
                            java.net.URL baseURL,
                            int flags,
                            java.lang.String skin,
                            float scale)
Creates a new ModelResourceRequest.

Parameters:
name - the name of the requested Model resource
bagName - the name of the requested resource, that it will carry in the ResourceBag
baseURL - the base URL to use while loading (or null to get from model URL)
flags - the load flags to be used to load this Model
skin - the name of the skin to be loaded
scale - the scale to load the Model with

ModelResourceRequest

public ModelResourceRequest(java.lang.String name,
                            java.lang.String bagName,
                            java.net.URL baseURL,
                            int flags,
                            java.lang.String skin)
Creates a new ModelResourceRequest.

Parameters:
name - the name of the requested Model resource
bagName - the name of the requested resource, that it will carry in the ResourceBag
baseURL - the base URL to use while loading (or null to get from model URL)
flags - the load flags to be used to load this Model
skin - the name of the skin to be loaded

ModelResourceRequest

public ModelResourceRequest(java.lang.String name,
                            java.lang.String bagName,
                            java.net.URL baseURL,
                            int flags,
                            float scale)
Creates a new ModelResourceRequest.

Parameters:
name - the name of the requested Model resource
bagName - the name of the requested resource, that it will carry in the ResourceBag
baseURL - the base URL to use while loading (or null to get from model URL)
flags - the load flags to be used to load this Model
scale - the scale to load the Model with

ModelResourceRequest

public ModelResourceRequest(java.lang.String name,
                            java.lang.String bagName,
                            java.net.URL baseURL,
                            int flags)
Creates a new ModelResourceRequest.

Parameters:
name - the name of the requested Model resource
bagName - the name of the requested resource, that it will carry in the ResourceBag
baseURL - the base URL to use while loading (or null to get from model URL)
flags - the load flags to be used to load this Model

ModelResourceRequest

public ModelResourceRequest(java.lang.String name,
                            java.lang.String bagName,
                            java.net.URL baseURL)
Creates a new ModelResourceRequest.

Parameters:
name - the name of the requested Model resource
bagName - the name of the requested resource, that it will carry in the ResourceBag
baseURL - the base URL to use while loading (or null to get from model URL)

ModelResourceRequest

public ModelResourceRequest(java.lang.String name,
                            java.lang.String bagName,
                            float scale)
Creates a new ModelResourceRequest.

Parameters:
name - the name of the requested Model resource
bagName - the name of the requested resource, that it will carry in the ResourceBag
scale - the scale to load the Model with

ModelResourceRequest

public ModelResourceRequest(java.lang.String name,
                            java.lang.String bagName)
Creates a new ModelResourceRequest.

Parameters:
name - the name of the requested Model resource
bagName - the name of the requested resource, that it will carry in the ResourceBag
Method Detail

getName

public final java.lang.String getName()

Specified by:
getName in interface org.jagatoo.datatypes.NamedObject
Specified by:
getName in interface ResourceRequest
Returns:
the name of the requested resource

getBagName

public final java.lang.String getBagName()

Specified by:
getBagName in interface ResourceRequest
Returns:
the name of the requested resource, that it will carry in the ResourceBag

getBaseURL

public final java.net.URL getBaseURL()
Returns:
the base URL to use while loading (or null to get from model URL).

getSkin

public final java.lang.String getSkin()
Returns:
the name of the skin to be loaded.

getScale

public final float getScale()
Returns:
the scale, the Model will be loaded with.

getLoadFlags

public final int getLoadFlags()
Returns:
the load flags to be used to load this Model.

loadResource

public java.lang.Object loadResource(ResourceLocator resLoc,
                                     ResourceBag resBag)
                              throws java.io.IOException
Loads the resource and stores it into the ResourceBag.

Specified by:
loadResource in interface ResourceRequest
Parameters:
resLoc - the ResourceLocator to load resources from
resBag - the ResourceBag to store the loaded resource to
Returns:
the loaded resource.
Throws:
java.io.IOException