DI-Guy SDK Documentation  13.1
diguy_module_sim_physx.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2015 VT MAK
4  ** All rights reserved.
5  *********************************************************************/
6 
7 /*********************************************************************
8  **
9  *t DI-Guy API, PhysX Simulation Module
10  */
11 
12 #ifndef __diguy_module_sim_physx_H
13 #define __diguy_module_sim_physx_H
14 
15 extern "C" {
16 
17 #include <declspec_diguy.h>
18 
19 
20 /*****************************************************************************
21  **
22  *2 Init Structure
23  **
24  **
25  */
26 
27 typedef struct diguyModuleSimPhysXInit
28 {
30  :
31  physx_px_physics(NULL),
32  physx_px_scene(NULL),
33  ground_plane_z(0.0f),
35  {}
36 
37  /*l
38  *b Description:
39  **
40  ** An optional pointer to an physx::PxPhysics object, if the module should
41  ** use an already existing PhysX session. If NULL DI-Guy will create
42  ** a new session.
43  */
44  void* physx_px_physics;
45 
46  /*l
47  *b Description:
48  **
49  ** An optional pointer to an physx::PxScene object, if the module should use
50  ** an already existing PhysX scene. If NULL DI-Guy will create a new
51  ** scene.
52  */
53  void* physx_px_scene;
54 
55  /*l
56  *b Description:
57  **
58  ** The initial altitude of a ground plane. If this value is set to
59  ** -10000.0 or lower no ground plane will be enabled.
60  */
61  float ground_plane_z;
62 
63  /*l
64  *b Description:
65  **
66  ** Set to 1 to enable a connection to the PhysX VRD debugger.
67  */
69 
71 
72 
73 /*****************************************************************************
74  **
75  *2 Functions
76  **
77  */
78 
79 /*l
80  *b Description:
81  **
82  ** This function tells DI-Guy that it should use the PhysX simulation
83  ** library for doing physics simulations on selected characters.
84  **
85  ** This function must be called after the main DI-Guy initialize call
86  ** (e.g., diguy_ogl_initialize()), and before any scenario is created.
87  **
88  ** The PhysX system software must be installed on any computer that will
89  ** use this module. The directory 3rdparty/physx under the DI-Guy
90  ** install directory has system software installed. Be sure to read the
91  ** README.TXT file!
92  **
93  ** See the "Physics Module Functions" section in the diguyApp
94  ** documentation for functions that affect the simulation system.
95  **
96  *b Returns:
97  **
98  ** 0 on success, -1 on failure
99  **
100  *b Example:
101  **
102  *e diguy_ogl_initialize(NULL);
103  *e
104  *e diguyModuleSimPhysXInit init;
105  *e init.ground_plane_z = 2.0f;
106  *e diguy_sim_physx_initialize(&init);
107  *e
108  *e diguyScenario* scenario = diguy_create_scenario();
109  */
110 BDI_DECLSPEC_diguy
112 
113 /*l
114  *b Description:
115  **
116  ** This function tells DI-Guy to shut down the PhysX simulation library
117  ** module.
118  **
119  *b Returns:
120  **
121  ** 0 on success, -1 on failure
122  **
123  */
124 BDI_DECLSPEC_diguy
126 
127 
128 } /* end extern "C" */
129 
130 #endif /* __diguy_module_sim_physx_H */
131 
132 
133 /*********************************************************************
134  ** Copyright (c) 1992-2015 VT MAK
135  ** All rights reserved.
136  *********************************************************************/
137 
struct diguyModuleSimPhysXInit diguyModuleSimPhysXInit
Definition: diguy_module_sim_physx.h:26
int diguy_sim_physx_initialize(diguyModuleSimPhysXInit *init)
This function tells DI-Guy that it should use the PhysX simulation library for doing physics simulati...
int diguy_sim_physx_deinitialize()
This function tells DI-Guy to shut down the PhysX simulation library module.
void * physx_px_physics
An optional pointer to an physx::PxPhysics object, if the module should use an already existing PhysX...
Definition: diguy_module_sim_physx.h:42
diguyModuleSimPhysXInit()
Definition: diguy_module_sim_physx.h:28
void * physx_px_scene
An optional pointer to an physx::PxScene object, if the module should use an already existing PhysX s...
Definition: diguy_module_sim_physx.h:50
int enable_vrd_connection
Set to 1 to enable a connection to the PhysX VRD debugger.
Definition: diguy_module_sim_physx.h:63
float ground_plane_z
The initial altitude of a ground plane.
Definition: diguy_module_sim_physx.h:57