public class FunctionLoader
extends java.lang.Object
<joint-name>,<function-type>,<support-point-count>,
<phase>,[<support- point>]{ 2...*}
<joint-name>
: String: Name of the joint<function-type>
: String: Name of the function (sinus,
linear, bezier, spline)<support-point-count>
: Integer: The number of support
points in this line<support-point-count>
: Integer: The number of support
points in this line<support-point>
: format v1: two separate float values,
format v2: 2 or 6 in brackets encapsulated, space separated float valuesModifier and Type | Field and Description |
---|---|
static FunctionLoader |
INSTANCE |
static int |
VERSION_1
Constant for format version 1
|
static int |
VERSION_2
Constant for format version 2
|
Constructor and Description |
---|
FunctionLoader() |
Modifier and Type | Method and Description |
---|---|
IFunction |
createFunction(java.lang.String name,
java.util.ArrayList<SupportPoint> supportPoints,
float stiffness) |
IFunction |
fromCSVString(java.lang.String csvLine,
int version) |
java.lang.String[] |
getKnownFunctionTypes() |
java.lang.String |
toCSVString(IFunction function,
int version) |
public static final FunctionLoader INSTANCE
public static final int VERSION_1
public static final int VERSION_2
public java.lang.String[] getKnownFunctionTypes()
public java.lang.String toCSVString(IFunction function, int version)
public IFunction fromCSVString(java.lang.String csvLine, int version)
public IFunction createFunction(java.lang.String name, java.util.ArrayList<SupportPoint> supportPoints, float stiffness)
csvLine
- - the line in the behavior-file defining a functionversion
- - the file format version