org.ogre4j
Class ParticleEmitter

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.ParticleEmitter
All Implemented Interfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IParticle, IParticleEmitter, ISceneObjAllocatedObject, IStringInterface, INativeObject

public class ParticleEmitter
extends NativeObject
implements IParticleEmitter


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  ParticleEmitter(InstancePointer p)
          This constructor is public for internal useage only!
protected ParticleEmitter(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  ParticleEmitter(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 int _getEmissionCount(float timeElapsed)
          Gets the number of particles which this emitter would like to emit based on the time elapsed.
 void _initParticle(IParticle pParticle)
          Initialises a particle based on the emitter's approach and parameters.
 void _notifyOwner(IParticleSystem owner)
          Internal method for notifying the particle of it's owner.
 void _notifyVisualData(IParticleVisualData vis)
          Internal method for notifying the particle of it's optional visual data.
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()
           
 IRadian getAngle()
          Returns the maximum angle which the initial particle direction can deviate from the emitters base direction.
 IColourValue getColour()
          Gets the colour of particles to be emitted.
 void getcolour(IColourValue returnValue)
           
 IColourValue getColourRangeEnd()
          Gets the maximum colour of particles to be emitted.
 IColourValue getColourRangeStart()
          Gets the minimum colour of particles to be emitted.
 IVector3 getDirection()
          Returns the base direction of the emitter.
 void getdirection(IVector3 returnValue)
           
 float getDuration()
          Gets the duration of the emitter from when it is created or re-enabled.
 float getEmissionRate()
          Returns the emission rate set for this emitter.
 java.lang.String getEmittedEmitter()
          Returns the name of the emitter to be emitted
 boolean getEnabled()
          Gets the flag indicating if this emitter is enabled or not.
 float getMaxDuration()
          Gets the maximum duration of this emitter in seconds (see setDuration for more details)
 float getMaxParticleVelocity()
          Returns the maximum particle velocity.
 float getMaxRepeatDelay()
          Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)
 float getMaxTimeToLive()
          Gets the maximum time each particle will live for.
 float getmHeight()
           
 float getMinDuration()
          Gets the minimum duration of this emitter in seconds (see setDuration for more details)
 float getMinParticleVelocity()
          Returns the minimum particle velocity.
 float getMinRepeatDelay()
          Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)
 float getMinTimeToLive()
          Gets the minimum time each particle will live for.
 boolean getmOwnDimensions()
           
 float getmWidth()
           
 java.lang.String getName()
          Returns the name of the emitter
 float getOwnHeight()
          Retrieves the particle's personal width, if hasOwnDimensions is true.
 float getOwnWidth()
          Retrieves the particle's personal width, if hasOwnDimensions is true.
 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.
 Particle.ParticleType getparticleType()
           
 float getParticleVelocity()
          Returns the initial velocity of particles emitted.
 IVector3 getPosition()
          Returns the position of this emitter relative to the center of the particle system.
 void getposition(IVector3 returnValue)
           
 float getRepeatDelay()
          Gets the duration of the emitter from when it is created or re-enabled.
 IRadian getRotation()
           
 void getrotation(IRadian returnValue)
           
 void getrotationSpeed(IRadian returnValue)
           
 float getStartTime()
          Gets the start time of the emitter.
 float gettimeToLive()
           
 float getTimeToLive()
          Gets the time each particle will live for.
 float gettotalTimeToLive()
           
 java.lang.String getType()
          Returns the name of the type of emitter.
 IParticleVisualData getVisualData()
           
 boolean hasOwnDimensions()
          Returns true if this particle deviates from the ParticleSystem's default dimensions (i.e. if the particle::setDimensions method has been called for this instance).
 boolean isEmitted()
          Return 'true' if the emitter is emitted by another emitter
 void resetDimensions()
           
 void setAngle(IRadian angle)
          Sets the maximum angle away from the emitter direction which particle will be emitted.
 void setcolour(IColourValue _jni_value_)
           
 void setColour(IColourValue colour)
          Sets the initial colour of particles emitted.
 void setColour(IColourValue colourStart, IColourValue colourEnd)
          Sets the range of colours for emitted particles.
 void setColourRangeEnd(IColourValue colour)
          Sets the maximum colour of particles to be emitted.
 void setColourRangeStart(IColourValue colour)
          Sets the minimum colour of particles to be emitted.
 void setDimensions(float width, float height)
          Sets the width and height for this particle.
 void setdirection(IVector3 _jni_value_)
           
 void setDirection(IVector3 direction)
          Sets the direction of the emitter.
 void setDuration(float duration)
          Sets the duration of the emitter.
 void setDuration(float _min, float _max)
          Sets the range of random duration for this emitter.
 void setEmissionRate(float particlesPerSecond)
          Sets the emission rate for this emitter.
 void setEmitted(boolean emitted)
          Set the indication (true/false) to indicate that the emitter is emitted by another emitter
 void setEmittedEmitter(java.lang.String emittedEmitter)
          Sets the name of the emitter to be emitted
 void setEnabled(boolean enabled)
          Sets whether or not the emitter is enabled.
 void setMaxDuration(float _max)
          Sets the maximum duration of this emitter in seconds (see setDuration for more details)
 void setMaxParticleVelocity(float _max)
          Returns the maximum particle velocity.
 void setMaxRepeatDelay(float _max)
          Sets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)
 void setMaxTimeToLive(float _max)
          Sets the maximum time each particle will live for.
 void setmHeight(float _jni_value_)
           
 void setMinDuration(float _min)
          Sets the minimum duration of this emitter in seconds (see setDuration for more details)
 void setMinParticleVelocity(float _min)
          Returns the minimum particle velocity.
 void setMinRepeatDelay(float _min)
          Sets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)
 void setMinTimeToLive(float _min)
          Sets the minimum time each particle will live for.
 void setmOwnDimensions(boolean _jni_value_)
           
 void setmWidth(float _jni_value_)
           
 void setName(java.lang.String newName)
          Sets the name of the emitter
 boolean setParameter(java.lang.String name, java.lang.String value)
          Generic parameter setting method.
 void setParameterList(INameValuePairList paramList)
          Generic multiple parameter setting method.
 void setparticleType(Particle.ParticleType _jni_value_)
           
 void setParticleVelocity(float speed)
          Sets the initial velocity of particles emitted.
 void setParticleVelocity(float _min, float _max)
          Sets the initial velocity range of particles emitted.
 void setposition(IVector3 _jni_value_)
           
 void setPosition(IVector3 pos)
          Sets the position of this emitter relative to the particle system center.
 void setRepeatDelay(float duration)
          Sets the time between repeats of the emitter.
 void setRepeatDelay(float _min, float _max)
          Sets the range of random duration for this emitter.
 void setrotation(IRadian _jni_value_)
           
 void setRotation(IRadian rad)
          Sets the current rotation
 void setrotationSpeed(IRadian _jni_value_)
           
 void setStartTime(float startTime)
          Sets the 'start time' of this emitter.
 void settimeToLive(float _jni_value_)
           
 void setTimeToLive(float ttl)
          Sets the lifetime of all particles emitted.
 void setTimeToLive(float minTtl, float maxTtl)
          Sets the range of lifetime for particles emitted.
 void settotalTimeToLive(float _jni_value_)
           
 
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

