Tuesday merger of bf-blender into orange branch.
[blender.git] / extern / bullet / Bullet / CollisionShapes / ConvexTriangleCallback.h
1 #ifndef CONVEX_TRIANGLE_CALLBACK_H
2 #define CONVEX_TRIANGLE_CALLBACK_H
3
4 #include "TriangleCallback.h"
5 class ConvexShape;
6 class PersistentManifold;
7 #include "SimdTransform.h"
8 ///ConvexTriangleCallback processes the narrowphase convex-triangle collision detection
9 class ConvexTriangleCallback: public TriangleCallback
10 {
11         SimdVector3     m_aabbMin;
12         SimdVector3     m_aabbMax ;
13
14         SimdTransform   m_triangleMeshTransform;
15         SimdTransform   m_convexTransform;
16
17 //      bool m_useContinuous;
18         float m_collisionMarginTriangle;
19         
20 public:
21 int     m_triangleCount;
22         
23         ConvexShape*    m_convexShape;
24
25         PersistentManifold*     m_manifoldPtr;
26
27         ConvexTriangleCallback(PersistentManifold* manifold,ConvexShape* convexShape,const SimdTransform&convexTransform,const SimdTransform& triangleMeshTransform);
28
29         void    Update(float collisionMarginTriangle);
30
31         virtual ~ConvexTriangleCallback();
32
33         virtual void ProcessTriangle(SimdVector3* triangle);
34         
35         void ClearCache();
36
37         inline const SimdVector3& GetAabbMin() const
38         {
39                 return m_aabbMin;
40         }
41         inline const SimdVector3& GetAabbMax() const
42         {
43                 return m_aabbMax;
44         }
45
46 };
47
48
49 #endif //CONVEX_TRIANGLE_CALLBACK_H