VuoMathExpressionParser implementation.
- Copyright
- Copyright © 2012–2016 Kosada Incorporated. This code may be modified and distributed under the terms of the MIT License. For more information, see http://vuo.org/license.
|
const char * | VuoMathExpressionError_getMessage (VuoMathExpressionError error) |
| Returns a description of the error.
|
|
VuoList_VuoInteger | VuoMathExpressionError_getExpressionIndices (VuoMathExpressionError error) |
| Returns a sorted list of the indices of the math expressions causing the error.
|
|
void | VuoMathExpressionError_free (VuoMathExpressionError error) |
| Destructor.
|
|
static double | deg2rad (double degrees) |
| Converts degrees to radians.
|
|
static double | rad2deg (double radians) |
| Converts radians to degrees.
|
|
static double | muparser_rint (double x) |
| As defined by muParserTemplateMagic.h.
|
|
static double | fract (double x) |
| As defined by https://www.opengl.org/sdk/docs/man/html/fract.xhtml.
|
|
static double | clamp (double x, double minVal, double maxVal) |
| As defined by https://www.opengl.org/sdk/docs/man/html/clamp.xhtml.
|
|
static double | step (double edge, double x) |
| As defined by https://www.opengl.org/sdk/docs/man/html/step.xhtml.
|
|
static double | smoothstep (double edge0, double edge1, double x) |
| As defined by https://www.opengl.org/sdk/docs/man/html/smoothstep.xhtml.
|
|
static double | mix (double x, double y, double a) |
| As defined by https://www.opengl.org/sdk/docs/man/html/mix.xhtml.
|
|
void | VuoMathExpressionParser_defineStandardLibrary (void *p) |
| Given a pointer to a mu::Parser instance, adds Vuo's standard operators, constants, and functions.
|
|
static vector< string > | splitSingleExpressionOnAssignmentOperators (string expression) |
| Returns the parts of expression separated by (and not including) the assignment operator ("=").
|
|
static void | checkSyntaxOfSingleExpression (string expression, VuoMathExpressionError *error) |
| Checks that expression contains a syntactically valid, single math expression with at most one assignment operator.
|
|
static void | checkSyntaxOfMultipleExpressions (VuoList_VuoText expressions, VuoMathExpressionError *error) |
| Checks that each single math expression in expressions satisfies checkSyntaxOfSingleExpression().
|
|
static void | parseVariablesFromSingleExpression (string expression, vector< string > &inputVariableNames, string &outputVariableName, VuoMathExpressionError *error) |
| Parses the unique variable names from expression and puts them in inputVariableNames and outputVariableName.
|
|
static void | parseVariablesFromMultipleExpressions (VuoList_VuoText expressions, vector< string > &inputVariableNames, vector< string > &outputVariableNames, VuoMathExpressionError *error) |
| Parses the unique variable names from expressions and puts them in inputVariableNames and outputVariableNames.
|
|
void | VuoMathExpressionParser_free (void *me) |
| Destroys me, a VuoMathExpressionParser.
|
|
VuoMathExpressionParser | VuoMathExpressionParser_makeFromSingleExpression (VuoText expression, VuoMathExpressionError *error) |
| Parses expression (e.g.
|
|
VuoMathExpressionParser | VuoMathExpressionParser_makeFromMultipleExpressions (VuoList_VuoText expressions, VuoMathExpressionError *error) |
| Parses expressions (e.g.
|
|
VuoList_VuoText | VuoMathExpressionParser_getInputVariables (VuoMathExpressionParser m) |
| Returns the unique input variable names from the parsed expression(s), in alphabetical order.
|
|
VuoList_VuoText | VuoMathExpressionParser_getOutputVariables (VuoMathExpressionParser m) |
| Returns the output variable names from the parsed expression(s), in the order they appeared.
|
|
VuoDictionary_VuoText_VuoReal | VuoMathExpressionParser_calculate (VuoMathExpressionParser m, VuoDictionary_VuoText_VuoReal inputValues) |
| Evaluates the parsed expression(s).
|
|
|
static double | sinInDegrees (double degrees) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | cosInDegrees (double degrees) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | tanInDegrees (double degrees) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | asinInDegrees (double x) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | acosInDegrees (double x) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | atanInDegrees (double x) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | atan2InDegrees (double y, double x) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | sinhInDegrees (double degrees) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | coshInDegrees (double degrees) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | tanhInDegrees (double degrees) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | asinhInDegrees (double x) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | acoshInDegrees (double x) |
| Trigonometric functions that take degrees instead of radians.
|
|
static double | atanhInDegrees (double x) |
| Trigonometric functions that take degrees instead of radians.
|
|
|
static double | perlin2d (double x, double y) |
| Gradient noise wrappers.
|
|
static double | perlin3d (double x, double y, double z) |
| Gradient noise wrappers.
|
|
static double | perlin4d (double x, double y, double z, double w) |
| Gradient noise wrappers.
|
|
static double | simplex2d (double x, double y) |
| Gradient noise wrappers.
|
|
static double | simplex3d (double x, double y, double z) |
| Gradient noise wrappers.
|
|
static double | simplex4d (double x, double y, double z, double w) |
| Gradient noise wrappers.
|
|