00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _OP_OPTIONS_H_
00022 #define _OP_OPTIONS_H_
00023
00024 #include "OP_API.h"
00025 #include <UT/UT_DMatrix4.h>
00026 #include <UT/UT_Options.h>
00027
00028 class OP_Node;
00029 class PRM_Template;
00030
00031
00032
00033
00034
00035 class OP_API OP_Options : public UT_Options
00036 {
00037 public:
00038 explicit OP_Options();
00039 virtual ~OP_Options();
00040
00041
00042
00043
00044
00045 void interpolate(const OP_Options &source1,
00046 const OP_Options &source2,
00047 fpreal interp);
00048
00049
00050
00051
00052
00053 void setOptionFromTemplate(OP_Node *node,
00054 const PRM_Template &tplate,
00055 int pi, fpreal time);
00056
00057
00058
00059
00060 void setOptionFromParm(OP_Node *node, int pi, int vi,
00061 fpreal time);
00062
00063
00064
00065
00066
00067
00068 void setOptionFromTemplateDefault(const PRM_Template &tp);
00069
00070
00071
00072
00073
00074 bool setOptionFromCommand(const char *optionname,
00075 const char *optionvalue,
00076 fpreal optionvaluefloat,
00077 UT_OptionType optiontype);
00078
00079
00080
00081 UT_DMatrix4 getTransformFromOptions() const;
00082
00083
00084 const OP_Options &operator=(const UT_Options &src);
00085
00086 protected:
00087
00088
00089
00090
00091
00092 virtual void optionChanged(const char *name);
00093
00094
00095 virtual void getInterpolatedInt(int &value,
00096 const char *name,
00097 int source1,
00098 int source2,
00099 fpreal interp) const;
00100 virtual void getInterpolatedBool(bool &value,
00101 const char *name,
00102 bool source1,
00103 bool source2,
00104 fpreal interp) const;
00105 virtual void getInterpolatedFpreal(fpreal &value,
00106 const char *name,
00107 fpreal source1,
00108 fpreal source2,
00109 fpreal interp) const;
00110 virtual void getInterpolatedString(UT_String &value,
00111 const char *name,
00112 const UT_String &source1,
00113 const UT_String &source2,
00114 fpreal interp) const;
00115 virtual void getInterpolatedVector2(UT_Vector2 &value,
00116 const char *name,
00117 const UT_Vector2 &source1,
00118 const UT_Vector2 &source2,
00119 fpreal interp) const;
00120 virtual void getInterpolatedVector3(UT_Vector3 &value,
00121 const char *name,
00122 const UT_Vector3 &source1,
00123 const UT_Vector3 &source2,
00124 fpreal interp) const;
00125 virtual void getInterpolatedVector4(UT_Vector4 &value,
00126 const char *name,
00127 const UT_Vector4 &source1,
00128 const UT_Vector4 &source2,
00129 fpreal interp) const;
00130 virtual void getInterpolatedQuaternion(UT_Quaternion &value,
00131 const char *name,
00132 const UT_Quaternion &source1,
00133 const UT_Quaternion &source2,
00134 fpreal interp) const;
00135 virtual void getInterpolatedMatrix3(UT_Matrix3 &value,
00136 const char *name,
00137 const UT_Matrix3 &source1,
00138 const UT_Matrix3 &source2,
00139 fpreal interp) const;
00140 virtual void getInterpolatedMatrix4(UT_Matrix4 &value,
00141 const char *name,
00142 const UT_Matrix4 &source1,
00143 const UT_Matrix4 &source2,
00144 fpreal interp) const;
00145
00146 private:
00147 explicit OP_Options(const OP_Options &src);
00148 };
00149
00150 #endif
00151