com.jmex.effects.particles
Class ParticleLines

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Node
          extended by com.jmex.effects.particles.ParticleSystem
              extended by com.jmex.effects.particles.ParticleLines
All Implemented Interfaces:
Savable, java.io.Serializable

public class ParticleLines
extends ParticleSystem

ParticleLines is a particle system that uses Line as its underlying geometric data.

Version:
$Id: ParticleLines.java 4133 2009-03-19 20:40:11Z blaine.dev $
Author:
Joshua Slack
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jmex.effects.particles.ParticleSystem
ParticleSystem.EmitType, ParticleSystem.ParticleType
 
Nested classes/interfaces inherited from class com.jme.scene.Spatial
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode
 
Field Summary
 
Fields inherited from class com.jmex.effects.particles.ParticleSystem
absUpVector, abUpMinUp, appearanceColors, cameraFacing, controller, DEFAULT_END_COLOR, DEFAULT_END_SIZE, DEFAULT_MAX_ANGLE, DEFAULT_MAX_LIFE, DEFAULT_MIN_LIFE, DEFAULT_START_COLOR, DEFAULT_START_SIZE, emissionDirection, emitterTransform, emitType, endColor, endMass, endSize, endSpin, geometryCoordinates, initialVelocity, invScale, leftVector, matData, maximumAngle, maximumLifeTime, minimumAngle, minimumLifeTime, numParticles, oldEmit, originCenter, originOffset, particleGeom, particleOrientation, particles, particlesInWorldCoords, particleType, psGeom, psLine, psRect, psRing, ramp, releaseRate, rotateWithScene, rotMatrix, startColor, startMass, startSize, startSpin, startTexIndex, texAnimation, texQuantity, upVector, upXemit, velocityAligned, workVect2, workVect3, worldEmit
 
Fields inherited from class com.jme.scene.Node
children
 
Fields inherited from class com.jme.scene.Spatial
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
ParticleLines()
           
ParticleLines(java.lang.String name, int numParticles)
           
 
Method Summary
 void draw(Renderer r)
          draw calls the onDraw method for each child maintained by this node.
 void findCollisions(Spatial scene, CollisionResults results)
          checks this spatial against a second spatial, any collisions are stored in the results object.
 float getLineWidth()
           
 Line.Mode getMode()
           
 Line getParticleGeometry()
           
 ParticleSystem.ParticleType getParticleType()
          Get which emittype method is being used by the underlying system.
 int getStippleFactor()
           
 short getStipplePattern()
           
 boolean hasCollision(Spatial scene, boolean checkTriangles)
          Checks this spatial against a second spatial for collisions.
protected  void initializeParticles(int numParticles)
           
 boolean isAntialiased()
           
 void setAntialiased(boolean antialiased)
          Sets whether the line should be antialiased.
 void setLineWidth(float lineWidth)
          Sets the width of each line when drawn.
 void setMode(Line.Mode mode)
           
 void setStippleFactor(int stippleFactor)
           
 void setStipplePattern(short stipplePattern)
          The stipple or pattern to use when drawing the particle lines.
 
Methods inherited from class com.jmex.effects.particles.ParticleSystem
addController, addInfluence, clearInfluences, forceRespawn, getEmissionDirection, getEmitterTransform, getEmitType, getEndColor, getEndMass, getEndSize, getEndSpin, getGeometry, getInfluences, getInitialVelocity, getInvScale, getLeftVector, getLine, getMaximumAngle, getMaximumLifeTime, getMinimumAngle, getMinimumLifeTime, getNumParticles, getOriginCenter, getOriginOffset, getParticle, getParticleController, getParticleOrientation, getRamp, getRandomAngle, getRandomLifeSpan, getRandomVelocity, getRectangle, getReleaseRate, getReleaseVariance, getRing, getRotMatrix, getStartColor, getStartMass, getStartSize, getStartSpin, getStartTexIndex, getTexAnimation, getTexQuantity, getUpVector, getVertsForParticleType, getWorldEmit, initAllParticlesLocation, initParticleLocation, isActive, isCameraFacing, isParticlesInWorldCoords, isRotateWithScene, isVelocityAligned, read, recreate, removeInfluence, resetParticleVelocity, rotateVectorSpeed, setCameraFacing, setControlFlow, setEmissionDirection, setEmitterTransform, setEmitType, setEndColor, setEndMass, setEndSize, setEndSpin, setGeometry, setGeometry, setGeometry, setGeometry, setInitialVelocity, setInvScale, setLeftVector, setMaximumAngle, setMaximumLifeTime, setMinimumAngle, setMinimumLifeTime, setNumParticles, setOriginOffset, setParticleMass, setParticleOrientation, setParticlesInWorldCoords, setParticleSpinSpeed, setParticleType, setRamp, setReleaseRate, setReleaseVariance, setRepeatType, setRotateWithScene, setRotMatrix, setSpeed, setStartColor, setStartMass, setStartSize, setStartSpin, setStartTexIndex, setTexAnimation, setTexQuantity, setUpVector, setVelocityAligned, setWorldEmit, updateGeometricState, updateInvScale, updateRotationMatrix, updateWorldBound, updateWorldBoundManually, warmUp, write
 
