Class ShapeParticle
java.lang.Object
de.gurkenlabs.litiengine.graphics.emitters.particles.Particle
de.gurkenlabs.litiengine.graphics.emitters.particles.ShapeParticle
- All Implemented Interfaces:
ITimeToLive
- Direct Known Subclasses:
EllipseParticle,LineParticle,PolygonParticle,RectangleParticle
public abstract class ShapeParticle
extends ParticleConstructor Summary
Constructors Constructor Description ShapeParticle(float width, float height)Method Summary
Modifier and Type Method Description java.awt.geom.Rectangle2DgetBoundingBox(java.awt.geom.Point2D origin)Gets the current bounding box of the particle, depending on its spawn location.protected abstract java.awt.ShapegetShape(java.awt.geom.Point2D emitterOrigin)voidrender(java.awt.Graphics2D g, java.awt.geom.Point2D emitterOrigin)Methods inherited from class de.gurkenlabs.litiengine.graphics.emitters.particles.Particle
getAbsoluteLocation, getAbsoluteX, getAbsoluteY, getAccelerationX, getAccelerationY, getAliveTime, getAngle, getCollisionType, getColor, getCustomRenderType, getDeltaAngle, getDeltaHeight, getDeltaWidth, getHeight, getOpacity, getRenderLocation, getTimeToLive, getVelocityX, getVelocityY, getWidth, getX, getY, init, isAntiAliased, isContinuousCollisionEnabled, isFading, isFadingOnCollision, isOutlineOnly, isStoppingOnCollision, setAccelerationX, setAccelerationY, setAngle, setAntiAliasing, setCollisionType, setColor, setContinuousCollision, setCustomRenderType, setDeltaAngle, setDeltaHeight, setDeltaWidth, setFade, setFadeOnCollision, setHeight, setOutlineOnly, setStopOnCollision, setTimeToLive, setVelocityX, setVelocityY, setWidth, setX, setY, timeToLiveReached, update, usesCustomRenderType
Constructor Details
ShapeParticle
public ShapeParticle(float width, float height)
Method Details
getShape
protected abstract java.awt.Shape getShape(java.awt.geom.Point2D emitterOrigin)getBoundingBox
public java.awt.geom.Rectangle2D getBoundingBox(java.awt.geom.Point2D origin)Description copied from class:ParticleGets the current bounding box of the particle, depending on its spawn location.- Overrides:
getBoundingBoxin classParticle- Parameters:
origin- the spawn location of this particle- Returns:
- The Rectangular particle bounding box.
render
public void render(java.awt.Graphics2D g, java.awt.geom.Point2D emitterOrigin)
