org.ogre4j
Interface IMaterial

All Superinterfaces:
IAllocatedObject<IResourceAllocPolicy>, INativeObject, IResource, IResourceAllocatedObject, IStringInterface
All Known Implementing Classes:
Material

public interface IMaterial
extends INativeObject, IResource


Nested Class Summary
static interface IMaterial.IBestTechniquesBySchemeList
           
static interface IMaterial.ILodDistanceIterator
           
static interface IMaterial.ILodDistanceList
           
static interface IMaterial.ILodTechniques
           
static interface IMaterial.ITechniqueIterator
           
static interface IMaterial.ITechniques
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IResource
IResource.IListener, IResource.IListenerList
 
Method Summary
 void _notifyNeedsRecompile()
          Tells the material that it needs recompilation.
 boolean applyTextureAliases(IAliasTextureNamePairList aliasList, boolean apply)
          Applies texture names to Unit State with matching texture name aliases.
 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.
 ITechnique createTechnique()
          Creates a new for this .
 ITechnique getBestTechnique(int lodIndex, IRenderable rend)
          Gets the best supported technique.
 boolean getCompilationRequired()
          Gets the compilation status of the material.
 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.
 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.
 boolean getReceiveShadows()
          Returns whether or not objects using this material will receive shadows.
 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 isTransparent()
          Determines if the material has any transparency with the rest of the scene (derived from whether any Techniques say they involve transparency).
 IMaterial operatorAssignment(IMaterial rhs)
          Assignment operator to allow easy copying between materials.
 void removeAllTechniques()
          Removes all the techniques in this .
 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 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.
 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.
 
Methods inherited from interface org.ogre4j.IResource
_dirtyState, _fireBackgroundLoadingComplete, _fireBackgroundPreparingComplete, _notifyOrigin, addListener, changeGroupOwnership, escalateLoading, getCreator, getGroup, getHandle, getLoadingState, getName, getOrigin, getSize, getStateCount, isBackgroundLoaded, isLoaded, isLoading, isManuallyLoaded, isPrepared, isReloadable, load, prepare, reload, removeListener, setBackgroundLoaded, unload
 
Methods inherited from interface org.ogre4j.IStringInterface
copyParametersTo, getParamDictionary_const, getParamDictionary, getParameter, getParameters, setParameter, setParameterList
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

operatorAssignment

IMaterial operatorAssignment(IMaterial rhs)
Assignment operator to allow easy copying between materials.


isTransparent

boolean isTransparent()
Determines if the material has any transparency with the rest of the scene (derived from whether any Techniques say they involve transparency).


setReceiveShadows

void setReceiveShadows(boolean enabled)
Sets whether objects using this material will receive shadows.


getReceiveShadows

boolean getReceiveShadows()
Returns whether or not objects using this material will receive shadows.


setTransparencyCastsShadows

void setTransparencyCastsShadows(boolean enabled)
Sets whether objects using this material be classified as opaque to the shadow caster system.


getTransparencyCastsShadows

boolean getTransparencyCastsShadows()
Returns whether or not objects using this material be classified as opaque to the shadow caster system.


createTechnique

ITechnique createTechnique()
Creates a new for this .


getTechnique

ITechnique getTechnique(int index)
Gets the indexed technique.


getTechnique

ITechnique getTechnique(java.lang.String name)
searches for the named technique. Return 0 if technique with name is not found


getNumTechniques

int getNumTechniques()
Retrieves the number of techniques.


removeTechnique

void removeTechnique(int index)
Removes the technique at the given index.


removeAllTechniques

void removeAllTechniques()
Removes all the techniques in this .


getTechniqueIterator

void getTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
Get an iterator over the Techniques in this .


getSupportedTechniqueIterator

void getSupportedTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
Gets an iterator over all the Techniques which are supported by the current card.


getSupportedTechnique

ITechnique getSupportedTechnique(int index)
Gets the indexed supported technique.


getNumSupportedTechniques

int getNumSupportedTechniques()
Retrieves the number of supported techniques.


getUnsupportedTechniquesExplanation

java.lang.String getUnsupportedTechniquesExplanation()
Gets a string explaining why any techniques are not supported.


getNumLodLevels

int getNumLodLevels(int schemeIndex)
Gets the number of levels-of-detail this material has in the given scheme, based on .


getNumLodLevels

int getNumLodLevels(java.lang.String schemeName)
Gets the number of levels-of-detail this material has in the given scheme, based on .


getBestTechnique

ITechnique getBestTechnique(int lodIndex,
                            IRenderable rend)
