00001 // rdBodyConstraint.h 00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00003 // AUTHOR: Frank C. Anderson 00004 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00005 #ifndef __rdBodyConstraint_h__ 00006 #define __rdBodyConstraint_h__ 00007 00008 00009 //============================================================================== 00010 // INCLUDES 00011 //============================================================================== 00012 #include "rdTools.h" 00013 #include "rdPointConstraint.h" 00014 //class rdPointConstraint; 00015 00016 00017 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00018 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00025 class RDTOOLS_API rdBodyConstraint 00026 { 00027 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00028 //============================================================================== 00029 // DATA 00030 //============================================================================== 00031 public: 00032 int _id; // BODY ID 00033 rdPointConstraint _pc[3]; // POINT CONSTRAINTS (3 MAX, for now) 00034 00035 //============================================================================== 00036 // METHODS 00037 //============================================================================== 00038 public: 00039 //--------------------------------------------------------------------------- 00040 // CONSTRUCTION 00041 //--------------------------------------------------------------------------- 00042 virtual ~rdBodyConstraint(); 00043 rdBodyConstraint(); 00044 00045 //--------------------------------------------------------------------------- 00046 // SET AND GET 00047 //--------------------------------------------------------------------------- 00048 int getNC(); 00049 void setID(int aID); 00050 int getID(); 00051 rdPointConstraint* getPC(int aI); 00052 00053 //--------------------------------------------------------------------------- 00054 // CONSTRAINT CONSTRUCTION 00055 //--------------------------------------------------------------------------- 00056 void setValues(int aN,int aID[],double aV[][3]); 00057 void constructConstraintsForPoint1(); 00058 void constructConstraintsForPoint2(); 00059 double* findMostOrthogonal(rdPointConstraint *aPC,double aV[3]); 00060 00061 //--------------------------------------------------------------------------- 00062 // UTILITY 00063 //--------------------------------------------------------------------------- 00064 void clear(); 00065 void clearValues(); 00066 00067 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00068 }; // END class rdBodyConstraint 00069 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00070 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00071 00072 00073 #endif // #ifndef __rdBodyConstraint_h__
1.3