org.ogre4j
Class BillboardParticleRenderer

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.BillboardParticleRenderer
All Implemented Interfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IBillboardParticleRenderer, IParticleSystemRenderer, ISceneObjAllocatedObject, IStringInterface, INativeObject

public class BillboardParticleRenderer
extends NativeObject
implements IBillboardParticleRenderer


Nested Class Summary
static class BillboardParticleRenderer.CmdAccurateFacing
           
static class BillboardParticleRenderer.CmdBillboardOrigin
           
static class BillboardParticleRenderer.CmdBillboardRotationType
           
static class BillboardParticleRenderer.CmdBillboardType
           
static class BillboardParticleRenderer.CmdCommonDirection
           
static class BillboardParticleRenderer.CmdCommonUpVector
           
static class BillboardParticleRenderer.CmdPointRendering
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IBillboardParticleRenderer
IBillboardParticleRenderer.ICmdAccurateFacing, IBillboardParticleRenderer.ICmdBillboardOrigin, IBillboardParticleRenderer.ICmdBillboardRotationType, IBillboardParticleRenderer.ICmdBillboardType, IBillboardParticleRenderer.ICmdCommonDirection, IBillboardParticleRenderer.ICmdCommonUpVector, IBillboardParticleRenderer.ICmdPointRendering
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  BillboardParticleRenderer()
           
  BillboardParticleRenderer(InstancePointer p)
          This constructor is public for internal useage only!
protected BillboardParticleRenderer(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  BillboardParticleRenderer(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 IParticleVisualData _createVisualData()
          Create a new instance for attachment to a particle.
 void _destroyVisualData(IParticleVisualData vis)
          Destroy a instance.
 SortMode _getSortMode()
          Gets the desired particles sort mode of this renderer
 void _notifyAttached(INode parent, boolean isTagPoint)
          Delegated to by
 void _notifyCurrentCamera(ICamera cam)
          Delegated to by
 void _notifyDefaultDimensions(float width, float height)
          Tells the renderer that the particle default size has changed
 void _notifyParticleCleared(Ilist<IParticle> currentParticles)
          Optional callback notified when particles cleared
 void _notifyParticleEmitted(IParticle particle)
          Optional callback notified when particle emitted
 void _notifyParticleExpired(IParticle particle)
          Optional callback notified when particle expired
 void _notifyParticleMoved(Ilist<IParticle> currentParticles)
          Optional callback notified when particles moved
 void _notifyParticleQuota(int quota)
          Tells the renderer that the particle quota has changed
 void _notifyParticleResized()
          Optional callback notified when particles are resized individually
 void _notifyParticleRotated()
          Optional callback notified when particles are rotated
 void _setMaterial(IMaterialPtr mat)
          Sets the material this renderer must use; called by .
 void _updateRenderQueue(IRenderQueue queue, Ilist<IParticle> currentParticles, boolean cullIndividually)
          Delegated to by
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 copyParametersTo(IStringInterface dest)
          Method for copying this object's parameters to another object.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 BillboardOrigin getBillboardOrigin()
          Gets the point which acts as the origin point for all billboards in this set.
 BillboardRotationType getBillboardRotationType()
          Sets billboard rotation type.
 IBillboardSet getBillboardSet()
           
 BillboardType getBillboardType()
          Returns the billboard type in use.
 IVector3 getCommonDirection()
          Gets the common direction for all billboards (BBT_ORIENTED_COMMON)
 IVector3 getCommonUpVector()
          Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF)
 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.
 java.lang.String getType()
          Gets the type of this renderer - must be implemented by subclasses
 boolean getUseAccurateFacing()
           
 boolean isPointRenderingEnabled()
           
 void setBillboardOrigin(BillboardOrigin origin)
          Sets the point which acts as the origin point for all billboards in this set.
 void setBillboardRotationType(BillboardRotationType rotationType)
          Sets billboard rotation type.
 void setBillboardType(BillboardType bbt)
          Sets the type of billboard to render.
 void setCommonDirection(IVector3 vec)
          Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON.
 void setCommonUpVector(IVector3 vec)
          Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF.
 void setKeepParticlesInLocalSpace(boolean keepLocal)
          Setting carried over from .
 boolean setParameter(java.lang.String name, java.lang.String value)
          Generic parameter setting method.
 void setParameterList(INameValuePairList paramList)
          Generic multiple parameter setting method.
 void setPointRenderingEnabled(boolean enabled)
           
 void setRenderQueueGroup(short queueID)
          Sets which render queue group this renderer should target with it's output.
 void setUseAccurateFacing(boolean acc)
           
 void visitRenderables(IRenderable.IVisitor visitor, boolean debugRenderables)
          Required method to allow the renderer to communicate the Renderables it will be using to render the system to a visitor.
 
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

BillboardParticleRenderer

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


BillboardParticleRenderer

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


BillboardParticleRenderer

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

BillboardParticleRenderer

public BillboardParticleRenderer()
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

setBillboardType

public void setBillboardType(BillboardType bbt)
Sets the type of billboard to render.

Specified by:
setBillboardType in interface IBillboardParticleRenderer

getBillboardType

public BillboardType getBillboardType()
Returns the billboard type in use.

Specified by:
getBillboardType in interface IBillboardParticleRenderer

setUseAccurateFacing

public void setUseAccurateFacing(boolean acc)
Specified by:
setUseAccurateFacing in interface IBillboardParticleRenderer

getUseAccurateFacing

public boolean getUseAccurateFacing()
Specified by:
getUseAccurateFacing in interface IBillboardParticleRenderer

setBillboardOrigin

public void setBillboardOrigin(BillboardOrigin origin)
Sets the point which acts as the origin point for all billboards in this set.

Specified by:
setBillboardOrigin in interface IBillboardParticleRenderer

getBillboardOrigin

public BillboardOrigin getBillboardOrigin()
Gets the point which acts as the origin point for all billboards in this set.

Specified by:
getBillboardOrigin in interface IBillboardParticleRenderer

setBillboardRotationType

public void setBillboardRotationType(BillboardRotationType rotationType)
Sets billboard rotation type.

Specified by:
setBillboardRotationType in interface IBillboardParticleRenderer

getBillboardRotationType

public BillboardRotationType getBillboardRotationType()
Sets billboard rotation type.

Specified by:
getBillboardRotationType in interface IBillboardParticleRenderer

setCommonDirection

public void setCommonDirection(IVector3 vec)
Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON.

Specified by:
setCommonDirection in interface IBillboardParticleRenderer

getCommonDirection

public IVector3 getCommonDirection()
Gets the common direction for all billboards (BBT_ORIENTED_COMMON)

Specified by:
getCommonDirection in interface IBillboardParticleRenderer

setCommonUpVector

public void setCommonUpVector(IVector3 vec)
Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF.

Specified by:
setCommonUpVector in interface IBillboardParticleRenderer

getCommonUpVector

public IVector3 getCommonUpVector()
Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF)

