00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef VEE_VALUE_RANDOM_H
00021 #define VEE_VALUE_RANDOM_H
00022
00023 #include <vee_value.h>
00024 #include <vee_matrix3.h>
00025
00027 class VEE_ValueRandomVector3 : public VEE_Value
00028 {
00029 public:
00030 VEE_ValueRandomVector3();
00031 virtual ~VEE_ValueRandomVector3();
00032
00033 virtual VEE_Value * clone() const;
00034 virtual bool setValue(const char *, VEE_Value *);
00035
00036 virtual bool getVector3(VEE_Vector3 *);
00037
00038 void setRanges(const VEE_Vector3 &minVect, const VEE_Vector3 &maxVect)
00039 { m_randMin = minVect; m_randMax = maxVect; }
00040
00041 void setRotation(const VEE_Matrix3 &rot) { m_randRotation = rot; }
00042
00043 protected:
00044 VEE_Vector3 m_randMin, m_randMax;
00045 VEE_Matrix3 m_randRotation;
00046 };
00047
00050
00052 class VEE_ValueRandomRotation : public VEE_Value
00053 {
00054 public:
00055 VEE_ValueRandomRotation();
00056 virtual ~VEE_ValueRandomRotation();
00057
00058 virtual VEE_Value * clone() const;
00059 virtual bool setValue(const char *, VEE_Value *);
00060
00061 virtual bool getMatrix3(VEE_Matrix3 *);
00062
00063 void setAxes(const VEE_Vector3 &axes) { m_axes = axes; }
00064 void setMaxRotation(float v) { m_maxRotation = v; }
00065
00066 protected:
00067 VEE_Vector3 m_axes;
00068 float m_maxRotation;
00069 };
00070
00073
00075 class VEE_ValueRandomFloat : public VEE_Value
00076 {
00077 public:
00078 VEE_ValueRandomFloat(float fmin = 0.0, float fmax = 1.0);
00079 virtual ~VEE_ValueRandomFloat();
00080
00081 virtual VEE_Value * clone() const;
00082 virtual bool setValue(const char *, VEE_Value *);
00083
00084 virtual bool getFloat(float *);
00085 virtual bool getInt(int *);
00086
00087 void set(float fmin, float fmax)
00088 { m_min = fmin; m_max = fmax, m_range = fmax - fmin; }
00089
00090 protected:
00091 float m_min, m_max, m_range;
00092 };
00093
00094 #endif