Go to the documentation of this file.
48 #ifndef vtkFunctionParser_h
49 #define vtkFunctionParser_h
54 #define VTK_PARSER_IMMEDIATE 1
55 #define VTK_PARSER_UNARY_MINUS 2
58 #define VTK_PARSER_ADD 3
59 #define VTK_PARSER_SUBTRACT 4
60 #define VTK_PARSER_MULTIPLY 5
61 #define VTK_PARSER_DIVIDE 6
62 #define VTK_PARSER_POWER 7
63 #define VTK_PARSER_ABSOLUTE_VALUE 8
64 #define VTK_PARSER_EXPONENT 9
65 #define VTK_PARSER_CEILING 10
66 #define VTK_PARSER_FLOOR 11
67 #define VTK_PARSER_LOGARITHM 12
68 #define VTK_PARSER_LOGARITHME 13
69 #define VTK_PARSER_LOGARITHM10 14
70 #define VTK_PARSER_SQUARE_ROOT 15
71 #define VTK_PARSER_SINE 16
72 #define VTK_PARSER_COSINE 17
73 #define VTK_PARSER_TANGENT 18
74 #define VTK_PARSER_ARCSINE 19
75 #define VTK_PARSER_ARCCOSINE 20
76 #define VTK_PARSER_ARCTANGENT 21
77 #define VTK_PARSER_HYPERBOLIC_SINE 22
78 #define VTK_PARSER_HYPERBOLIC_COSINE 23
79 #define VTK_PARSER_HYPERBOLIC_TANGENT 24
80 #define VTK_PARSER_MIN 25
81 #define VTK_PARSER_MAX 26
82 #define VTK_PARSER_SIGN 28
85 #define VTK_PARSER_CROSS 27
86 #define VTK_PARSER_VECTOR_UNARY_MINUS 29
87 #define VTK_PARSER_DOT_PRODUCT 30
88 #define VTK_PARSER_VECTOR_ADD 31
89 #define VTK_PARSER_VECTOR_SUBTRACT 32
90 #define VTK_PARSER_SCALAR_TIMES_VECTOR 33
91 #define VTK_PARSER_VECTOR_TIMES_SCALAR 34
92 #define VTK_PARSER_VECTOR_OVER_SCALAR 35
93 #define VTK_PARSER_MAGNITUDE 36
94 #define VTK_PARSER_NORMALIZE 37
97 #define VTK_PARSER_IHAT 38
98 #define VTK_PARSER_JHAT 39
99 #define VTK_PARSER_KHAT 40
102 #define VTK_PARSER_IF 41
105 #define VTK_PARSER_VECTOR_IF 42
108 #define VTK_PARSER_LESS_THAN 43
111 #define VTK_PARSER_GREATER_THAN 44
114 #define VTK_PARSER_EQUAL_TO 45
117 #define VTK_PARSER_AND 46
120 #define VTK_PARSER_OR 47
125 #define VTK_PARSER_BEGIN_VARIABLES 48
128 #define VTK_PARSER_ERROR_RESULT VTK_FLOAT_MAX
161 double *
r = this->GetVectorResult();
186 double yValue,
double zValue);
200 double *
r = this->GetVectorVariableValue(variableName);
204 double *
r = this->GetVectorVariableValue(i);
int NumberOfVectorVariables
int GetMathConstantNumber(int currentIndex)
double GetScalarVariableValue(int i)
int GetMathFunctionStringLength(int mathFunctionNumber)
double * GetVectorResult()
int DisambiguateOperators()
int GetMathConstantStringLength(int mathConstantNumber)
void SetVectorVariableValue(int i, const double values[3])
int IsElementaryOperator(int op)
record modification and/or execution time
int GetMathFunctionNumberByCheckingParenthesis(int currentIndex)
void InvalidateFunction()
#define vtkTypeMacro(thisClass, superclass)
abstract base class for most VTK objects
void SetVectorVariableValue(int i, double xValue, double yValue, double zValue)
char ** ScalarVariableNames
void RemoveScalarVariables()
vtkTimeStamp FunctionMTime
int IsVariableName(int currentIndex)
unsigned long int GetMTime()
#define VTKCOMMONMISC_EXPORT
void SetScalarVariableValue(int i, double value)
static vtkFunctionParser * New()
char * RemoveSpacesFrom(const char *variableName)
int GetVariableNameLength(int variableNumber)
void SetVectorVariableValue(const char *variableName, const double values[3])
GLsizei const GLfloat * value
void GetVectorVariableValue(const char *variableName, double value[3])
int OperatorWithinVariable(int idx)
GLboolean GLenum GLenum GLvoid * values
int NumberOfScalarVariables
void CheckExpression(int &pos, char **error)
vtkTimeStamp EvaluateMTime
a simple class to control print indentation
void SetScalarVariableValue(const char *variableName, double value)
unsigned char GetOperandNumber(int currentIndex)
unsigned char GetElementaryOperatorNumber(char op)
#define vtkSetStringMacro(name)
void BuildInternalSubstringStructure(int beginIndex, int endIndex)
double * ScalarVariableValues
double ** VectorVariableValues
#define vtkGetMacro(name, type)
double GetScalarVariableValue(const char *variableName)
vtkGetStringMacro(ExtensionsString)
int FindPositionInOriginalFunction(const int &pos)
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro(IgnoreDriverBugs, bool)
int FindEndOfMathConstant(int beginIndex)
GLdouble GLdouble GLdouble r
char * FunctionWithSpaces
void GetVectorVariableValue(int i, double value[3])
double * GetVectorVariableValue(int i)
int FindEndOfMathFunction(int beginIndex)
Parse and evaluate a mathematical expression.
void GetVectorResult(double result[3])
void AddInternalByte(unsigned char newByte)
void CopyParseError(int &position, char **error)
void RemoveVectorVariables()
vtkTimeStamp VariableMTime
char * GetVectorVariableName(int i)
char ** VectorVariableNames
void SetFunction(const char *function)
void SetVectorVariableValue(const char *variableName, double xValue, double yValue, double zValue)
double * GetVectorVariableValue(const char *variableName)
int BuildInternalFunctionStructure()
void PrintSelf(ostream &os, vtkIndent indent)
int IsSubstringCompletelyEnclosed(int beginIndex, int endIndex)
int GetMathFunctionNumber(int currentIndex)
void RemoveAllVariables()
char * GetScalarVariableName(int i)