ParticleEmitter

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


ParticleEmitter

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


ParticleEmitter

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()
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

setPosition

public void setPosition(IVector3 pos)
Sets the position of this emitter relative to the particle system center.

Specified by:
setPosition in interface IParticleEmitter

getPosition

public IVector3 getPosition()
Returns the position of this emitter relative to the center of the particle system.

Specified by:
getPosition in interface IParticleEmitter

setDirection

public void setDirection(IVector3 direction)
Sets the direction of the emitter.

Specified by:
setDirection in interface IParticleEmitter

getDirection

public IVector3 getDirection()
Returns the base direction of the emitter.

Specified by:
getDirection in interface IParticleEmitter

setAngle

public void setAngle(IRadian angle)
Sets the maximum angle away from the emitter direction which particle will be emitted.

Specified by:
setAngle in interface IParticleEmitter

getAngle

public IRadian getAngle()
Returns the maximum angle which the initial particle direction can deviate from the emitters base direction.

Specified by:
getAngle in interface IParticleEmitter

setParticleVelocity

public void setParticleVelocity(float speed)
Sets the initial velocity of particles emitted.

Specified by:
setParticleVelocity in interface IParticleEmitter

setParticleVelocity

public void setParticleVelocity(float _min,
                                float _max)
Sets the initial velocity range of particles emitted.

