|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.MaterialManager
public class MaterialManager
| Nested Class Summary | |
|---|---|
static class |
MaterialManager.Listener
|
protected static class |
MaterialManager.ListenerList
|
protected static class |
MaterialManager.SchemeMap
|
| Nested classes/interfaces inherited from interface org.ogre4j.IMaterialManager |
|---|
IMaterialManager.IListener, IMaterialManager.IListenerList, IMaterialManager.ISchemeMap |
| Nested classes/interfaces inherited from interface org.ogre4j.IResourceManager |
|---|
IResourceManager.IResourceCreateOrRetrieveResult, IResourceManager.IResourceHandleMap, IResourceManager.IResourceMap, IResourceManager.IResourceMapIterator |
| Field Summary |
|---|
| Fields inherited from class org.xbig.base.NativeObject |
|---|
deleted, object, remote |
| Constructor Summary | |
|---|---|
|
MaterialManager()
Default constructor. |
|
MaterialManager(InstancePointer p)
This constructor is public for internal useage only! |
protected |
MaterialManager(InstancePointer p,
boolean remote)
Creates a Java wrapper object for an existing C++ object. |
|
MaterialManager(WithoutNativeObject val)
Allows creation of Java objects without C++ objects. |
| Method Summary | |
|---|---|
ITechnique |
_arbitrateMissingTechniqueForActiveScheme(IMaterial mat,
int lodIndex,
IRenderable rend)
|
int |
_getActiveSchemeIndex()
Internal method - returns the active scheme index. |
int |
_getSchemeIndex(java.lang.String name)
Internal method - returns index for a given material scheme name. |
java.lang.String |
_getSchemeName(int index)
Internal method - returns name for a given material scheme index. |
void |
_notifyResourceLoaded(IResource res)
Notify this manager that a resource which it manages has been loaded. |
void |
_notifyResourceTouched(IResource res)
Notify this manager that a resource which it manages has been 'touched', i.e. used. |
void |
_notifyResourceUnloaded(IResource res)
Notify this manager that a resource which it manages has been unloaded. |
void |
addListener(IMaterialManager.IListener l)
Add a listener to handle material events. |
void |
create(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams)
Creates a new blank resource, but does not immediately load it. |
void |
createOrRetrieve(IResourceManager.IResourceCreateOrRetrieveResult returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams)
Create a new resource, or retrieve an existing one with the same name if it already exists. |
void |
delete()
Deletes the corresponding C++ object. |
void |
finalize()
|
java.lang.String |
getActiveScheme()
Returns the name of the active material scheme. |
void |
getByHandle(IResourcePtr returnValue,
long handle)
Retrieves a pointer to a resource by handle, or null if the resource does not exist. |
void |
getByName(IResourcePtr returnValue,
java.lang.String name)
Retrieves a pointer to a resource by name, or null if the resource does not exist. |
static java.lang.String |
getDEFAULT_SCHEME_NAME()
|
long |
getDefaultAnisotropy()
|
void |
getDefaultSettings(IMaterialPtr returnValue)
Returns a pointer to the default settings. |
FilterOptions |
getDefaultTextureFiltering(FilterType ftype)
|
float |
getLoadingOrder()
Gets the relative loading order of resources of this type. |
int |
getMemoryBudget()
Get the limit on the amount of memory this resource handler may use. |
int |
getMemoryUsage()
Gets the current memory usage, in bytes. |
void |
getResourceIterator(IResourceManager.IResourceMapIterator returnValue)
Returns an iterator over all resources in this manager. |
java.lang.String |
getResourceType()
Gets a string identifying the type of resource this manager handles. |
IStringVector |
getScriptPatterns()
Gets the file patterns which should be used to find scripts for this . |
static IMaterialManager |
getSingleton()
Override standard retrieval. |
static IMaterialManager |
getSingletonPtr()
Override standard retrieval. |
boolean |
getVerbose()
Gets whether this manager and its resources habitually produce log output |
void |
initialise()
Initialises the material manager, which also triggers it to parse all available .program and .material scripts. |
void |
load(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList loadParams)
Generic load method, used to create a specific to this without using one of the specialised 'load' methods (containing per-Resource-type parameters). |
void |
parseScript(IDataStreamPtr stream,
java.lang.String groupName)
Parse the definition of a set of resources from a script file. |
void |
prepare(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList loadParams)
Generic prepare method, used to create a specific to this without using one of the specialised 'prepare' methods (containing per-Resource-type parameters). |
void |
reloadAll(boolean reloadableOnly)
Caused all currently loaded resources to be reloaded. |
void |
reloadUnreferencedResources(boolean reloadableOnly)
Caused all currently loaded but not referenced by any other object resources to be reloaded. |
void |
remove(IResourcePtr r)
Remove a single resource. |
void |
remove(long handle)
Remove a single resource by handle. |
void |
remove(java.lang.String name)
Remove a single resource by name. |
void |
removeAll()
Removes all resources. |
void |
removeListener(IMaterialManager.IListener l)
Remove a listener handling material events. |
boolean |
resourceExists(long handle)
|
boolean |
resourceExists(java.lang.String name)
|
void |
setActiveScheme(java.lang.String schemeName)
Sets the name of the active material scheme. |
static void |
setDEFAULT_SCHEME_NAME(java.lang.String _jni_value_)
|
void |
setDefaultAnisotropy(long maxAniso)
Sets the default anisotropy level to be used for loaded textures, for when textures are loaded automatically (e.g. by class) or when 'load' is called with the default parameters by the application. |
void |
setDefaultTextureFiltering(FilterOptions minFilter,
FilterOptions magFilter,
FilterOptions mipFilter)
Sets the default texture filtering to be used for loaded textures, for when textures are loaded automatically (e.g. by class) or when 'load' is called with the default parameters by the application. |
void |
setDefaultTextureFiltering(FilterType ftype,
FilterOptions opts)
Sets the default texture filtering to be used for loaded textures, for when textures are loaded automatically (e.g. by class) or when 'load' is called with the default parameters by the application. |
void |
setDefaultTextureFiltering(TextureFilterOptions fo)
Sets the default texture filtering to be used for loaded textures, for when textures are loaded automatically (e.g. by class) or when 'load' is called with the default parameters by the application. |
void |
setMemoryBudget(int bytes)
Set a limit on the amount of memory this resource handler may use. |
void |
setVerbose(boolean v)
Sets whether this manager and its resources habitually produce log output |
void |
unload(long handle)
Unloads a single resource by handle. |
void |
unload(java.lang.String name)
Unloads a single resource by name. |
void |
unloadAll(boolean reloadableOnly)
Unloads all resources. |
void |
unloadUnreferencedResources(boolean reloadableOnly)
Unload all resources which are not referenced by any other object. |
| Methods inherited from class org.xbig.base.NativeObject |
|---|
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xbig.base.INativeObject |
|---|
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer |
| Constructor Detail |
|---|
public MaterialManager(InstancePointer p)
protected MaterialManager(InstancePointer p,
boolean remote)
public MaterialManager(WithoutNativeObject val)
WithoutNativeObject,
INativeObject.disconnectFromNativeObject()public MaterialManager()
| Method Detail |
|---|
public void delete()
INativeObjectSubclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!
delete in interface INativeObjectdelete in class NativeObject#remotepublic void finalize()
finalize in class NativeObjectpublic void initialise()
initialise in interface IMaterialManager
public void parseScript(IDataStreamPtr stream,
java.lang.String groupName)
IResourceManager
parseScript in interface IMaterialManagerparseScript in interface IResourceManagerparseScript in interface IScriptLoaderpublic void setDefaultTextureFiltering(TextureFilterOptions fo)
setDefaultTextureFiltering in interface IMaterialManager
public void setDefaultTextureFiltering(FilterType ftype,
FilterOptions opts)
setDefaultTextureFiltering in interface IMaterialManager
public void setDefaultTextureFiltering(FilterOptions minFilter,
FilterOptions magFilter,
FilterOptions mipFilter)
setDefaultTextureFiltering in interface IMaterialManagerpublic FilterOptions getDefaultTextureFiltering(FilterType ftype)
getDefaultTextureFiltering in interface IMaterialManagerpublic void setDefaultAnisotropy(long maxAniso)
setDefaultAnisotropy in interface IMaterialManagerpublic long getDefaultAnisotropy()
getDefaultAnisotropy in interface IMaterialManagerpublic void getDefaultSettings(IMaterialPtr returnValue)
getDefaultSettings in interface IMaterialManagerpublic int _getSchemeIndex(java.lang.String name)
_getSchemeIndex in interface IMaterialManagerpublic java.lang.String _getSchemeName(int index)
_getSchemeName in interface IMaterialManagerpublic int _getActiveSchemeIndex()
_getActiveSchemeIndex in interface IMaterialManagerpublic java.lang.String getActiveScheme()
getActiveScheme in interface IMaterialManagerpublic void setActiveScheme(java.lang.String schemeName)
setActiveScheme in interface IMaterialManagerpublic void addListener(IMaterialManager.IListener l)
addListener in interface IMaterialManagerpublic void removeListener(IMaterialManager.IListener l)
removeListener in interface IMaterialManager
public ITechnique _arbitrateMissingTechniqueForActiveScheme(IMaterial mat,
int lodIndex,
IRenderable rend)
_arbitrateMissingTechniqueForActiveScheme in interface IMaterialManagerpublic static IMaterialManager getSingleton()
public static IMaterialManager getSingletonPtr()
public void create(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams)
create in interface IResourceManager
public void createOrRetrieve(IResourceManager.IResourceCreateOrRetrieveResult returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList createParams)
createOrRetrieve in interface IResourceManagerpublic void setMemoryBudget(int bytes)
setMemoryBudget in interface IResourceManagerpublic int getMemoryBudget()
getMemoryBudget in interface IResourceManagerpublic int getMemoryUsage()
getMemoryUsage in interface IResourceManagerpublic void unload(java.lang.String name)
unload in interface IResourceManagerpublic void unload(long handle)
unload in interface IResourceManagerpublic void unloadAll(boolean reloadableOnly)
unloadAll in interface IResourceManagerpublic void reloadAll(boolean reloadableOnly)
reloadAll in interface IResourceManagerpublic void unloadUnreferencedResources(boolean reloadableOnly)
unloadUnreferencedResources in interface IResourceManagerpublic void reloadUnreferencedResources(boolean reloadableOnly)
reloadUnreferencedResources in interface IResourceManagerpublic void remove(IResourcePtr r)
remove in interface IResourceManagerpublic void remove(java.lang.String name)
remove in interface IResourceManagerpublic void remove(long handle)
remove in interface IResourceManagerpublic void removeAll()
removeAll in interface IResourceManager
public void getByName(IResourcePtr returnValue,
java.lang.String name)
getByName in interface IResourceManager
public void getByHandle(IResourcePtr returnValue,
long handle)
getByHandle in interface IResourceManagerpublic boolean resourceExists(java.lang.String name)
resourceExists in interface IResourceManagerpublic boolean resourceExists(long handle)
resourceExists in interface IResourceManagerpublic void _notifyResourceTouched(IResource res)
_notifyResourceTouched in interface IResourceManagerpublic void _notifyResourceLoaded(IResource res)
_notifyResourceLoaded in interface IResourceManagerpublic void _notifyResourceUnloaded(IResource res)
_notifyResourceUnloaded in interface IResourceManager
public void prepare(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList loadParams)
prepare in interface IResourceManager
public void load(IResourcePtr returnValue,
java.lang.String name,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader,
INameValuePairList loadParams)
load in interface IResourceManagerpublic IStringVector getScriptPatterns()
getScriptPatterns in interface IResourceManagergetScriptPatterns in interface IScriptLoaderpublic float getLoadingOrder()
getLoadingOrder in interface IResourceManagergetLoadingOrder in interface IScriptLoaderpublic java.lang.String getResourceType()
getResourceType in interface IResourceManagerpublic void setVerbose(boolean v)
setVerbose in interface IResourceManagerpublic boolean getVerbose()
getVerbose in interface IResourceManagerpublic void getResourceIterator(IResourceManager.IResourceMapIterator returnValue)
getResourceIterator in interface IResourceManagerpublic static java.lang.String getDEFAULT_SCHEME_NAME()
public static void setDEFAULT_SCHEME_NAME(java.lang.String _jni_value_)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||