You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
/*
17
+
Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's.
18
+
Work in progress, functionality will be added on demand.
19
+
20
+
If possible, use the richer Bullet C++ API, by including "btBulletDynamicsCommon.h"
21
+
*/
22
+
23
+
#ifndefBULLET_C_API_H
24
+
#defineBULLET_C_API_H
25
+
26
+
#definePL_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
27
+
28
+
#ifdefBT_USE_DOUBLE_PRECISION
29
+
typedefdoubleplReal;
30
+
#else
31
+
typedeffloatplReal;
32
+
#endif
33
+
34
+
typedefplRealplVector3[3];
35
+
typedefplRealplQuaternion[4];
36
+
37
+
#ifdef__cplusplus
38
+
extern"C" {
39
+
#endif
40
+
41
+
/** Particular physics SDK (C-API) */
42
+
PL_DECLARE_HANDLE(plPhysicsSdkHandle);
43
+
44
+
/** Dynamics world, belonging to some physics SDK (C-API)*/
45
+
PL_DECLARE_HANDLE(plDynamicsWorldHandle);
46
+
47
+
/** Rigid Body that can be part of a Dynamics World (C-API)*/
48
+
PL_DECLARE_HANDLE(plRigidBodyHandle);
49
+
50
+
/** Collision Shape/Geometry, property of a Rigid Body (C-API)*/
51
+
PL_DECLARE_HANDLE(plCollisionShapeHandle);
52
+
53
+
/** Constraint for Rigid Bodies (C-API)*/
54
+
PL_DECLARE_HANDLE(plConstraintHandle);
55
+
56
+
/** Triangle Mesh interface (C-API)*/
57
+
PL_DECLARE_HANDLE(plMeshInterfaceHandle);
58
+
59
+
/** Broadphase Scene/Proxy Handles (C-API)*/
60
+
PL_DECLARE_HANDLE(plCollisionBroadphaseHandle);
61
+
PL_DECLARE_HANDLE(plBroadphaseProxyHandle);
62
+
PL_DECLARE_HANDLE(plCollisionWorldHandle);
63
+
64
+
/**
65
+
Create and Delete a Physics SDK
66
+
*/
67
+
68
+
externplPhysicsSdkHandleplNewBulletSdk(void); //this could be also another sdk, like ODE, PhysX etc.
/** Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
12
+
//
13
+
// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
14
+
//
15
+
// 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.
16
+
//
17
+
// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
18
+
//
19
+
// 3. This notice may not be removed or altered from any source distribution.
0 commit comments