Panda3D

physxEnums.h
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file physxEnums.h
10 * @author enn0x
11 * @date 2009-09-23
12 */
13
14 #ifndef PHYSXENUMS_H
15 #define PHYSXENUMS_H
16
17 #include "pandabase.h"
18
19 #include "physx_includes.h"
20
21 #ifdef CPPPARSER
22
23 // PhysxParameter
24 #define NX_PENALTY_FORCE 0
25 #define NX_SKIN_WIDTH 1
26 #define NX_DEFAULT_SLEEP_LIN_VEL_SQUARED 2
27 #define NX_DEFAULT_SLEEP_ANG_VEL_SQUARED 3
28 #define NX_BOUNCE_THRESHOLD 4
29 #define NX_DYN_FRICT_SCALING 5
30 #define NX_STA_FRICT_SCALING 6
31 #define NX_MAX_ANGULAR_VELOCITY 7
32 #define NX_CONTINUOUS_CD 8
33 #define NX_VISUALIZATION_SCALE 9
34 #define NX_VISUALIZE_WORLD_AXES 10
35 #define NX_VISUALIZE_BODY_AXES 11
36 #define NX_VISUALIZE_BODY_MASS_AXES 12
37 #define NX_VISUALIZE_BODY_LIN_VELOCITY 13
38 #define NX_VISUALIZE_BODY_ANG_VELOCITY 14
39 #define NX_VISUALIZE_BODY_JOINT_GROUPS 22
40 #define NX_VISUALIZE_JOINT_LOCAL_AXES 27
41 #define NX_VISUALIZE_JOINT_WORLD_AXES 28
42 #define NX_VISUALIZE_JOINT_LIMITS 29
43 #define NX_VISUALIZE_CONTACT_POINT 33
44 #define NX_VISUALIZE_CONTACT_NORMAL 34
45 #define NX_VISUALIZE_CONTACT_ERROR 35
46 #define NX_VISUALIZE_CONTACT_FORCE 36
47 #define NX_VISUALIZE_ACTOR_AXES 37
48 #define NX_VISUALIZE_COLLISION_AABBS 38
49 #define NX_VISUALIZE_COLLISION_SHAPES 39
50 #define NX_VISUALIZE_COLLISION_AXES 40
51 #define NX_VISUALIZE_COLLISION_COMPOUNDS 41
52 #define NX_VISUALIZE_COLLISION_VNORMALS 42
53 #define NX_VISUALIZE_COLLISION_FNORMALS 43
54 #define NX_VISUALIZE_COLLISION_EDGES 44
55 #define NX_VISUALIZE_COLLISION_SPHERES 45
56 #define NX_VISUALIZE_COLLISION_STATIC 47
57 #define NX_VISUALIZE_COLLISION_DYNAMIC 48
58 #define NX_VISUALIZE_COLLISION_FREE 49
59 #define NX_VISUALIZE_COLLISION_CCD 50
60 #define NX_VISUALIZE_COLLISION_SKELETONS 51
61 #define NX_VISUALIZE_FLUID_EMITTERS 52
62 #define NX_VISUALIZE_FLUID_POSITION 53
63 #define NX_VISUALIZE_FLUID_VELOCITY 54
64 #define NX_VISUALIZE_FLUID_KERNEL_RADIUS 55
65 #define NX_VISUALIZE_FLUID_BOUNDS 56
66 #define NX_VISUALIZE_FLUID_PACKETS 57
67 #define NX_VISUALIZE_FLUID_MOTION_LIMIT 58
68 #define NX_VISUALIZE_FLUID_DYN_COLLISION 59
69 #define NX_VISUALIZE_FLUID_STC_COLLISION 60
70 #define NX_VISUALIZE_FLUID_MESH_PACKETS 61
71 #define NX_VISUALIZE_FLUID_DRAINS 62
72 #define NX_VISUALIZE_FLUID_PACKET_DATA 90
73 #define NX_VISUALIZE_CLOTH_MESH 63
74 #define NX_VISUALIZE_CLOTH_COLLISIONS 64
75 #define NX_VISUALIZE_CLOTH_SELFCOLLISIONS 65
76 #define NX_VISUALIZE_CLOTH_WORKPACKETS 66
77 #define NX_VISUALIZE_CLOTH_SLEEP 67
78 #define NX_VISUALIZE_CLOTH_SLEEP_VERTEX 94
79 #define NX_VISUALIZE_CLOTH_TEARABLE_VERTICES 80
80 #define NX_VISUALIZE_CLOTH_TEARING 81
81 #define NX_VISUALIZE_CLOTH_ATTACHMENT 82
82 #define NX_VISUALIZE_CLOTH_VALIDBOUNDS 92
83 #define NX_VISUALIZE_SOFTBODY_MESH 83
84 #define NX_VISUALIZE_SOFTBODY_COLLISIONS 84
85 #define NX_VISUALIZE_SOFTBODY_WORKPACKETS 85
86 #define NX_VISUALIZE_SOFTBODY_SLEEP 86
87 #define NX_VISUALIZE_SOFTBODY_SLEEP_VERTEX 95
88 #define NX_VISUALIZE_SOFTBODY_TEARABLE_VERTICES 87
89 #define NX_VISUALIZE_SOFTBODY_TEARING 88
90 #define NX_VISUALIZE_SOFTBODY_ATTACHMENT 89
91 #define NX_VISUALIZE_SOFTBODY_VALIDBOUNDS 93
92 #define NX_ADAPTIVE_FORCE 68
93 #define NX_COLL_VETO_JOINTED 69
94 #define NX_TRIGGER_TRIGGER_CALLBACK 70
95 #define NX_SELECT_HW_ALGO 71
96 #define NX_VISUALIZE_ACTIVE_VERTICES 72
97 #define NX_CCD_EPSILON 73
98 #define NX_SOLVER_CONVERGENCE_THRESHOLD 74
99 #define NX_BBOX_NOISE_LEVEL 75
100 #define NX_IMPLICIT_SWEEP_CACHE_SIZE 76
101 #define NX_DEFAULT_SLEEP_ENERGY 77
102 #define NX_CONSTANT_FLUID_MAX_PACKETS 78
103 #define NX_CONSTANT_FLUID_MAX_PARTICLES_PER_STEP 79
104 #define NX_VISUALIZE_FORCE_FIELDS 91
105 #define NX_ASYNCHRONOUS_MESH_CREATION 96
106 #define NX_FORCE_FIELD_CUSTOM_KERNEL_EPSILON 97
107 #define NX_IMPROVED_SPRING_SOLVER 98
108
109 #if NX_SDK_VERSION_NUMBER > 281
110 #define NX_FAST_MASSIVE_BP_VOLUME_DELETION 99
111 #define NX_LEGACY_JOINT_DRIVE 100
112 #endif /* NX_SDK_VERSION_NUMBER > 281 */
113
114 // PhysxActorFlag
115 #define NX_AF_DISABLE_COLLISION 1<<0
116 #define NX_AF_DISABLE_RESPONSE 1<<1
117 #define NX_AF_LOCK_COM 1<<2
118 #define NX_AF_FLUID_DISABLE_COLLISION 1<<3
119 #define NX_AF_CONTACT_MODIFICATION 1<<4
120 #define NX_AF_FORCE_CONE_FRICTION 1<<5
121 #define NX_AF_USER_ACTOR_PAIR_FILTERING 1<<6
122
123 // PhysxBodyFlag
124 #define NX_BF_DISABLE_GRAVITY 1<<0
125 #define NX_BF_FROZEN_POS_X 1<<1
126 #define NX_BF_FROZEN_POS_Y 1<<2
127 #define NX_BF_FROZEN_POS_Z 1<<3
128 #define NX_BF_FROZEN_ROT_X 1<<4
129 #define NX_BF_FROZEN_ROT_Y 1<<5
130 #define NX_BF_FROZEN_ROT_Z 1<<6
131 #define NX_BF_FROZEN_POS 256
132 #define NX_BF_FROZEN_ROT 131072
133 #define NX_BF_FROZEN 131328
134 #define NX_BF_KINEMATIC 1<<7
135 #define NX_BF_VISUALIZATION 1<<8
136 #define NX_BF_FILTER_SLEEP_VEL 1<<10
137 #define NX_BF_ENERGY_SLEEP_TEST 1<<11
138
139 // PhysxBroadPhaseType
140 #define NX_BP_TYPE_SAP_SINGLE 0
141 #define NX_BP_TYPE_SAP_MULTI 1
142
143 // PhysxClothFlag
144 #define NX_CLF_PRESSURE 1<<0
145 #define NX_CLF_STATIC 1<<1
146 #define NX_CLF_DISABLE_COLLISION 1<<2
147 #define NX_CLF_SELFCOLLISION 1<<3
148 #define NX_CLF_VISUALIZATION 1<<4
149 #define NX_CLF_GRAVITY 1<<5
150 #define NX_CLF_BENDING 1<<6
151 #define NX_CLF_BENDING_ORTHO 1<<7
152 #define NX_CLF_DAMPING 1<<8
153 #define NX_CLF_COLLISION_TWOWAY 1<<9
154 #define NX_CLF_TRIANGLE_COLLISION 1<<11
155 #define NX_CLF_TEARABLE 1<<12
156 #define NX_CLF_HARDWARE 1<<13
157 #define NX_CLF_COMDAMPING 1<<14
158 #define NX_CLF_VALIDBOUNDS 1<<15
159 #define NX_CLF_FLUID_COLLISION 1<<16
160 #define NX_CLF_DISABLE_DYNAMIC_CCD 1<<17
161 #define NX_CLF_ADHERE 1<<18
162
163 // PhysxContactPairFlag
164 #define NX_IGNORE_PAIR 1<<0
165 #define NX_NOTIFY_ON_START_TOUCH 1<<1
166 #define NX_NOTIFY_ON_END_TOUCH 1<<2
167 #define NX_NOTIFY_ON_TOUCH 1<<3
168 #define NX_NOTIFY_ON_IMPACT 1<<4
169 #define NX_NOTIFY_ON_ROLL 1<<5
170 #define NX_NOTIFY_ON_SLIDE 1<<6
171 #define NX_NOTIFY_FORCES 1<<7
172 #define NX_NOTIFY_ON_START_TOUCH_FORCE_THRESHOLD 1<<8
173 #define NX_NOTIFY_ON_END_TOUCH_FORCE_THRESHOLD 1<<9
174 #define NX_NOTIFY_ON_TOUCH_FORCE_THRESHOLD 1<<10
175 #define NX_NOTIFY_CONTACT_MODIFICATION 1<<16
176
177 // PhysxCombineMode
178 #define NX_CM_AVERAGE 0
179 #define NX_CM_MIN 1
180 #define NX_CM_MULTIPLY 2
181 #define NX_CM_MAX 3
182
183 // PhysxD6JointDriveType
184 #define NX_D6JOINT_DRIVE_POSITION 1<<0
185 #define NX_D6JOINT_DRIVE_VELOCITY 1<<1
186
187 // PhysxD6JointFlag
188 #define NX_D6JOINT_SLERP_DRIVE 1<<0
189 #define NX_D6JOINT_GEAR_ENABLED 1<<1
190
191 // PhysxD6JointMotion
192 #define NX_D6JOINT_MOTION_LOCKED 0
193 #define NX_D6JOINT_MOTION_LIMITED 1
194 #define NX_D6JOINT_MOTION_FREE 2
195
196 // PhysxDistanceJointFlag
197 #define NX_DJF_MAX_DISTANCE_ENABLED 1<<0
198 #define NX_DJF_MIN_DISTANCE_ENABLED 1<<1
199 #define NX_DJF_SPRING_ENABLED 1<<2
200
201 // PhysxFilterOp
202 #define NX_FILTEROP_AND 0
203 #define NX_FILTEROP_OR 1
204 #define NX_FILTEROP_XOR 2
205 #define NX_FILTEROP_NAND 3
206 #define NX_FILTEROP_NOR 4
207 #define NX_FILTEROP_NXOR 5
208 #define NX_FILTEROP_SWAP_AND 6
209
210 // PhysxForceFieldCoordinates
211 #define NX_FFC_CARTESIAN 0
212 #define NX_FFC_SPHERICAL 1
213 #define NX_FFC_CYLINDRICAL 2
214 #define NX_FFC_TOROIDAL 3
215
216 // PhysxForceFieldShapeGroupFlag
217 #define NX_FFSG_EXCLUDE_GROUP 1
218
219 // PhysxMaterialFlag
220 #define NX_MF_ANISOTROPIC 1<<0
221 #define NX_MF_DISABLE_FRICTION 1<<4
222 #define NX_MF_DISABLE_STRONG_FRICTION 1<<5
223
224 // PhysxForceMode
225 #define NX_FORCE 0
226 #define NX_IMPULSE 1
227 #define NX_VELOCITY_CHANGE 2
228 #define NX_SMOOTH_IMPULSE 3
229 #define NX_SMOOTH_VELOCITY_CHANGE 4
230 #define NX_ACCELERATION 5
231
232 // PhysxJointFlag
233 #define NX_JF_COLLISION_ENABLED 1<<0
234 #define NX_JF_VISUALIZATION 1<<1
235
236 // PhysxProjectionMode
237 #define NX_JPM_NONE 0
238 #define NX_JPM_POINT_MINDIST 1
239 #define NX_JPM_LINEAR_MINDIST 2
240
241 // PhysxPruningStructure
242 #define NX_PRUNING_NONE 0
243 #define NX_PRUNING_OCTREE 1
244 #define NX_PRUNING_QUADTREE 2
245 #define NX_PRUNING_DYNAMIC_AABB_TREE 3
246 #define NX_PRUNING_STATIC_AABB_TREE 4
247
248 // PhysxPulleyJointFlag
249 #define NX_PJF_IS_RIGID 1<<0
250 #define NX_PJF_MOTOR_ENABLED 1<<1
251
252 // PhysxRevoluteJointFlag
253 #define NX_RJF_LIMIT_ENABLED 1<<0
254 #define NX_RJF_MOTOR_ENABLED 1<<1
255 #define NX_RJF_SPRING_ENABLED 1<<2
256
257 // PhysxSceneFlag
258 #define NX_SF_DISABLE_SSE 0x1
259 #define NX_SF_DISABLE_COLLISIONS 0x2
260 #define NX_SF_SIMULATE_SEPARATE_THREAD 0x4
261 #define NX_SF_ENABLE_MULTITHREAD 0x8
262 #define NX_SF_ENABLE_ACTIVETRANSFORMS 0x10
263 #define NX_SF_RESTRICTED_SCENE 0x20
264 #define NX_SF_DISABLE_SCENE_MUTEX 0x40
265 #define NX_SF_FORCE_CONE_FRICTION 0x80
266 #define NX_SF_SEQUENTIAL_PRIMARY 0x80*2
267 #define NX_SF_FLUID_PERFORMANCE_HINT 0x80*4
268 #define NX_SF_ALTERNATIVE_FLUID_TRIANGLE_COLLISION 0x80*8
269 #define NX_SF_MULTITHREADED_FORCEFIELD 0x80*16
270
271 // PhysxShapeFlag
272 #define NX_TRIGGER_ON_ENTER 1<<0
273 #define NX_TRIGGER_ON_LEAVE 1<<1
274 #define NX_TRIGGER_ON_STAY 1<<2
275 #define NX_TRIGGER_ENABLE 7
276 #define NX_SF_VISUALIZATION 1<<3
277 #define NX_SF_DISABLE_COLLISION 1<<4
278 #define NX_SF_FEATURE_INDICES 1<<5
279 #define NX_SF_DISABLE_RAYCASTING 1<<6
280 #define NX_SF_POINT_CONTACT_FORCE 1<<7
281 #define NX_SF_FLUID_DRAIN 1<<8
282 #define NX_SF_FLUID_DISABLE_COLLISION 1<<10
283 #define NX_SF_FLUID_TWOWAY 1<<11
284 #define NX_SF_DISABLE_RESPONSE 1<<12
285 #define NX_SF_DYNAMIC_DYNAMIC_CCD 1<<13
286 #define NX_SF_DISABLE_SCENE_QUERIES 1<<14
287 #define NX_SF_CLOTH_DRAIN 1<<15
288 #define NX_SF_CLOTH_DISABLE_COLLISION 1<<16
289 #define NX_SF_CLOTH_TWOWAY 1<<17
290 #define NX_SF_SOFTBODY_DRAIN 1<<18
291 #define NX_SF_SOFTBODY_DISABLE_COLLISION 1<<19
292 #define NX_SF_SOFTBODY_TWOWAY 1<<20
293
294 // PhysxShapesType
295 #define NX_STATIC_SHAPES 1<<0
296 #define NX_DYNAMIC_SHAPES 1<<1
297 #define NX_ALL_SHAPES (1<<0|1<<1)
298
299 // PhysxSoftBodyFlag
300 #define NX_SBF_STATIC 1<<1
301 #define NX_SBF_DISABLE_COLLISION 1<<2
302 #define NX_SBF_SELFCOLLISION 1<<3
303 #define NX_SBF_VISUALIZATION 1<<4
304 #define NX_SBF_GRAVITY 1<<5
305 #define NX_SBF_VOLUME_CONSERVATION 1<<6
306 #define NX_SBF_DAMPING 1<<7
307 #define NX_SBF_COLLISION_TWOWAY 1<<8
308 #define NX_SBF_TEARABLE 1<<9
309 #define NX_SBF_HARDWARE 1<<10
310 #define NX_SBF_COMDAMPING 1<<11
311 #define NX_SBF_VALIDBOUNDS 1<<12
312 #define NX_SBF_FLUID_COLLISION 1<<13
313 #define NX_SBF_DISABLE_DYNAMIC_CCD 1<<14
314 #define NX_SBF_ADHERE 1<<15
315
316 // PhysxSphericalJointFlag
317 #define NX_SJF_TWIST_LIMIT_ENABLED 1<<0
318 #define NX_SJF_SWING_LIMIT_ENABLED 1<<1
319 #define NX_SJF_TWIST_SPRING_ENABLED 1<<2
320 #define NX_SJF_SWING_SPRING_ENABLED 1<<3
321 #define NX_SJF_JOINT_SPRING_ENABLED 1<<4
322 #define NX_SJF_PERPENDICULAR_DIR_CONSTRAINTS 1<<5
323
324 // PhysxUpAxis
325 #define NX_X 1
326 #define NX_Y 2
327 #define NX_Z 3
328
329 // PhysxVertexAttachmentStatus
330 #define NX_CLOTH_VERTEX_ATTACHMENT_NONE 0
331 #define NX_CLOTH_VERTEX_ATTACHMENT_GLOBAL 1
332 #define NX_CLOTH_VERTEX_ATTACHMENT_SHAPE 2
333
334 // PhysxWheelShapeFlag
335 #define NX_WF_WHEEL_AXIS_CONTACT_NORMAL 1<<0
336 #define NX_WF_INPUT_LAT_SLIPVELOCITY 1<<1
337 #define NX_WF_INPUT_LNG_SLIPVELOCITY 1<<2
338 #define NX_WF_UNSCALED_SPRING_BEHAVIOR 1<<3
339 #define NX_WF_AXLE_SPEED_OVERRIDE 1<<4
340 #define NX_WF_EMULATE_LEGACY_WHEEL 1<<5
341 #define NX_WF_CLAMPED_FRICTION 1<<6
342
343 #endif // CPPPARSER
344
345 // PhysxWheelFlag
346 #define NX_WF_STEERABLE_INPUT 1<<0
347 #define NX_WF_STEERABLE_AUTO 1<<1
348 #define NX_WF_AFFECTED_BY_HANDBRAKE 1<<2
349 #define NX_WF_ACCELERATED 1<<3
350
351 /**
352 * This class exists just to provide scoping for the enums shared by PhysX
353 * classes.
354 */
355 class EXPCL_PANDAPHYSX PhysxEnums {
356 PUBLISHED:
357
358 enum PhysxParameter {
359 P_penalty_force = NX_PENALTY_FORCE,
360 P_skin_width = NX_SKIN_WIDTH,
361 P_default_sleep_lin_vel_squared = NX_DEFAULT_SLEEP_LIN_VEL_SQUARED,
362 P_default_sleep_ang_vel_squared = NX_DEFAULT_SLEEP_ANG_VEL_SQUARED,
363 P_bounce_threshold = NX_BOUNCE_THRESHOLD,
364 P_dyn_frict_scaling = NX_DYN_FRICT_SCALING,
365 P_sta_frict_scaling = NX_STA_FRICT_SCALING,
366 P_max_angular_velocity = NX_MAX_ANGULAR_VELOCITY,
367 P_continuous_cd = NX_CONTINUOUS_CD,
368 P_visualization_scale = NX_VISUALIZATION_SCALE,
369 P_adaptive_force = NX_ADAPTIVE_FORCE,
370 P_coll_veta_jointed = NX_COLL_VETO_JOINTED,
371 P_trigger_trigger_callback = NX_TRIGGER_TRIGGER_CALLBACK,
372 P_select_hw_algo = NX_SELECT_HW_ALGO,
373 P_ccd_epsilon = NX_CCD_EPSILON,
374 P_solver_convergence_threshold = NX_SOLVER_CONVERGENCE_THRESHOLD,
375 P_bbox_noise_level = NX_BBOX_NOISE_LEVEL,
376 P_implicit_sweep_cache_size = NX_IMPLICIT_SWEEP_CACHE_SIZE,
377 P_default_sleep_energy = NX_DEFAULT_SLEEP_ENERGY,
378 P_constant_fluid_max_packets = NX_CONSTANT_FLUID_MAX_PACKETS,
379 P_constant_fluid_max_particles_per_step = NX_CONSTANT_FLUID_MAX_PARTICLES_PER_STEP,
380 P_asynchronous_mesh_creation = NX_ASYNCHRONOUS_MESH_CREATION,
381 P_force_field_custom_kernel_epsilon = NX_FORCE_FIELD_CUSTOM_KERNEL_EPSILON,
382 P_improved_spring_solver = NX_IMPROVED_SPRING_SOLVER,
383
384 #if NX_SDK_VERSION_NUMBER > 281
385 P_fast_massive_bp_volume_deletion = NX_FAST_MASSIVE_BP_VOLUME_DELETION,
386 P_legacy_joint_drive = NX_LEGACY_JOINT_DRIVE,
387 #endif
388
389 P_visualize_world_axes = NX_VISUALIZE_WORLD_AXES,
390 P_visualize_body_axes = NX_VISUALIZE_BODY_AXES,
391 P_visualize_body_mass_axes = NX_VISUALIZE_BODY_MASS_AXES,
392 P_visualize_body_lin_velocity = NX_VISUALIZE_BODY_LIN_VELOCITY,
393 P_visualize_body_ang_velocity = NX_VISUALIZE_BODY_ANG_VELOCITY,
394 P_visualize_body_joint_groups = NX_VISUALIZE_BODY_JOINT_GROUPS,
395 P_visualize_joint_local_axes = NX_VISUALIZE_JOINT_LOCAL_AXES,
396 P_visualize_joint_world_axes = NX_VISUALIZE_JOINT_WORLD_AXES,
397 P_visualize_joint_limits = NX_VISUALIZE_JOINT_LIMITS,
398 P_visualize_contact_point = NX_VISUALIZE_CONTACT_POINT,
399 P_visualize_contact_normal = NX_VISUALIZE_CONTACT_NORMAL,
400 P_visualize_contact_error = NX_VISUALIZE_CONTACT_ERROR,
401 P_visualize_contact_force = NX_VISUALIZE_CONTACT_FORCE,
402 P_visualize_actor_axes = NX_VISUALIZE_ACTOR_AXES,
403 P_visualize_collision_aabbs = NX_VISUALIZE_COLLISION_AABBS,
404 P_visualize_collision_shapes = NX_VISUALIZE_COLLISION_SHAPES,
405 P_visualize_collision_axes = NX_VISUALIZE_COLLISION_AXES,
406 P_visualize_collision_compounds = NX_VISUALIZE_COLLISION_COMPOUNDS,
407 P_visualize_collision_vnormals = NX_VISUALIZE_COLLISION_VNORMALS,
408 P_visualize_collision_fnormals = NX_VISUALIZE_COLLISION_FNORMALS,
409 P_visualize_collision_edges = NX_VISUALIZE_COLLISION_EDGES,
410 P_visualize_collision_spheres = NX_VISUALIZE_COLLISION_SPHERES,
411 P_visualize_collision_static = NX_VISUALIZE_COLLISION_STATIC,
412 P_visualize_collision_dynamic = NX_VISUALIZE_COLLISION_DYNAMIC,
413 P_visualize_collision_free = NX_VISUALIZE_COLLISION_FREE,
414 P_visualize_collision_ccd = NX_VISUALIZE_COLLISION_CCD,
415 P_visualize_collision_skeletons = NX_VISUALIZE_COLLISION_SKELETONS,
416 P_visualize_fluid_emitters = NX_VISUALIZE_FLUID_EMITTERS,
417 P_visualize_fluid_position = NX_VISUALIZE_FLUID_POSITION,
418 P_visualize_fluid_velocity = NX_VISUALIZE_FLUID_VELOCITY,
419 P_visualize_fluid_kernel_radius = NX_VISUALIZE_FLUID_KERNEL_RADIUS,
420 P_visualize_fluid_bounds = NX_VISUALIZE_FLUID_BOUNDS,
421 P_visualize_fluid_packets = NX_VISUALIZE_FLUID_PACKETS,
422 P_visualize_fluid_motion_limit = NX_VISUALIZE_FLUID_MOTION_LIMIT,
423 P_visualize_fluid_dyn_collision = NX_VISUALIZE_FLUID_DYN_COLLISION,
424 P_visualize_fluid_stc_collision = NX_VISUALIZE_FLUID_STC_COLLISION,
425 P_visualize_fluid_mesh_packets = NX_VISUALIZE_FLUID_MESH_PACKETS,
426 P_visualize_fluid_drains = NX_VISUALIZE_FLUID_DRAINS,
427 P_visualize_fluid_packet_data = NX_VISUALIZE_FLUID_PACKET_DATA,
428 P_visualize_cloth_mesh = NX_VISUALIZE_CLOTH_MESH,
429 P_visualize_cloth_collisions = NX_VISUALIZE_CLOTH_COLLISIONS,
430 P_visualize_cloth_selfcollisions = NX_VISUALIZE_CLOTH_SELFCOLLISIONS,
431 P_visualize_cloth_workpackets = NX_VISUALIZE_CLOTH_WORKPACKETS,
432 P_visualize_cloth_sleep = NX_VISUALIZE_CLOTH_SLEEP,
433 P_visualize_cloth_sleep_vertex = NX_VISUALIZE_CLOTH_SLEEP_VERTEX,
434 P_visualize_cloth_tearable_vertices = NX_VISUALIZE_CLOTH_TEARABLE_VERTICES,
435 P_visualize_cloth_tearing = NX_VISUALIZE_CLOTH_TEARING,
436 P_visualize_cloth_attachment = NX_VISUALIZE_CLOTH_ATTACHMENT,
437 P_visualize_cloth_validbounds = NX_VISUALIZE_CLOTH_VALIDBOUNDS,
438 P_visualize_softbody_mesh = NX_VISUALIZE_SOFTBODY_MESH,
439 P_visualize_softbody_collisions = NX_VISUALIZE_SOFTBODY_COLLISIONS,
440 P_visualize_softbody_workpackets = NX_VISUALIZE_SOFTBODY_WORKPACKETS,
441 P_visualize_softbody_sleep = NX_VISUALIZE_SOFTBODY_SLEEP,
442 P_visualize_softbody_sleep_vertex = NX_VISUALIZE_SOFTBODY_SLEEP_VERTEX,
443 P_visualize_softbody_tearable_vertices = NX_VISUALIZE_SOFTBODY_TEARABLE_VERTICES,
444 P_visualize_softbody_tearing = NX_VISUALIZE_SOFTBODY_TEARING,
445 P_visualize_softbody_attachment = NX_VISUALIZE_SOFTBODY_ATTACHMENT,
446 P_visualize_softbody_validbounds = NX_VISUALIZE_SOFTBODY_VALIDBOUNDS,
447 P_visualize_active_vertices = NX_VISUALIZE_ACTIVE_VERTICES,
448 P_visualize_force_fields = NX_VISUALIZE_FORCE_FIELDS,
449 };
450
451 enum PhysxActorFlag {
452 AF_disable_collision = NX_AF_DISABLE_COLLISION,
453 AF_disable_response = NX_AF_DISABLE_RESPONSE,
454 AF_lock_com = NX_AF_LOCK_COM,
455 AF_fluid_disable_collision = NX_AF_FLUID_DISABLE_COLLISION,
456 AF_contact_modification = NX_AF_CONTACT_MODIFICATION,
457 AF_force_cone_friction = NX_AF_FORCE_CONE_FRICTION,
458 AF_user_actor_pair_filtering = NX_AF_USER_ACTOR_PAIR_FILTERING
459 };
460
461 enum PhysxBodyFlag {
462 BF_disable_gravity = NX_BF_DISABLE_GRAVITY,
463 Bf_frozen_pos_x = NX_BF_FROZEN_POS_X,
464 BF_frozen_pos_y = NX_BF_FROZEN_POS_Y,
465 BF_frozen_pos_z = NX_BF_FROZEN_POS_Z,
466 BF_frozen_rot_x = NX_BF_FROZEN_ROT_X,
467 BF_frozen_rot_y = NX_BF_FROZEN_ROT_Y,
468 BF_frozen_rot_z = NX_BF_FROZEN_ROT_Z,
469 BF_frozen_pos = NX_BF_FROZEN_POS,
470 BF_frozen_rot = NX_BF_FROZEN_ROT,
471 BF_frozen = NX_BF_FROZEN,
472 BF_kinematic = NX_BF_KINEMATIC,
473 BF_visualization = NX_BF_VISUALIZATION,
474 BF_filter_sleep_vel = NX_BF_FILTER_SLEEP_VEL,
475 BF_energy_sleep_test = NX_BF_ENERGY_SLEEP_TEST
476 };
477
478 enum PhysxBroadPhaseType {
479 BPT_sap_single = NX_BP_TYPE_SAP_SINGLE,
480 BPT_sap_multi = NX_BP_TYPE_SAP_MULTI
481 };
482
483 enum PhysxClothFlag {
484 CLF_pressure = NX_CLF_PRESSURE,
485 CLF_static = NX_CLF_STATIC,
486 CLF_disable_collision = NX_CLF_DISABLE_COLLISION,
487 CLF_selfcollision = NX_CLF_SELFCOLLISION,
488 CLF_visualization = NX_CLF_VISUALIZATION,
489 CLF_gravity = NX_CLF_GRAVITY,
490 CLF_bending = NX_CLF_BENDING,
491 CLF_bending_ortho = NX_CLF_BENDING_ORTHO,
492 CLF_damping = NX_CLF_DAMPING,
493 CLF_collision_twoway = NX_CLF_COLLISION_TWOWAY,
494 CLF_triangle_collision = NX_CLF_TRIANGLE_COLLISION,
495 CLF_tearable = NX_CLF_TEARABLE,
496 CLF_hardware = NX_CLF_HARDWARE,
497 CLF_comdamping = NX_CLF_COMDAMPING,
498 CLF_validbounds = NX_CLF_VALIDBOUNDS,
499 CLF_fluid_collision = NX_CLF_FLUID_COLLISION,
500 CLF_disable_dynamic_ccd = NX_CLF_DISABLE_DYNAMIC_CCD,
501 CLF_adhere = NX_CLF_ADHERE
502 };
503
504 enum PhysxContactPairFlag {
505 CPF_ignore_pair = NX_IGNORE_PAIR,
506 CPF_notify_on_start_touch = NX_NOTIFY_ON_START_TOUCH,
507 CPF_notify_on_end_touch = NX_NOTIFY_ON_END_TOUCH,
508 CPF_notify_on_touch = NX_NOTIFY_ON_TOUCH,
509 CPF_notify_on_impact = NX_NOTIFY_ON_IMPACT,
510 CPF_notify_on_roll = NX_NOTIFY_ON_ROLL,
511 CPF_notify_on_slide = NX_NOTIFY_ON_SLIDE,
512 CPF_notify_forces = NX_NOTIFY_FORCES,
513 CPF_notify_on_start_touch_threshold = NX_NOTIFY_ON_START_TOUCH_FORCE_THRESHOLD,
514 CPF_notify_on_end_touch_threshold = NX_NOTIFY_ON_END_TOUCH_FORCE_THRESHOLD,
515 CPF_notify_on_touch_threshold = NX_NOTIFY_ON_TOUCH_FORCE_THRESHOLD,
516 CPF_notify_contact_modifications = NX_NOTIFY_CONTACT_MODIFICATION
517 };
518
519 enum PhysxCombineMode {
520 CM_average = NX_CM_AVERAGE,
521 CM_min = NX_CM_MIN,
522 CM_multiply = NX_CM_MULTIPLY,
523 CM_max = NX_CM_MAX
524 };
525
526 enum PhysxD6JointDriveType {
527 D6_joint_drive_position = NX_D6JOINT_DRIVE_POSITION,
528 D6_joint_drive_velocity = NX_D6JOINT_DRIVE_VELOCITY
529 };
530
531 enum PhysxD6JointFlag {
532 D6_joint_slerp_drive = NX_D6JOINT_SLERP_DRIVE,
533 D6_joint_gear_disabled = NX_D6JOINT_GEAR_ENABLED
534 };
535
536 enum PhysxD6JointMotion {
537 D6_joint_motion_locked = NX_D6JOINT_MOTION_LOCKED,
538 D6_joint_motion_limited = NX_D6JOINT_MOTION_LIMITED,
539 D6_joint_motion_free = NX_D6JOINT_MOTION_FREE
540 };
541
542 enum PhysxDistanceJointFlag {
543 DJF_max_distance_enabled = NX_DJF_MAX_DISTANCE_ENABLED,
544 DJF_mix_distance_enabled = NX_DJF_MIN_DISTANCE_ENABLED,
545 DJF_spring_enabled = NX_DJF_SPRING_ENABLED
546 };
547
548 enum PhysxFilterOp {
549 FO_and = NX_FILTEROP_AND,
550 FO_or = NX_FILTEROP_OR,
551 FO_xor = NX_FILTEROP_XOR,
552 FO_nand = NX_FILTEROP_NAND,
553 FO_nor = NX_FILTEROP_NOR,
554 FO_nxor = NX_FILTEROP_NXOR,
555 FO_swap_and = NX_FILTEROP_SWAP_AND
556 };
557
558 enum PhysxForceFieldCoordinates {
559 FFC_cartesian,
560 FFC_spherical,
561 FFC_cylindrical,
562 FFC_toroidal,
563 };
564
565 enum PhysxForceFieldShapeGroupFlag {
566 FFSG_exclude_group = NX_FFSG_EXCLUDE_GROUP
567 };
568
569 enum PhysxForceMode {
570 FM_force = NX_FORCE,
571 FM_impulse = NX_IMPULSE,
572 FM_velocity_change = NX_VELOCITY_CHANGE,
573 FM_smooth_impulse = NX_SMOOTH_IMPULSE,
574 FM_smooth_velocity_change = NX_SMOOTH_VELOCITY_CHANGE,
575 FM_acceleration = NX_ACCELERATION
576 };
577
578 enum PhysxJointFlag {
579 JF_collision_enabled = NX_JF_COLLISION_ENABLED,
580 JF_visualization = NX_JF_VISUALIZATION
581 };
582
583 enum PhysxMaterialFlag {
584 MF_anisotropic = NX_MF_ANISOTROPIC,
585 MF_disable_friction = NX_MF_DISABLE_FRICTION,
586 MF_disable_strong_friction = NX_MF_DISABLE_STRONG_FRICTION
587 };
588
589 enum PhysxProjectionMode {
590 PM_none = NX_JPM_NONE,
591 PM_point_mindist = NX_JPM_POINT_MINDIST,
592 PM_linear_mindist = NX_JPM_LINEAR_MINDIST
593 };
594
595 enum PhysxPruningStructure {
596 PS_none = NX_PRUNING_NONE,
597 PS_octree = NX_PRUNING_OCTREE,
598 PS_quadtree = NX_PRUNING_QUADTREE,
599 PS_dynamic_aabb_tree = NX_PRUNING_DYNAMIC_AABB_TREE,
600 PS_static_aabb_tree = NX_PRUNING_STATIC_AABB_TREE
601 };
602
603 enum PhysxPulleyJointFlag {
604 PJF_is_rigid = NX_PJF_IS_RIGID,
605 PJF_motor_enabled = NX_PJF_MOTOR_ENABLED
606 };
607
608 enum PhysxRevoluteJointFlag {
609 RJF_limit_enabled = NX_RJF_LIMIT_ENABLED,
610 RJF_motor_enabled = NX_RJF_MOTOR_ENABLED,
611 RJF_spring_enabled = NX_RJF_SPRING_ENABLED
612 };
613
614 enum PhysxSceneFlag {
615 SF_disable_sse = NX_SF_DISABLE_SSE,
616 SF_disable_collisions = NX_SF_DISABLE_COLLISIONS,
617 SF_restricted_scene = NX_SF_RESTRICTED_SCENE,
618 SF_disable_scene_mutex = NX_SF_DISABLE_SCENE_MUTEX,
619 SF_force_cone_friction = NX_SF_FORCE_CONE_FRICTION,
620 SF_sequential_primary = NX_SF_SEQUENTIAL_PRIMARY,
621 SF_fluid_performance_hint = NX_SF_FLUID_PERFORMANCE_HINT,
622 // SF_alternative_fluid_triangle_collision =
623 // NX_SF_ALTERNATIVE_FLUID_TRIANGLE_COLLISION, SF_multithreaded_forcefield
624 // = NX_SF_MULTITHREADED_FORCEFIELD, SF_simulate_separate_thread =
625 // NX_SF_SIMULATE_SEPARATE_THREAD, SF_enable_multithread =
626 // NX_SF_ENABLE_MULTITHREAD,
627 };
628
629 enum PhysxShapeFlag {
630 SF_trigger_on_enter = NX_TRIGGER_ON_ENTER,
631 SF_trigger_on_leave = NX_TRIGGER_ON_LEAVE,
632 SF_trigger_on_stay = NX_TRIGGER_ON_STAY,
633 SF_trigger_enable = NX_TRIGGER_ENABLE,
634 SF_visualization = NX_SF_VISUALIZATION,
635 SF_disable_collision = NX_SF_DISABLE_COLLISION,
636 SF_disable_raycasting = NX_SF_DISABLE_RAYCASTING,
637 SF_disable_response = NX_SF_DISABLE_RESPONSE,
638 SF_disable_scene_queries = NX_SF_DISABLE_SCENE_QUERIES,
639 SF_point_contact_force = NX_SF_POINT_CONTACT_FORCE,
640 SF_feature_indices = NX_SF_FEATURE_INDICES,
641 SF_dynamic_dynamic_ccd = NX_SF_DYNAMIC_DYNAMIC_CCD,
642 SF_fluid_drain = NX_SF_FLUID_DRAIN,
643 SF_fluid_disable_collision = NX_SF_FLUID_DISABLE_COLLISION,
644 SF_fluid_twoway = NX_SF_FLUID_TWOWAY,
645 SF_cloth_drain = NX_SF_CLOTH_DRAIN,
646 SF_cloth_disable_collision = NX_SF_CLOTH_DISABLE_COLLISION,
647 SF_cloth_twoway = NX_SF_CLOTH_TWOWAY,
648 SF_softbody_drain = NX_SF_SOFTBODY_DRAIN,
649 SF_softbody_disable_collision = NX_SF_SOFTBODY_DISABLE_COLLISION,
650 SF_softbody_twoway = NX_SF_SOFTBODY_TWOWAY
651 };
652
653 enum PhysxSoftBodyFlag {
654 SBF_static = NX_SBF_STATIC,
655 SBF_disable_collision = NX_SBF_DISABLE_COLLISION,
656 SBF_selfcollision = NX_SBF_SELFCOLLISION,
657 SBF_visualization = NX_SBF_VISUALIZATION,
658 SBF_gravity = NX_SBF_GRAVITY,
659 SBF_volume_conservtion = NX_SBF_VOLUME_CONSERVATION,
660 SBF_damping = NX_SBF_DAMPING,
661 SBF_collision_twoway = NX_SBF_COLLISION_TWOWAY,
662 SBF_tearable = NX_SBF_TEARABLE,
663 SBF_hardware = NX_SBF_HARDWARE,
664 SBF_comdamping = NX_SBF_COMDAMPING,
665 SBF_validbounds = NX_SBF_VALIDBOUNDS,
666 SBF_fluid_collision = NX_SBF_FLUID_COLLISION,
667 SBF_disable_dynamic_ccd = NX_SBF_DISABLE_DYNAMIC_CCD,
668 SBF_adhere = NX_SBF_ADHERE
669 };
670
671 enum PhysxShapesType {
672 ST_static = NX_STATIC_SHAPES ,
673 ST_dynamic = NX_DYNAMIC_SHAPES ,
674 ST_all = NX_ALL_SHAPES
675 };
676
677 enum PhysxSphericalJointFlag {
678 SJF_twist_limit_enabled = NX_SJF_TWIST_LIMIT_ENABLED,
679 SJF_swing_limit_enabled = NX_SJF_SWING_LIMIT_ENABLED,
680 SJF_twist_spring_enabled = NX_SJF_TWIST_SPRING_ENABLED,
681 SJF_swing_spring_enabled = NX_SJF_SWING_SPRING_ENABLED,
682 SJF_joint_spring_enabled = NX_SJF_JOINT_SPRING_ENABLED,
683 SJF_perpendicular_dir_constraints = NX_SJF_PERPENDICULAR_DIR_CONSTRAINTS
684 };
685
686 enum PhysxUpAxis {
687 X_up = NX_X,
688 Y_up = NX_Y,
689 Z_up = NX_Z
690 };
691
692 enum PhysxVertexAttachmentStatus {
693 VAS_none = NX_CLOTH_VERTEX_ATTACHMENT_NONE,
694 VAS_global = NX_CLOTH_VERTEX_ATTACHMENT_GLOBAL,
695 VAS_shape = NX_CLOTH_VERTEX_ATTACHMENT_SHAPE
696 };
697
698 enum PhysxWheelFlag {
699 WF_steerable_input = NX_WF_STEERABLE_INPUT,
700 WF_steerable_auto = NX_WF_STEERABLE_AUTO,
701 WF_affected_by_handbrake = NX_WF_AFFECTED_BY_HANDBRAKE,
702 WF_accelerated = NX_WF_ACCELERATED
703 };
704
705 enum PhysxWheelShapeFlag {
706 WSF_wheel_axis_contact_normal = NX_WF_WHEEL_AXIS_CONTACT_NORMAL,
707 WSF_input_lat_slipvelocity = NX_WF_INPUT_LAT_SLIPVELOCITY,
708 WSF_input_lng_slipvelocity = NX_WF_INPUT_LNG_SLIPVELOCITY,
709 WSF_unscaled_spring_behavior = NX_WF_UNSCALED_SPRING_BEHAVIOR,
710 WSF_axle_speed_override = NX_WF_AXLE_SPEED_OVERRIDE,
711 WSF_emulate_legacy_wheel = NX_WF_EMULATE_LEGACY_WHEEL,
712 WSF_clamped_friction = NX_WF_CLAMPED_FRICTION
713 };
714
715 };
716
717 EXPCL_PANDAPHYSX std::ostream &operator << (std::ostream &out, PhysxEnums::PhysxUpAxis axis);
718 EXPCL_PANDAPHYSX std::istream &operator >> (std::istream &in, PhysxEnums::PhysxUpAxis &axis);
719
720 #endif
PhysxEnums
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:355
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physx_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.