org.ogre4j
Class CompositorChain

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

public class CompositorChain
extends NativeObject
implements ICompositorChain


Nested Class Summary
static class CompositorChain.InstanceIterator
           
static class CompositorChain.Instances
           
protected static class CompositorChain.RenderSystemOperations
           
protected static class CompositorChain.RQListener
           
 
Nested classes/interfaces inherited from interface org.ogre4j.ICompositorChain
ICompositorChain.IInstanceIterator, ICompositorChain.IInstances, ICompositorChain.IRenderSystemOperations, ICompositorChain.IRQListener
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  CompositorChain(InstancePointer p)
          This constructor is public for internal useage only!
protected CompositorChain(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  CompositorChain(IViewport vp)
           
  CompositorChain(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _compile()
          Compile this Composition chain into a series of operations.
 ICompositorInstance _getOriginalSceneCompositor()
          Get the original scene compositor instance for this chain (internal use).
 void _markDirty()
          Mark state as dirty, and to be recompiled next frame.
 void _notifyViewport(IViewport vp)
          Internal method for reconnecting with viewport
 void _queuedOperation(ICompositorInstance.IRenderSystemOperation op)
          Internal method for registering a queued operation for deletion later
 void _removeInstance(ICompositorInstance i)
          Remove a compositor by pointer.
 ICompositorInstance addCompositor(ICompositorPtr filter, int addPosition, int technique)
          Apply a compositor.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
static int getBEST()
           
 ICompositorInstance getCompositor(int index)
          Get compositor instance by position.
 void getCompositors(ICompositorChain.IInstanceIterator returnValue)
          Get an iterator over the compositor instances.
static int getLAST()
           
 int getNumCompositors()
          Get the number of compositors.
 IViewport getViewport()
          Get viewport that is the target of this chain
 void postRenderTargetUpdate(IRenderTargetEvent evt)
          Called just after a has been rendered to.
 void postViewportUpdate(IRenderTargetViewportEvent evt)
           
 void preRenderTargetUpdate(IRenderTargetEvent evt)
          Called just before a is about to be rendered into.
 void preViewportUpdate(IRenderTargetViewportEvent evt)
           
 void removeAllCompositors()
          Remove all compositors.
 void removeCompositor(int position)
          Remove a compositor.
 void setCompositorEnabled(int position, boolean state)
          Enable or disable a compositor, by position.
 void viewportAdded(IRenderTargetViewportEvent evt)
          Called to notify listener that a has been added to the target in question.
 void viewportRemoved(IRenderTargetViewportEvent evt)
          Called to notify listener that a has been removed from the target in question.
 
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

CompositorChain

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


CompositorChain

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


CompositorChain

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

CompositorChain

public CompositorChain(IViewport vp)
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

addCompositor

public ICompositorInstance addCompositor(ICompositorPtr filter,
                                         int addPosition,
                                         int technique)
Apply a compositor. Initially, the filter is enabled.

Specified by:
addCompositor in interface ICompositorChain

removeCompositor

public void removeCompositor(int position)
Remove a compositor.

Specified by:
removeCompositor in interface ICompositorChain

getNumCompositors

public int getNumCompositors()
Get the number of compositors.

Specified by:
getNumCompositors in interface ICompositorChain

removeAllCompositors

public void removeAllCompositors()
Remove all compositors.

Specified by:
removeAllCompositors in interface ICompositorChain

getCompositor

public ICompositorInstance getCompositor(int index)
Get compositor instance by position.

Specified by:
getCompositor in interface ICompositorChain

_getOriginalSceneCompositor

public ICompositorInstance _getOriginalSceneCompositor()
Get the original scene compositor instance for this chain (internal use).

Specified by:
_getOriginalSceneCompositor in interface ICompositorChain

getCompositors

public void getCompositors(ICompositorChain.IInstanceIterator returnValue)
Get an iterator over the compositor instances. The first compositor in this list is applied first, the last one is applied last.

Specified by:
getCompositors in interface ICompositorChain

setCompositorEnabled

public void setCompositorEnabled(int position,
                                 boolean state)
Enable or disable a compositor, by position. Disabling a compositor stops it from rendering but does not free any resources. This can be more efficient than using removeCompositor and addCompositor in cases the filter is switched on and off a lot.

Specified by:
setCompositorEnabled in interface ICompositorChain

preRenderTargetUpdate

public void preRenderTargetUpdate(IRenderTargetEvent evt)
Description copied from interface: IRenderTargetListener
Called just before a is about to be rendered into.

Specified by:
preRenderTargetUpdate in interface ICompositorChain
Specified by:
preRenderTargetUpdate in interface IRenderTargetListener

preViewportUpdate

public void preViewportUpdate(IRenderTargetViewportEvent evt)
Specified by:
preViewportUpdate in interface ICompositorChain
Specified by:
preViewportUpdate in interface IRenderTargetListener

postViewportUpdate

public void postViewportUpdate(IRenderTargetViewportEvent evt)
Specified by:
postViewportUpdate in interface ICompositorChain
Specified by:
postViewportUpdate in interface IRenderTargetListener

viewportRemoved

public void viewportRemoved(IRenderTargetViewportEvent evt)
Description copied from interface: IRenderTargetListener
Called to notify listener that a has been removed from the target in question.

Specified by:
viewportRemoved in interface ICompositorChain
Specified by:
viewportRemoved in interface IRenderTargetListener

_markDirty

public void _markDirty()
Mark state as dirty, and to be recompiled next frame.

Specified by:
_markDirty in interface ICompositorChain

getViewport

public IViewport getViewport()
Get viewport that is the target of this chain

Specified by:
getViewport in interface ICompositorChain

_notifyViewport

public void _notifyViewport(IViewport vp)
Internal method for reconnecting with viewport

Specified by:
_notifyViewport in interface ICompositorChain

_removeInstance

public void _removeInstance(ICompositorInstance i)
Remove a compositor by pointer. This is internally used by to "weak" remove any instanced of a deleted technique.

Specified by:
_removeInstance in interface ICompositorChain

_queuedOperation

public void _queuedOperation(ICompositorInstance.IRenderSystemOperation op)
Internal method for registering a queued operation for deletion later

Specified by:
_queuedOperation in interface ICompositorChain

_compile

public void _compile()
Compile this Composition chain into a series of operations.

Specified by:
_compile in interface ICompositorChain

postRenderTargetUpdate

public void postRenderTargetUpdate(IRenderTargetEvent evt)
Called just after a has been rendered to.

Specified by:
postRenderTargetUpdate in interface IRenderTargetListener

viewportAdded

public void viewportAdded(IRenderTargetViewportEvent evt)
Called to notify listener that a has been added to the target in question.

Specified by:
viewportAdded in interface IRenderTargetListener

getLAST

public static int getLAST()

getBEST

public static int getBEST()


Copyright © 2007 netAllied GmbH. All Rights Reserved.