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 Particle
  • Constructor Details

    • ShapeParticle

      protected ShapeParticle(float width, float height)
  • Method Details

    • getShape

      protected abstract Shape getShape(Point2D emitterOrigin)
    • getBoundingBox

      public Rectangle2D getBoundingBox(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(Graphics2D g, Point2D emitterOrigin)
      Specified by:
      render in class Particle