espresso3d.engine.logo.particlesystems.particles
Class RedPlasmaParticle

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.renderer.base.E3DRenderable
          extended byespresso3d.engine.renderer.base.E3DTexturedRenderable
              extended byespresso3d.engine.renderer.base.E3DAnimatedTextureRenderable
                  extended byespresso3d.engine.world.sector.base.E3DPortalEnabledAnimatedTextureRenderable
                      extended byespresso3d.engine.world.sector.particle.E3DSprite
                          extended byespresso3d.engine.world.sector.particle.E3DBillboardSprite
                              extended byespresso3d.engine.world.sector.particle.E3DParticle
                                  extended byespresso3d.engine.logo.particlesystems.particles.RedPlasmaParticle
All Implemented Interfaces:
E3DCollisionDetectableObject, E3DPortalEnabledItem

public class RedPlasmaParticle
extends E3DParticle

Author:
Curt The red plasma particle used in v0.2 logos particle system

Constructor Summary
RedPlasmaParticle(E3DEngine engine, E3DVector3F startPosition, E3DVector3F startMovementDirection, double velocity, double life, double startDelay, double size, boolean createLight)
           
 
Method Summary
 E3DLight getLight()
           
 boolean isCollideable()
          Return true if the collision detector should include this when checking for collisions of other objects into this.
 boolean isCollisionCausedByMovement()
          Set this to true if the particle in the system needs to cause collisions when it moves.
 void onCollisionActor(E3DCollision collision)
          Intercept collision with actor callbacks
 boolean onCollisionDuringUpdate(E3DCollision collision)
          This callback gets fired when the particle hits something in the world.
 void onCollisionSprite(E3DCollision collision)
          Intercept collision with sprite callbacks
 E3DParticle onGetClone()
           
 void setLight(E3DLight light)
           
 boolean update(E3DActor curActor, double lastFrameTimeSeconds)
          Update the particle - move in direction at the velocity speed.
 
Methods inherited from class espresso3d.engine.world.sector.particle.E3DParticle
getCurrentFrameVelocity, getCurrentMovementDirection, getEndAlpha, getLife, getLoops, getParticleSystem, getStartAlpha, getStartDelay, getStartMovementDirection, getStartPosition, getTranslationAmt, getVelocity, isAlive, render, rotate, rotateMovementDirection, setCurrentMovementDirection, setEndAlpha, setLife, setLoops, setStartAlpha, setStartDelay, setStartMovementDirection, setStartPosition, setVelocity, translate
 
Methods inherited from class espresso3d.engine.world.sector.particle.E3DBillboardSprite
isLockX, isLockY, isLockZ, setLockX, setLockY, setLockZ, update
 
Methods inherited from class espresso3d.engine.world.sector.particle.E3DSprite
getBoundingObject, getKey, getOrientation, getQuad, getSize, getTriangleList, getUniqueVertexPositionList, scale, setBoundingObject, setPosition, setQuad, setRenderMode
 
Methods inherited from class espresso3d.engine.world.sector.base.E3DPortalEnabledAnimatedTextureRenderable
checkSectorChangeDuringMovement, getSector, setSector
 
Methods inherited from class espresso3d.engine.renderer.base.E3DAnimatedTextureRenderable
getAnimatedTexture, setAnimatedTexture, update
 
Methods inherited from class espresso3d.engine.renderer.base.E3DTexturedRenderable
getTexture, getTextureDetail0, getTextureDetail1, isTextureAvailable, isTextureDetail0Available, isTextureDetail1Available, setTexture, setTextureDetail0, setTextureDetail1
 
Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable
getBlendMode, getRenderMode, initCorrectGeometryRenderer, isKeyChanged, setBlendMode, setKeyChanged
 
Methods inherited from class espresso3d.engine.base.E3DEngineItem
getEngine, setEngine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface espresso3d.engine.collision.base.E3DCollisionDetectableObject
getEngine, getSector
 

Constructor Detail

RedPlasmaParticle

public RedPlasmaParticle(E3DEngine engine,
                         E3DVector3F startPosition,
                         E3DVector3F startMovementDirection,
                         double velocity,
                         double life,
                         double startDelay,
                         double size,
                         boolean createLight)
Method Detail

onCollisionActor

public void onCollisionActor(E3DCollision collision)
Description copied from class: E3DParticle
Intercept collision with actor callbacks

Specified by:
onCollisionActor in interface E3DCollisionDetectableObject
Specified by:
onCollisionActor in class E3DParticle

onCollisionSprite

public void onCollisionSprite(E3DCollision collision)
Description copied from class: E3DParticle
Intercept collision with sprite callbacks

Specified by:
onCollisionSprite in interface E3DCollisionDetectableObject
Specified by:
onCollisionSprite in class E3DParticle

onCollisionDuringUpdate

public boolean onCollisionDuringUpdate(E3DCollision collision)
Description copied from class: E3DParticle
This callback gets fired when the particle hits something in the world. Actors don't have this callback, but particles do since they're movement is done automatically by the engine

Specified by:
onCollisionDuringUpdate in class E3DParticle
Parameters:
collision -
Returns:
Return true or false. True will make the particle continue with its normal automated movement after a collision, false will stop it from moving during the frames where there is a collision.

onGetClone

public E3DParticle onGetClone()
                       throws java.lang.Exception
Specified by:
onGetClone in class E3DParticle
Throws:
java.lang.Exception

isCollideable

public boolean isCollideable()
Description copied from interface: E3DCollisionDetectableObject
Return true if the collision detector should include this when checking for collisions of other objects into this. Otherwise, false and it will be ignored in other object's collision detection This does not automatically make this stop causing collisions with their own movement (in all cases except particles, this can only be triggered by the user). it just keeps the object from being run into by other object's movement.

Returns:

isCollisionCausedByMovement

public boolean isCollisionCausedByMovement()
Description copied from class: E3DParticle
Set this to true if the particle in the system needs to cause collisions when it moves. If set to false, it will not cause any collision callbacks to be hit when it moves. This must also be set to true in the particle's particle system (A false setting in the particle system overrides this setting). This does not automatically make it uncollideable. It just keeps itself from causing collisions with its own movement. Other objects movement can still run into this particle if isCollideable is set to true for the particle and particle system.

Specified by:
isCollisionCausedByMovement in class E3DParticle
Returns:

getLight

public E3DLight getLight()

setLight

public void setLight(E3DLight light)

update

public boolean update(E3DActor curActor,
                      double lastFrameTimeSeconds)
Description copied from class: E3DParticle
Update the particle - move in direction at the velocity speed. Also apply the gravity vector if its not null. This is an engine speed based movement, so it should move at a constant speed no matter how fast or slow the engine is currently running.

Overrides:
update in class E3DParticle
Parameters:
lastFrameTimeSeconds - Pass in the last engine's frame time to use as a scalar for the movement velocity of hte particle (so its the same speed on fast or slow systems Returns false if it needs to be removed from the particlesystem (its dead)