|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.Material
public class Material
| Nested Class Summary | |
|---|---|
protected static class |
Material.BestTechniquesBySchemeList
|
static class |
Material.LodDistanceIterator
|
static class |
Material.LodDistanceList
|
protected static class |
Material.LodTechniques
|
static class |
Material.TechniqueIterator
|
protected static class |
Material.Techniques
|
| Nested classes/interfaces inherited from interface org.ogre4j.IMaterial |
|---|
IMaterial.IBestTechniquesBySchemeList, IMaterial.ILodDistanceIterator, IMaterial.ILodDistanceList, IMaterial.ILodTechniques, IMaterial.ITechniqueIterator, IMaterial.ITechniques |
| Nested classes/interfaces inherited from interface org.ogre4j.IResource |
|---|
IResource.IListener, IResource.IListenerList |
| Field Summary |
|---|
| Fields inherited from class org.xbig.base.NativeObject |
|---|
deleted, object, remote |
| Constructor Summary | |
|---|---|
|
Material(InstancePointer p)
This constructor is public for internal useage only! |
protected |
Material(InstancePointer p,
boolean remote)
Creates a Java wrapper object for an existing C++ object. |
|
Material(IResourceManager creator,
java.lang.String name,
long handle,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader)
Constructor - use resource manager's create method rather than this. |
|
Material(WithoutNativeObject val)
Allows creation of Java objects without C++ objects. |
| Method Summary | |
|---|---|
void |
_dirtyState()
Manually mark the state of this resource as having been changed. |
void |
_fireBackgroundLoadingComplete()
Firing of background loading complete event |
void |
_fireBackgroundPreparingComplete()
Firing of background preparing complete event |
void |
_notifyNeedsRecompile()
Tells the material that it needs recompilation. |
void |
_notifyOrigin(java.lang.String origin)
|
void |
addListener(IResource.IListener lis)
Register a listener on this resource. |
boolean |
applyTextureAliases(IAliasTextureNamePairList aliasList,
boolean apply)
Applies texture names to Unit State with matching texture name aliases. |
void |
changeGroupOwnership(java.lang.String newGroup)
Change the resource group ownership of a . |
static void |
cleanupDictionary()
Cleans up the static 'msDictionary' required to reset , otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the implementers (e.g. ) initializes. |
void |
clone(IMaterialPtr returnValue,
java.lang.String newName,
boolean changeGroup,
java.lang.String newGroup)
Creates a new copy of this material with the same settings but a new name. |
void |
compile(boolean autoManageTextureUnits)
'Compiles' this . |
void |
copyDetailsTo(IMaterialPtr mat)
Copies the details of this material into another, preserving the target's handle and name (unlike operator=) but copying everything else. |
void |
copyParametersTo(IStringInterface dest)
Method for copying this object's parameters to another object. |
ITechnique |
createTechnique()
Creates a new for this . |
void |
delete()
Deletes the corresponding C++ object. |
void |
escalateLoading()
Escalates the loading of a background loaded resource. |
void |
finalize()
|
ITechnique |
getBestTechnique(int lodIndex,
IRenderable rend)
Gets the best supported technique. |
boolean |
getCompilationRequired()
Gets the compilation status of the material. |
IResourceManager |
getCreator()
|
java.lang.String |
getGroup()
|
long |
getHandle()
|
Resource.LoadingState |
getLoadingState()
Returns the current loading state. |
void |
getLodDistanceIterator(IMaterial.ILodDistanceIterator returnValue)
Gets an iterator over the list of distances at which each LOD comes into effect. |
int |
getLodIndex(float d)
Gets the LOD index to use at the given distance. |
int |
getLodIndexSquaredDepth(float squaredDepth)
Gets the LOD index to use at the given squared distance. |
java.lang.String |
getName()
Gets resource name. |
int |
getNumLodLevels(int schemeIndex)
Gets the number of levels-of-detail this material has in the given scheme, based on . |
int |
getNumLodLevels(java.lang.String schemeName)
Gets the number of levels-of-detail this material has in the given scheme, based on . |
int |
getNumSupportedTechniques()
Retrieves the number of supported techniques. |
int |
getNumTechniques()
Retrieves the number of techniques. |
java.lang.String |
getOrigin()
Get the origin of this resource, e.g. a script file name. |
IParamDictionary |
getParamDictionary_const()
|
IParamDictionary |
getParamDictionary()
Retrieves the parameter dictionary for this class. |
java.lang.String |
getParameter(java.lang.String name)
Generic parameter retrieval method. |
IParameterList |
getParameters()
Retrieves a list of parameters valid for this object. |
boolean |
getReceiveShadows()
Returns whether or not objects using this material will receive shadows. |
int |
getSize()
Retrieves info about the size of the resource. |
int |
getStateCount()
Returns the number of times this resource has changed state, which generally means the number of times it has been loaded. |
ITechnique |
getSupportedTechnique(int index)
Gets the indexed supported technique. |
void |
getSupportedTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
Gets an iterator over all the Techniques which are supported by the current card. |
ITechnique |
getTechnique(int index)
Gets the indexed technique. |
ITechnique |
getTechnique(java.lang.String name)
searches for the named technique. |
void |
getTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
Get an iterator over the Techniques in this . |
boolean |
getTransparencyCastsShadows()
Returns whether or not objects using this material be classified as opaque to the shadow caster system. |
java.lang.String |
getUnsupportedTechniquesExplanation()
Gets a string explaining why any techniques are not supported. |
boolean |
isBackgroundLoaded()
Returns whether this has been earmarked for background loading. |
boolean |
isLoaded()
Returns true if the has been loaded, false otherwise. |
boolean |
isLoading()
Returns whether the resource is currently in the process of background loading. |
boolean |
isManuallyLoaded()
Is this resource manually loaded? |
boolean |
isPrepared()
Returns true if the has been prepared, false otherwise. |
boolean |
isReloadable()
Returns true if the is reloadable, false otherwise. |
boolean |
isTransparent()
Determines if the material has any transparency with the rest of the scene (derived from whether any Techniques say they involve transparency). |
void |
load(boolean backgroundThread)
Loads the resource, if it is not already. |
IMaterial |
operatorAssignment(IMaterial rhs)
Assignment operator to allow easy copying between materials. |
void |
prepare()
Prepares the resource for load, if it is not already. |
void |
reload()
Reloads the resource, if it is already loaded. |
void |
removeAllTechniques()
Removes all the techniques in this . |
void |
removeListener(IResource.IListener lis)
Remove a listener on this resource. |
void |
removeTechnique(int index)
Removes the technique at the given index. |
void |
setAmbient(float red,
float green,
float blue)
Sets the ambient colour reflectance properties for every in every . |
void |
setAmbient(IColourValue ambient)
Sets the ambient colour reflectance properties for every in every . |
void |
setBackgroundLoaded(boolean bl)
Tells the resource whether it is background loaded or not. |
void |
setColourWriteEnabled(boolean enabled)
Sets whether or not colour buffer writing is enabled for each . |
void |
setCullingMode(CullingMode mode)
Sets the culling mode for each pass based on the 'vertex winding'. |
void |
setDepthBias(float constantBias,
float slopeScaleBias)
Sets the depth bias to be used for each . |
void |
setDepthCheckEnabled(boolean enabled)
Sets whether or not each renders with depth-buffer checking on or not. |
void |
setDepthFunction(CompareFunction func)
Sets the function used to compare depth values when depth checking is on. |
void |
setDepthWriteEnabled(boolean enabled)
Sets whether or not each renders with depth-buffer writing on or not. |
void |
setDiffuse(float red,
float green,
float blue,
float alpha)
Sets the diffuse colour reflectance properties of every in every . |
void |
setDiffuse(IColourValue diffuse)
Sets the diffuse colour reflectance properties of every in every . |
void |
setFog(boolean overrideScene,
FogMode mode,
IColourValue colour,
float expDensity,
float linearStart,
float linearEnd)
Sets the fogging mode applied to each pass. |
void |
setLightingEnabled(boolean enabled)
Sets whether or not dynamic lighting is enabled for every . |
void |
setLodLevels(IMaterial.ILodDistanceList lodDistances)
Sets the distance at which level-of-detail (LOD) levels come into effect. |
void |
setManualCullingMode(ManualCullingMode mode)
Sets the manual culling mode, performed by CPU rather than hardware. |
boolean |
setParameter(java.lang.String name,
java.lang.String value)
Generic parameter setting method. |
void |
setParameterList(INameValuePairList paramList)
Generic multiple parameter setting method. |
void |
setPointSize(float ps)
Sets the point size properties for every in every . |
void |
setReceiveShadows(boolean enabled)
Sets whether objects using this material will receive shadows. |
void |
setSceneBlending(SceneBlendFactor sourceFactor,
SceneBlendFactor destFactor)
Allows very fine control of blending every with the existing contents of the scene. |
void |
setSceneBlending(SceneBlendType sbt)
Sets the kind of blending every pass has with the existing contents of the scene. |
void |
setSelfIllumination(float red,
float green,
float blue)
Sets the amount of self-illumination of every in every . |
void |
setSelfIllumination(IColourValue selfIllum)
Sets the amount of self-illumination of every in every . |
void |
setSeparateSceneBlending(SceneBlendFactor sourceFactor,
SceneBlendFactor destFactor,
SceneBlendFactor sourceFactorAlpha,
SceneBlendFactor destFactorAlpha)
Allows very fine control of blending every with the existing contents of the scene, using individual factors for color and alpha channels |
void |
setSeparateSceneBlending(SceneBlendType sbt,
SceneBlendType sbta)
Sets the kind of blending every pass has with the existing contents of the scene, using individual factors for color and alpha channels |
void |
setShadingMode(ShadeOptions mode)
Sets the type of light shading required |
void |
setShininess(float val)
Sets the shininess properties of every in every . |
void |
setSpecular(float red,
float green,
float blue,
float alpha)
Sets the specular colour reflectance properties of every in every . |
void |
setSpecular(IColourValue specular)
Sets the specular colour reflectance properties of every in every . |
void |
setTextureAnisotropy(int maxAniso)
Sets the anisotropy level to be used for all textures. |
void |
setTextureFiltering(TextureFilterOptions filterType)
Set texture filtering for every texture unit in every and |
void |
setTransparencyCastsShadows(boolean enabled)
Sets whether objects using this material be classified as opaque to the shadow caster system. |
void |
touch()
'Touches' the resource to indicate it has been used. |
void |
unload()
Unloads the resource; this is not permanent, the resource can be reloaded later if required. |
| 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 Material(InstancePointer p)
protected Material(InstancePointer p,
boolean remote)
public Material(WithoutNativeObject val)
WithoutNativeObject,
INativeObject.disconnectFromNativeObject()
public Material(IResourceManager creator,
java.lang.String name,
long handle,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader)
| 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 IMaterial operatorAssignment(IMaterial rhs)
operatorAssignment in interface IMaterialpublic boolean isTransparent()
isTransparent in interface IMaterialpublic void setReceiveShadows(boolean enabled)
setReceiveShadows in interface IMaterialpublic boolean getReceiveShadows()
getReceiveShadows in interface IMaterialpublic void setTransparencyCastsShadows(boolean enabled)
setTransparencyCastsShadows in interface IMaterialpublic boolean getTransparencyCastsShadows()
getTransparencyCastsShadows in interface IMaterialpublic ITechnique createTechnique()
createTechnique in interface IMaterialpublic ITechnique getTechnique(int index)
getTechnique in interface IMaterialpublic ITechnique getTechnique(java.lang.String name)
getTechnique in interface IMaterialpublic int getNumTechniques()
getNumTechniques in interface IMaterialpublic void removeTechnique(int index)
removeTechnique in interface IMaterialpublic void removeAllTechniques()
removeAllTechniques in interface IMaterialpublic void getTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
getTechniqueIterator in interface IMaterialpublic void getSupportedTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
getSupportedTechniqueIterator in interface IMaterialpublic ITechnique getSupportedTechnique(int index)
getSupportedTechnique in interface IMaterialpublic int getNumSupportedTechniques()
getNumSupportedTechniques in interface IMaterialpublic java.lang.String getUnsupportedTechniquesExplanation()
getUnsupportedTechniquesExplanation in interface IMaterialpublic int getNumLodLevels(int schemeIndex)
getNumLodLevels in interface IMaterialpublic int getNumLodLevels(java.lang.String schemeName)
getNumLodLevels in interface IMaterial
public ITechnique getBestTechnique(int lodIndex,
IRenderable rend)
getBestTechnique in interface IMaterial
public void clone(IMaterialPtr returnValue,
java.lang.String newName,
boolean changeGroup,
java.lang.String newGroup)
clone in interface IMaterialpublic void copyDetailsTo(IMaterialPtr mat)
copyDetailsTo in interface IMaterialpublic void compile(boolean autoManageTextureUnits)
compile in interface IMaterialpublic void setPointSize(float ps)
setPointSize in interface IMaterial
public void setAmbient(float red,
float green,
float blue)
setAmbient in interface IMaterialpublic void setAmbient(IColourValue ambient)
setAmbient in interface IMaterial
public void setDiffuse(float red,
float green,
float blue,
float alpha)
setDiffuse in interface IMaterialpublic void setDiffuse(IColourValue diffuse)
setDiffuse in interface IMaterial
public void setSpecular(float red,
float green,
float blue,
float alpha)
setSpecular in interface IMaterialpublic void setSpecular(IColourValue specular)
setSpecular in interface IMaterialpublic void setShininess(float val)
setShininess in interface IMaterial
public void setSelfIllumination(float red,
float green,
float blue)
setSelfIllumination in interface IMaterialpublic void setSelfIllumination(IColourValue selfIllum)
setSelfIllumination in interface IMaterialpublic void setDepthCheckEnabled(boolean enabled)
setDepthCheckEnabled in interface IMaterialpublic void setDepthWriteEnabled(boolean enabled)
setDepthWriteEnabled in interface IMaterialpublic void setDepthFunction(CompareFunction func)
setDepthFunction in interface IMaterialpublic void setColourWriteEnabled(boolean enabled)
setColourWriteEnabled in interface IMaterialpublic void setCullingMode(CullingMode mode)
setCullingMode in interface IMaterialpublic void setManualCullingMode(ManualCullingMode mode)
setManualCullingMode in interface IMaterialpublic void setLightingEnabled(boolean enabled)
setLightingEnabled in interface IMaterialpublic void setShadingMode(ShadeOptions mode)
setShadingMode in interface IMaterial
public void setFog(boolean overrideScene,
FogMode mode,
IColourValue colour,
float expDensity,
float linearStart,
float linearEnd)
setFog in interface IMaterial
public void setDepthBias(float constantBias,
float slopeScaleBias)
setDepthBias in interface IMaterialpublic void setTextureFiltering(TextureFilterOptions filterType)
setTextureFiltering in interface IMaterialpublic void setTextureAnisotropy(int maxAniso)
setTextureAnisotropy in interface IMaterialpublic void setSceneBlending(SceneBlendType sbt)
setSceneBlending in interface IMaterial
public void setSeparateSceneBlending(SceneBlendType sbt,
SceneBlendType sbta)
setSeparateSceneBlending in interface IMaterial
public void setSceneBlending(SceneBlendFactor sourceFactor,
SceneBlendFactor destFactor)
setSceneBlending in interface IMaterial
public void setSeparateSceneBlending(SceneBlendFactor sourceFactor,
SceneBlendFactor destFactor,
SceneBlendFactor sourceFactorAlpha,
SceneBlendFactor destFactorAlpha)
setSeparateSceneBlending in interface IMaterialpublic void _notifyNeedsRecompile()
_notifyNeedsRecompile in interface IMaterialpublic void setLodLevels(IMaterial.ILodDistanceList lodDistances)
setLodLevels in interface IMaterialpublic void getLodDistanceIterator(IMaterial.ILodDistanceIterator returnValue)
getLodDistanceIterator in interface IMaterialpublic int getLodIndex(float d)
getLodIndex in interface IMaterialpublic int getLodIndexSquaredDepth(float squaredDepth)
getLodIndexSquaredDepth in interface IMaterialpublic void touch()
IResource
touch in interface IMaterialtouch in interface IResource
public boolean applyTextureAliases(IAliasTextureNamePairList aliasList,
boolean apply)
applyTextureAliases in interface IMaterialpublic boolean getCompilationRequired()
getCompilationRequired in interface IMaterialpublic void prepare()
prepare in interface IResourcepublic void load(boolean backgroundThread)
load in interface IResourcepublic void reload()
reload in interface IResourcepublic boolean isReloadable()
isReloadable in interface IResourcepublic boolean isManuallyLoaded()
isManuallyLoaded in interface IResourcepublic void unload()
unload in interface IResourcepublic int getSize()
getSize in interface IResourcepublic java.lang.String getName()
getName in interface IResourcepublic long getHandle()
getHandle in interface IResourcepublic boolean isPrepared()
isPrepared in interface IResourcepublic boolean isLoaded()
isLoaded in interface IResourcepublic boolean isLoading()
isLoading in interface IResourcepublic Resource.LoadingState getLoadingState()
getLoadingState in interface IResourcepublic boolean isBackgroundLoaded()
isBackgroundLoaded in interface IResourcepublic void setBackgroundLoaded(boolean bl)
setBackgroundLoaded in interface IResourcepublic void escalateLoading()
escalateLoading in interface IResourcepublic void addListener(IResource.IListener lis)
addListener in interface IResourcepublic void removeListener(IResource.IListener lis)
removeListener in interface IResourcepublic java.lang.String getGroup()
getGroup in interface IResourcepublic void changeGroupOwnership(java.lang.String newGroup)
changeGroupOwnership in interface IResourcepublic IResourceManager getCreator()
getCreator in interface IResourcepublic java.lang.String getOrigin()
getOrigin in interface IResourcepublic void _notifyOrigin(java.lang.String origin)
_notifyOrigin in interface IResourcepublic int getStateCount()
getStateCount in interface IResourcepublic void _dirtyState()
_dirtyState in interface IResourcepublic void _fireBackgroundLoadingComplete()
_fireBackgroundLoadingComplete in interface IResourcepublic void _fireBackgroundPreparingComplete()
_fireBackgroundPreparingComplete in interface IResourcepublic IParamDictionary getParamDictionary()
getParamDictionary in interface IStringInterfacepublic IParamDictionary getParamDictionary_const()
getParamDictionary_const in interface IStringInterfacepublic IParameterList getParameters()
getParameters in interface IStringInterface
public boolean setParameter(java.lang.String name,
java.lang.String value)
setParameter in interface IStringInterfacepublic void setParameterList(INameValuePairList paramList)
setParameterList in interface IStringInterfacepublic java.lang.String getParameter(java.lang.String name)
getParameter in interface IStringInterfacepublic void copyParametersTo(IStringInterface dest)
copyParametersTo in interface IStringInterfacepublic static void cleanupDictionary()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||