00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _CONVEX_H_
00028 #define _CONVEX_H_
00029
00030 #include <3D/Point.h>
00031 #include "Shape.h"
00032 #include "BBox.h"
00033 #include "Transform.h"
00034
00035 class Convex : public Shape {
00036 public:
00037 ShapeType getType() const { return CONVEX; }
00038
00039 virtual ~Convex() {}
00040 virtual Point support(const Vector& v) const = 0;
00041 virtual BBox bbox(const Transform& t) const;
00042 };
00043
00044
00045 bool intersect(const Convex& a, const Convex& b,
00046 const Transform& a2w, const Transform& b2w,
00047 Vector& v);
00048
00049 bool intersect(const Convex& a, const Convex& b, const Transform& b2a,
00050 Vector& v);
00051
00052 bool common_point(const Convex& a, const Convex& b,
00053 const Transform& a2w, const Transform& b2w,
00054 Vector& v, Point& pa, Point& pb);
00055
00056 bool common_point(const Convex& a, const Convex& b, const Transform& b2a,
00057 Vector& v, Point& pa, Point& pb);
00058
00059 void closest_points(const Convex&, const Convex&,
00060 const Transform&, const Transform&,
00061 Point&, Point&);
00062
00063 #endif