Package wtf.choco.dragoneggdrop.particle
Class ParticleVariables
java.lang.Object
wtf.choco.dragoneggdrop.particle.ParticleVariables
public final class ParticleVariables extends Object
Represents a set of variables to be used when parsing and evaluating an expression
in a
ParticleShapeDefinition
.- Author:
- Parker Hawke - Choco
-
Constructor Summary
Constructors Constructor Description ParticleVariables()
Construct a new set of variables where all values are initialized to 0.0ParticleVariables(double x, double y, double z, double t, double theta)
Construct a new set of variables. -
Method Summary
-
Constructor Details
-
ParticleVariables
public ParticleVariables(double x, double y, double z, double t, double theta)Construct a new set of variables.- Parameters:
x
- the initial x valuey
- the initial y valuez
- the initial z valuet
- the initial t valuetheta
- the initial theta value
-
ParticleVariables
public ParticleVariables()Construct a new set of variables where all values are initialized to 0.0
-
-
Method Details
-
getX
public double getX()Get the x variable.- Returns:
- x
-
getY
public double getY()Get the y variable.- Returns:
- y
-
getZ
public double getZ()Get the z variable.- Returns:
- z
-
getT
public double getT()Get the t variable.- Returns:
- t
-
getTheta
public double getTheta()Get the theta variable.- Returns:
- theta
-
get
Get a variable by its name.- Parameters:
name
- the variable namedefaultValue
- the default value to return if no variable with the given name could be found- Returns:
- the value of the variable
-