Package test

Class Particle

java.lang.Object
test.Particle

public class Particle extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private float
     
    private float
     
    (package private) int[]
     
    private float
     
    private float
     
    private float
     
    private float
     
    private float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Particle(float x, float y, float r)
     
    Particle(float x, float y, float r, float vx, float vy)
     
    Particle(float x, float y, float r, float vx, float vy, float ax, float ay)
     
    Particle(float x, float y, float r, float vx, float vy, float ax, float ay, int[] color)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyAcceleration(float ax, float ay)
     
    void
    applyForce(float a, float theta)
     
    float
     
    float
     
    float
     
    void
    update(processing.core.PApplet app)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • x

      private float x
    • y

      private float y
    • r

      private float r
    • vx

      private float vx
    • vy

      private float vy
    • ax

      private float ax
    • ay

      private float ay
    • color

      int[] color
  • Constructor Details

    • Particle

      public Particle(float x, float y, float r)
    • Particle

      public Particle(float x, float y, float r, float vx, float vy)
    • Particle

      public Particle(float x, float y, float r, float vx, float vy, float ax, float ay)
    • Particle

      public Particle(float x, float y, float r, float vx, float vy, float ax, float ay, int[] color)
  • Method Details

    • update

      public void update(processing.core.PApplet app)
    • applyForce

      public void applyForce(float a, float theta)
    • applyAcceleration

      public void applyAcceleration(float ax, float ay)
    • getX

      public float getX()
    • getY

      public float getY()
    • getR

      public float getR()