Specified by:
getCommonUpVector in interface IBillboardParticleRenderer

setPointRenderingEnabled

public void setPointRenderingEnabled(boolean enabled)
Specified by:
setPointRenderingEnabled in interface IBillboardParticleRenderer

isPointRenderingEnabled

public boolean isPointRenderingEnabled()
Specified by:
isPointRenderingEnabled in interface IBillboardParticleRenderer

getType

public java.lang.String getType()
Description copied from interface: IParticleSystemRenderer
Gets the type of this renderer - must be implemented by subclasses

Specified by:
getType in interface IBillboardParticleRenderer
Specified by:
getType in interface IParticleSystemRenderer

_updateRenderQueue

public void _updateRenderQueue(IRenderQueue queue,
                               Ilist<IParticle> currentParticles,
                               boolean cullIndividually)
Description copied from interface: IParticleSystemRenderer
Delegated to by

Specified by:
_updateRenderQueue in interface IBillboardParticleRenderer
Specified by:
_updateRenderQueue in interface IParticleSystemRenderer

visitRenderables

public void visitRenderables(IRenderable.IVisitor visitor,
                             boolean debugRenderables)
Description copied from interface: IParticleSystemRenderer
Required method to allow the renderer to communicate the Renderables it will be using to render the system to a visitor.

Specified by:
visitRenderables in interface IBillboardParticleRenderer
Specified by:
visitRenderables in interface IParticleSystemRenderer

_setMaterial

public void _setMaterial(IMaterialPtr mat)
Description copied from interface: IParticleSystemRenderer
Sets the material this renderer must use; called by .

Specified by:
_setMaterial in interface IBillboardParticleRenderer
Specified by:
_setMaterial in interface IParticleSystemRenderer

_notifyCurrentCamera

public void _notifyCurrentCamera(ICamera cam)
Description copied from interface: IParticleSystemRenderer
Delegated to by

Specified by:
_notifyCurrentCamera in interface IBillboardParticleRenderer
Specified by:
_notifyCurrentCamera in interface IParticleSystemRenderer

_notifyParticleRotated

public void _notifyParticleRotated()
Description copied from interface: IParticleSystemRenderer
Optional callback notified when particles are rotated

Specified by:
_notifyParticleRotated in interface IBillboardParticleRenderer
Specified by:
_notifyParticleRotated in interface IParticleSystemRenderer

_notifyParticleResized