Specified by:
setParticleVelocity in interface IParticleEmitter

setMinParticleVelocity

public void setMinParticleVelocity(float _min)
Returns the minimum particle velocity.

Specified by:
setMinParticleVelocity in interface IParticleEmitter

setMaxParticleVelocity

public void setMaxParticleVelocity(float _max)
Returns the maximum particle velocity.

Specified by:
setMaxParticleVelocity in interface IParticleEmitter

getParticleVelocity

public float getParticleVelocity()
Returns the initial velocity of particles emitted.

Specified by:
getParticleVelocity in interface IParticleEmitter

getMinParticleVelocity

public float getMinParticleVelocity()
Returns the minimum particle velocity.

Specified by:
getMinParticleVelocity in interface IParticleEmitter

getMaxParticleVelocity

public float getMaxParticleVelocity()
Returns the maximum particle velocity.

Specified by:
getMaxParticleVelocity in interface IParticleEmitter

setEmissionRate

public void setEmissionRate(float particlesPerSecond)
Sets the emission rate for this emitter.

Specified by:
setEmissionRate in interface IParticleEmitter

getEmissionRate

public float getEmissionRate()
Returns the emission rate set for this emitter.

Specified by:
getEmissionRate in interface IParticleEmitter

setTimeToLive

public void setTimeToLive(float ttl)
Sets the lifetime of all particles emitted.

Specified by:
setTimeToLive in interface IParticleEmitter

setTimeToLive

public void setTimeToLive(float minTtl,
                          float maxTtl)
Sets the range of lifetime for particles emitted.

Specified by:
setTimeToLive in interface IParticleEmitter

setMinTimeToLive

public void setMinTimeToLive(float _min)
Sets the minimum time each particle will live for.

Specified by:
setMinTimeToLive in interface IParticleEmitter

setMaxTimeToLive

public void setMaxTimeToLive(float _max)
Sets the maximum time each particle will live for.

Specified by:
setMaxTimeToLive in interface IParticleEmitter

getTimeToLive

public float getTimeToLive()
Gets the time each particle will live for.

Specified by:
getTimeToLive in interface IParticleEmitter

getMinTimeToLive

public float getMinTimeToLive()
Gets the minimum time each particle will live for.

Specified by:
getMinTimeToLive in interface IParticleEmitter

getMaxTimeToLive

public float getMaxTimeToLive()
Gets the maximum time each particle will live for.

Specified by:
getMaxTimeToLive in interface IParticleEmitter

setColour

public void setColour(IColourValue colour)
Sets the initial colour of particles emitted.

Specified by:
setColour in interface IParticleEmitter

setColour

public void setColour(IColourValue colourStart,
                      IColourValue colourEnd)
Sets the range of colours for emitted particles.

Specified by:
setColour in interface IParticleEmitter

setColourRangeStart

public void setColourRangeStart(IColourValue colour)
Sets the minimum colour of particles to be emitted.

Specified by:
setColourRangeStart in interface IParticleEmitter

setColourRangeEnd

public void setColourRangeEnd(IColourValue colour)
Sets the maximum colour of particles to be emitted.

Specified by:
setColourRangeEnd in interface IParticleEmitter

getColour

public IColourValue getColour()
Gets the colour of particles to be emitted.

Specified by:
getColour in interface IParticleEmitter

getColourRangeStart

public IColourValue getColourRangeStart()
Gets the minimum colour of particles to be emitted.

Specified by:
getColourRangeStart in interface IParticleEmitter

getColourRangeEnd

public IColourValue getColourRangeEnd()
Gets the maximum colour of particles to be emitted.

Specified by:
getColourRangeEnd in interface IParticleEmitter

_getEmissionCount

public int _getEmissionCount(float timeElapsed)
Gets the number of particles which this emitter would like to emit based on the time elapsed.

