Choreonoid  1.8
SSVTreeCollider.h
Go to the documentation of this file.
1 #ifndef __SSV_TREE_COLLIDER_H__
2 #define __SSV_TREE_COLLIDER_H__
3 
4 #include "Opcode/Opcode.h"
5 
6 namespace Opcode {
7 
11 class SSVTreeCollider : public AABBTreeCollider {
12 public:
16  SSVTreeCollider();
17 
21  ~SSVTreeCollider(){};
22 
33  bool Distance(BVTCache& cache, float& minD, Point &point0, Point&point1,
34  const Matrix4x4* world0=null, const Matrix4x4* world1=null);
35 
44  bool Collide(BVTCache& cache, double tolerance,
45  const Matrix4x4* world0=null, const Matrix4x4* world1=null);
46 
47 protected:
54  float SsvSsvDist(const AABBCollisionNode* b0, const AABBCollisionNode *b1);
55 
64  float PrimDist(udword id0, udword id1, Point& point0, Point& point1);
65 
66 private:
67  void Distance(const AABBCollisionTree* tree0,
68  const AABBCollisionTree* tree1,
69  const Matrix4x4* world0, const Matrix4x4* world1,
70  Pair* cache, float& minD, Point &point0, Point&point1);
71 
72  void _Distance(const AABBCollisionNode* b0, const AABBCollisionNode* b1,
73  float& minD, Point& point0, Point& point1);
74  bool Collide(const AABBCollisionTree* tree0,
75  const AABBCollisionTree* tree1,
76  const Matrix4x4* world0, const Matrix4x4* world1,
77  Pair* cache, double tolerance);
78 
79  bool _Collide(const AABBCollisionNode* b0, const AABBCollisionNode* b1,
80  double tolerance);
89  float PssPssDist(float r0, const Point& center0, float r1, const Point& center1);
90 
100  float PssLssDist(float r0, const Point& center0,
101  float r1, const Point& point0, const Point& point1);
102 
112  float LssPssDist(float r0, const Point& point0, const Point& point1,
113  float r1, const Point& center0);
114 
125  float LssLssDist(float r0, const Point& point0, const Point& point1,
126  float r1, const Point& point2, const Point& point3);
127 };
128 }
129 
130 #endif