Package com.sun.j3d.loaders
Class LoaderBase
java.lang.Object
com.sun.j3d.loaders.LoaderBase
- All Implemented Interfaces:
Loader
This class implements the Loader interface. To use
a file loader would extend this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Stores the basePath for data files associated with the file passed into load(String).protected URL
Stores the baseUrl for data files associated with the URL passed into load(URL).protected int
Stores the types of objects that the user wishes to load.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
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a Loader with default values for all variables.LoaderBase
(int flags) Constructs a Loader with the specified flags word. -
Method Summary
Modifier and TypeMethodDescriptionReturns the current base path setting.Returns the current base URL setting.int
getFlags()
Returns the current loading flags setting.void
setBasePath
(String pathName) This method sets the base path name for data files associated with the file.void
setBaseUrl
(URL url) This method sets the base URL name for data files associated with the file.void
setFlags
(int flags) This method sets the load flags for the file.
-
Field Details
-
loadFlags
protected int loadFlagsStores the types of objects that the user wishes to load. -
baseUrl
Stores the baseUrl for data files associated with the URL passed into load(URL). -
basePath
Stores the basePath for data files associated with the file passed into load(String).
-
-
Constructor Details
-
LoaderBase
public LoaderBase()Constructs a Loader with default values for all variables. -
LoaderBase
public LoaderBase(int flags) Constructs a Loader with the specified flags word.
-
-
Method Details
-
setBaseUrl
This method sets the base URL name for data files associated with the file. The baseUrl should be null by default, which is an indicator to the loader that it should look for any associated files starting from the same place as the URL passed into the load(URL) method. Note: Users of setBaseUrl() would then use load(URL) as opposed to load(String).- Specified by:
setBaseUrl
in interfaceLoader
-
setBasePath
This method sets the base path name for data files associated with the file. The basePath should be null by default, which is an indicator to the loader that it should look for any associated files starting from the same directory as the file passed into the load(String) method. Note: Users of setBasePath() would then use load(String) as opposed to load(URL).- Specified by:
setBasePath
in interfaceLoader
-
getBaseUrl
Returns the current base URL setting.- Specified by:
getBaseUrl
in interfaceLoader
-
getBasePath
Returns the current base path setting.- Specified by:
getBasePath
in interfaceLoader
-
setFlags
public void setFlags(int flags) This method sets the load flags for the file. The flags should equal 0 by default (which tells the loader to only load geometry). -
getFlags
public int getFlags()Returns the current loading flags setting.
-