Initial revision
[blender.git] / source / gameengine / Ketsji / KX_ConvertPhysicsObject.h
1 /**
2  * $Id$
3  *
4  * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version. The Blender
10  * Foundation also sells licenses for use in proprietary software under
11  * the Blender License.  See http://www.blender.org/BL/ for information
12  * about this.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22  *
23  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
24  * All rights reserved.
25  *
26  * The Original Code is: all of this file.
27  *
28  * Contributor(s): none yet.
29  *
30  * ***** END GPL/BL DUAL LICENSE BLOCK *****
31  */
32 #ifndef KX_CONVERTPHYSICSOBJECTS
33 #define KX_CONVERTPHYSICSOBJECTS
34
35
36
37
38 //#define USE_SUMO_SOLID
39 //solid is not available yet
40
41 //#define USE_ODE
42 //ode is not available yet
43
44
45 class RAS_MeshObject;
46 class KX_Scene;
47
48
49 struct KX_Bounds
50 {
51         float m_center[3];
52         float m_extends[3];
53 };
54
55 struct KX_ObjectProperties
56 {
57         bool    m_dyna;
58         double m_radius;
59         bool    m_angular_rigidbody;
60         bool    m_in_active_layer;
61         bool    m_ghost;
62         class KX_GameObject*    m_dynamic_parent;
63         bool    m_isactor;
64         bool    m_concave;
65         bool    m_isdeformable;
66         bool    m_implicitsphere ;
67         bool    m_implicitbox;
68         KX_Bounds       m_boundingbox;
69 };
70
71 #ifdef USE_ODE
72
73
74 void    KX_ConvertODEEngineObject(KX_GameObject* gameobj,
75                                                          RAS_MeshObject* meshobj,
76                                                          KX_Scene* kxscene,
77                                                         struct  PHY_ShapeProps* shapeprops,
78                                                         struct  PHY_MaterialProps*      smmaterial,
79                                                         struct  KX_ObjectProperties*    objprop);
80
81
82 #endif //USE_ODE
83
84
85 void    KX_ConvertDynamoObject(KX_GameObject* gameobj,
86                                                          RAS_MeshObject* meshobj,
87                                                          KX_Scene* kxscene,
88                                                         struct  PHY_ShapeProps* shapeprops,
89                                                         struct  PHY_MaterialProps*      smmaterial,
90                                                         struct  KX_ObjectProperties*    objprop);
91
92
93
94 #ifdef USE_SUMO_SOLID
95
96
97
98
99
100 void    KX_ConvertSumoObject(   class   KX_GameObject* gameobj,
101                                                         class   RAS_MeshObject* meshobj,
102                                                         class   KX_Scene* kxscene,
103                                                         struct  PHY_ShapeProps* shapeprops,
104                                                         struct  PHY_MaterialProps*      smmaterial,
105                                                         struct  KX_ObjectProperties*    objprop);
106 #endif
107
108
109
110 #endif //KX_CONVERTPHYSICSOBJECTS