Curve
class Curve
Curve is a graph of lines (X and Y) on which points can be placed to determine the value of some attribute.
public class Curve
— Constructors (1) —
Constructor | Description |
---|---|
Curve() | Creates a new Curve instance. |
— Enumerators (1) —
public enum WrapMode{
Loop, ClampToBorder, PingPong
}
— Methods (12) —
Name | Description |
---|---|
void addPoint(float x, float y) | Adds a point on the axes (X and Y) defined to be arguments. |
void setPoint(int idx, float x, float y) | Defines a point on the axes (X and Y) defined to be arguments based on an index. |
Vector2 pointAt(int idx) | Defines a point based on an index for both axes (X and Y). |
Vector2 pointAt(int idx, Vector2 out) | Defines a point based on an index for both axes (X and Y) and applies it to another Vector. |
void clear() | Erases all curve points. |
int pointsCount() | Returns the number of points on the Curve. |
float evaluate(float x) | Evaluates the curve at the time. |
void apply() | Applies all modifications made to the Curve. |
[WrapMode] getWrapMode() | Returns the execution mode of the Curve ("Loop", "ClampToBorder" or "PingPong"). |
void setWrapMode([WrapMode] wrapMode) | Defines the execution mode of the Curve ("Loop", "ClampToBorder" or "PingPong"). |
String toJson() | Converts from Curve to a "Json". |
Curve fromJson(String json) | Converts from Curve to a "Json". |