Methods inherited from class com.jme.scene.Node
applyRenderState, attachChild, attachChildAt, childChange, detachAllChildren, detachChild, detachChildAt, detachChildNamed, findPick, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, lockBounds, lockMeshes, lockShadows, lockTransforms, setModelBound, sortLights, swapChildren, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldData, updateWorldVectors
 
Methods inherited from class com.jme.scene.Spatial
calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getClassTag, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBranch, lockMeshes, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBranch, unlockMeshes, updateRenderState, updateRenderState, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, worldToLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Constructor Detail

ParticleLines

public ParticleLines()

ParticleLines

public ParticleLines(java.lang.String name,
                     int numParticles)
Method Detail

initializeParticles

protected void initializeParticles(int numParticles)
Specified by:
initializeParticles in class ParticleSystem

getParticleType

public ParticleSystem.ParticleType getParticleType()
Description copied from class: ParticleSystem
Get which emittype method is being used by the underlying system. One of ParticleType.Quad, ParticleType.Triangle, ParticleType.Point, ParticleType.Line, ParticleType.GeomMesh

Overrides:
getParticleType in class ParticleSystem
Returns:
An int representing the type of particle we are emitting.

draw

public void draw(Renderer r)
Description copied from class: Node
draw calls the onDraw method for each child maintained by this node.

Overrides:
draw in class Node
Parameters:
r - the renderer to draw to.
See Also:
Spatial.draw(com.jme.renderer.Renderer)

getParticleGeometry

public Line getParticleGeometry()
Specified by:
getParticleGeometry in class ParticleSystem

isAntialiased

public boolean isAntialiased()
Returns:
true if lines are to be antialiased

setAntialiased

public void setAntialiased(boolean antialiased)
Sets whether the line should be antialiased. May decrease performance. If you want to enabled antialiasing, you should also use an alphastate with a source of SourceFunction.SourceAlpha and a destination of DestinationFunction.OneMinusSourceColor or DestinationFunction.One.

Parameters:
antialiased - true if the line should be antialiased.

getMode

public Line.Mode getMode()
Returns:
line mode
See Also:
Line.Mode

setMode

public void setMode(Line.Mode mode)
Parameters:
mode - Line mode.
See Also:
Line.Mode

getLineWidth

public float getLineWidth()
Returns:
the width of this line.

setLineWidth

public void setLineWidth(float lineWidth)
Sets the width of each line when drawn. Non anti-aliased line widths are rounded to the nearest whole number by opengl.

Parameters:
lineWidth - The lineWidth to set.

getStipplePattern

public short getStipplePattern()
Returns:
the set stipplePattern. 0xFFFF means no stipple.

setStipplePattern

public void setStipplePattern(short stipplePattern)
The stipple or pattern to use when drawing the particle lines. 0xFFFF is a solid line.

Parameters:
stipplePattern - a 16bit short whose bits describe the pattern to use when drawing this line

getStippleFactor

public int getStippleFactor()
Returns:
the set stippleFactor.

setStippleFactor

public void setStippleFactor(int stippleFactor)
Parameters:
stippleFactor - magnification factor to apply to the stipple pattern.

findCollisions

public void findCollisions(Spatial scene,
                           CollisionResults results)
Description copied from class: Spatial
checks this spatial against a second spatial, any collisions are stored in the results object.

Overrides:
findCollisions in class Node
Parameters:
scene - the scene to test against.
results - the results of the collisions.

hasCollision

public boolean hasCollision(Spatial scene,
                            boolean checkTriangles)
Description copied from class: Spatial
Checks this spatial against a second spatial for collisions.

Overrides:
hasCollision in class Node
Parameters:
scene - the scene to test against.
checkTriangles - check for collisions on triangle accuracy level
Returns:
true if any collision were found