Specified by:
_getEmissionCount in interface IParticleEmitter

_initParticle

public void _initParticle(IParticle pParticle)
Initialises a particle based on the emitter's approach and parameters.

Specified by:
_initParticle in interface IParticleEmitter

getType

public java.lang.String getType()
Returns the name of the type of emitter.

Specified by:
getType in interface IParticleEmitter

setEnabled

public void setEnabled(boolean enabled)
Sets whether or not the emitter is enabled.

Specified by:
setEnabled in interface IParticleEmitter

getEnabled

public boolean getEnabled()
Gets the flag indicating if this emitter is enabled or not.

Specified by:
getEnabled in interface IParticleEmitter

setStartTime

public void setStartTime(float startTime)
Sets the 'start time' of this emitter.

Specified by:
setStartTime in interface IParticleEmitter

getStartTime

public float getStartTime()
Gets the start time of the emitter.

Specified by:
getStartTime in interface IParticleEmitter

setDuration

public void setDuration(float duration)
Sets the duration of the emitter.

Specified by:
setDuration in interface IParticleEmitter

getDuration

public float getDuration()
Gets the duration of the emitter from when it is created or re-enabled.

Specified by:
getDuration in interface IParticleEmitter

setDuration

public void setDuration(float _min,
                        float _max)
Sets the range of random duration for this emitter.

Specified by:
setDuration in interface IParticleEmitter

setMinDuration

public void setMinDuration(float _min)
Sets the minimum duration of this emitter in seconds (see setDuration for more details)

Specified by:
setMinDuration in interface IParticleEmitter

setMaxDuration

public void setMaxDuration(float _max)
Sets the maximum duration of this emitter in seconds (see setDuration for more details)

Specified by:
setMaxDuration in interface IParticleEmitter

getMinDuration

public float getMinDuration()
Gets the minimum duration of this emitter in seconds (see setDuration for more details)

Specified by:
getMinDuration in interface IParticleEmitter

getMaxDuration

public float getMaxDuration()
Gets the maximum duration of this emitter in seconds (see setDuration for more details)

Specified by:
getMaxDuration in interface IParticleEmitter

setRepeatDelay

public void setRepeatDelay(float duration)
Sets the time between repeats of the emitter.

Specified by:
setRepeatDelay in interface IParticleEmitter

getRepeatDelay

public float getRepeatDelay()
Gets the duration of the emitter from when it is created or re-enabled.

Specified by:
getRepeatDelay in interface IParticleEmitter

setRepeatDelay

public void setRepeatDelay(float _min,
                           float _max)
Sets the range of random duration for this emitter.

Specified by:
setRepeatDelay in interface IParticleEmitter

setMinRepeatDelay

public void setMinRepeatDelay(float _min)
Sets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)

Specified by:
setMinRepeatDelay in interface IParticleEmitter

setMaxRepeatDelay

public void setMaxRepeatDelay(float _max)
Sets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)

Specified by:
setMaxRepeatDelay in interface IParticleEmitter

getMinRepeatDelay

public float getMinRepeatDelay()
Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)

Specified by:
getMinRepeatDelay in interface IParticleEmitter

getMaxRepeatDelay

public float getMaxRepeatDelay()
Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)

Specified by:
getMaxRepeatDelay in interface IParticleEmitter

getName

public java.lang.String getName()
Returns the name of the emitter

Specified by:
getName in interface IParticleEmitter

setName

public void setName(java.lang.String newName)
Sets the name of the emitter

Specified by:
setName in interface IParticleEmitter

getEmittedEmitter

public java.lang.String getEmittedEmitter()
Returns the name of the emitter to be emitted

Specified by:
getEmittedEmitter in interface IParticleEmitter

setEmittedEmitter

public void setEmittedEmitter(java.lang.String emittedEmitter)
Sets the name of the emitter to be emitted

Specified by:
setEmittedEmitter in interface IParticleEmitter

isEmitted

public boolean isEmitted()
Return 'true' if the emitter is emitted by another emitter

Specified by:
isEmitted in interface IParticleEmitter

setEmitted

