a1bcc615010f99d812ec1878aefd4f1806a3d6b0
[blender.git] / extern / bullet / Bullet / NarrowPhaseCollision / GjkConvexCast.h
1 /*
2  * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
3  *
4  * Permission to use, copy, modify, distribute and sell this software
5  * and its documentation for any purpose is hereby granted without fee,
6  * provided that the above copyright notice appear in all copies.
7  * Erwin Coumans makes no representations about the suitability 
8  * of this software for any purpose.  
9  * It is provided "as is" without express or implied warranty.
10 */
11
12
13 #ifndef GJK_CONVEX_CAST_H
14 #define GJK_CONVEX_CAST_H
15
16 #include "CollisionMargin.h"
17 #include "SimdVector3.h"
18 #include "ConvexCast.h"
19 class ConvexShape;
20 class MinkowskiSumShape;
21 #include "SimplexSolverInterface.h"
22
23 ///GjkConvexCast performs a raycast on a convex object using support mapping.
24 class GjkConvexCast : public ConvexCast
25 {
26         SimplexSolverInterface* m_simplexSolver;
27         ConvexShape*    m_convexA;
28         ConvexShape*    m_convexB;
29
30 public:
31
32         GjkConvexCast(ConvexShape*      convexA,ConvexShape* convexB,SimplexSolverInterface* simplexSolver);
33
34         /// cast a convex against another convex object
35         virtual bool    calcTimeOfImpact(
36                                         const SimdTransform& fromA,
37                                         const SimdTransform& toA,
38                                         const SimdTransform& fromB,
39                                         const SimdTransform& toB,
40                                         CastResult& result);
41
42 };
43
44 #endif //GJK_CONVEX_CAST_H