public void _notifyParticleResized()
Description copied from interface: IParticleSystemRenderer
Optional callback notified when particles are resized individually

Specified by:
_notifyParticleResized in interface IBillboardParticleRenderer
Specified by:
_notifyParticleResized in interface IParticleSystemRenderer

_notifyParticleQuota

public void _notifyParticleQuota(int quota)
Description copied from interface: IParticleSystemRenderer
Tells the renderer that the particle quota has changed

Specified by:
_notifyParticleQuota in interface IBillboardParticleRenderer
Specified by:
_notifyParticleQuota in interface IParticleSystemRenderer

_notifyAttached

public void _notifyAttached(INode parent,
                            boolean isTagPoint)
Description copied from interface: IParticleSystemRenderer
Delegated to by

Specified by:
_notifyAttached in interface IBillboardParticleRenderer
Specified by:
_notifyAttached in interface IParticleSystemRenderer

_notifyDefaultDimensions

public void _notifyDefaultDimensions(float width,
                                     float height)
Description copied from interface: IParticleSystemRenderer
Tells the renderer that the particle default size has changed

Specified by:
_notifyDefaultDimensions in interface IBillboardParticleRenderer
Specified by:
_notifyDefaultDimensions in interface IParticleSystemRenderer

setRenderQueueGroup

public void setRenderQueueGroup(short queueID)
Description copied from interface: IParticleSystemRenderer
Sets which render queue group this renderer should target with it's output.

Specified by:
setRenderQueueGroup in interface IBillboardParticleRenderer
Specified by:
setRenderQueueGroup in interface IParticleSystemRenderer

setKeepParticlesInLocalSpace

public void setKeepParticlesInLocalSpace(boolean keepLocal)
Description copied from interface: IParticleSystemRenderer
Setting carried over from .

Specified by:
setKeepParticlesInLocalSpace in interface IBillboardParticleRenderer
Specified by:
setKeepParticlesInLocalSpace in interface IParticleSystemRenderer

_getSortMode

public SortMode _getSortMode()
Description copied from interface: IParticleSystemRenderer
Gets the desired particles sort mode of this renderer

Specified by:
_getSortMode in interface IBillboardParticleRenderer
Specified by:
_getSortMode in interface IParticleSystemRenderer

getBillboardSet

public IBillboardSet getBillboardSet()
Specified by:
getBillboardSet in interface IBillboardParticleRenderer

_notifyParticleEmitted

public void _notifyParticleEmitted(IParticle particle)
Optional callback notified when particle emitted

Specified by:
_notifyParticleEmitted in interface IParticleSystemRenderer

_notifyParticleExpired

public void _notifyParticleExpired(IParticle particle)
Optional callback notified when particle expired

Specified by:
_notifyParticleExpired in interface IParticleSystemRenderer

_notifyParticleMoved

public void _notifyParticleMoved(Ilist<IParticle> currentParticles)
Optional callback notified when particles moved

Specified by:
_notifyParticleMoved in interface IParticleSystemRenderer

_notifyParticleCleared

public void _notifyParticleCleared(Ilist<IParticle> currentParticles)
Optional callback notified when particles cleared

Specified by:
_notifyParticleCleared in interface IParticleSystemRenderer

_createVisualData

public IParticleVisualData _createVisualData()
Create a new instance for attachment to a particle.

Specified by:
_createVisualData in interface IParticleSystemRenderer

_destroyVisualData

public void _destroyVisualData(IParticleVisualData vis)
Destroy a instance.

Specified by:
_destroyVisualData in interface IParticleSystemRenderer

getParamDictionary

public IParamDictionary getParamDictionary()
Retrieves the parameter dictionary for this class.

Specified by:
getParamDictionary in interface IStringInterface

getParamDictionary_const

public IParamDictionary getParamDictionary_const()
Specified by:
getParamDictionary_const in interface IStringInterface

getParameters

public IParameterList getParameters()
Retrieves a list of parameters valid for this object.

Specified by:
getParameters in interface IStringInterface

setParameter

public boolean setParameter(java.lang.String name,
                            java.lang.String value)
Generic parameter setting method.

Specified by:
setParameter in interface IStringInterface

setParameterList

public void setParameterList(INameValuePairList paramList)
Generic multiple parameter setting method.

Specified by:
setParameterList in interface IStringInterface

getParameter

public java.lang.String getParameter(java.lang.String name)
Generic parameter retrieval method.

Specified by:
getParameter in interface IStringInterface

copyParametersTo

public void copyParametersTo(IStringInterface dest)
Method for copying this object's parameters to another object.

Specified by:
copyParametersTo in interface IStringInterface

cleanupDictionary

public 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.



Copyright © 2007 netAllied GmbH. All Rights Reserved.