00001 /* collisionset.h stores collision set, that is one half of 00002 the object that are involved into collsion 00003 detection. 00004 Physical Based Simulation, ETH Zuerich 00005 Rene Mueller, June 16th, 2003 */ 00006 00007 #ifndef _RAPID_H_ 00008 #define _RAPID_H_ 00009 00010 #include <RAPID.H> 00011 #include "model.h" 00012 00014 typedef struct ModelList { 00016 ModelList* next; 00017 00019 Model* model; 00020 } ModelList; 00021 00023 00032 class CollisionSet { 00033 public: 00034 00036 CollisionSet(); 00037 00039 00045 bool insert(Model* model); 00046 00048 00053 bool contains(Model* model); 00054 00056 00059 void setTranslation(double t[3]); 00060 00061 00063 00066 void setOrientation(double o[3][3]); 00067 00069 00076 static bool checkForCollision(CollisionSet *setA, CollisionSet *setB); 00077 00078 00080 double translation[3]; 00081 00083 double orientation[3][3]; 00084 00086 ~CollisionSet(); 00087 00088 00089 private: 00090 00091 // root node of linked list 00092 ModelList* root; 00093 00094 00095 }; 00096 00097 #endif // _RAPID_H_ 00098