00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __RBD_ColliderSDF_h__
00016 #define __RBD_ColliderSDF_h__
00017
00018
00019 #include "RBD_API.h"
00020 #include "RBD_Solver.h"
00021 #include "RBD_Object.h"
00022 #include "RBD_Utils.h"
00023
00024 #include <SIM/SIM_Collider.h>
00025 #include <SIM/SIM_Utils.h>
00026
00027 class SIM_Object;
00028 class SIM_Random;
00029 class SIM_SDF;
00030 class RBD_State;
00031 class RBD_ContactGraph;
00032 class RBD_ObjectTree;
00033
00034 class RBD_API RBD_ColliderSDF : public SIM_Collider
00035 {
00036 public:
00037
00038
00039 void intersectRBDObjects(SIM_IsectPriorityQueue &queue,
00040 RBD_Object *obj_a, RBD_Object *obj_b,
00041 bool findany,
00042 bool finddeepest,
00043 fpreal depthtol,
00044 bool ignorevel,
00045 bool usesdfvel,
00046 bool usepointvel) const;
00047
00048 protected:
00049 explicit RBD_ColliderSDF(const SIM_DataFactory *factory);
00050 virtual ~RBD_ColliderSDF();
00051
00052
00053
00054
00055
00056
00057
00058 virtual bool collideObjectsSubclass(SIM_Engine &engine,
00059 SIM_Object &object,
00060 SIM_Object &affector,
00061 const SIM_Time &startTime,
00062 const SIM_Time &endTime,
00063 SIM_ImpactApplyType implactapplytype,
00064 int impactflags) const;
00065
00066
00067
00068 void findVertexIntersections(SIM_IsectPriorityQueue &queue,
00069 RBD_Object *obj_a,
00070 RBD_Object *obj_b,
00071 bool reverseobj,
00072 bool findany,
00073 bool finddeepest,
00074 fpreal depthtol,
00075 bool ignorevel,
00076 bool usesdfvel,
00077 bool usepointvel,
00078 int child_id_a,
00079 int child_id_b) const;
00080
00081
00082
00083 static const SIM_DopDescription *getDopDescription();
00084 DECLARE_STANDARD_GETCASTTOTYPE();
00085 DECLARE_DATAFACTORY(RBD_ColliderSDF,
00086 SIM_Collider,
00087 "Volume/Volume Collider",
00088 getDopDescription());
00089 };
00090
00091 #endif