org.ogre4j
Class Technique

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Technique
All Implemented Interfaces:
IAllocatedObject<IResourceAllocPolicy>, IResourceAllocatedObject, ITechnique, INativeObject

public class Technique
extends NativeObject
implements ITechnique


Nested Class Summary
static class Technique.GPUDeviceNameRule
           
static class Technique.GPUDeviceNameRuleIterator
           
static class Technique.GPUDeviceNameRuleList
           
static class Technique.GPUVendorRule
           
static class Technique.GPUVendorRuleIterator
           
static class Technique.GPUVendorRuleList
           
protected static class Technique.IlluminationPassesState
           
static class Technique.IlluminationPassIterator
           
static class Technique.IncludeOrExclude
           
protected static class Technique.Passes
           
static class Technique.PassIterator
           
 
Nested classes/interfaces inherited from interface org.ogre4j.ITechnique
ITechnique.IGPUDeviceNameRule, ITechnique.IGPUDeviceNameRuleIterator, ITechnique.IGPUDeviceNameRuleList, ITechnique.IGPUVendorRule, ITechnique.IGPUVendorRuleIterator, ITechnique.IGPUVendorRuleList, ITechnique.IIlluminationPassIterator, ITechnique.IPasses, ITechnique.IPassIterator
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Technique(IMaterial parent)
           
  Technique(IMaterial parent, ITechnique oth)
           
  Technique(InstancePointer p)
          This constructor is public for internal useage only!
protected Technique(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Technique(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 java.lang.String _compile(boolean autoManageTextureUnits)
          Internal compilation method; see .
 void _compileIlluminationPasses()
          Internal method for splitting the passes into illumination passes.
 int _getSchemeIndex()
           
 void _load()
          Internal load method, derived from call to .
 void _notifyNeedsRecompile()
          Tells the technique that it needs recompilation.
 void _prepare()
          Internal prepare method, derived from call to .
 void _unload()
          Internal unload method, derived from call to .
 void _unprepare()
          Internal unprepare method, derived from call to Material::unprepare.
 void addGPUDeviceNameRule(ITechnique.IGPUDeviceNameRule rule)
          Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g. '*8800*').
 void addGPUDeviceNameRule(java.lang.String devicePattern, Technique.IncludeOrExclude includeOrExclude, boolean caseSensitive)
          Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g. '*8800*').
 void addGPUVendorRule(GPUVendor vendor, Technique.IncludeOrExclude includeOrExclude)
          Add a rule which manually influences the support for this technique based on a GPU vendor.
 void addGPUVendorRule(ITechnique.IGPUVendorRule rule)
          Add a rule which manually influences the support for this technique based on a GPU vendor.
 boolean applyTextureAliases(IAliasTextureNamePairList aliasList, boolean apply)
          Applies texture names to Unit State with matching texture name aliases.
 boolean checkGPURules(Iostringstream errors)
           
 boolean checkHardwareSupport(boolean autoManageTextureUnits, Iostringstream compileErrors)
           
 IPass createPass()
          Creates a new for this .
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 void getGPUDeviceNameRuleIterator(ITechnique.IGPUDeviceNameRuleIterator returnValue)
           
 void getGPUVendorRuleIterator(ITechnique.IGPUVendorRuleIterator returnValue)
           
 void getIlluminationPassIterator(ITechnique.IIlluminationPassIterator returnValue)
          Gets an iterator over the illumination-stage categorised passes.
 int getLodIndex()
          Gets the level-of-detail index assigned to this .
 java.lang.String getName()
           
 int getNumPasses()
          Retrieves the number of passes.
 IMaterial getParent()
           
 IPass getPass(int index)
          Retrieves the with the given index.
 IPass getPass(java.lang.String name)
          Retrieves the matching name.
 void getPassIterator(ITechnique.IPassIterator returnValue)
          Gets an iterator over the passes in this .
 java.lang.String getResourceGroup()
           
 java.lang.String getSchemeName()
          Returns the scheme to which this technique is assigned.
 void getShadowCasterMaterial(IMaterialPtr returnValue)
          return this material specific shadow casting specific material
 void getShadowReceiverMaterial(IMaterialPtr returnValue)
          return this material specific shadow receiving specific material
 boolean hasColourWriteDisabled()
          Exists colour writing disabled pass on this technique?
 boolean isDepthCheckEnabled()
          Is depth checking going to occur on this technique?
 boolean isDepthWriteEnabled()
          Is depth writing going to occur on this technique?
 boolean isLoaded()
           
 boolean isSupported()
          Indicates if this technique is supported by the current graphics card.
 boolean isTransparent()
          Returns true if this involves transparency.
 boolean isTransparentSortingEnabled()
          Returns true if this has transparent sorting enabled.
 boolean movePass(int sourceIndex, int destinationIndex)
          Move a pass from source index to destination index.
 ITechnique operatorAssignment(ITechnique rhs)
          Overloaded operator to copy on to another.
 void removeAllPasses()
          Removes all Passes from this .
 void removeGPUDeviceNameRule(java.lang.String devicePattern)
          Removes a matching device name rule.
 void removeGPUVendorRule(GPUVendor vendor)
          Removes a matching vendor rule.
 void removePass(int index)
          Removes the with 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 setLodIndex(int index)
          Assigns a level-of-detail (LOD) index to this .
 void setManualCullingMode(ManualCullingMode mode)
          Sets the manual culling mode, performed by CPU rather than hardware.
 void setName(java.lang.String name)
          Set the name of the technique.
 void setPointSize(float ps)
          Sets the point size properties for every in this .
 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 setSchemeName(java.lang.String schemeName)
          Set the 'scheme name' for this technique.
 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 both 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 both color and alpha channels
 void setShadingMode(ShadeOptions mode)
          Sets the type of light shading required
 void setShadowCasterMaterial(IMaterialPtr val)
          set this material specific shadow casting specific material
 void setShadowCasterMaterial(java.lang.String name)
          set this material specific shadow casting specific material
 void setShadowReceiverMaterial(IMaterialPtr val)
          set this material specific shadow receiving specific material
 void setShadowReceiverMaterial(java.lang.String name)
          set this material specific shadow receiving specific material
 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(long maxAniso)
          Sets the anisotropy level to be used for all textures.
 void setTextureFiltering(TextureFilterOptions filterType)
          Set texture filtering for every texture unit in every
 
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

