Bevel Factor Mapping
[blender.git] / source / gameengine / Physics / common / PHY_DynamicTypes.h
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
4
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose, 
8 including commercial applications, and to alter it and redistribute it freely, 
9 subject to the following restrictions:
10
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15
16 /** \file PHY_DynamicTypes.h
17  *  \ingroup phys
18  */
19
20 #ifndef __PHY_DYNAMICTYPES_H__
21 #define __PHY_DYNAMICTYPES_H__
22
23 #include "MT_Vector3.h"
24
25 struct KX_ClientObjectInfo;
26
27 enum
28 {
29         PHY_FH_RESPONSE,
30         PHY_SENSOR_RESPONSE,    /* Touch Sensors */
31         PHY_CAMERA_RESPONSE,    /* Visibility Culling */
32         PHY_OBJECT_RESPONSE,    /* Object Dynamic Geometry Response */
33         PHY_STATIC_RESPONSE,    /* Static Geometry Response */
34         PHY_BROADPH_RESPONSE,   /* broadphase Response */
35         
36         PHY_NUM_RESPONSE
37 };
38
39 typedef struct PHY_CollData {
40         MT_Vector3 m_point1;               /* Point in object1 in world coordinates */
41         MT_Vector3 m_point2;               /* Point in object2 in world coordinates */
42         MT_Vector3 m_normal;               /* point2 - point1 */
43 } PHY_CollData;
44
45
46 typedef bool (*PHY_ResponseCallback)(void *client_data,
47                                      void *client_object1,
48                                      void *client_object2,
49                                      const PHY_CollData *coll_data);
50 typedef void (*PHY_CullingCallback)(KX_ClientObjectInfo* info, void* param);
51
52
53 /// PHY_PhysicsType enumerates all possible Physics Entities.
54 /// It is mainly used to create/add Physics Objects
55
56 typedef enum PHY_PhysicsType {
57         PHY_CONVEX_RIGIDBODY=16386,
58         PHY_CONCAVE_RIGIDBODY=16399,
59         PHY_CONVEX_FIXEDBODY=16388,//'collision object'
60         PHY_CONCAVE_FIXEDBODY=16401,
61         PHY_CONVEX_KINEMATICBODY=16387,// 
62         PHY_CONCAVE_KINEMATICBODY=16400,
63         PHY_CONVEX_PHANTOMBODY=16398,
64         PHY_CONCAVE_PHANTOMBODY=16402
65 } PHY_PhysicsType;
66
67 /// PHY_ConstraintType enumerates all supported Constraint Types
68 typedef enum PHY_ConstraintType {
69         PHY_POINT2POINT_CONSTRAINT=1,
70         PHY_LINEHINGE_CONSTRAINT=2,
71         PHY_ANGULAR_CONSTRAINT = 3,//hinge without ball socket
72         PHY_CONE_TWIST_CONSTRAINT = 4,
73         PHY_VEHICLE_CONSTRAINT=11,//complex 'constraint' that turns a rigidbody into a vehicle
74         PHY_GENERIC_6DOF_CONSTRAINT=12,//can leave any of the 6 degree of freedom 'free' or 'locked'
75
76 } PHY_ConstraintType;
77
78 typedef enum PHY_ShapeType {
79         PHY_SHAPE_NONE,
80         PHY_SHAPE_BOX,
81         PHY_SHAPE_SPHERE,
82         PHY_SHAPE_CYLINDER,
83         PHY_SHAPE_CONE,
84         PHY_SHAPE_CAPSULE,
85         PHY_SHAPE_MESH,
86         PHY_SHAPE_POLYTOPE,
87         PHY_SHAPE_COMPOUND,
88         PHY_SHAPE_PROXY
89 } PHY_ShapeType;
90
91 #endif  /* __PHY_DYNAMICTYPES_H__ */