org.ogre4j
Class CompositorInstance

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

public class CompositorInstance
extends NativeObject
implements ICompositorInstance


Nested Class Summary
static class CompositorInstance.CompiledState
           
static class CompositorInstance.Listener
           
static class CompositorInstance.QuadMaterialMap
           
static class CompositorInstance.RenderSystemOperation
           
static class CompositorInstance.RenderSystemOpPair
           
static class CompositorInstance.RenderSystemOpPairs
           
static class CompositorInstance.TargetOperation
           
 
Nested classes/interfaces inherited from interface org.ogre4j.ICompositorInstance
ICompositorInstance.ICompiledState, ICompositorInstance.IListener, ICompositorInstance.IListeners, ICompositorInstance.ILocalMRTMap, ICompositorInstance.ILocalTextureMap, ICompositorInstance.IQuadMaterialMap, ICompositorInstance.IRenderSystemOperation, ICompositorInstance.IRenderSystemOpPair, ICompositorInstance.IRenderSystemOpPairs, ICompositorInstance.ITargetOperation
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  CompositorInstance(ICompositor filter, ICompositionTechnique technique, ICompositorChain chain)
           
  CompositorInstance(InstancePointer p)
          This constructor is public for internal useage only!
protected CompositorInstance(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  CompositorInstance(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _compileOutputOperation(ICompositorInstance.ITargetOperation finalState)
          Compile the final (output) operation.
 void _compileTargetOperations(ICompositorInstance.ICompiledState compiledState)
          Recursively collect target states (except for final ).
 void _fireNotifyMaterialRender(long pass_id, IMaterialPtr mat)
          Notify listeners of a material render.
 void _fireNotifyMaterialSetup(long pass_id, IMaterialPtr mat)
          Notify listeners of a material compilation.
 void addListener(ICompositorInstance.IListener l)
          Add a listener.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 ICompositorChain getChain()
          Get Chain that this instance is part of
 ICompositor getCompositor()
          Get of which this is an instance
 boolean getEnabled()
          Get enabled flag.
 IRenderTarget getRenderTarget(java.lang.String name)
          Get the render target for a given render texture name.
 ICompositionTechnique getTechnique()
          Get used by this instance
 java.lang.String getTextureInstanceName(java.lang.String name, int mrtIndex)
          Get the instance name for a local texture.
 void removeListener(ICompositorInstance.IListener l)
          Remove a listener.
 void setEnabled(boolean value)
          Set enabled flag.
 
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

CompositorInstance

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


CompositorInstance

protected CompositorInstance(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.


CompositorInstance

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

CompositorInstance

public CompositorInstance(ICompositor filter,
                          ICompositionTechnique technique,
                          ICompositorChain chain)
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

setEnabled

public void setEnabled(boolean value)
Set enabled flag. The compositor instance will only render if it is enabled, otherwise it is pass-through.

Specified by:
setEnabled in interface ICompositorInstance

getEnabled

public boolean getEnabled()
Get enabled flag.

Specified by:
getEnabled in interface ICompositorInstance

getTextureInstanceName

public java.lang.String getTextureInstanceName(java.lang.String name,
                                               int mrtIndex)
Get the instance name for a local texture.

Specified by:
getTextureInstanceName in interface ICompositorInstance

getRenderTarget

public IRenderTarget getRenderTarget(java.lang.String name)
Get the render target for a given render texture name.

Specified by:
getRenderTarget in interface ICompositorInstance

_compileTargetOperations

public void _compileTargetOperations(ICompositorInstance.ICompiledState compiledState)
Recursively collect target states (except for final ).

Specified by:
_compileTargetOperations in interface ICompositorInstance

_compileOutputOperation

public void _compileOutputOperation(ICompositorInstance.ITargetOperation finalState)
Compile the final (output) operation. This is done separately because this is combined with the input in chained filters.

Specified by:
_compileOutputOperation in interface ICompositorInstance

getCompositor

public ICompositor getCompositor()
Get of which this is an instance

Specified by:
getCompositor in interface ICompositorInstance

getTechnique

public ICompositionTechnique getTechnique()
Get used by this instance

Specified by:
getTechnique in interface ICompositorInstance

getChain

public ICompositorChain getChain()
Get Chain that this instance is part of

Specified by:
getChain in interface ICompositorInstance

addListener

public void addListener(ICompositorInstance.IListener l)
Add a listener. Listeners provide an interface to "listen in" to to render system operations executed by this so that materials can be programmatically set up.

Specified by:
addListener in interface ICompositorInstance

removeListener

public void removeListener(ICompositorInstance.IListener l)
Remove a listener.

Specified by:
removeListener in interface ICompositorInstance

_fireNotifyMaterialSetup

public void _fireNotifyMaterialSetup(long pass_id,
                                     IMaterialPtr mat)
Notify listeners of a material compilation.

Specified by:
_fireNotifyMaterialSetup in interface ICompositorInstance

_fireNotifyMaterialRender

public void _fireNotifyMaterialRender(long pass_id,
                                      IMaterialPtr mat)
Notify listeners of a material render.

Specified by:
_fireNotifyMaterialRender in interface ICompositorInstance


Copyright © 2007 netAllied GmbH. All Rights Reserved.