Class Velocity

java.lang.Object
tripleplay.particle.init.Velocity

public class Velocity extends Object
Initializers for a particle's velocity.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    constant(pythagoras.f.Vector velocity)
    Returns an initializer that provides a constant velocity.
    increment(float dx, float dy)
    Returns an initializer that increments the previously assigned velocity by the specified amounts.
    randomCircle(Randoms rando, float maximum)
    Returns an initializer that provides a velocity in a random direction with the specified maximum magnitude.
    randomCircle(Randoms rando, float min, float max)
    Returns an initializer that provides a velocity in a random direction with the specified minimum and maximum magnitude.
    randomNormal(Randoms rando, float mean, float dev)
    Returns an initializer that provides a normally distributed random velocity with the specified mean and standard deviation parameters.
    randomNormal(Randoms rando, float xMean, float xDev, float yMean, float yDev)
    Returns an initializer that provides a normally distributed random velocity with the specified mean and standard deviation parameters.
    randomSquare(Randoms rando, float xRange, float yRange)
    Returns an initializer that provides a uniformly distributed random velocity.
    randomSquare(Randoms rando, float minX, float maxX, float minY, float maxY)
    Returns an initializer that provides a uniformly distribted random velocity in the range minX to maxX and similarly for the y direction.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Velocity

      public Velocity()
  • Method Details

    • constant

      public static Initializer constant(pythagoras.f.Vector velocity)
      Returns an initializer that provides a constant velocity.
    • randomSquare

      public static Initializer randomSquare(Randoms rando, float xRange, float yRange)
      Returns an initializer that provides a uniformly distributed random velocity.
      Parameters:
      xRange - x velocity will range from -xRange/2 to xRange/2.
      yRange - y velocity will range from -yRange/2 to yRange/2.
    • randomSquare

      public static Initializer randomSquare(Randoms rando, float minX, float maxX, float minY, float maxY)
      Returns an initializer that provides a uniformly distribted random velocity in the range minX to maxX and similarly for the y direction.
    • randomNormal

      public static Initializer randomNormal(Randoms rando, float mean, float dev)
      Returns an initializer that provides a normally distributed random velocity with the specified mean and standard deviation parameters.
    • randomNormal

      public static Initializer randomNormal(Randoms rando, float xMean, float xDev, float yMean, float yDev)
      Returns an initializer that provides a normally distributed random velocity with the specified mean and standard deviation parameters.
    • randomCircle

      public static Initializer randomCircle(Randoms rando, float maximum)
      Returns an initializer that provides a velocity in a random direction with the specified maximum magnitude.
    • randomCircle

      public static Initializer randomCircle(Randoms rando, float min, float max)
      Returns an initializer that provides a velocity in a random direction with the specified minimum and maximum magnitude.
    • increment

      public static Initializer increment(float dx, float dy)
      Returns an initializer that increments the previously assigned velocity by the specified amounts.