00001
00002
00003
00004
00005 #ifndef __rdPointConstraint_h__
00006 #define __rdPointConstraint_h__
00007
00008
00009 #include "rdTools.h"
00010
00011
00012
00013
00028 class RDTOOLS_API rdPointConstraint
00029 {
00030
00031
00032
00033
00034 public:
00035 int _id;
00036 double _p[3];
00037 double _v[3];
00038 double _c0[3];
00039 double _c1[3];
00040 double _c2[3];
00041
00042
00043
00044
00045 public:
00046
00047
00048
00049 virtual ~rdPointConstraint();
00050 rdPointConstraint(int aID=0);
00051 rdPointConstraint(double aP[3],double aV[3],
00052 double aC0[3],double aC1[3],double aC2[3],int aID=0);
00053
00054
00055
00056
00057 int getNC();
00058 void setID(int aID);
00059 int getID();
00060 void setPoint(double aP[3]);
00061 void setPoint(double aP0,double aP1,double aP2);
00062 void getPoint(double aP[3]);
00063 double* getPoint();
00064 void setValue(double aP[3]);
00065 void setValue(double aP0,double aP1,double aP2);
00066 void getValue(double aP[3]);
00067 double* getValue();
00068 void setC0(double aC[3]);
00069 void setC0(double aC0,double aC1,double aC2);
00070 void getC0(double *aC);
00071 double* getC0();
00072 void setC1(double aC[3]);
00073 void setC1(double aC0,double aC1,double aC2);
00074 void getC1(double *aC);
00075 double* getC1();
00076 void setC2(double aC[3]);
00077 void setC2(double aC0,double aC1,double aC2);
00078 void getC2(double *aC);
00079 double* getC2();
00080
00081
00082
00083
00084 double evaluateC0(double aV[3]);
00085 double evaluateC1(double aV[3]);
00086 double evaluateC2(double aV[3]);
00087
00088
00089
00090
00091 void constructOrthoNormalConstraints(double aV[3],double aC0[3]);
00092 void constructOrthoNormalC1(double aV[3]);
00093 void constructOrthoNormalC2();
00094 void normalizeConstraints();
00095 void zeroConstraints();
00096 void clear();
00097
00098
00099 };
00100
00101
00102
00103
00104 #endif // #ifndef __rdPointConstraint_h__