Technique

public Technique(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


Technique

protected Technique(InstancePointer p,
                    boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


Technique

public Technique(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Technique

public Technique(IMaterial parent)

Technique

public Technique(IMaterial parent,
                 ITechnique oth)
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

isSupported

public boolean isSupported()
Indicates if this technique is supported by the current graphics card.

Specified by:
isSupported in interface ITechnique

_compile

public java.lang.String _compile(boolean autoManageTextureUnits)
Internal compilation method; see .

Specified by:
_compile in interface ITechnique

checkGPURules

public boolean checkGPURules(Iostringstream errors)
Specified by:
checkGPURules in interface ITechnique

checkHardwareSupport

public boolean checkHardwareSupport(boolean autoManageTextureUnits,
                                    Iostringstream compileErrors)
Specified by:
checkHardwareSupport in interface ITechnique

_compileIlluminationPasses

public void _compileIlluminationPasses()
Internal method for splitting the passes into illumination passes.

Specified by:
_compileIlluminationPasses in interface ITechnique

createPass

public IPass createPass()
Creates a new for this .

Specified by:
createPass in interface ITechnique

getPass

public IPass getPass(int index)
Retrieves the with the given index.

Specified by:
getPass in interface ITechnique

getPass

public IPass getPass(java.lang.String name)
Retrieves the matching name. Returns 0 if name match is not found.

Specified by:
getPass in interface ITechnique

getNumPasses

public int getNumPasses()
Retrieves the number of passes.

Specified by:
getNumPasses in interface ITechnique

removePass

public void removePass(int index)
Removes the with the given index.

Specified by:
removePass in interface ITechnique

removeAllPasses

public void removeAllPasses()
Removes all Passes from this .

Specified by:
removeAllPasses in interface ITechnique

movePass

public boolean movePass(int sourceIndex,
                        int destinationIndex)
Move a pass from source index to destination index. If successful then returns true.

Specified by:
movePass in interface ITechnique

getPassIterator

public void getPassIterator(ITechnique.IPassIterator returnValue)
Gets an iterator over the passes in this .

Specified by:
getPassIterator in interface ITechnique

getIlluminationPassIterator

public void getIlluminationPassIterator(ITechnique.IIlluminationPassIterator returnValue)
Gets an iterator over the illumination-stage categorised passes.

Specified by:
getIlluminationPassIterator in interface ITechnique

getParent

public IMaterial getParent()
Specified by:
getParent in interface ITechnique

operatorAssignment

public ITechnique operatorAssignment(ITechnique rhs)
Overloaded operator to copy on to another.

Specified by:
operatorAssignment in interface ITechnique

getResourceGroup

public java.lang.String getResourceGroup()
Specified by:
getResourceGroup in interface ITechnique

isTransparent

public boolean isTransparent()
Returns true if this involves transparency.

Specified by:
isTransparent in interface ITechnique

isTransparentSortingEnabled

public boolean isTransparentSortingEnabled()
Returns true if this has transparent sorting enabled.

Specified by:
isTransparentSortingEnabled in interface ITechnique

_prepare

public void _prepare()
Internal prepare method, derived from call to .

Specified by:
_prepare in interface ITechnique

_unprepare

public void _unprepare()
Internal unprepare method, derived from call to Material::unprepare.

Specified by:
_unprepare in interface ITechnique

_load

public void _load()
Internal load method, derived from call to .

Specified by:
_load in interface ITechnique

_unload

public void _unload()
Internal unload method, derived from call to .

Specified by:
_unload in interface ITechnique

isLoaded

public boolean isLoaded()
Specified by:
isLoaded in interface ITechnique

_notifyNeedsRecompile

public void _notifyNeedsRecompile()
Tells the technique that it needs recompilation.

Specified by:
_notifyNeedsRecompile in interface ITechnique

getShadowCasterMaterial

public void getShadowCasterMaterial(IMaterialPtr returnValue)
return this material specific shadow casting specific material

Specified by:
getShadowCasterMaterial in interface ITechnique

setShadowCasterMaterial

public void setShadowCasterMaterial(IMaterialPtr val)
set this material specific shadow casting specific material

Specified by:
setShadowCasterMaterial in interface ITechnique

setShadowCasterMaterial

public void setShadowCasterMaterial(java.lang.String name)
set this material specific shadow casting specific material

Specified by:
setShadowCasterMaterial in interface ITechnique

getShadowReceiverMaterial

public void getShadowReceiverMaterial(IMaterialPtr returnValue)
return this material specific shadow receiving specific material

Specified by:
getShadowReceiverMaterial in interface ITechnique

setShadowReceiverMaterial

public void setShadowReceiverMaterial(IMaterialPtr val)
set this material specific shadow receiving specific material

Specified by:
setShadowReceiverMaterial in interface ITechnique

setShadowReceiverMaterial

public void setShadowReceiverMaterial(java.lang.String name)
set this material specific shadow receiving specific material

Specified by:
setShadowReceiverMaterial in interface ITechnique

setPointSize

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

Specified by:
setPointSize in interface ITechnique

setAmbient

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

Specified by:
setAmbient in interface ITechnique

setAmbient

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

Specified by:
setAmbient in interface ITechnique

setDiffuse

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

Specified by:
setDiffuse in interface ITechnique

setDiffuse

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

Specified by:
setDiffuse in interface ITechnique

setSpecular

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

Specified by:
setSpecular in interface ITechnique

setSpecular

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

Specified by:
setSpecular in interface ITechnique

setShininess

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

Specified by:
setShininess in interface ITechnique

setSelfIllumination

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

Specified by:
setSelfIllumination in interface ITechnique

setSelfIllumination

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

Specified by:
setSelfIllumination in interface ITechnique

setDepthCheckEnabled

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

Specified by:
setDepthCheckEnabled in interface ITechnique

setDepthWriteEnabled

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

Specified by:
setDepthWriteEnabled in interface ITechnique

setDepthFunction

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

Specified by:
setDepthFunction in interface ITechnique

setColourWriteEnabled

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

Specified by:
setColourWriteEnabled in interface ITechnique

setCullingMode

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

Specified by:
setCullingMode in interface ITechnique

setManualCullingMode

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

Specified by:
setManualCullingMode in interface ITechnique

setLightingEnabled

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

Specified by:
setLightingEnabled in interface ITechnique

setShadingMode

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

Specified by:
setShadingMode in interface ITechnique

setFog

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

Specified by:
setFog in interface ITechnique

setDepthBias

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

Specified by:
setDepthBias in interface ITechnique

setTextureFiltering

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

Specified by:
setTextureFiltering in interface ITechnique

setTextureAnisotropy

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

Specified by:
setTextureAnisotropy in interface ITechnique

setSceneBlending

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

Specified by:
setSceneBlending in interface ITechnique

setSeparateSceneBlending

public void setSeparateSceneBlending(SceneBlendType sbt,
                                     SceneBlendType sbta)
Sets the kind of blending every pass has with the existing contents of the scene, using individual factors both color and alpha channels

Specified by:
setSeparateSceneBlending in interface ITechnique

setSceneBlending

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

Specified by:
setSceneBlending in interface ITechnique

setSeparateSceneBlending

public 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 both color and alpha channels

Specified by:
setSeparateSceneBlending in interface ITechnique

setLodIndex

public void setLodIndex(int index)
Assigns a level-of-detail (LOD) index to this .

Specified by:
setLodIndex in interface ITechnique

getLodIndex

public int getLodIndex()
Gets the level-of-detail index assigned to this .

Specified by:
getLodIndex in interface ITechnique

setSchemeName

public void setSchemeName(java.lang.String schemeName)
Set the 'scheme name' for this technique.

Specified by:
setSchemeName in interface ITechnique

getSchemeName

public java.lang.String getSchemeName()
Returns the scheme to which this technique is assigned.

Specified by:
getSchemeName in interface ITechnique

_getSchemeIndex

public int _getSchemeIndex()
Specified by:
_getSchemeIndex in interface ITechnique

isDepthWriteEnabled

public boolean isDepthWriteEnabled()
Is depth writing going to occur on this technique?

Specified by:
isDepthWriteEnabled in interface ITechnique

isDepthCheckEnabled

public boolean isDepthCheckEnabled()
Is depth checking going to occur on this technique?

Specified by:
isDepthCheckEnabled in interface ITechnique

hasColourWriteDisabled

public boolean hasColourWriteDisabled()
Exists colour writing disabled pass on this technique?

Specified by:
hasColourWriteDisabled in interface ITechnique

setName

public void setName(java.lang.String name)
Set the name of the technique.

Specified by:
setName in interface ITechnique

getName

public java.lang.String getName()
Specified by:
getName in interface ITechnique

applyTextureAliases

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

Specified by:
applyTextureAliases in interface ITechnique

addGPUVendorRule

public void addGPUVendorRule(GPUVendor vendor,
                             Technique.IncludeOrExclude includeOrExclude)
Add a rule which manually influences the support for this technique based on a GPU vendor.

Specified by:
addGPUVendorRule in interface ITechnique

addGPUVendorRule

public void addGPUVendorRule(ITechnique.IGPUVendorRule rule)
Add a rule which manually influences the support for this technique based on a GPU vendor.

Specified by:
addGPUVendorRule in interface ITechnique

removeGPUVendorRule

public void removeGPUVendorRule(GPUVendor vendor)
Removes a matching vendor rule.

Specified by:
removeGPUVendorRule in interface ITechnique

getGPUVendorRuleIterator

public void getGPUVendorRuleIterator(ITechnique.IGPUVendorRuleIterator returnValue)
Specified by:
getGPUVendorRuleIterator in interface ITechnique

addGPUDeviceNameRule

public void addGPUDeviceNameRule(java.lang.String devicePattern,
                                 Technique.IncludeOrExclude includeOrExclude,
                                 boolean caseSensitive)
Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g. '*8800*').

Specified by:
addGPUDeviceNameRule in interface ITechnique

addGPUDeviceNameRule

public void addGPUDeviceNameRule(ITechnique.IGPUDeviceNameRule rule)
Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g. '*8800*').

Specified by:
addGPUDeviceNameRule in interface ITechnique

removeGPUDeviceNameRule

public void removeGPUDeviceNameRule(java.lang.String devicePattern)
Removes a matching device name rule.

Specified by:
removeGPUDeviceNameRule in interface ITechnique

getGPUDeviceNameRuleIterator

public void getGPUDeviceNameRuleIterator(ITechnique.IGPUDeviceNameRuleIterator returnValue)
Specified by:
getGPUDeviceNameRuleIterator in interface ITechnique


Copyright © 2007 netAllied GmbH. All Rights Reserved.