Navigation
API > API/Plugins > API/Plugins/CurveExpression
References
| Module | CurveExpression |
| Header | /Engine/Plugins/Experimental/Animation/CurveExpression/Source/Runtime/Public/ExpressionEvaluator.h |
| Include | #include "ExpressionEvaluator.h" |
Syntax
class FEngine
Remarks
Simple, fast expression evaluation engine. Can evaluate simple arithmetic expressions, including user-settable constants. 1 + 1 foo + (3.0 * bar)
Allowable operands are taken from Python and are currently as follow: -x Unary negation x + y Addition x - y Subtraction x * y Multiplication x / y Division (div-by-zero returns zero) x ** y Raise x to y's power x // y Division and rounding down.
Terms can also be grouped by parentheses '(' and ')'.
Constants that begin with a number, include spaces or any of the above operands/parentheses are allowed, but must be then enclosed in single quotes when referenced. E.g: 'foo(1)' * 2.0 rather than: foo (1) * 2.0
Functions
| Type | Name | Description | |
|---|---|---|---|
| TOptional< float > | Evaluate
(
FStringView InExpression, |
Evaluate an expression directly and returns the result. | |
| float | Execute
(
const FExpressionObject& InExpressionObject, |
Executes the given expression object. | |
| TVariant< FExpressionObject, FParseError > | Parse an expression and either receive an error or a expression execution object that matches this evaluator. | ||
| TOptional< FParseError > | Verify an expression. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EOperatorToken |
Typedefs
| Name | Description |
|---|---|
| FToken | |
| FunctionType |
Constants
| Name | Description |
|---|---|
| FunctionNameIndex | |
| Functions |