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 Particle
  • 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: Particle
      Gets the current bounding box of the particle, depending on its spawn location.
      Overrides:
      getBoundingBox in class Particle
      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)
      Specified by:
      render in class Particle