00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00030
00031 #ifndef ARMAGETRON_veMath_h
00032 #define ARMAGETRON_veMath_h
00033
00034 #include <math.h>
00035 #include "tRandom.h"
00036
00037 long int ve_math_random();
00038 #include "values/vCore.h"
00039 #include "values/vebCFunction.h"
00040
00041
00042 namespace vValue {
00043 namespace Expr {
00044 namespace Math {
00045
00046 class Add : public BinaryOp {
00047 public:
00048 Add(BasePtr lvalue, BasePtr rvalue) : BinaryOp(lvalue, rvalue) {};
00049 Add(BinaryOp const &other) : BinaryOp(other) {};
00050
00051 virtual Variant GetValue(void) const;
00052 virtual Base *copy(void) const;
00053 };
00054 class Subtract : public BinaryOp {
00055 public:
00056 Subtract(BasePtr lvalue, BasePtr rvalue) : BinaryOp(lvalue, rvalue) {};
00057 Subtract(BinaryOp const &other) : BinaryOp(other) {};
00058
00059 virtual Variant GetValue(void) const;
00060 virtual Base *copy(void) const;
00061 };
00062 class Multiply : public BinaryOp {
00063 public:
00064 Multiply(BasePtr lvalue, BasePtr rvalue) : BinaryOp(lvalue, rvalue) {};
00065 Multiply(BinaryOp const &other) : BinaryOp(other) {};
00066
00067 virtual Variant GetValue(void) const;
00068 virtual Base *copy(void) const;
00069 };
00070 class Divide : public BinaryOp {
00071 public:
00072 Divide(BasePtr lvalue, BasePtr rvalue) : BinaryOp(lvalue, rvalue) {};
00073 Divide(BinaryOp const &other) : BinaryOp(other) {};
00074
00075 virtual Variant GetValue(void) const;
00076 virtual Base *copy(void) const;
00077 };
00078
00079 typedef Bindings::CFunction::fZeroary<long int, ve_math_random> Random;
00080
00081 namespace Trig {
00082
00083 typedef Bindings::CFunction::fUnary<float, float, sinf> Sin;
00084
00085 }
00086 }
00087 }
00088 }
00089
00090 #endif