00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GU_LSysExpr_h__
00020 #define __GU_LsysExpr_h__
00021
00022 #include "GU_API.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include <limits.h>
00034
00035 #include <UT/UT_SymbolTable.h>
00036 #include <UT/UT_PtrArray.h>
00037
00038 class GU_Detail;
00039 class IMG_Raster;
00040
00041 #define LSYS_EXPR_UNUSED (FLT_MAX)
00042 #define LSYS_MAX_PARAMS 5
00043
00044 class GU_API GU_LSysExpr {
00045
00046 public:
00047
00048 GU_LSysExpr(void);
00049 ~GU_LSysExpr(void);
00050
00051 float &operator[](unsigned i) { return val[i]; }
00052
00053 int evalExpr(char *src, char *dest,
00054 float *var[LSYS_MAX_PARAMS]);
00055
00056 float eval(char *str);
00057
00058 IMG_Raster *picRaster;
00059 GU_Detail *meta;
00060 float (*getChanValue)(int ind, void *data);
00061 void *callbackData;
00062
00063 const char *getString(int idx) const;
00064 int addString(const char *str);
00065
00066 private:
00067 UT_SymbolTable myStrings;
00068 UT_PtrArray<char *> myStringLUT;
00069
00070 float val[256];
00071
00072 };
00073
00074 #endif
00075