public void setEmitted(boolean emitted)
Set the indication (true/false) to indicate that the emitter is emitted by another emitter

Specified by:
setEmitted in interface IParticleEmitter

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.


setDimensions

public void setDimensions(float width,
                          float height)
Sets the width and height for this particle.

Specified by:
setDimensions in interface IParticle

hasOwnDimensions

public boolean hasOwnDimensions()
Returns true if this particle deviates from the ParticleSystem's default dimensions (i.e. if the particle::setDimensions method has been called for this instance).

Specified by:
hasOwnDimensions in interface IParticle

getOwnWidth

public float getOwnWidth()
Retrieves the particle's personal width, if hasOwnDimensions is true.

Specified by:
getOwnWidth in interface IParticle

getOwnHeight

public float getOwnHeight()
Retrieves the particle's personal width, if hasOwnDimensions is true.

Specified by:
getOwnHeight in interface IParticle

setRotation

public void setRotation(IRadian rad)
Sets the current rotation

Specified by:
setRotation in interface IParticle

getRotation

public IRadian getRotation()
Specified by:
getRotation in interface IParticle

_notifyOwner

public void _notifyOwner(IParticleSystem owner)
Internal method for notifying the particle of it's owner.

Specified by:
_notifyOwner in interface IParticle

_notifyVisualData

public void _notifyVisualData(IParticleVisualData vis)
Internal method for notifying the particle of it's optional visual data.

Specified by:
_notifyVisualData in interface IParticle

getVisualData

public IParticleVisualData getVisualData()
Specified by:
getVisualData in interface IParticle

resetDimensions

public void resetDimensions()
Specified by:
resetDimensions in interface IParticle

getmOwnDimensions

public boolean getmOwnDimensions()
Specified by:
getmOwnDimensions in interface IParticle

setmOwnDimensions

public void setmOwnDimensions(boolean _jni_value_)
Specified by:
setmOwnDimensions in interface IParticle

getmWidth

public float getmWidth()
Specified by:
getmWidth in interface IParticle

setmWidth

public void setmWidth(float _jni_value_)
Specified by:
setmWidth in interface IParticle

getmHeight

public float getmHeight()
Specified by:
getmHeight in interface IParticle

setmHeight

public void setmHeight(float _jni_value_)
Specified by:
setmHeight in interface IParticle

getrotation

public void getrotation(IRadian returnValue)
Specified by:
getrotation in interface IParticle

setrotation

public void setrotation(IRadian _jni_value_)
Specified by:
setrotation in interface IParticle

getposition

public void getposition(IVector3 returnValue)
Specified by:
getposition in interface IParticle

setposition

public void setposition(IVector3 _jni_value_)
Specified by:
setposition in interface IParticle

getdirection

public void getdirection(IVector3 returnValue)
Specified by:
getdirection in interface IParticle

setdirection

public void setdirection(IVector3 _jni_value_)
Specified by:
setdirection in interface IParticle

getcolour

public void getcolour(IColourValue returnValue)
Specified by:
getcolour in interface IParticle

setcolour

public void setcolour(IColourValue _jni_value_)
Specified by:
setcolour in interface IParticle

gettimeToLive

public float gettimeToLive()
Specified by:
gettimeToLive in interface IParticle

settimeToLive

public void settimeToLive(float _jni_value_)
Specified by:
settimeToLive in interface IParticle

gettotalTimeToLive

public float gettotalTimeToLive()
Specified by:
gettotalTimeToLive in interface IParticle

settotalTimeToLive

public void settotalTimeToLive(float _jni_value_)
Specified by:
settotalTimeToLive in interface IParticle

getrotationSpeed

public void getrotationSpeed(IRadian returnValue)
Specified by:
getrotationSpeed in interface IParticle

setrotationSpeed

public void setrotationSpeed(IRadian _jni_value_)
Specified by:
setrotationSpeed in interface IParticle

getparticleType

public Particle.ParticleType getparticleType()
Specified by:
getparticleType in interface IParticle

setparticleType

public void setparticleType(Particle.ParticleType _jni_value_)
Specified by:
setparticleType in interface IParticle


Copyright © 2007 netAllied GmbH. All Rights Reserved.