Gets the best supported technique.


clone

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.


copyDetailsTo

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.


compile

void compile(boolean autoManageTextureUnits)
'Compiles' this .


setPointSize

void setPointSize(float ps)
Sets the point size properties for every in every .


setAmbient

void setAmbient(float red,
                float green,
                float blue)
Sets the ambient colour reflectance properties for every in every .


setAmbient

void setAmbient(IColourValue ambient)
Sets the ambient colour reflectance properties for every in every .


setDiffuse

void setDiffuse(float red,
                float green,
                float blue,
                float alpha)
Sets the diffuse colour reflectance properties of every in every .


setDiffuse

void setDiffuse(IColourValue diffuse)
Sets the diffuse colour reflectance properties of every in every .


setSpecular

void setSpecular(float red,
                 float green,
                 float blue,
                 float alpha)
Sets the specular colour reflectance properties of every in every .


setSpecular

void setSpecular(IColourValue specular)
Sets the specular colour reflectance properties of every in every .


setShininess

void setShininess(float val)
Sets the shininess properties of every in every .


setSelfIllumination

void setSelfIllumination(float red,
                         float green,
                         float blue)
Sets the amount of self-illumination of every in every .


setSelfIllumination

void setSelfIllumination(IColourValue selfIllum)
Sets the amount of self-illumination of every in every .


setDepthCheckEnabled

void setDepthCheckEnabled(boolean enabled)
Sets whether or not each renders with depth-buffer checking on or not.


setDepthWriteEnabled

void setDepthWriteEnabled(boolean enabled)
Sets whether or not each renders with depth-buffer writing on or not.


setDepthFunction

void setDepthFunction(CompareFunction func)
Sets the function used to compare depth values when depth checking is on.


setColourWriteEnabled

void setColourWriteEnabled(boolean enabled)
Sets whether or not colour buffer writing is enabled for each .


setCullingMode

void setCullingMode(CullingMode mode)
Sets the culling mode for each pass based on the 'vertex winding'.


setManualCullingMode

void setManualCullingMode(ManualCullingMode mode)
Sets the manual culling mode, performed by CPU rather than hardware.


setLightingEnabled

void setLightingEnabled(boolean enabled)
Sets whether or not dynamic lighting is enabled for every .


setShadingMode

void setShadingMode(ShadeOptions mode)
Sets the type of light shading required


setFog

void setFog(boolean overrideScene,
            FogMode mode,
            IColourValue colour,
            float expDensity,
            float linearStart,
            float linearEnd)
Sets the fogging mode applied to each pass.


setDepthBias

void setDepthBias(float constantBias,
                  float slopeScaleBias)
Sets the depth bias to be used for each .


setTextureFiltering

void setTextureFiltering(TextureFilterOptions filterType)
Set texture filtering for every texture unit in every and


setTextureAnisotropy

void setTextureAnisotropy(int maxAniso)
Sets the anisotropy level to be used for all textures.


setSceneBlending

void setSceneBlending(SceneBlendType sbt)
Sets the kind of blending every pass has with the existing contents of the scene.


setSeparateSceneBlending

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


setSceneBlending

void setSceneBlending(SceneBlendFactor sourceFactor,
                      SceneBlendFactor destFactor)
Allows very fine control of blending every with the existing contents of the scene.


setSeparateSceneBlending

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


_notifyNeedsRecompile

void _notifyNeedsRecompile()
Tells the material that it needs recompilation.


setLodLevels

void setLodLevels(IMaterial.ILodDistanceList lodDistances)
Sets the distance at which level-of-detail (LOD) levels come into effect.


getLodDistanceIterator

void getLodDistanceIterator(IMaterial.ILodDistanceIterator returnValue)
Gets an iterator over the list of distances at which each LOD comes into effect.


getLodIndex

int getLodIndex(float d)
Gets the LOD index to use at the given distance.


getLodIndexSquaredDepth

int getLodIndexSquaredDepth(float squaredDepth)
Gets the LOD index to use at the given squared distance.


touch

void touch()
Description copied from interface: IResource
'Touches' the resource to indicate it has been used.

Specified by:
touch in interface IResource

applyTextureAliases

boolean applyTextureAliases(IAliasTextureNamePairList aliasList,
                            boolean apply)
Applies texture names to Unit State with matching texture name aliases. All techniques, passes, and Unit States within the material are checked. If matching texture aliases are found then true is returned.


getCompilationRequired

boolean getCompilationRequired()
Gets the compilation status of the material.



Copyright © 2007 netAllied GmbH. All Rights Reserved.