physx_sys/physx_generated.rs
1/// enum for empty constructor tag
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3#[repr(i32)]
4pub enum PxEMPTY {
5 PxEmpty = 0,
6}
7
8/// enum for zero constructor tag for vectors and matrices
9#[derive(Debug, Clone, Copy, PartialEq, Eq)]
10#[repr(i32)]
11pub enum PxZERO {
12 PxZero = 0,
13}
14
15/// enum for identity constructor flag for quaternions, transforms, and matrices
16#[derive(Debug, Clone, Copy, PartialEq, Eq)]
17#[repr(i32)]
18pub enum PxIDENTITY {
19 PxIdentity = 0,
20}
21
22/// Error codes
23///
24/// These error codes are passed to [`PxErrorCallback`]
25#[derive(Debug, Clone, Copy, PartialEq, Eq)]
26#[repr(i32)]
27pub enum PxErrorCode {
28 NoError = 0,
29 /// An informational message.
30 DebugInfo = 1,
31 /// a warning message for the user to help with debugging
32 DebugWarning = 2,
33 /// method called with invalid parameter(s)
34 InvalidParameter = 4,
35 /// method was called at a time when an operation is not possible
36 InvalidOperation = 8,
37 /// method failed to allocate some memory
38 OutOfMemory = 16,
39 /// The library failed for some reason.
40 /// Possibly you have passed invalid values like NaNs, which are not checked for.
41 InternalError = 32,
42 /// An unrecoverable error, execution should be halted and log output flushed
43 Abort = 64,
44 /// The SDK has determined that an operation may result in poor performance.
45 PerfWarning = 128,
46 /// A bit mask for including all errors
47 MaskAll = -1,
48}
49
50#[derive(Debug, Clone, Copy, PartialEq, Eq)]
51#[repr(u32)]
52pub enum PxThreadPriority {
53 /// High priority
54 High = 0,
55 /// Above Normal priority
56 AboveNormal = 1,
57 /// Normal/default priority
58 Normal = 2,
59 /// Below Normal priority
60 BelowNormal = 3,
61 /// Low priority.
62 Low = 4,
63 ForceDword = 4294967295,
64}
65
66/// Default color values used for debug rendering.
67#[derive(Debug, Clone, Copy, PartialEq, Eq)]
68#[repr(u32)]
69pub enum PxDebugColor {
70 ArgbBlack = 4278190080,
71 ArgbRed = 4294901760,
72 ArgbGreen = 4278255360,
73 ArgbBlue = 4278190335,
74 ArgbYellow = 4294967040,
75 ArgbMagenta = 4294902015,
76 ArgbCyan = 4278255615,
77 ArgbWhite = 4294967295,
78 ArgbGrey = 4286611584,
79 ArgbDarkred = 4287102976,
80 ArgbDarkgreen = 4278224896,
81 ArgbDarkblue = 4278190216,
82}
83
84/// an enumeration of concrete classes inheriting from PxBase
85///
86/// Enumeration space is reserved for future PhysX core types, PhysXExtensions,
87/// PhysXVehicle and Custom application types.
88#[derive(Debug, Clone, Copy, PartialEq, Eq)]
89#[repr(i32)]
90pub enum PxConcreteType {
91 Undefined = 0,
92 Heightfield = 1,
93 ConvexMesh = 2,
94 TriangleMeshBvh33 = 3,
95 TriangleMeshBvh34 = 4,
96 TetrahedronMesh = 5,
97 SoftbodyMesh = 6,
98 RigidDynamic = 7,
99 RigidStatic = 8,
100 Shape = 9,
101 Material = 10,
102 SoftbodyMaterial = 11,
103 ClothMaterial = 12,
104 PbdMaterial = 13,
105 FlipMaterial = 14,
106 MpmMaterial = 15,
107 CustomMaterial = 16,
108 Constraint = 17,
109 Aggregate = 18,
110 ArticulationReducedCoordinate = 19,
111 ArticulationLink = 20,
112 ArticulationJointReducedCoordinate = 21,
113 ArticulationSensor = 22,
114 ArticulationSpatialTendon = 23,
115 ArticulationFixedTendon = 24,
116 ArticulationAttachment = 25,
117 ArticulationTendonJoint = 26,
118 PruningStructure = 27,
119 Bvh = 28,
120 SoftBody = 29,
121 SoftBodyState = 30,
122 PbdParticlesystem = 31,
123 FlipParticlesystem = 32,
124 MpmParticlesystem = 33,
125 CustomParticlesystem = 34,
126 FemCloth = 35,
127 HairSystem = 36,
128 ParticleBuffer = 37,
129 ParticleDiffuseBuffer = 38,
130 ParticleClothBuffer = 39,
131 ParticleRigidBuffer = 40,
132 PhysxCoreCount = 41,
133 FirstPhysxExtension = 256,
134 FirstVehicleExtension = 512,
135 FirstUserExtension = 1024,
136}
137
138impl From<u16> for PxConcreteType {
139 fn from(val: u16) -> Self {
140 #[allow(clippy::match_same_arms)]
141 match val {
142 0 => Self::Undefined,
143 1 => Self::Heightfield,
144 2 => Self::ConvexMesh,
145 3 => Self::TriangleMeshBvh33,
146 4 => Self::TriangleMeshBvh34,
147 5 => Self::TetrahedronMesh,
148 6 => Self::SoftbodyMesh,
149 7 => Self::RigidDynamic,
150 8 => Self::RigidStatic,
151 9 => Self::Shape,
152 10 => Self::Material,
153 11 => Self::SoftbodyMaterial,
154 12 => Self::ClothMaterial,
155 13 => Self::PbdMaterial,
156 14 => Self::FlipMaterial,
157 15 => Self::MpmMaterial,
158 16 => Self::CustomMaterial,
159 17 => Self::Constraint,
160 18 => Self::Aggregate,
161 19 => Self::ArticulationReducedCoordinate,
162 20 => Self::ArticulationLink,
163 21 => Self::ArticulationJointReducedCoordinate,
164 22 => Self::ArticulationSensor,
165 23 => Self::ArticulationSpatialTendon,
166 24 => Self::ArticulationFixedTendon,
167 25 => Self::ArticulationAttachment,
168 26 => Self::ArticulationTendonJoint,
169 27 => Self::PruningStructure,
170 28 => Self::Bvh,
171 29 => Self::SoftBody,
172 30 => Self::SoftBodyState,
173 31 => Self::PbdParticlesystem,
174 32 => Self::FlipParticlesystem,
175 33 => Self::MpmParticlesystem,
176 34 => Self::CustomParticlesystem,
177 35 => Self::FemCloth,
178 36 => Self::HairSystem,
179 37 => Self::ParticleBuffer,
180 38 => Self::ParticleDiffuseBuffer,
181 39 => Self::ParticleClothBuffer,
182 40 => Self::ParticleRigidBuffer,
183 41 => Self::PhysxCoreCount,
184 256 => Self::FirstPhysxExtension,
185 512 => Self::FirstVehicleExtension,
186 1024 => Self::FirstUserExtension,
187 _ => Self::Undefined,
188 }
189 }
190}
191
192/// Flags for PxBase.
193#[derive(Debug, Clone, Copy, PartialEq, Eq)]
194#[repr(i32)]
195pub enum PxBaseFlag {
196 OwnsMemory = 1,
197 IsReleasable = 2,
198}
199
200bitflags::bitflags! {
201 /// Flags for [`PxBaseFlag`]
202 #[derive(Default)]
203 #[repr(transparent)]
204 pub struct PxBaseFlags: u16 {
205 const OwnsMemory = 1 << 0;
206 const IsReleasable = 1 << 1;
207 }
208}
209
210/// Flags used to configure binary meta data entries, typically set through PX_DEF_BIN_METADATA defines.
211#[derive(Debug, Clone, Copy, PartialEq, Eq)]
212#[repr(i32)]
213pub enum PxMetaDataFlag {
214 /// declares a class
215 Class = 1,
216 /// declares class to be virtual
217 Virtual = 2,
218 /// declares a typedef
219 Typedef = 4,
220 /// declares a pointer
221 Ptr = 8,
222 /// declares a handle
223 Handle = 16,
224 /// declares extra data exported with PxSerializer::exportExtraData
225 ExtraData = 32,
226 /// specifies one element of extra data
227 ExtraItem = 64,
228 /// specifies an array of extra data
229 ExtraItems = 128,
230 /// specifies a name of extra data
231 ExtraName = 256,
232 /// declares a union
233 Union = 512,
234 /// declares explicit padding data
235 Padding = 1024,
236 /// declares aligned data
237 Alignment = 2048,
238 /// specifies that the count value's most significant bit needs to be masked out
239 CountMaskMsb = 4096,
240 /// specifies that the count value is treated as zero for a variable value of one - special case for single triangle meshes
241 CountSkipIfOne = 8192,
242 /// specifies that the control value is the negate of the variable value
243 ControlFlip = 16384,
244 /// specifies that the control value is masked - mask bits are assumed to be within eCONTROL_MASK_RANGE
245 ControlMask = 32768,
246 /// mask range allowed for eCONTROL_MASK
247 ControlMaskRange = 255,
248 ForceDword = 2147483647,
249}
250
251/// Identifies the type of each heavyweight PxTask object
252#[derive(Debug, Clone, Copy, PartialEq, Eq)]
253#[repr(i32)]
254pub enum PxTaskType {
255 /// PxTask will be run on the CPU
256 Cpu = 0,
257 /// Return code when attempting to find a task that does not exist
258 NotPresent = 1,
259 /// PxTask execution has been completed
260 Completed = 2,
261}
262
263/// A geometry type.
264///
265/// Used to distinguish the type of a ::PxGeometry object.
266#[derive(Debug, Clone, Copy, PartialEq, Eq)]
267#[repr(i32)]
268pub enum PxGeometryType {
269 Sphere = 0,
270 Plane = 1,
271 Capsule = 2,
272 Box = 3,
273 Convexmesh = 4,
274 Particlesystem = 5,
275 Tetrahedronmesh = 6,
276 Trianglemesh = 7,
277 Heightfield = 8,
278 Hairsystem = 9,
279 Custom = 10,
280 /// internal use only!
281 GeometryCount = 11,
282 /// internal use only!
283 Invalid = -1,
284}
285
286/// Geometry-level query flags.
287#[derive(Debug, Clone, Copy, PartialEq, Eq)]
288#[repr(i32)]
289pub enum PxGeometryQueryFlag {
290 /// Saves/restores SIMD control word for each query (safer but slower). Omit this if you took care of it yourself in your app.
291 SimdGuard = 1,
292}
293
294bitflags::bitflags! {
295 /// Flags for [`PxGeometryQueryFlag`]
296 #[derive(Default)]
297 #[repr(transparent)]
298 pub struct PxGeometryQueryFlags: u32 {
299 const SimdGuard = 1 << 0;
300 }
301}
302
303/// Desired build strategy for bounding-volume hierarchies
304#[derive(Debug, Clone, Copy, PartialEq, Eq)]
305#[repr(i32)]
306pub enum PxBVHBuildStrategy {
307 /// Fast build strategy. Fast build speed, good runtime performance in most cases. Recommended for runtime cooking.
308 Fast = 0,
309 /// Default build strategy. Medium build speed, good runtime performance in all cases.
310 Default = 1,
311 /// SAH build strategy. Slower builds, slightly improved runtime performance in some cases.
312 Sah = 2,
313 Last = 3,
314}
315
316/// Flags controlling the simulated behavior of the convex mesh geometry.
317///
318/// Used in ::PxConvexMeshGeometryFlags.
319#[derive(Debug, Clone, Copy, PartialEq, Eq)]
320#[repr(i32)]
321pub enum PxConvexMeshGeometryFlag {
322 /// Use tighter (but more expensive to compute) bounds around the convex geometry.
323 TightBounds = 1,
324}
325
326bitflags::bitflags! {
327 /// Flags for [`PxConvexMeshGeometryFlag`]
328 #[derive(Default)]
329 #[repr(transparent)]
330 pub struct PxConvexMeshGeometryFlags: u8 {
331 const TightBounds = 1 << 0;
332 }
333}
334
335/// Flags controlling the simulated behavior of the triangle mesh geometry.
336///
337/// Used in ::PxMeshGeometryFlags.
338#[derive(Debug, Clone, Copy, PartialEq, Eq)]
339#[repr(i32)]
340pub enum PxMeshGeometryFlag {
341 /// Use tighter (but more expensive to compute) bounds around the triangle mesh geometry.
342 TightBounds = 1,
343 /// Meshes with this flag set are treated as double-sided.
344 /// This flag is currently only used for raycasts and sweeps (it is ignored for overlap queries).
345 /// For detailed specifications of this flag for meshes and heightfields please refer to the Geometry Query section of the user guide.
346 DoubleSided = 2,
347}
348
349bitflags::bitflags! {
350 /// Flags for [`PxMeshGeometryFlag`]
351 #[derive(Default)]
352 #[repr(transparent)]
353 pub struct PxMeshGeometryFlags: u8 {
354 const TightBounds = 1 << 0;
355 const DoubleSided = 1 << 1;
356 }
357}
358
359/// Identifies the solver to use for a particle system.
360#[derive(Debug, Clone, Copy, PartialEq, Eq)]
361#[repr(i32)]
362pub enum PxParticleSolverType {
363 /// The position based dynamics solver that can handle fluid, granular material, cloth, inflatables etc. See [`PxPBDParticleSystem`].
364 Pbd = 1,
365 /// The FLIP fluid solver. See [`PxFLIPParticleSystem`].
366 Flip = 2,
367 /// The MPM (material point method) solver that can handle a variety of materials. See [`PxMPMParticleSystem`].
368 Mpm = 4,
369 /// Custom solver. The user needs to specify the interaction of the particle by providing appropriate functions. Can be used e.g. for molecular dynamics simulations. See [`PxCustomParticleSystem`].
370 Custom = 8,
371}
372
373/// Scene query and geometry query behavior flags.
374///
375/// PxHitFlags are used for 3 different purposes:
376///
377/// 1) To request hit fields to be filled in by scene queries (such as hit position, normal, face index or UVs).
378/// 2) Once query is completed, to indicate which fields are valid (note that a query may produce more valid fields than requested).
379/// 3) To specify additional options for the narrow phase and mid-phase intersection routines.
380///
381/// All these flags apply to both scene queries and geometry queries (PxGeometryQuery).
382#[derive(Debug, Clone, Copy, PartialEq, Eq)]
383#[repr(i32)]
384pub enum PxHitFlag {
385 /// "position" member of [`PxQueryHit`] is valid
386 Position = 1,
387 /// "normal" member of [`PxQueryHit`] is valid
388 Normal = 2,
389 /// "u" and "v" barycentric coordinates of [`PxQueryHit`] are valid. Not applicable to sweep queries.
390 Uv = 8,
391 /// Performance hint flag for sweeps when it is known upfront there's no initial overlap.
392 /// NOTE: using this flag may cause undefined results if shapes are initially overlapping.
393 AssumeNoInitialOverlap = 16,
394 /// Report any first hit. Used for geometries that contain more than one primitive. For meshes,
395 /// if neither eMESH_MULTIPLE nor eANY_HIT is specified, a single closest hit will be reported.
396 AnyHit = 32,
397 /// Report all hits for meshes rather than just the first. Not applicable to sweep queries.
398 MeshMultiple = 64,
399 /// Report hits with back faces of mesh triangles. Also report hits for raycast
400 /// originating on mesh surface and facing away from the surface normal. Not applicable to sweep queries.
401 /// Please refer to the user guide for heightfield-specific differences.
402 MeshBothSides = 128,
403 /// Use more accurate but slower narrow phase sweep tests.
404 /// May provide better compatibility with PhysX 3.2 sweep behavior.
405 PreciseSweep = 256,
406 /// Report the minimum translation depth, normal and contact point.
407 Mtd = 512,
408 /// "face index" member of [`PxQueryHit`] is valid
409 FaceIndex = 1024,
410 Default = 1027,
411 /// Only this subset of flags can be modified by pre-filter. Other modifications will be discarded.
412 ModifiableFlags = 464,
413}
414
415bitflags::bitflags! {
416 /// Flags for [`PxHitFlag`]
417 #[derive(Default)]
418 #[repr(transparent)]
419 pub struct PxHitFlags: u16 {
420 const Position = 1 << 0;
421 const Normal = 1 << 1;
422 const Uv = 1 << 3;
423 const AssumeNoInitialOverlap = 1 << 4;
424 const AnyHit = 1 << 5;
425 const MeshMultiple = 1 << 6;
426 const MeshBothSides = 1 << 7;
427 const PreciseSweep = 1 << 8;
428 const Mtd = 1 << 9;
429 const FaceIndex = 1 << 10;
430 const Default = Self::Position.bits | Self::Normal.bits | Self::FaceIndex.bits;
431 const ModifiableFlags = Self::AssumeNoInitialOverlap.bits | Self::MeshMultiple.bits | Self::MeshBothSides.bits | Self::PreciseSweep.bits;
432 }
433}
434
435/// Describes the format of height field samples.
436#[derive(Debug, Clone, Copy, PartialEq, Eq)]
437#[repr(i32)]
438pub enum PxHeightFieldFormat {
439 /// Height field height data is 16 bit signed integers, followed by triangle materials.
440 ///
441 /// Each sample is 32 bits wide arranged as follows:
442 ///
443 /// 1) First there is a 16 bit height value.
444 /// 2) Next, two one byte material indices, with the high bit of each byte reserved for special use.
445 /// (so the material index is only 7 bits).
446 /// The high bit of material0 is the tess-flag.
447 /// The high bit of material1 is reserved for future use.
448 ///
449 /// There are zero or more unused bytes before the next sample depending on PxHeightFieldDesc.sampleStride,
450 /// where the application may eventually keep its own data.
451 ///
452 /// This is the only format supported at the moment.
453 S16Tm = 1,
454}
455
456/// Determines the tessellation of height field cells.
457#[derive(Debug, Clone, Copy, PartialEq, Eq)]
458#[repr(i32)]
459pub enum PxHeightFieldTessFlag {
460 /// This flag determines which way each quad cell is subdivided.
461 ///
462 /// The flag lowered indicates subdivision like this: (the 0th vertex is referenced by only one triangle)
463 ///
464 /// +--+--+--+---> column
465 /// | /| /| /|
466 /// |/ |/ |/ |
467 /// +--+--+--+
468 /// | /| /| /|
469 /// |/ |/ |/ |
470 /// +--+--+--+
471 /// |
472 /// |
473 /// V row
474 ///
475 /// The flag raised indicates subdivision like this: (the 0th vertex is shared by two triangles)
476 ///
477 /// +--+--+--+---> column
478 /// |
479 /// \
480 /// |
481 /// \
482 /// |
483 /// \
484 /// |
485 /// |
486 /// \
487 /// |
488 /// \
489 /// |
490 /// \
491 /// |
492 /// +--+--+--+
493 /// |
494 /// \
495 /// |
496 /// \
497 /// |
498 /// \
499 /// |
500 /// |
501 /// \
502 /// |
503 /// \
504 /// |
505 /// \
506 /// |
507 /// +--+--+--+
508 /// |
509 /// |
510 /// V row
511 E0ThVertexShared = 1,
512}
513
514/// Enum with flag values to be used in PxHeightFieldDesc.flags.
515#[derive(Debug, Clone, Copy, PartialEq, Eq)]
516#[repr(i32)]
517pub enum PxHeightFieldFlag {
518 /// Disable collisions with height field with boundary edges.
519 ///
520 /// Raise this flag if several terrain patches are going to be placed adjacent to each other,
521 /// to avoid a bump when sliding across.
522 ///
523 /// This flag is ignored in contact generation with sphere and capsule shapes.
524 NoBoundaryEdges = 1,
525}
526
527bitflags::bitflags! {
528 /// Flags for [`PxHeightFieldFlag`]
529 #[derive(Default)]
530 #[repr(transparent)]
531 pub struct PxHeightFieldFlags: u16 {
532 const NoBoundaryEdges = 1 << 0;
533 }
534}
535
536/// Special material index values for height field samples.
537#[derive(Debug, Clone, Copy, PartialEq, Eq)]
538#[repr(i32)]
539pub enum PxHeightFieldMaterial {
540 /// A material indicating that the triangle should be treated as a hole in the mesh.
541 Hole = 127,
542}
543
544#[derive(Debug, Clone, Copy, PartialEq, Eq)]
545#[repr(i32)]
546pub enum PxMeshMeshQueryFlag {
547 /// Report all overlaps
548 Default = 0,
549 /// Ignore coplanar triangle-triangle overlaps
550 DiscardCoplanar = 1,
551}
552
553bitflags::bitflags! {
554 /// Flags for [`PxMeshMeshQueryFlag`]
555 #[derive(Default)]
556 #[repr(transparent)]
557 pub struct PxMeshMeshQueryFlags: u32 {
558 const DiscardCoplanar = 1 << 0;
559 }
560}
561
562/// Enum with flag values to be used in PxSimpleTriangleMesh::flags.
563#[derive(Debug, Clone, Copy, PartialEq, Eq)]
564#[repr(i32)]
565pub enum PxMeshFlag {
566 /// Specifies if the SDK should flip normals.
567 ///
568 /// The PhysX libraries assume that the face normal of a triangle with vertices [a,b,c] can be computed as:
569 /// edge1 = b-a
570 /// edge2 = c-a
571 /// face_normal = edge1 x edge2.
572 ///
573 /// Note: This is the same as a counterclockwise winding in a right handed coordinate system or
574 /// alternatively a clockwise winding order in a left handed coordinate system.
575 ///
576 /// If this does not match the winding order for your triangles, raise the below flag.
577 Flipnormals = 1,
578 /// Denotes the use of 16-bit vertex indices
579 E16BitIndices = 2,
580}
581
582bitflags::bitflags! {
583 /// Flags for [`PxMeshFlag`]
584 #[derive(Default)]
585 #[repr(transparent)]
586 pub struct PxMeshFlags: u16 {
587 const Flipnormals = 1 << 0;
588 const E16BitIndices = 1 << 1;
589 }
590}
591
592/// Mesh midphase structure. This enum is used to select the desired acceleration structure for midphase queries
593/// (i.e. raycasts, overlaps, sweeps vs triangle meshes).
594///
595/// The PxMeshMidPhase::eBVH33 structure is the one used in recent PhysX versions (up to PhysX 3.3). It has great performance and is
596/// supported on all platforms. It is deprecated since PhysX 5.x.
597///
598/// The PxMeshMidPhase::eBVH34 structure is a revisited implementation introduced in PhysX 3.4. It can be significantly faster both
599/// in terms of cooking performance and runtime performance.
600#[derive(Debug, Clone, Copy, PartialEq, Eq)]
601#[repr(i32)]
602pub enum PxMeshMidPhase {
603 /// Default midphase mesh structure, as used up to PhysX 3.3 (deprecated)
604 Bvh33 = 0,
605 /// New midphase mesh structure, introduced in PhysX 3.4
606 Bvh34 = 1,
607 Last = 2,
608}
609
610/// Flags for the mesh geometry properties.
611///
612/// Used in ::PxTriangleMeshFlags.
613#[derive(Debug, Clone, Copy, PartialEq, Eq)]
614#[repr(i32)]
615pub enum PxTriangleMeshFlag {
616 /// The triangle mesh has 16bits vertex indices.
617 E16BitIndices = 2,
618 /// The triangle mesh has adjacency information build.
619 AdjacencyInfo = 4,
620 /// Indicates that this mesh would preferably not be the mesh projected for mesh-mesh collision. This can indicate that the mesh is not well tessellated.
621 PreferNoSdfProj = 8,
622}
623
624bitflags::bitflags! {
625 /// Flags for [`PxTriangleMeshFlag`]
626 #[derive(Default)]
627 #[repr(transparent)]
628 pub struct PxTriangleMeshFlags: u8 {
629 const E16BitIndices = 1 << 1;
630 const AdjacencyInfo = 1 << 2;
631 const PreferNoSdfProj = 1 << 3;
632 }
633}
634
635#[derive(Debug, Clone, Copy, PartialEq, Eq)]
636#[repr(i32)]
637pub enum PxTetrahedronMeshFlag {
638 /// The tetrahedron mesh has 16bits vertex indices
639 E16BitIndices = 2,
640}
641
642bitflags::bitflags! {
643 /// Flags for [`PxTetrahedronMeshFlag`]
644 #[derive(Default)]
645 #[repr(transparent)]
646 pub struct PxTetrahedronMeshFlags: u8 {
647 const E16BitIndices = 1 << 1;
648 }
649}
650
651/// Flags which control the behavior of an actor.
652#[derive(Debug, Clone, Copy, PartialEq, Eq)]
653#[repr(i32)]
654pub enum PxActorFlag {
655 /// Enable debug renderer for this actor
656 Visualization = 1,
657 /// Disables scene gravity for this actor
658 DisableGravity = 2,
659 /// Enables the sending of PxSimulationEventCallback::onWake() and PxSimulationEventCallback::onSleep() notify events
660 SendSleepNotifies = 4,
661 /// Disables simulation for the actor.
662 ///
663 /// This is only supported by PxRigidStatic and PxRigidDynamic actors and can be used to reduce the memory footprint when rigid actors are
664 /// used for scene queries only.
665 ///
666 /// Setting this flag will remove all constraints attached to the actor from the scene.
667 ///
668 /// If this flag is set, the following calls are forbidden:
669 ///
670 /// PxRigidBody: setLinearVelocity(), setAngularVelocity(), addForce(), addTorque(), clearForce(), clearTorque(), setForceAndTorque()
671 ///
672 /// PxRigidDynamic: setKinematicTarget(), setWakeCounter(), wakeUp(), putToSleep()
673 ///
674 /// Sleeping:
675 /// Raising this flag will set all velocities and the wake counter to 0, clear all forces, clear the kinematic target, put the actor
676 /// to sleep and wake up all touching actors from the previous frame.
677 DisableSimulation = 8,
678}
679
680bitflags::bitflags! {
681 /// Flags for [`PxActorFlag`]
682 #[derive(Default)]
683 #[repr(transparent)]
684 pub struct PxActorFlags: u8 {
685 const Visualization = 1 << 0;
686 const DisableGravity = 1 << 1;
687 const SendSleepNotifies = 1 << 2;
688 const DisableSimulation = 1 << 3;
689 }
690}
691
692/// Identifies each type of actor.
693#[derive(Debug, Clone, Copy, PartialEq, Eq)]
694#[repr(i32)]
695pub enum PxActorType {
696 /// A static rigid body
697 RigidStatic = 0,
698 /// A dynamic rigid body
699 RigidDynamic = 1,
700 /// An articulation link
701 ArticulationLink = 2,
702}
703
704#[derive(Debug, Clone, Copy, PartialEq, Eq)]
705#[repr(i32)]
706pub enum PxAggregateType {
707 /// Aggregate will contain various actors of unspecified types
708 Generic = 0,
709 /// Aggregate will only contain static actors
710 Static = 1,
711 /// Aggregate will only contain kinematic actors
712 Kinematic = 2,
713}
714
715/// Constraint row flags
716///
717/// These flags configure the post-processing of constraint rows and the behavior of the solver while solving constraints
718#[derive(Debug, Clone, Copy, PartialEq, Eq)]
719#[repr(i32)]
720pub enum Px1DConstraintFlag {
721 /// whether the constraint is a spring. Mutually exclusive with eRESTITUTION. If set, eKEEPBIAS is ignored.
722 Spring = 1,
723 /// whether the constraint is a force or acceleration spring. Only valid if eSPRING is set.
724 AccelerationSpring = 2,
725 /// whether the restitution model should be applied to generate the target velocity. Mutually exclusive with eSPRING. If restitution causes a bounces, eKEEPBIAS is ignored
726 Restitution = 4,
727 /// whether to keep the error term when solving for velocity. Ignored if restitution generates bounce, or eSPRING is set.
728 Keepbias = 8,
729 /// whether to accumulate the force value from this constraint in the force total that is reported for the constraint and tested for breakage
730 OutputForce = 16,
731 /// whether the constraint has a drive force limit (which will be scaled by dt unless PxConstraintFlag::eLIMITS_ARE_FORCES is set)
732 HasDriveLimit = 32,
733 /// whether this is an angular or linear constraint
734 AngularConstraint = 64,
735 /// whether the constraint's geometric error should drive the target velocity
736 DriveRow = 128,
737}
738
739bitflags::bitflags! {
740 /// Flags for [`Px1DConstraintFlag`]
741 #[derive(Default)]
742 #[repr(transparent)]
743 pub struct Px1DConstraintFlags: u16 {
744 const Spring = 1 << 0;
745 const AccelerationSpring = 1 << 1;
746 const Restitution = 1 << 2;
747 const Keepbias = 1 << 3;
748 const OutputForce = 1 << 4;
749 const HasDriveLimit = 1 << 5;
750 const AngularConstraint = 1 << 6;
751 const DriveRow = 1 << 7;
752 }
753}
754
755/// Constraint type hints which the solver uses to optimize constraint handling
756#[derive(Debug, Clone, Copy, PartialEq, Eq)]
757#[repr(i32)]
758pub enum PxConstraintSolveHint {
759 /// no special properties
760 None = 0,
761 /// a group of acceleration drive constraints with the same stiffness and drive parameters
762 Acceleration1 = 256,
763 /// temporary special value to identify SLERP drive rows
764 SlerpSpring = 258,
765 /// a group of acceleration drive constraints with the same stiffness and drive parameters
766 Acceleration2 = 512,
767 /// a group of acceleration drive constraints with the same stiffness and drive parameters
768 Acceleration3 = 768,
769 /// rotational equality constraints with no force limit and no velocity target
770 RotationalEquality = 1024,
771 /// rotational inequality constraints with (0, PX_MAX_FLT) force limits
772 RotationalInequality = 1025,
773 /// equality constraints with no force limit and no velocity target
774 Equality = 2048,
775 /// inequality constraints with (0, PX_MAX_FLT) force limits
776 Inequality = 2049,
777}
778
779/// Flags for determining which components of the constraint should be visualized.
780#[derive(Debug, Clone, Copy, PartialEq, Eq)]
781#[repr(i32)]
782pub enum PxConstraintVisualizationFlag {
783 /// visualize constraint frames
784 LocalFrames = 1,
785 /// visualize constraint limits
786 Limits = 2,
787}
788
789/// Flags for determining how PVD should serialize a constraint update
790#[derive(Debug, Clone, Copy, PartialEq, Eq)]
791#[repr(i32)]
792pub enum PxPvdUpdateType {
793 /// triggers createPvdInstance call, creates an instance of a constraint
794 CreateInstance = 0,
795 /// triggers releasePvdInstance call, releases an instance of a constraint
796 ReleaseInstance = 1,
797 /// triggers updatePvdProperties call, updates all properties of a constraint
798 UpdateAllProperties = 2,
799 /// triggers simUpdate call, updates all simulation properties of a constraint
800 UpdateSimProperties = 3,
801}
802
803/// Constraint descriptor used inside the solver
804#[derive(Debug, Clone, Copy, PartialEq, Eq)]
805#[repr(i32)]
806pub enum ConstraintType {
807 /// Defines this pair is a contact constraint
808 ContactConstraint = 0,
809 /// Defines this pair is a joint constraint
810 JointConstraint = 1,
811}
812
813/// Data structure used for preparing constraints before solving them
814#[derive(Debug, Clone, Copy, PartialEq, Eq)]
815#[repr(i32)]
816pub enum BodyState {
817 DynamicBody = 1,
818 StaticBody = 2,
819 KinematicBody = 4,
820 Articulation = 8,
821}
822
823/// @
824/// {
825#[derive(Debug, Clone, Copy, PartialEq, Eq)]
826#[repr(i32)]
827pub enum PxArticulationAxis {
828 /// Rotational about eX
829 Twist = 0,
830 /// Rotational about eY
831 Swing1 = 1,
832 /// Rotational about eZ
833 Swing2 = 2,
834 /// Linear in eX
835 X = 3,
836 /// Linear in eY
837 Y = 4,
838 /// Linear in eZ
839 Z = 5,
840 Count = 6,
841}
842
843#[derive(Debug, Clone, Copy, PartialEq, Eq)]
844#[repr(i32)]
845pub enum PxArticulationMotion {
846 /// Locked axis, i.e. degree of freedom (DOF)
847 Locked = 0,
848 /// Limited DOF - set limits of joint DOF together with this flag, see PxArticulationJointReducedCoordinate::setLimitParams
849 Limited = 1,
850 /// Free DOF
851 Free = 2,
852}
853
854bitflags::bitflags! {
855 /// Flags for [`PxArticulationMotion`]
856 #[derive(Default)]
857 #[repr(transparent)]
858 pub struct PxArticulationMotions: u8 {
859 const Limited = 1 << 0;
860 const Free = 1 << 1;
861 }
862}
863
864#[derive(Debug, Clone, Copy, PartialEq, Eq)]
865#[repr(i32)]
866pub enum PxArticulationJointType {
867 /// All joint axes, i.e. degrees of freedom (DOFs) locked
868 Fix = 0,
869 /// Single linear DOF, e.g. cart on a rail
870 Prismatic = 1,
871 /// Single rotational DOF, e.g. an elbow joint or a rotational motor, position wrapped at 2pi radians
872 Revolute = 2,
873 /// Single rotational DOF, e.g. an elbow joint or a rotational motor, position not wrapped
874 RevoluteUnwrapped = 3,
875 /// Ball and socket joint with two or three DOFs
876 Spherical = 4,
877 Undefined = 5,
878}
879
880#[derive(Debug, Clone, Copy, PartialEq, Eq)]
881#[repr(i32)]
882pub enum PxArticulationFlag {
883 /// Set articulation base to be fixed.
884 FixBase = 1,
885 /// Limits for drive effort are forces and torques rather than impulses, see PxArticulationDrive::maxForce.
886 DriveLimitsAreForces = 2,
887 /// Disable collisions between the articulation's links (note that parent/child collisions are disabled internally in either case).
888 DisableSelfCollision = 4,
889 /// Enable in order to be able to query joint solver (i.e. constraint) forces using PxArticulationCache::jointSolverForces.
890 ComputeJointForces = 8,
891}
892
893bitflags::bitflags! {
894 /// Flags for [`PxArticulationFlag`]
895 #[derive(Default)]
896 #[repr(transparent)]
897 pub struct PxArticulationFlags: u8 {
898 const FixBase = 1 << 0;
899 const DriveLimitsAreForces = 1 << 1;
900 const DisableSelfCollision = 1 << 2;
901 const ComputeJointForces = 1 << 3;
902 }
903}
904
905#[derive(Debug, Clone, Copy, PartialEq, Eq)]
906#[repr(i32)]
907pub enum PxArticulationDriveType {
908 /// The output of the implicit spring drive controller is a force/torque.
909 Force = 0,
910 /// The output of the implicit spring drive controller is a joint acceleration (use this to get (spatial)-inertia-invariant behavior of the drive).
911 Acceleration = 1,
912 /// Sets the drive gains internally to track a target position almost kinematically (i.e. with very high drive gains).
913 Target = 2,
914 /// Sets the drive gains internally to track a target velocity almost kinematically (i.e. with very high drive gains).
915 Velocity = 3,
916 None = 4,
917}
918
919/// A description of the types of articulation data that may be directly written to and read from the GPU using the functions
920/// PxScene::copyArticulationData() and PxScene::applyArticulationData(). Types that are read-only may only be used in conjunction with
921/// PxScene::copyArticulationData(). Types that are write-only may only be used in conjunction with PxScene::applyArticulationData().
922/// A subset of data types may be used in conjunction with both PxScene::applyArticulationData() and PxScene::applyArticulationData().
923#[derive(Debug, Clone, Copy, PartialEq, Eq)]
924#[repr(i32)]
925pub enum PxArticulationGpuDataType {
926 /// The joint positions, read and write, see PxScene::copyArticulationData(), PxScene::applyArticulationData()
927 JointPosition = 0,
928 /// The joint velocities, read and write, see PxScene::copyArticulationData(), PxScene::applyArticulationData()
929 JointVelocity = 1,
930 /// The joint accelerations, read only, see PxScene::copyArticulationData()
931 JointAcceleration = 2,
932 /// The applied joint forces, write only, see PxScene::applyArticulationData()
933 JointForce = 3,
934 /// The computed joint constraint solver forces, read only, see PxScene::copyArticulationData()()
935 JointSolverForce = 4,
936 /// The velocity targets for the joint drives, write only, see PxScene::applyArticulationData()
937 JointTargetVelocity = 5,
938 /// The position targets for the joint drives, write only, see PxScene::applyArticulationData()
939 JointTargetPosition = 6,
940 /// The spatial sensor forces, read only, see PxScene::copyArticulationData()
941 SensorForce = 7,
942 /// The root link transform, read and write, see PxScene::copyArticulationData(), PxScene::applyArticulationData()
943 RootTransform = 8,
944 /// The root link velocity, read and write, see PxScene::copyArticulationData(), PxScene::applyArticulationData()
945 RootVelocity = 9,
946 /// The link transforms including root link, read only, see PxScene::copyArticulationData()
947 LinkTransform = 10,
948 /// The link velocities including root link, read only, see PxScene::copyArticulationData()
949 LinkVelocity = 11,
950 /// The forces to apply to links, write only, see PxScene::applyArticulationData()
951 LinkForce = 12,
952 /// The torques to apply to links, write only, see PxScene::applyArticulationData()
953 LinkTorque = 13,
954 /// Fixed tendon data, write only, see PxScene::applyArticulationData()
955 FixedTendon = 14,
956 /// Fixed tendon joint data, write only, see PxScene::applyArticulationData()
957 FixedTendonJoint = 15,
958 /// Spatial tendon data, write only, see PxScene::applyArticulationData()
959 SpatialTendon = 16,
960 /// Spatial tendon attachment data, write only, see PxScene::applyArticulationData()
961 SpatialTendonAttachment = 17,
962}
963
964/// These flags determine what data is read or written to the internal articulation data via cache.
965#[derive(Debug, Clone, Copy, PartialEq, Eq)]
966#[repr(i32)]
967pub enum PxArticulationCacheFlag {
968 /// The joint velocities, see PxArticulationCache::jointVelocity.
969 Velocity = 1,
970 /// The joint accelerations, see PxArticulationCache::jointAcceleration.
971 Acceleration = 2,
972 /// The joint positions, see PxArticulationCache::jointPosition.
973 Position = 4,
974 /// The joint forces, see PxArticulationCache::jointForce.
975 Force = 8,
976 /// The link velocities, see PxArticulationCache::linkVelocity.
977 LinkVelocity = 16,
978 /// The link accelerations, see PxArticulationCache::linkAcceleration.
979 LinkAcceleration = 32,
980 /// Root link transform, see PxArticulationCache::rootLinkData.
981 RootTransform = 64,
982 /// Root link velocities (read/write) and accelerations (read), see PxArticulationCache::rootLinkData.
983 RootVelocities = 128,
984 /// The spatial sensor forces, see PxArticulationCache::sensorForces.
985 SensorForces = 256,
986 /// Solver constraint joint forces, see PxArticulationCache::jointSolverForces.
987 JointSolverForces = 512,
988 All = 247,
989}
990
991bitflags::bitflags! {
992 /// Flags for [`PxArticulationCacheFlag`]
993 #[derive(Default)]
994 #[repr(transparent)]
995 pub struct PxArticulationCacheFlags: u32 {
996 const Velocity = 1 << 0;
997 const Acceleration = 1 << 1;
998 const Position = 1 << 2;
999 const Force = 1 << 3;
1000 const LinkVelocity = 1 << 4;
1001 const LinkAcceleration = 1 << 5;
1002 const RootTransform = 1 << 6;
1003 const RootVelocities = 1 << 7;
1004 const SensorForces = 1 << 8;
1005 const JointSolverForces = 1 << 9;
1006 const All = Self::Velocity.bits | Self::Acceleration.bits | Self::Position.bits | Self::LinkVelocity.bits | Self::LinkAcceleration.bits | Self::RootTransform.bits | Self::RootVelocities.bits;
1007 }
1008}
1009
1010/// Flags to configure the forces reported by articulation link sensors.
1011#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1012#[repr(i32)]
1013pub enum PxArticulationSensorFlag {
1014 /// Raise to receive forces from forward dynamics.
1015 ForwardDynamicsForces = 1,
1016 /// Raise to receive forces from constraint solver.
1017 ConstraintSolverForces = 2,
1018 /// Raise to receive forces in the world rotation frame, otherwise they will be reported in the sensor's local frame.
1019 WorldFrame = 4,
1020}
1021
1022bitflags::bitflags! {
1023 /// Flags for [`PxArticulationSensorFlag`]
1024 #[derive(Default)]
1025 #[repr(transparent)]
1026 pub struct PxArticulationSensorFlags: u8 {
1027 const ForwardDynamicsForces = 1 << 0;
1028 const ConstraintSolverForces = 1 << 1;
1029 const WorldFrame = 1 << 2;
1030 }
1031}
1032
1033/// Flag that configures articulation-state updates by PxArticulationReducedCoordinate::updateKinematic.
1034#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1035#[repr(i32)]
1036pub enum PxArticulationKinematicFlag {
1037 /// Raise after any changes to the articulation root or joint positions using non-cache API calls. Updates links' positions and velocities.
1038 Position = 1,
1039 /// Raise after velocity-only changes to the articulation root or joints using non-cache API calls. Updates links' velocities.
1040 Velocity = 2,
1041}
1042
1043bitflags::bitflags! {
1044 /// Flags for [`PxArticulationKinematicFlag`]
1045 #[derive(Default)]
1046 #[repr(transparent)]
1047 pub struct PxArticulationKinematicFlags: u8 {
1048 const Position = 1 << 0;
1049 const Velocity = 1 << 1;
1050 }
1051}
1052
1053/// Flags which affect the behavior of PxShapes.
1054#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1055#[repr(i32)]
1056pub enum PxShapeFlag {
1057 /// The shape will partake in collision in the physical simulation.
1058 ///
1059 /// It is illegal to raise the eSIMULATION_SHAPE and eTRIGGER_SHAPE flags.
1060 /// In the event that one of these flags is already raised the sdk will reject any
1061 /// attempt to raise the other. To raise the eSIMULATION_SHAPE first ensure that
1062 /// eTRIGGER_SHAPE is already lowered.
1063 ///
1064 /// This flag has no effect if simulation is disabled for the corresponding actor (see [`PxActorFlag::eDISABLE_SIMULATION`]).
1065 SimulationShape = 1,
1066 /// The shape will partake in scene queries (ray casts, overlap tests, sweeps, ...).
1067 SceneQueryShape = 2,
1068 /// The shape is a trigger which can send reports whenever other shapes enter/leave its volume.
1069 ///
1070 /// Triangle meshes and heightfields can not be triggers. Shape creation will fail in these cases.
1071 ///
1072 /// Shapes marked as triggers do not collide with other objects. If an object should act both
1073 /// as a trigger shape and a collision shape then create a rigid body with two shapes, one being a
1074 /// trigger shape and the other a collision shape. It is illegal to raise the eTRIGGER_SHAPE and
1075 /// eSIMULATION_SHAPE flags on a single PxShape instance. In the event that one of these flags is already
1076 /// raised the sdk will reject any attempt to raise the other. To raise the eTRIGGER_SHAPE flag first
1077 /// ensure that eSIMULATION_SHAPE flag is already lowered.
1078 ///
1079 /// Trigger shapes will no longer send notification events for interactions with other trigger shapes.
1080 ///
1081 /// Shapes marked as triggers are allowed to participate in scene queries, provided the eSCENE_QUERY_SHAPE flag is set.
1082 ///
1083 /// This flag has no effect if simulation is disabled for the corresponding actor (see [`PxActorFlag::eDISABLE_SIMULATION`]).
1084 TriggerShape = 4,
1085 /// Enable debug renderer for this shape
1086 Visualization = 8,
1087}
1088
1089bitflags::bitflags! {
1090 /// Flags for [`PxShapeFlag`]
1091 #[derive(Default)]
1092 #[repr(transparent)]
1093 pub struct PxShapeFlags: u8 {
1094 const SimulationShape = 1 << 0;
1095 const SceneQueryShape = 1 << 1;
1096 const TriggerShape = 1 << 2;
1097 const Visualization = 1 << 3;
1098 }
1099}
1100
1101/// Parameter to addForce() and addTorque() calls, determines the exact operation that is carried out.
1102#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1103#[repr(i32)]
1104pub enum PxForceMode {
1105 /// parameter has unit of mass * length / time^2, i.e., a force
1106 Force = 0,
1107 /// parameter has unit of mass * length / time, i.e., force * time
1108 Impulse = 1,
1109 /// parameter has unit of length / time, i.e., the effect is mass independent: a velocity change.
1110 VelocityChange = 2,
1111 /// parameter has unit of length/ time^2, i.e., an acceleration. It gets treated just like a force except the mass is not divided out before integration.
1112 Acceleration = 3,
1113}
1114
1115/// Collection of flags describing the behavior of a rigid body.
1116#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1117#[repr(i32)]
1118pub enum PxRigidBodyFlag {
1119 /// Enable kinematic mode for the body.
1120 Kinematic = 1,
1121 /// Use the kinematic target transform for scene queries.
1122 ///
1123 /// If this flag is raised, then scene queries will treat the kinematic target transform as the current pose
1124 /// of the body (instead of using the actual pose). Without this flag, the kinematic target will only take
1125 /// effect with respect to scene queries after a simulation step.
1126 UseKinematicTargetForSceneQueries = 2,
1127 /// Enable CCD for the body.
1128 EnableCcd = 4,
1129 /// Enabled CCD in swept integration for the actor.
1130 ///
1131 /// If this flag is raised and CCD is enabled, CCD interactions will simulate friction. By default, friction is disabled in CCD interactions because
1132 /// CCD friction has been observed to introduce some simulation artifacts. CCD friction was enabled in previous versions of the SDK. Raising this flag will result in behavior
1133 /// that is a closer match for previous versions of the SDK.
1134 ///
1135 /// This flag requires PxRigidBodyFlag::eENABLE_CCD to be raised to have any effect.
1136 EnableCcdFriction = 8,
1137 /// Register a rigid body to dynamically adjust contact offset based on velocity. This can be used to achieve a CCD effect.
1138 ///
1139 /// If both eENABLE_CCD and eENABLE_SPECULATIVE_CCD are set on the same body, then angular motions are handled by speculative
1140 /// contacts (eENABLE_SPECULATIVE_CCD) while linear motions are handled by sweeps (eENABLE_CCD).
1141 EnableSpeculativeCcd = 16,
1142 /// Register a rigid body for reporting pose changes by the simulation at an early stage.
1143 ///
1144 /// Sometimes it might be advantageous to get access to the new pose of a rigid body as early as possible and
1145 /// not wait until the call to fetchResults() returns. Setting this flag will schedule the rigid body to get reported
1146 /// in [`PxSimulationEventCallback::onAdvance`](). Please refer to the documentation of that callback to understand
1147 /// the behavior and limitations of this functionality.
1148 EnablePoseIntegrationPreview = 32,
1149 /// Permit CCD to limit maxContactImpulse. This is useful for use-cases like a destruction system but can cause visual artefacts so is not enabled by default.
1150 EnableCcdMaxContactImpulse = 64,
1151 /// Carries over forces/accelerations between frames, rather than clearing them
1152 RetainAccelerations = 128,
1153 /// Forces kinematic-kinematic pairs notifications for this actor.
1154 ///
1155 /// This flag overrides the global scene-level PxPairFilteringMode setting for kinematic actors.
1156 /// This is equivalent to having PxPairFilteringMode::eKEEP for pairs involving this actor.
1157 ///
1158 /// A particular use case is when you have a large amount of kinematic actors, but you are only
1159 /// interested in interactions between a few of them. In this case it is best to use
1160 /// PxSceneDesc.kineKineFilteringMode = PxPairFilteringMode::eKILL, and then raise the
1161 /// eFORCE_KINE_KINE_NOTIFICATIONS flag on the small set of kinematic actors that need
1162 /// notifications.
1163 ///
1164 /// This has no effect if PxRigidBodyFlag::eKINEMATIC is not set.
1165 ///
1166 /// Changing this flag at runtime will not have an effect until you remove and re-add the actor to the scene.
1167 ForceKineKineNotifications = 256,
1168 /// Forces static-kinematic pairs notifications for this actor.
1169 ///
1170 /// Similar to eFORCE_KINE_KINE_NOTIFICATIONS, but for static-kinematic interactions.
1171 ///
1172 /// This has no effect if PxRigidBodyFlag::eKINEMATIC is not set.
1173 ///
1174 /// Changing this flag at runtime will not have an effect until you remove and re-add the actor to the scene.
1175 ForceStaticKineNotifications = 512,
1176 /// Enables computation of gyroscopic forces on the rigid body.
1177 EnableGyroscopicForces = 1024,
1178}
1179
1180bitflags::bitflags! {
1181 /// Flags for [`PxRigidBodyFlag`]
1182 #[derive(Default)]
1183 #[repr(transparent)]
1184 pub struct PxRigidBodyFlags: u16 {
1185 const Kinematic = 1 << 0;
1186 const UseKinematicTargetForSceneQueries = 1 << 1;
1187 const EnableCcd = 1 << 2;
1188 const EnableCcdFriction = 1 << 3;
1189 const EnableSpeculativeCcd = 1 << 4;
1190 const EnablePoseIntegrationPreview = 1 << 5;
1191 const EnableCcdMaxContactImpulse = 1 << 6;
1192 const RetainAccelerations = 1 << 7;
1193 const ForceKineKineNotifications = 1 << 8;
1194 const ForceStaticKineNotifications = 1 << 9;
1195 const EnableGyroscopicForces = 1 << 10;
1196 }
1197}
1198
1199/// constraint flags
1200///
1201/// eBROKEN is a read only flag
1202#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1203#[repr(i32)]
1204pub enum PxConstraintFlag {
1205 /// whether the constraint is broken
1206 Broken = 1,
1207 /// whether actor1 should get projected to actor0 for this constraint (note: projection of a static/kinematic actor to a dynamic actor will be ignored)
1208 ProjectToActor0 = 2,
1209 /// whether actor0 should get projected to actor1 for this constraint (note: projection of a static/kinematic actor to a dynamic actor will be ignored)
1210 ProjectToActor1 = 4,
1211 /// whether the actors should get projected for this constraint (the direction will be chosen by PhysX)
1212 Projection = 6,
1213 /// whether contacts should be generated between the objects this constraint constrains
1214 CollisionEnabled = 8,
1215 /// whether this constraint should be visualized, if constraint visualization is turned on
1216 Visualization = 16,
1217 /// limits for drive strength are forces rather than impulses
1218 DriveLimitsAreForces = 32,
1219 /// perform preprocessing for improved accuracy on D6 Slerp Drive (this flag will be removed in a future release when preprocessing is no longer required)
1220 ImprovedSlerp = 128,
1221 /// suppress constraint preprocessing, intended for use with rowResponseThreshold. May result in worse solver accuracy for ill-conditioned constraints.
1222 DisablePreprocessing = 256,
1223 /// enables extended limit ranges for angular limits (e.g., limit values > PxPi or
1224 /// <
1225 /// -PxPi)
1226 EnableExtendedLimits = 512,
1227 /// the constraint type is supported by gpu dynamics
1228 GpuCompatible = 1024,
1229 /// updates the constraint each frame
1230 AlwaysUpdate = 2048,
1231 /// disables the constraint. SolverPrep functions won't be called for this constraint.
1232 DisableConstraint = 4096,
1233}
1234
1235bitflags::bitflags! {
1236 /// Flags for [`PxConstraintFlag`]
1237 #[derive(Default)]
1238 #[repr(transparent)]
1239 pub struct PxConstraintFlags: u16 {
1240 const Broken = 1 << 0;
1241 const ProjectToActor0 = 1 << 1;
1242 const ProjectToActor1 = 1 << 2;
1243 const Projection = Self::ProjectToActor0.bits | Self::ProjectToActor1.bits;
1244 const CollisionEnabled = 1 << 3;
1245 const Visualization = 1 << 4;
1246 const DriveLimitsAreForces = 1 << 5;
1247 const ImprovedSlerp = 1 << 7;
1248 const DisablePreprocessing = 1 << 8;
1249 const EnableExtendedLimits = 1 << 9;
1250 const GpuCompatible = 1 << 10;
1251 const AlwaysUpdate = 1 << 11;
1252 const DisableConstraint = 1 << 12;
1253 }
1254}
1255
1256/// Header for a contact patch where all points share same material and normal
1257#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1258#[repr(i32)]
1259pub enum PxContactPatchFlags {
1260 /// Indicates this contact stream has face indices.
1261 HasFaceIndices = 1,
1262 /// Indicates this contact stream is modifiable.
1263 Modifiable = 2,
1264 /// Indicates this contact stream is notify-only (no contact response).
1265 ForceNoResponse = 4,
1266 /// Indicates this contact stream has modified mass ratios
1267 HasModifiedMassRatios = 8,
1268 /// Indicates this contact stream has target velocities set
1269 HasTargetVelocity = 16,
1270 /// Indicates this contact stream has max impulses set
1271 HasMaxImpulse = 32,
1272 /// Indicates this contact stream needs patches re-generated. This is required if the application modified either the contact normal or the material properties
1273 RegeneratePatches = 64,
1274 CompressedModifiedContact = 128,
1275}
1276
1277/// A class to iterate over a compressed contact stream. This supports read-only access to the various contact formats.
1278#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1279#[repr(i32)]
1280pub enum StreamFormat {
1281 SimpleStream = 0,
1282 ModifiableStream = 1,
1283 CompressedModifiableStream = 2,
1284}
1285
1286/// Flags specifying deletion event types.
1287#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1288#[repr(i32)]
1289pub enum PxDeletionEventFlag {
1290 /// The user has called release on an object.
1291 UserRelease = 1,
1292 /// The destructor of an object has been called and the memory has been released.
1293 MemoryRelease = 2,
1294}
1295
1296bitflags::bitflags! {
1297 /// Flags for [`PxDeletionEventFlag`]
1298 #[derive(Default)]
1299 #[repr(transparent)]
1300 pub struct PxDeletionEventFlags: u8 {
1301 const UserRelease = 1 << 0;
1302 const MemoryRelease = 1 << 1;
1303 }
1304}
1305
1306/// Collection of flags describing the actions to take for a collision pair.
1307#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1308#[repr(i32)]
1309pub enum PxPairFlag {
1310 /// Process the contacts of this collision pair in the dynamics solver.
1311 ///
1312 /// Only takes effect if the colliding actors are rigid bodies.
1313 SolveContact = 1,
1314 /// Call contact modification callback for this collision pair
1315 ///
1316 /// Only takes effect if the colliding actors are rigid bodies.
1317 ModifyContacts = 2,
1318 /// Call contact report callback or trigger callback when this collision pair starts to be in contact.
1319 ///
1320 /// If one of the two collision objects is a trigger shape (see [`PxShapeFlag::eTRIGGER_SHAPE`])
1321 /// then the trigger callback will get called as soon as the other object enters the trigger volume.
1322 /// If none of the two collision objects is a trigger shape then the contact report callback will get
1323 /// called when the actors of this collision pair start to be in contact.
1324 ///
1325 /// Only takes effect if the colliding actors are rigid bodies.
1326 ///
1327 /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
1328 NotifyTouchFound = 4,
1329 /// Call contact report callback while this collision pair is in contact
1330 ///
1331 /// If none of the two collision objects is a trigger shape then the contact report callback will get
1332 /// called while the actors of this collision pair are in contact.
1333 ///
1334 /// Triggers do not support this event. Persistent trigger contacts need to be tracked separately by observing eNOTIFY_TOUCH_FOUND/eNOTIFY_TOUCH_LOST events.
1335 ///
1336 /// Only takes effect if the colliding actors are rigid bodies.
1337 ///
1338 /// No report will get sent if the objects in contact are sleeping.
1339 ///
1340 /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
1341 ///
1342 /// If this flag gets enabled while a pair is in touch already, there will be no eNOTIFY_TOUCH_PERSISTS events until the pair loses and regains touch.
1343 NotifyTouchPersists = 8,
1344 /// Call contact report callback or trigger callback when this collision pair stops to be in contact
1345 ///
1346 /// If one of the two collision objects is a trigger shape (see [`PxShapeFlag::eTRIGGER_SHAPE`])
1347 /// then the trigger callback will get called as soon as the other object leaves the trigger volume.
1348 /// If none of the two collision objects is a trigger shape then the contact report callback will get
1349 /// called when the actors of this collision pair stop to be in contact.
1350 ///
1351 /// Only takes effect if the colliding actors are rigid bodies.
1352 ///
1353 /// This event will also get triggered if one of the colliding objects gets deleted.
1354 ///
1355 /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
1356 NotifyTouchLost = 16,
1357 /// Call contact report callback when this collision pair is in contact during CCD passes.
1358 ///
1359 /// If CCD with multiple passes is enabled, then a fast moving object might bounce on and off the same
1360 /// object multiple times. Hence, the same pair might be in contact multiple times during a simulation step.
1361 /// This flag will make sure that all the detected collision during CCD will get reported. For performance
1362 /// reasons, the system can not always tell whether the contact pair lost touch in one of the previous CCD
1363 /// passes and thus can also not always tell whether the contact is new or has persisted. eNOTIFY_TOUCH_CCD
1364 /// just reports when the two collision objects were detected as being in contact during a CCD pass.
1365 ///
1366 /// Only takes effect if the colliding actors are rigid bodies.
1367 ///
1368 /// Trigger shapes are not supported.
1369 ///
1370 /// Only takes effect if eDETECT_CCD_CONTACT is raised
1371 NotifyTouchCcd = 32,
1372 /// Call contact report callback when the contact force between the actors of this collision pair exceeds one of the actor-defined force thresholds.
1373 ///
1374 /// Only takes effect if the colliding actors are rigid bodies.
1375 ///
1376 /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
1377 NotifyThresholdForceFound = 64,
1378 /// Call contact report callback when the contact force between the actors of this collision pair continues to exceed one of the actor-defined force thresholds.
1379 ///
1380 /// Only takes effect if the colliding actors are rigid bodies.
1381 ///
1382 /// If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the
1383 /// previous one (unless [`eNOTIFY_THRESHOLD_FORCE_FOUND`] has been set in the previous frame).
1384 ///
1385 /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
1386 NotifyThresholdForcePersists = 128,
1387 /// Call contact report callback when the contact force between the actors of this collision pair falls below one of the actor-defined force thresholds (includes the case where this collision pair stops being in contact).
1388 ///
1389 /// Only takes effect if the colliding actors are rigid bodies.
1390 ///
1391 /// If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the
1392 /// previous one (unless [`eNOTIFY_THRESHOLD_FORCE_FOUND`] or #eNOTIFY_THRESHOLD_FORCE_PERSISTS has been set in the previous frame).
1393 ///
1394 /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
1395 NotifyThresholdForceLost = 256,
1396 /// Provide contact points in contact reports for this collision pair.
1397 ///
1398 /// Only takes effect if the colliding actors are rigid bodies and if used in combination with the flags eNOTIFY_TOUCH_... or eNOTIFY_THRESHOLD_FORCE_...
1399 ///
1400 /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
1401 NotifyContactPoints = 512,
1402 /// This flag is used to indicate whether this pair generates discrete collision detection contacts.
1403 ///
1404 /// Contacts are only responded to if eSOLVE_CONTACT is enabled.
1405 DetectDiscreteContact = 1024,
1406 /// This flag is used to indicate whether this pair generates CCD contacts.
1407 ///
1408 /// The contacts will only be responded to if eSOLVE_CONTACT is enabled on this pair.
1409 ///
1410 /// The scene must have PxSceneFlag::eENABLE_CCD enabled to use this feature.
1411 ///
1412 /// Non-static bodies of the pair should have PxRigidBodyFlag::eENABLE_CCD specified for this feature to work correctly.
1413 ///
1414 /// This flag is not supported with trigger shapes. However, CCD trigger events can be emulated using non-trigger shapes
1415 /// and requesting eNOTIFY_TOUCH_FOUND and eNOTIFY_TOUCH_LOST and not raising eSOLVE_CONTACT on the pair.
1416 DetectCcdContact = 2048,
1417 /// Provide pre solver velocities in contact reports for this collision pair.
1418 ///
1419 /// If the collision pair has contact reports enabled, the velocities of the rigid bodies before contacts have been solved
1420 /// will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.
1421 ///
1422 /// Usually it is not necessary to request these velocities as they will be available by querying the velocity from the provided
1423 /// PxRigidActor object directly. However, it might be the case that the velocity of a rigid body gets set while the simulation is running
1424 /// in which case the PxRigidActor would return this new velocity in the contact report callback and not the velocity the simulation used.
1425 PreSolverVelocity = 4096,
1426 /// Provide post solver velocities in contact reports for this collision pair.
1427 ///
1428 /// If the collision pair has contact reports enabled, the velocities of the rigid bodies after contacts have been solved
1429 /// will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.
1430 PostSolverVelocity = 8192,
1431 /// Provide rigid body poses in contact reports for this collision pair.
1432 ///
1433 /// If the collision pair has contact reports enabled, the rigid body poses at the contact event will be provided
1434 /// in the contact report callback unless the pair lost touch in which case no data will be provided.
1435 ///
1436 /// Usually it is not necessary to request these poses as they will be available by querying the pose from the provided
1437 /// PxRigidActor object directly. However, it might be the case that the pose of a rigid body gets set while the simulation is running
1438 /// in which case the PxRigidActor would return this new pose in the contact report callback and not the pose the simulation used.
1439 /// Another use case is related to CCD with multiple passes enabled, A fast moving object might bounce on and off the same
1440 /// object multiple times. This flag can be used to request the rigid body poses at the time of impact for each such collision event.
1441 ContactEventPose = 16384,
1442 /// For internal use only.
1443 NextFree = 32768,
1444 /// Provided default flag to do simple contact processing for this collision pair.
1445 ContactDefault = 1025,
1446 /// Provided default flag to get commonly used trigger behavior for this collision pair.
1447 TriggerDefault = 1044,
1448}
1449
1450bitflags::bitflags! {
1451 /// Flags for [`PxPairFlag`]
1452 #[derive(Default)]
1453 #[repr(transparent)]
1454 pub struct PxPairFlags: u16 {
1455 const SolveContact = 1 << 0;
1456 const ModifyContacts = 1 << 1;
1457 const NotifyTouchFound = 1 << 2;
1458 const NotifyTouchPersists = 1 << 3;
1459 const NotifyTouchLost = 1 << 4;
1460 const NotifyTouchCcd = 1 << 5;
1461 const NotifyThresholdForceFound = 1 << 6;
1462 const NotifyThresholdForcePersists = 1 << 7;
1463 const NotifyThresholdForceLost = 1 << 8;
1464 const NotifyContactPoints = 1 << 9;
1465 const DetectDiscreteContact = 1 << 10;
1466 const DetectCcdContact = 1 << 11;
1467 const PreSolverVelocity = 1 << 12;
1468 const PostSolverVelocity = 1 << 13;
1469 const ContactEventPose = 1 << 14;
1470 const NextFree = 1 << 15;
1471 const ContactDefault = Self::SolveContact.bits | Self::DetectDiscreteContact.bits;
1472 const TriggerDefault = Self::NotifyTouchFound.bits | Self::NotifyTouchLost.bits | Self::DetectDiscreteContact.bits;
1473 }
1474}
1475
1476/// Collection of flags describing the filter actions to take for a collision pair.
1477#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1478#[repr(i32)]
1479pub enum PxFilterFlag {
1480 /// Ignore the collision pair as long as the bounding volumes of the pair objects overlap.
1481 ///
1482 /// Killed pairs will be ignored by the simulation and won't run through the filter again until one
1483 /// of the following occurs:
1484 ///
1485 /// The bounding volumes of the two objects overlap again (after being separated)
1486 ///
1487 /// The user enforces a re-filtering (see [`PxScene::resetFiltering`]())
1488 Kill = 1,
1489 /// Ignore the collision pair as long as the bounding volumes of the pair objects overlap or until filtering relevant data changes for one of the collision objects.
1490 ///
1491 /// Suppressed pairs will be ignored by the simulation and won't make another filter request until one
1492 /// of the following occurs:
1493 ///
1494 /// Same conditions as for killed pairs (see [`eKILL`])
1495 ///
1496 /// The filter data or the filter object attributes change for one of the collision objects
1497 Suppress = 2,
1498 /// Invoke the filter callback ([`PxSimulationFilterCallback::pairFound`]()) for this collision pair.
1499 Callback = 4,
1500 /// Track this collision pair with the filter callback mechanism.
1501 ///
1502 /// When the bounding volumes of the collision pair lose contact, the filter callback [`PxSimulationFilterCallback::pairLost`]()
1503 /// will be invoked. Furthermore, the filter status of the collision pair can be adjusted through [`PxSimulationFilterCallback::statusChange`]()
1504 /// once per frame (until a pairLost() notification occurs).
1505 Notify = 12,
1506 /// Provided default to get standard behavior:
1507 ///
1508 /// The application configure the pair's collision properties once when bounding volume overlap is found and
1509 /// doesn't get asked again about that pair until overlap status or filter properties changes, or re-filtering is requested.
1510 ///
1511 /// No notification is provided when bounding volume overlap is lost
1512 ///
1513 /// The pair will not be killed or suppressed, so collision detection will be processed
1514 Default = 0,
1515}
1516
1517bitflags::bitflags! {
1518 /// Flags for [`PxFilterFlag`]
1519 #[derive(Default)]
1520 #[repr(transparent)]
1521 pub struct PxFilterFlags: u16 {
1522 const Kill = 1 << 0;
1523 const Suppress = 1 << 1;
1524 const Callback = 1 << 2;
1525 const Notify = Self::Callback.bits;
1526 }
1527}
1528
1529/// Identifies each type of filter object.
1530#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1531#[repr(i32)]
1532pub enum PxFilterObjectType {
1533 /// A static rigid body
1534 RigidStatic = 0,
1535 /// A dynamic rigid body
1536 RigidDynamic = 1,
1537 /// An articulation
1538 Articulation = 2,
1539 /// A particle system
1540 Particlesystem = 3,
1541 /// A FEM-based soft body
1542 Softbody = 4,
1543 /// A FEM-based cloth
1544 ///
1545 /// In development
1546 Femcloth = 5,
1547 /// A hair system
1548 ///
1549 /// In development
1550 Hairsystem = 6,
1551 /// internal use only!
1552 MaxTypeCount = 16,
1553 /// internal use only!
1554 Undefined = 15,
1555}
1556
1557#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1558#[repr(i32)]
1559pub enum PxFilterObjectFlag {
1560 Kinematic = 16,
1561 Trigger = 32,
1562}
1563
1564#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1565#[repr(i32)]
1566pub enum PxPairFilteringMode {
1567 /// Output pair from BP, potentially send to user callbacks, create regular interaction object.
1568 ///
1569 /// Enable contact pair filtering between kinematic/static or kinematic/kinematic rigid bodies.
1570 ///
1571 /// By default contacts between these are suppressed (see [`PxFilterFlag::eSUPPRESS`]) and don't get reported to the filter mechanism.
1572 /// Use this mode if these pairs should go through the filtering pipeline nonetheless.
1573 ///
1574 /// This mode is not mutable, and must be set in PxSceneDesc at scene creation.
1575 Keep = 0,
1576 /// Output pair from BP, create interaction marker. Can be later switched to regular interaction.
1577 Suppress = 1,
1578 /// Don't output pair from BP. Cannot be later switched to regular interaction, needs "resetFiltering" call.
1579 Kill = 2,
1580}
1581
1582#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1583#[repr(i32)]
1584pub enum PxDataAccessFlag {
1585 Readable = 1,
1586 Writable = 2,
1587 Device = 4,
1588}
1589
1590bitflags::bitflags! {
1591 /// Flags for [`PxDataAccessFlag`]
1592 #[derive(Default)]
1593 #[repr(transparent)]
1594 pub struct PxDataAccessFlags: u8 {
1595 const Readable = 1 << 0;
1596 const Writable = 1 << 1;
1597 const Device = 1 << 2;
1598 }
1599}
1600
1601/// Flags which control the behavior of a material.
1602#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1603#[repr(i32)]
1604pub enum PxMaterialFlag {
1605 /// If this flag is set, friction computations are always skipped between shapes with this material and any other shape.
1606 DisableFriction = 1,
1607 /// Whether to use strong friction.
1608 /// The difference between "normal" and "strong" friction is that the strong friction feature
1609 /// remembers the "friction error" between simulation steps. The friction is a force trying to
1610 /// hold objects in place (or slow them down) and this is handled in the solver. But since the
1611 /// solver is only an approximation, the result of the friction calculation can include a small
1612 /// "error" - e.g. a box resting on a slope should not move at all if the static friction is in
1613 /// action, but could slowly glide down the slope because of a small friction error in each
1614 /// simulation step. The strong friction counter-acts this by remembering the small error and
1615 /// taking it to account during the next simulation step.
1616 ///
1617 /// However, in some cases the strong friction could cause problems, and this is why it is
1618 /// possible to disable the strong friction feature by setting this flag. One example is
1619 /// raycast vehicles that are sliding fast across the surface, but still need a precise
1620 /// steering behavior. It may be a good idea to reenable the strong friction when objects
1621 /// are coming to a rest, to prevent them from slowly creeping down inclines.
1622 ///
1623 /// Note: This flag only has an effect if the PxMaterialFlag::eDISABLE_FRICTION bit is 0.
1624 DisableStrongFriction = 2,
1625 /// Whether to use the patch friction model.
1626 /// This flag only has an effect if PxFrictionType::ePATCH friction model is used.
1627 ///
1628 /// When using the patch friction model, up to 2 friction anchors are generated per patch. As the number of friction anchors
1629 /// can be smaller than the number of contacts, the normal force is accumulated over all contacts and used to compute friction
1630 /// for all anchors. Where there are more than 2 anchors, this can produce frictional behavior that is too strong (approximately 2x as strong
1631 /// as analytical models suggest).
1632 ///
1633 /// This flag causes the normal force to be distributed between the friction anchors such that the total amount of friction applied does not
1634 /// exceed the analytical results.
1635 ImprovedPatchFriction = 4,
1636 /// This flag has the effect of enabling an implicit spring model for the normal force computation.
1637 CompliantContact = 8,
1638}
1639
1640bitflags::bitflags! {
1641 /// Flags for [`PxMaterialFlag`]
1642 #[derive(Default)]
1643 #[repr(transparent)]
1644 pub struct PxMaterialFlags: u16 {
1645 const DisableFriction = 1 << 0;
1646 const DisableStrongFriction = 1 << 1;
1647 const ImprovedPatchFriction = 1 << 2;
1648 const CompliantContact = 1 << 3;
1649 }
1650}
1651
1652/// Enumeration that determines the way in which two material properties will be combined to yield a friction or restitution coefficient for a collision.
1653///
1654/// When two actors come in contact with each other, they each have materials with various coefficients, but we only need a single set of coefficients for the pair.
1655///
1656/// Physics doesn't have any inherent combinations because the coefficients are determined empirically on a case by case
1657/// basis. However, simulating this with a pairwise lookup table is often impractical.
1658///
1659/// For this reason the following combine behaviors are available:
1660///
1661/// eAVERAGE
1662/// eMIN
1663/// eMULTIPLY
1664/// eMAX
1665///
1666/// The effective combine mode for the pair is maximum(material0.combineMode, material1.combineMode).
1667#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1668#[repr(i32)]
1669pub enum PxCombineMode {
1670 /// Average: (a + b)/2
1671 Average = 0,
1672 /// Minimum: minimum(a,b)
1673 Min = 1,
1674 /// Multiply: a*b
1675 Multiply = 2,
1676 /// Maximum: maximum(a,b)
1677 Max = 3,
1678 /// This is not a valid combine mode, it is a sentinel to denote the number of possible values. We assert that the variable's value is smaller than this.
1679 NValues = 4,
1680 /// This is not a valid combine mode, it is to assure that the size of the enum type is big enough.
1681 Pad32 = 2147483647,
1682}
1683
1684/// Identifies dirty particle buffers that need to be updated in the particle system.
1685///
1686/// This flag can be used mark the device user buffers that are dirty and need to be written to the particle system.
1687#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1688#[repr(i32)]
1689pub enum PxParticleBufferFlag {
1690 /// No data specified
1691 None = 0,
1692 /// Specifies the position (first 3 floats) and inverse mass (last float) data (array of PxVec4 * number of particles)
1693 UpdatePosition = 1,
1694 /// Specifies the velocity (first 3 floats) data (array of PxVec4 * number of particles)
1695 UpdateVelocity = 2,
1696 /// Specifies the per-particle phase flag data (array of PxU32 * number of particles)
1697 UpdatePhase = 4,
1698 /// Specifies the rest position (first 3 floats) data for cloth buffers
1699 UpdateRestposition = 8,
1700 /// Specifies the cloth buffer (see PxParticleClothBuffer)
1701 UpdateCloth = 32,
1702 /// Specifies the rigid buffer (see PxParticleRigidBuffer)
1703 UpdateRigid = 64,
1704 /// Specifies the diffuse particle parameter buffer (see PxDiffuseParticleParams)
1705 UpdateDiffuseParam = 128,
1706 /// Specifies the attachments.
1707 UpdateAttachments = 256,
1708 All = 495,
1709}
1710
1711bitflags::bitflags! {
1712 /// Flags for [`PxParticleBufferFlag`]
1713 #[derive(Default)]
1714 #[repr(transparent)]
1715 pub struct PxParticleBufferFlags: u32 {
1716 const UpdatePosition = 1 << 0;
1717 const UpdateVelocity = 1 << 1;
1718 const UpdatePhase = 1 << 2;
1719 const UpdateRestposition = 1 << 3;
1720 const UpdateCloth = 1 << 5;
1721 const UpdateRigid = 1 << 6;
1722 const UpdateDiffuseParam = 1 << 7;
1723 const UpdateAttachments = 1 << 8;
1724 const All = Self::UpdatePosition.bits | Self::UpdateVelocity.bits | Self::UpdatePhase.bits | Self::UpdateRestposition.bits | Self::UpdateCloth.bits | Self::UpdateRigid.bits | Self::UpdateDiffuseParam.bits | Self::UpdateAttachments.bits;
1725 }
1726}
1727
1728/// Identifies per-particle behavior for a PxParticleSystem.
1729///
1730/// See [`PxParticleSystem::createPhase`]().
1731#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1732#[repr(u32)]
1733pub enum PxParticlePhaseFlag {
1734 /// Bits [ 0, 19] represent the particle group for controlling collisions
1735 ParticlePhaseGroupMask = 1048575,
1736 /// Bits [20, 23] hold flags about how the particle behave
1737 ParticlePhaseFlagsMask = 4293918720,
1738 /// If set this particle will interact with particles of the same group
1739 ParticlePhaseSelfCollide = 1048576,
1740 /// If set this particle will ignore collisions with particles closer than the radius in the rest pose, this flag should not be specified unless valid rest positions have been specified using setRestParticles()
1741 ParticlePhaseSelfCollideFilter = 2097152,
1742 /// If set this particle will generate fluid density constraints for its overlapping neighbors
1743 ParticlePhaseFluid = 4194304,
1744}
1745
1746bitflags::bitflags! {
1747 /// Flags for [`PxParticlePhaseFlag`]
1748 #[derive(Default)]
1749 #[repr(transparent)]
1750 pub struct PxParticlePhaseFlags: u32 {
1751 const ParticlePhaseGroupMask = 0x000fffff;
1752 const ParticlePhaseFlagsMask = Self::ParticlePhaseSelfCollide.bits | Self::ParticlePhaseSelfCollideFilter.bits | Self::ParticlePhaseFluid.bits;
1753 const ParticlePhaseSelfCollide = 1 << 20;
1754 const ParticlePhaseSelfCollideFilter = 1 << 21;
1755 const ParticlePhaseFluid = 1 << 22;
1756 }
1757}
1758
1759/// Specifies memory space for a PxBuffer instance.
1760#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1761#[repr(i32)]
1762pub enum PxBufferType {
1763 Host = 0,
1764 Device = 1,
1765}
1766
1767/// Filtering flags for scene queries.
1768#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1769#[repr(i32)]
1770pub enum PxQueryFlag {
1771 /// Traverse static shapes
1772 Static = 1,
1773 /// Traverse dynamic shapes
1774 Dynamic = 2,
1775 /// Run the pre-intersection-test filter (see [`PxQueryFilterCallback::preFilter`]())
1776 Prefilter = 4,
1777 /// Run the post-intersection-test filter (see [`PxQueryFilterCallback::postFilter`]())
1778 Postfilter = 8,
1779 /// Abort traversal as soon as any hit is found and return it via callback.block.
1780 /// Helps query performance. Both eTOUCH and eBLOCK hitTypes are considered hits with this flag.
1781 AnyHit = 16,
1782 /// All hits are reported as touching. Overrides eBLOCK returned from user filters with eTOUCH.
1783 /// This is also an optimization hint that may improve query performance.
1784 NoBlock = 32,
1785 /// Same as eBATCH_QUERY_LEGACY_BEHAVIOUR, more explicit name making it clearer that this can also be used
1786 /// with regular/non-batched queries if needed.
1787 DisableHardcodedFilter = 64,
1788 /// Reserved for internal use
1789 Reserved = 32768,
1790}
1791
1792bitflags::bitflags! {
1793 /// Flags for [`PxQueryFlag`]
1794 #[derive(Default)]
1795 #[repr(transparent)]
1796 pub struct PxQueryFlags: u16 {
1797 const Static = 1 << 0;
1798 const Dynamic = 1 << 1;
1799 const Prefilter = 1 << 2;
1800 const Postfilter = 1 << 3;
1801 const AnyHit = 1 << 4;
1802 const NoBlock = 1 << 5;
1803 const DisableHardcodedFilter = 1 << 6;
1804 const Reserved = 1 << 15;
1805 }
1806}
1807
1808/// Classification of scene query hits (intersections).
1809///
1810/// - eNONE: Returning this hit type means that the hit should not be reported.
1811/// - eBLOCK: For all raycast, sweep and overlap queries the nearest eBLOCK type hit will always be returned in PxHitCallback::block member.
1812/// - eTOUCH: Whenever a raycast, sweep or overlap query was called with non-zero PxHitCallback::nbTouches and PxHitCallback::touches
1813/// parameters, eTOUCH type hits that are closer or same distance (touchDistance
1814/// <
1815/// = blockDistance condition)
1816/// as the globally nearest eBLOCK type hit, will be reported.
1817/// - For example, to record all hits from a raycast query, always return eTOUCH.
1818///
1819/// All hits in overlap() queries are treated as if the intersection distance were zero.
1820/// This means the hits are unsorted and all eTOUCH hits are recorded by the callback even if an eBLOCK overlap hit was encountered.
1821/// Even though all overlap() blocking hits have zero length, only one (arbitrary) eBLOCK overlap hit is recorded in PxHitCallback::block.
1822/// All overlap() eTOUCH type hits are reported (zero touchDistance
1823/// <
1824/// = zero blockDistance condition).
1825///
1826/// For raycast/sweep/overlap calls with zero touch buffer or PxHitCallback::nbTouches member,
1827/// only the closest hit of type eBLOCK is returned. All eTOUCH hits are discarded.
1828#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1829#[repr(i32)]
1830pub enum PxQueryHitType {
1831 /// the query should ignore this shape
1832 None = 0,
1833 /// a hit on the shape touches the intersection geometry of the query but does not block it
1834 Touch = 1,
1835 /// a hit on the shape blocks the query (does not block overlap queries)
1836 Block = 2,
1837}
1838
1839/// Collection of flags providing a mechanism to lock motion along/around a specific axis.
1840#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1841#[repr(i32)]
1842pub enum PxRigidDynamicLockFlag {
1843 LockLinearX = 1,
1844 LockLinearY = 2,
1845 LockLinearZ = 4,
1846 LockAngularX = 8,
1847 LockAngularY = 16,
1848 LockAngularZ = 32,
1849}
1850
1851bitflags::bitflags! {
1852 /// Flags for [`PxRigidDynamicLockFlag`]
1853 #[derive(Default)]
1854 #[repr(transparent)]
1855 pub struct PxRigidDynamicLockFlags: u8 {
1856 const LockLinearX = 1 << 0;
1857 const LockLinearY = 1 << 1;
1858 const LockLinearZ = 1 << 2;
1859 const LockAngularX = 1 << 3;
1860 const LockAngularY = 1 << 4;
1861 const LockAngularZ = 1 << 5;
1862 }
1863}
1864
1865/// Pruning structure used to accelerate scene queries.
1866///
1867/// eNONE uses a simple data structure that consumes less memory than the alternatives,
1868/// but generally has slower query performance.
1869///
1870/// eDYNAMIC_AABB_TREE usually provides the fastest queries. However there is a
1871/// constant per-frame management cost associated with this structure. How much work should
1872/// be done per frame can be tuned via the [`PxSceneQueryDesc::dynamicTreeRebuildRateHint`]
1873/// parameter.
1874///
1875/// eSTATIC_AABB_TREE is typically used for static objects. It is the same as the
1876/// dynamic AABB tree, without the per-frame overhead. This can be a good choice for static
1877/// objects, if no static objects are added, moved or removed after the scene has been
1878/// created. If there is no such guarantee (e.g. when streaming parts of the world in and out),
1879/// then the dynamic version is a better choice even for static objects.
1880#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1881#[repr(i32)]
1882pub enum PxPruningStructureType {
1883 /// Using a simple data structure
1884 None = 0,
1885 /// Using a dynamic AABB tree
1886 DynamicAabbTree = 1,
1887 /// Using a static AABB tree
1888 StaticAabbTree = 2,
1889 Last = 3,
1890}
1891
1892/// Secondary pruning structure used for newly added objects in dynamic trees.
1893///
1894/// Dynamic trees (PxPruningStructureType::eDYNAMIC_AABB_TREE) are slowly rebuilt
1895/// over several frames. A secondary pruning structure holds and manages objects
1896/// added to the scene while this rebuild is in progress.
1897///
1898/// eNONE ignores newly added objects. This means that for a number of frames (roughly
1899/// defined by PxSceneQueryDesc::dynamicTreeRebuildRateHint) newly added objects will
1900/// be ignored by scene queries. This can be acceptable when streaming large worlds, e.g.
1901/// when the objects added at the boundaries of the game world don't immediately need to be
1902/// visible from scene queries (it would be equivalent to streaming that data in a few frames
1903/// later). The advantage of this approach is that there is no CPU cost associated with
1904/// inserting the new objects in the scene query data structures, and no extra runtime cost
1905/// when performing queries.
1906///
1907/// eBUCKET uses a structure similar to PxPruningStructureType::eNONE. Insertion is fast but
1908/// query cost can be high.
1909///
1910/// eINCREMENTAL uses an incremental AABB-tree, with no direct PxPruningStructureType equivalent.
1911/// Query time is fast but insertion cost can be high.
1912///
1913/// eBVH uses a PxBVH structure. This usually offers the best overall performance.
1914#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1915#[repr(i32)]
1916pub enum PxDynamicTreeSecondaryPruner {
1917 /// no secondary pruner, new objects aren't visible to SQ for a few frames
1918 None = 0,
1919 /// bucket-based secondary pruner, faster updates, slower query time
1920 Bucket = 1,
1921 /// incremental-BVH secondary pruner, faster query time, slower updates
1922 Incremental = 2,
1923 /// PxBVH-based secondary pruner, good overall performance
1924 Bvh = 3,
1925 Last = 4,
1926}
1927
1928/// Scene query update mode
1929///
1930/// This enum controls what work is done when the scene query system is updated. The updates traditionally happen when PxScene::fetchResults
1931/// is called. This function then calls PxSceneQuerySystem::finalizeUpdates, where the update mode is used.
1932///
1933/// fetchResults/finalizeUpdates will sync changed bounds during simulation and update the scene query bounds in pruners, this work is mandatory.
1934///
1935/// eBUILD_ENABLED_COMMIT_ENABLED does allow to execute the new AABB tree build step during fetchResults/finalizeUpdates, additionally
1936/// the pruner commit is called where any changes are applied. During commit PhysX refits the dynamic scene query tree and if a new tree
1937/// was built and the build finished the tree is swapped with current AABB tree.
1938///
1939/// eBUILD_ENABLED_COMMIT_DISABLED does allow to execute the new AABB tree build step during fetchResults/finalizeUpdates. Pruner commit
1940/// is not called, this means that refit will then occur during the first scene query following fetchResults/finalizeUpdates, or may be forced
1941/// by the method PxScene::flushQueryUpdates() / PxSceneQuerySystemBase::flushUpdates().
1942///
1943/// eBUILD_DISABLED_COMMIT_DISABLED no further scene query work is executed. The scene queries update needs to be called manually, see
1944/// PxScene::sceneQueriesUpdate (see that function's doc for the equivalent PxSceneQuerySystem sequence). It is recommended to call
1945/// PxScene::sceneQueriesUpdate right after fetchResults/finalizeUpdates as the pruning structures are not updated.
1946#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1947#[repr(i32)]
1948pub enum PxSceneQueryUpdateMode {
1949 /// Both scene query build and commit are executed.
1950 BuildEnabledCommitEnabled = 0,
1951 /// Scene query build only is executed.
1952 BuildEnabledCommitDisabled = 1,
1953 /// No work is done, no update of scene queries
1954 BuildDisabledCommitDisabled = 2,
1955}
1956
1957/// Built-in enum for default PxScene pruners
1958///
1959/// This is passed as a pruner index to various functions in the following APIs.
1960#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1961#[repr(u32)]
1962pub enum PxScenePrunerIndex {
1963 PxScenePrunerStatic = 0,
1964 PxScenePrunerDynamic = 1,
1965 PxSceneCompoundPruner = 4294967295,
1966}
1967
1968/// Broad phase algorithm used in the simulation
1969///
1970/// eSAP is a good generic choice with great performance when many objects are sleeping. Performance
1971/// can degrade significantly though, when all objects are moving, or when large numbers of objects
1972/// are added to or removed from the broad phase. This algorithm does not need world bounds to be
1973/// defined in order to work.
1974///
1975/// eMBP is an alternative broad phase algorithm that does not suffer from the same performance
1976/// issues as eSAP when all objects are moving or when inserting large numbers of objects. However
1977/// its generic performance when many objects are sleeping might be inferior to eSAP, and it requires
1978/// users to define world bounds in order to work.
1979///
1980/// eABP is a revisited implementation of MBP, which automatically manages broad-phase regions.
1981/// It offers the convenience of eSAP (no need to define world bounds or regions) and the performance
1982/// of eMBP when a lot of objects are moving. While eSAP can remain faster when most objects are
1983/// sleeping and eMBP can remain faster when it uses a large number of properly-defined regions,
1984/// eABP often gives the best performance on average and the best memory usage.
1985///
1986/// ePABP is a parallel implementation of ABP. It can often be the fastest (CPU) broadphase, but it
1987/// can use more memory than ABP.
1988///
1989/// eGPU is a GPU implementation of the incremental sweep and prune approach. Additionally, it uses a ABP-style
1990/// initial pair generation approach to avoid large spikes when inserting shapes. It not only has the advantage
1991/// of traditional SAP approch which is good for when many objects are sleeping, but due to being fully parallel,
1992/// it also is great when lots of shapes are moving or for runtime pair insertion and removal. It can become a
1993/// performance bottleneck if there are a very large number of shapes roughly projecting to the same values
1994/// on a given axis. If the scene has a very large number of shapes in an actor, e.g. a humanoid, it is recommended
1995/// to use an aggregate to represent multi-shape or multi-body actors to minimize stress placed on the broad phase.
1996#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1997#[repr(i32)]
1998pub enum PxBroadPhaseType {
1999 /// 3-axes sweep-and-prune
2000 Sap = 0,
2001 /// Multi box pruning
2002 Mbp = 1,
2003 /// Automatic box pruning
2004 Abp = 2,
2005 /// Parallel automatic box pruning
2006 Pabp = 3,
2007 /// GPU broad phase
2008 Gpu = 4,
2009 Last = 5,
2010}
2011
2012/// Enum for selecting the friction algorithm used for simulation.
2013///
2014/// [`PxFrictionType::ePATCH`] selects the patch friction model which typically leads to the most stable results at low solver iteration counts and is also quite inexpensive, as it uses only
2015/// up to four scalar solver constraints per pair of touching objects. The patch friction model is the same basic strong friction algorithm as PhysX 3.2 and before.
2016///
2017/// [`PxFrictionType::eONE_DIRECTIONAL`] is a simplification of the Coulomb friction model, in which the friction for a given point of contact is applied in the alternating tangent directions of
2018/// the contact's normal. This simplification allows us to reduce the number of iterations required for convergence but is not as accurate as the two directional model.
2019///
2020/// [`PxFrictionType::eTWO_DIRECTIONAL`] is identical to the one directional model, but it applies friction in both tangent directions simultaneously. This hurts convergence a bit so it
2021/// requires more solver iterations, but is more accurate. Like the one directional model, it is applied at every contact point, which makes it potentially more expensive
2022/// than patch friction for scenarios with many contact points.
2023///
2024/// [`PxFrictionType::eFRICTION_COUNT`] is the total numer of friction models supported by the SDK.
2025#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2026#[repr(i32)]
2027pub enum PxFrictionType {
2028 /// Select default patch-friction model.
2029 Patch = 0,
2030 /// Select one directional per-contact friction model.
2031 OneDirectional = 1,
2032 /// Select two directional per-contact friction model.
2033 TwoDirectional = 2,
2034 /// The total number of friction models supported by the SDK.
2035 FrictionCount = 3,
2036}
2037
2038/// Enum for selecting the type of solver used for the simulation.
2039///
2040/// [`PxSolverType::ePGS`] selects the iterative sequential impulse solver. This is the same kind of solver used in PhysX 3.4 and earlier releases.
2041///
2042/// [`PxSolverType::eTGS`] selects a non linear iterative solver. This kind of solver can lead to improved convergence and handle large mass ratios, long chains and jointed systems better. It is slightly more expensive than the default solver and can introduce more energy to correct joint and contact errors.
2043#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2044#[repr(i32)]
2045pub enum PxSolverType {
2046 /// Projected Gauss-Seidel iterative solver
2047 Pgs = 0,
2048 /// Default Temporal Gauss-Seidel solver
2049 Tgs = 1,
2050}
2051
2052/// flags for configuring properties of the scene
2053#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2054#[repr(i32)]
2055pub enum PxSceneFlag {
2056 /// Enable Active Actors Notification.
2057 ///
2058 /// This flag enables the Active Actor Notification feature for a scene. This
2059 /// feature defaults to disabled. When disabled, the function
2060 /// PxScene::getActiveActors() will always return a NULL list.
2061 ///
2062 /// There may be a performance penalty for enabling the Active Actor Notification, hence this flag should
2063 /// only be enabled if the application intends to use the feature.
2064 ///
2065 /// Default:
2066 /// False
2067 EnableActiveActors = 1,
2068 /// Enables a second broad phase check after integration that makes it possible to prevent objects from tunneling through eachother.
2069 ///
2070 /// PxPairFlag::eDETECT_CCD_CONTACT requires this flag to be specified.
2071 ///
2072 /// For this feature to be effective for bodies that can move at a significant velocity, the user should raise the flag PxRigidBodyFlag::eENABLE_CCD for them.
2073 ///
2074 /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
2075 ///
2076 /// Default:
2077 /// False
2078 EnableCcd = 2,
2079 /// Enables a simplified swept integration strategy, which sacrifices some accuracy for improved performance.
2080 ///
2081 /// This simplified swept integration approach makes certain assumptions about the motion of objects that are not made when using a full swept integration.
2082 /// These assumptions usually hold but there are cases where they could result in incorrect behavior between a set of fast-moving rigid bodies. A key issue is that
2083 /// fast-moving dynamic objects may tunnel through each-other after a rebound. This will not happen if this mode is disabled. However, this approach will be potentially
2084 /// faster than a full swept integration because it will perform significantly fewer sweeps in non-trivial scenes involving many fast-moving objects. This approach
2085 /// should successfully resist objects passing through the static environment.
2086 ///
2087 /// PxPairFlag::eDETECT_CCD_CONTACT requires this flag to be specified.
2088 ///
2089 /// This scene flag requires eENABLE_CCD to be enabled as well. If it is not, this scene flag will do nothing.
2090 ///
2091 /// For this feature to be effective for bodies that can move at a significant velocity, the user should raise the flag PxRigidBodyFlag::eENABLE_CCD for them.
2092 ///
2093 /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
2094 ///
2095 /// Default:
2096 /// False
2097 DisableCcdResweep = 4,
2098 /// Enable GJK-based distance collision detection system.
2099 ///
2100 /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
2101 ///
2102 /// Default:
2103 /// true
2104 EnablePcm = 64,
2105 /// Disable contact report buffer resize. Once the contact buffer is full, the rest of the contact reports will
2106 /// not be buffered and sent.
2107 ///
2108 /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
2109 ///
2110 /// Default:
2111 /// false
2112 DisableContactReportBufferResize = 128,
2113 /// Disable contact cache.
2114 ///
2115 /// Contact caches are used internally to provide faster contact generation. You can disable all contact caches
2116 /// if memory usage for this feature becomes too high.
2117 ///
2118 /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
2119 ///
2120 /// Default:
2121 /// false
2122 DisableContactCache = 256,
2123 /// Require scene-level locking
2124 ///
2125 /// When set to true this requires that threads accessing the PxScene use the
2126 /// multi-threaded lock methods.
2127 ///
2128 /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
2129 ///
2130 /// Default:
2131 /// false
2132 RequireRwLock = 512,
2133 /// Enables additional stabilization pass in solver
2134 ///
2135 /// When set to true, this enables additional stabilization processing to improve that stability of complex interactions between large numbers of bodies.
2136 ///
2137 /// Note that this flag is not mutable and must be set in PxSceneDesc at scene creation. Also, this is an experimental feature which does result in some loss of momentum.
2138 EnableStabilization = 1024,
2139 /// Enables average points in contact manifolds
2140 ///
2141 /// When set to true, this enables additional contacts to be generated per manifold to represent the average point in a manifold. This can stabilize stacking when only a small
2142 /// number of solver iterations is used.
2143 ///
2144 /// Note that this flag is not mutable and must be set in PxSceneDesc at scene creation.
2145 EnableAveragePoint = 2048,
2146 /// Do not report kinematics in list of active actors.
2147 ///
2148 /// Since the target pose for kinematics is set by the user, an application can track the activity state directly and use
2149 /// this flag to avoid that kinematics get added to the list of active actors.
2150 ///
2151 /// This flag has only an effect in combination with eENABLE_ACTIVE_ACTORS.
2152 ///
2153 /// Default:
2154 /// false
2155 ExcludeKinematicsFromActiveActors = 4096,
2156 /// Do not report kinematics in list of active actors.
2157 ///
2158 /// Since the target pose for kinematics is set by the user, an application can track the activity state directly and use
2159 /// this flag to avoid that kinematics get added to the list of active actors.
2160 ///
2161 /// This flag has only an effect in combination with eENABLE_ACTIVE_ACTORS.
2162 ///
2163 /// Default:
2164 /// false
2165 EnableGpuDynamics = 8192,
2166 /// Provides improved determinism at the expense of performance.
2167 ///
2168 /// By default, PhysX provides limited determinism guarantees. Specifically, PhysX guarantees that the exact scene (same actors created in the same order) and simulated using the same
2169 /// time-stepping scheme should provide the exact same behaviour.
2170 ///
2171 /// However, if additional actors are added to the simulation, this can affect the behaviour of the existing actors in the simulation, even if the set of new actors do not interact with
2172 /// the existing actors.
2173 ///
2174 /// This flag provides an additional level of determinism that guarantees that the simulation will not change if additional actors are added to the simulation, provided those actors do not interfere
2175 /// with the existing actors in the scene. Determinism is only guaranteed if the actors are inserted in a consistent order each run in a newly-created scene and simulated using a consistent time-stepping
2176 /// scheme.
2177 ///
2178 /// Note that this flag is not mutable and must be set at scene creation.
2179 ///
2180 /// Note that enabling this flag can have a negative impact on performance.
2181 ///
2182 /// Note that this feature is not currently supported on GPU.
2183 ///
2184 /// Default
2185 /// false
2186 EnableEnhancedDeterminism = 16384,
2187 /// Controls processing friction in all solver iterations
2188 ///
2189 /// By default, PhysX processes friction only in the final 3 position iterations, and all velocity
2190 /// iterations. This flag enables friction processing in all position and velocity iterations.
2191 ///
2192 /// The default behaviour provides a good trade-off between performance and stability and is aimed
2193 /// primarily at game development.
2194 ///
2195 /// When simulating more complex frictional behaviour, such as grasping of complex geometries with
2196 /// a robotic manipulator, better results can be achieved by enabling friction in all solver iterations.
2197 ///
2198 /// This flag only has effect with the default solver. The TGS solver always performs friction per-iteration.
2199 EnableFrictionEveryIteration = 32768,
2200 /// Controls processing friction in all solver iterations
2201 ///
2202 /// By default, PhysX processes friction only in the final 3 position iterations, and all velocity
2203 /// iterations. This flag enables friction processing in all position and velocity iterations.
2204 ///
2205 /// The default behaviour provides a good trade-off between performance and stability and is aimed
2206 /// primarily at game development.
2207 ///
2208 /// When simulating more complex frictional behaviour, such as grasping of complex geometries with
2209 /// a robotic manipulator, better results can be achieved by enabling friction in all solver iterations.
2210 ///
2211 /// This flag only has effect with the default solver. The TGS solver always performs friction per-iteration.
2212 SuppressReadback = 65536,
2213 /// Controls processing friction in all solver iterations
2214 ///
2215 /// By default, PhysX processes friction only in the final 3 position iterations, and all velocity
2216 /// iterations. This flag enables friction processing in all position and velocity iterations.
2217 ///
2218 /// The default behaviour provides a good trade-off between performance and stability and is aimed
2219 /// primarily at game development.
2220 ///
2221 /// When simulating more complex frictional behaviour, such as grasping of complex geometries with
2222 /// a robotic manipulator, better results can be achieved by enabling friction in all solver iterations.
2223 ///
2224 /// This flag only has effect with the default solver. The TGS solver always performs friction per-iteration.
2225 ForceReadback = 131072,
2226 /// Controls processing friction in all solver iterations
2227 ///
2228 /// By default, PhysX processes friction only in the final 3 position iterations, and all velocity
2229 /// iterations. This flag enables friction processing in all position and velocity iterations.
2230 ///
2231 /// The default behaviour provides a good trade-off between performance and stability and is aimed
2232 /// primarily at game development.
2233 ///
2234 /// When simulating more complex frictional behaviour, such as grasping of complex geometries with
2235 /// a robotic manipulator, better results can be achieved by enabling friction in all solver iterations.
2236 ///
2237 /// This flag only has effect with the default solver. The TGS solver always performs friction per-iteration.
2238 MutableFlags = 69633,
2239}
2240
2241bitflags::bitflags! {
2242 /// Flags for [`PxSceneFlag`]
2243 #[derive(Default)]
2244 #[repr(transparent)]
2245 pub struct PxSceneFlags: u32 {
2246 const EnableActiveActors = 1 << 0;
2247 const EnableCcd = 1 << 1;
2248 const DisableCcdResweep = 1 << 2;
2249 const EnablePcm = 1 << 6;
2250 const DisableContactReportBufferResize = 1 << 7;
2251 const DisableContactCache = 1 << 8;
2252 const RequireRwLock = 1 << 9;
2253 const EnableStabilization = 1 << 10;
2254 const EnableAveragePoint = 1 << 11;
2255 const ExcludeKinematicsFromActiveActors = 1 << 12;
2256 const EnableGpuDynamics = 1 << 13;
2257 const EnableEnhancedDeterminism = 1 << 14;
2258 const EnableFrictionEveryIteration = 1 << 15;
2259 const SuppressReadback = 1 << 16;
2260 const ForceReadback = 1 << 17;
2261 const MutableFlags = Self::EnableActiveActors.bits | Self::ExcludeKinematicsFromActiveActors.bits | Self::SuppressReadback.bits;
2262 }
2263}
2264
2265/// Debug visualization parameters.
2266///
2267/// [`PxVisualizationParameter::eSCALE`] is the master switch for enabling visualization, please read the corresponding documentation
2268/// for further details.
2269#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2270#[repr(i32)]
2271pub enum PxVisualizationParameter {
2272 /// This overall visualization scale gets multiplied with the individual scales. Setting to zero ignores all visualizations. Default is 0.
2273 ///
2274 /// The below settings permit the debug visualization of various simulation properties.
2275 /// The setting is either zero, in which case the property is not drawn. Otherwise it is a scaling factor
2276 /// that determines the size of the visualization widgets.
2277 ///
2278 /// Only objects for which visualization is turned on using setFlag(eVISUALIZATION) are visualized (see [`PxActorFlag::eVISUALIZATION`], #PxShapeFlag::eVISUALIZATION, ...).
2279 /// Contacts are visualized if they involve a body which is being visualized.
2280 /// Default is 0.
2281 ///
2282 /// Notes:
2283 /// - to see any visualization, you have to set PxVisualizationParameter::eSCALE to nonzero first.
2284 /// - the scale factor has been introduced because it's difficult (if not impossible) to come up with a
2285 /// good scale for 3D vectors. Normals are normalized and their length is always 1. But it doesn't mean
2286 /// we should render a line of length 1. Depending on your objects/scene, this might be completely invisible
2287 /// or extremely huge. That's why the scale factor is here, to let you tune the length until it's ok in
2288 /// your scene.
2289 /// - however, things like collision shapes aren't ambiguous. They are clearly defined for example by the
2290 /// triangles
2291 /// &
2292 /// polygons themselves, and there's no point in scaling that. So the visualization widgets
2293 /// are only scaled when it makes sense.
2294 ///
2295 /// Range:
2296 /// [0, PX_MAX_F32)
2297 /// Default:
2298 /// 0
2299 Scale = 0,
2300 /// Visualize the world axes.
2301 WorldAxes = 1,
2302 /// Visualize a bodies axes.
2303 BodyAxes = 2,
2304 /// Visualize a body's mass axes.
2305 ///
2306 /// This visualization is also useful for visualizing the sleep state of bodies. Sleeping bodies are drawn in
2307 /// black, while awake bodies are drawn in white. If the body is sleeping and part of a sleeping group, it is
2308 /// drawn in red.
2309 BodyMassAxes = 3,
2310 /// Visualize the bodies linear velocity.
2311 BodyLinVelocity = 4,
2312 /// Visualize the bodies angular velocity.
2313 BodyAngVelocity = 5,
2314 /// Visualize contact points. Will enable contact information.
2315 ContactPoint = 6,
2316 /// Visualize contact normals. Will enable contact information.
2317 ContactNormal = 7,
2318 /// Visualize contact errors. Will enable contact information.
2319 ContactError = 8,
2320 /// Visualize Contact forces. Will enable contact information.
2321 ContactForce = 9,
2322 /// Visualize actor axes.
2323 ActorAxes = 10,
2324 /// Visualize bounds (AABBs in world space)
2325 CollisionAabbs = 11,
2326 /// Shape visualization
2327 CollisionShapes = 12,
2328 /// Shape axis visualization
2329 CollisionAxes = 13,
2330 /// Compound visualization (compound AABBs in world space)
2331 CollisionCompounds = 14,
2332 /// Mesh
2333 /// &
2334 /// convex face normals
2335 CollisionFnormals = 15,
2336 /// Active edges for meshes
2337 CollisionEdges = 16,
2338 /// Static pruning structures
2339 CollisionStatic = 17,
2340 /// Dynamic pruning structures
2341 CollisionDynamic = 18,
2342 /// Joint local axes
2343 JointLocalFrames = 19,
2344 /// Joint limits
2345 JointLimits = 20,
2346 /// Visualize culling box
2347 CullBox = 21,
2348 /// MBP regions
2349 MbpRegions = 22,
2350 /// Renders the simulation mesh instead of the collision mesh (only available for tetmeshes)
2351 SimulationMesh = 23,
2352 /// Renders the SDF of a mesh instead of the collision mesh (only available for triangle meshes with SDFs)
2353 Sdf = 24,
2354 /// This is not a parameter, it just records the current number of parameters (as maximum(PxVisualizationParameter)+1) for use in loops.
2355 NumValues = 25,
2356 /// This is not a parameter, it just records the current number of parameters (as maximum(PxVisualizationParameter)+1) for use in loops.
2357 ForceDword = 2147483647,
2358}
2359
2360/// Different types of rigid body collision pair statistics.
2361#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2362#[repr(i32)]
2363pub enum RbPairStatsType {
2364 /// Shape pairs processed as discrete contact pairs for the current simulation step.
2365 DiscreteContactPairs = 0,
2366 /// Shape pairs processed as swept integration pairs for the current simulation step.
2367 ///
2368 /// Counts the pairs for which special CCD (continuous collision detection) work was actually done and NOT the number of pairs which were configured for CCD.
2369 /// Furthermore, there can be multiple CCD passes and all processed pairs of all passes are summed up, hence the number can be larger than the amount of pairs which have been configured for CCD.
2370 CcdPairs = 1,
2371 /// Shape pairs processed with user contact modification enabled for the current simulation step.
2372 ModifiedContactPairs = 2,
2373 /// Trigger shape pairs processed for the current simulation step.
2374 TriggerPairs = 3,
2375}
2376
2377/// These flags determine what data is read or written to the gpu softbody.
2378#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2379#[repr(i32)]
2380pub enum PxSoftBodyDataFlag {
2381 /// The collision mesh tetrahedron indices (quadruples of int32)
2382 TetIndices = 0,
2383 /// The collision mesh cauchy stress tensors (float 3x3 matrices)
2384 TetStress = 1,
2385 /// The collision mesh tetrahedron von Mises stress (float scalar)
2386 TetStresscoeff = 2,
2387 /// The collision mesh tetrahedron rest poses (float 3x3 matrices)
2388 TetRestPoses = 3,
2389 /// The collision mesh tetrahedron orientations (quaternions, quadruples of float)
2390 TetRotations = 4,
2391 /// The collision mesh vertex positions and their inverted mass in the 4th component (quadruples of float)
2392 TetPositionInvMass = 5,
2393 /// The simulation mesh tetrahedron indices (quadruples of int32)
2394 SimTetIndices = 6,
2395 /// The simulation mesh vertex velocities and their inverted mass in the 4th component (quadruples of float)
2396 SimVelocityInvMass = 7,
2397 /// The simulation mesh vertex positions and their inverted mass in the 4th component (quadruples of float)
2398 SimPositionInvMass = 8,
2399 /// The simulation mesh kinematic target positions
2400 SimKinematicTarget = 9,
2401}
2402
2403/// Identifies input and output buffers for PxHairSystem
2404#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2405#[repr(i32)]
2406pub enum PxHairSystemData {
2407 /// No data specified
2408 None = 0,
2409 /// Specifies the position (first 3 floats) and inverse mass (last float) data (array of PxVec4 * max number of vertices)
2410 PositionInvmass = 1,
2411 /// Specifies the velocity (first 3 floats) data (array of PxVec4 * max number of vertices)
2412 Velocity = 2,
2413 /// Specifies everything
2414 All = 3,
2415}
2416
2417bitflags::bitflags! {
2418 /// Flags for [`PxHairSystemData`]
2419 #[derive(Default)]
2420 #[repr(transparent)]
2421 pub struct PxHairSystemDataFlags: u32 {
2422 const PositionInvmass = 1 << 0;
2423 const Velocity = 1 << 1;
2424 const All = Self::PositionInvmass.bits | Self::Velocity.bits;
2425 }
2426}
2427
2428/// Binary settings for hair system simulation
2429#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2430#[repr(i32)]
2431pub enum PxHairSystemFlag {
2432 /// Determines if self-collision between hair vertices is ignored
2433 DisableSelfCollision = 1,
2434 /// Determines if collision between hair and external bodies is ignored
2435 DisableExternalCollision = 2,
2436 /// Determines if attachment constraint is also felt by body to which the hair is attached
2437 DisableTwosidedAttachment = 4,
2438}
2439
2440bitflags::bitflags! {
2441 /// Flags for [`PxHairSystemFlag`]
2442 #[derive(Default)]
2443 #[repr(transparent)]
2444 pub struct PxHairSystemFlags: u32 {
2445 const DisableSelfCollision = 1 << 0;
2446 const DisableExternalCollision = 1 << 1;
2447 const DisableTwosidedAttachment = 1 << 2;
2448 }
2449}
2450
2451/// Identifies each type of information for retrieving from actor.
2452#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2453#[repr(i32)]
2454pub enum PxActorCacheFlag {
2455 ActorData = 1,
2456 Force = 4,
2457 Torque = 8,
2458}
2459
2460bitflags::bitflags! {
2461 /// Flags for [`PxActorCacheFlag`]
2462 #[derive(Default)]
2463 #[repr(transparent)]
2464 pub struct PxActorCacheFlags: u16 {
2465 const ActorData = 1 << 0;
2466 const Force = 1 << 2;
2467 const Torque = 1 << 3;
2468 }
2469}
2470
2471/// PVD scene Flags. They are disabled by default, and only works if PxPvdInstrumentationFlag::eDEBUG is set.
2472#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2473#[repr(i32)]
2474pub enum PxPvdSceneFlag {
2475 TransmitContacts = 1,
2476 /// Transmits contact stream to PVD.
2477 TransmitScenequeries = 2,
2478 /// Transmits scene query stream to PVD.
2479 TransmitConstraints = 4,
2480}
2481
2482bitflags::bitflags! {
2483 /// Flags for [`PxPvdSceneFlag`]
2484 #[derive(Default)]
2485 #[repr(transparent)]
2486 pub struct PxPvdSceneFlags: u8 {
2487 const TransmitContacts = 1 << 0;
2488 const TransmitScenequeries = 1 << 1;
2489 const TransmitConstraints = 1 << 2;
2490 }
2491}
2492
2493/// Identifies each type of actor for retrieving actors from a scene.
2494///
2495/// [`PxArticulationLink`] objects are not supported. Use the #PxArticulationReducedCoordinate object to retrieve all its links.
2496#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2497#[repr(i32)]
2498pub enum PxActorTypeFlag {
2499 /// A static rigid body
2500 RigidStatic = 1,
2501 /// A dynamic rigid body
2502 RigidDynamic = 2,
2503}
2504
2505bitflags::bitflags! {
2506 /// Flags for [`PxActorTypeFlag`]
2507 #[derive(Default)]
2508 #[repr(transparent)]
2509 pub struct PxActorTypeFlags: u16 {
2510 const RigidStatic = 1 << 0;
2511 const RigidDynamic = 1 << 1;
2512 }
2513}
2514
2515/// Extra data item types for contact pairs.
2516#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2517#[repr(i32)]
2518pub enum PxContactPairExtraDataType {
2519 /// see [`PxContactPairVelocity`]
2520 PreSolverVelocity = 0,
2521 /// see [`PxContactPairVelocity`]
2522 PostSolverVelocity = 1,
2523 /// see [`PxContactPairPose`]
2524 ContactEventPose = 2,
2525 /// see [`PxContactPairIndex`]
2526 ContactPairIndex = 3,
2527}
2528
2529/// Collection of flags providing information on contact report pairs.
2530#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2531#[repr(i32)]
2532pub enum PxContactPairHeaderFlag {
2533 /// The actor with index 0 has been removed from the scene.
2534 RemovedActor0 = 1,
2535 /// The actor with index 1 has been removed from the scene.
2536 RemovedActor1 = 2,
2537}
2538
2539bitflags::bitflags! {
2540 /// Flags for [`PxContactPairHeaderFlag`]
2541 #[derive(Default)]
2542 #[repr(transparent)]
2543 pub struct PxContactPairHeaderFlags: u16 {
2544 const RemovedActor0 = 1 << 0;
2545 const RemovedActor1 = 1 << 1;
2546 }
2547}
2548
2549/// Collection of flags providing information on contact report pairs.
2550#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2551#[repr(i32)]
2552pub enum PxContactPairFlag {
2553 /// The shape with index 0 has been removed from the actor/scene.
2554 RemovedShape0 = 1,
2555 /// The shape with index 1 has been removed from the actor/scene.
2556 RemovedShape1 = 2,
2557 /// First actor pair contact.
2558 ///
2559 /// The provided shape pair marks the first contact between the two actors, no other shape pair has been touching prior to the current simulation frame.
2560 ///
2561 /// : This info is only available if [`PxPairFlag::eNOTIFY_TOUCH_FOUND`] has been declared for the pair.
2562 ActorPairHasFirstTouch = 4,
2563 /// All contact between the actor pair was lost.
2564 ///
2565 /// All contact between the two actors has been lost, no shape pairs remain touching after the current simulation frame.
2566 ActorPairLostTouch = 8,
2567 /// Internal flag, used by [`PxContactPair`].extractContacts()
2568 ///
2569 /// The applied contact impulses are provided for every contact point.
2570 /// This is the case if [`PxPairFlag::eSOLVE_CONTACT`] has been set for the pair.
2571 InternalHasImpulses = 16,
2572 /// Internal flag, used by [`PxContactPair`].extractContacts()
2573 ///
2574 /// The provided contact point information is flipped with regards to the shapes of the contact pair. This mainly concerns the order of the internal triangle indices.
2575 InternalContactsAreFlipped = 32,
2576}
2577
2578bitflags::bitflags! {
2579 /// Flags for [`PxContactPairFlag`]
2580 #[derive(Default)]
2581 #[repr(transparent)]
2582 pub struct PxContactPairFlags: u16 {
2583 const RemovedShape0 = 1 << 0;
2584 const RemovedShape1 = 1 << 1;
2585 const ActorPairHasFirstTouch = 1 << 2;
2586 const ActorPairLostTouch = 1 << 3;
2587 const InternalHasImpulses = 1 << 4;
2588 const InternalContactsAreFlipped = 1 << 5;
2589 }
2590}
2591
2592/// Collection of flags providing information on trigger report pairs.
2593#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2594#[repr(i32)]
2595pub enum PxTriggerPairFlag {
2596 /// The trigger shape has been removed from the actor/scene.
2597 RemovedShapeTrigger = 1,
2598 /// The shape causing the trigger event has been removed from the actor/scene.
2599 RemovedShapeOther = 2,
2600 /// For internal use only.
2601 NextFree = 4,
2602}
2603
2604bitflags::bitflags! {
2605 /// Flags for [`PxTriggerPairFlag`]
2606 #[derive(Default)]
2607 #[repr(transparent)]
2608 pub struct PxTriggerPairFlags: u8 {
2609 const RemovedShapeTrigger = 1 << 0;
2610 const RemovedShapeOther = 1 << 1;
2611 const NextFree = 1 << 2;
2612 }
2613}
2614
2615/// Identifies input and output buffers for PxSoftBody.
2616#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2617#[repr(i32)]
2618pub enum PxSoftBodyData {
2619 None = 0,
2620 /// Flag to request access to the collision mesh's positions; read only
2621 PositionInvmass = 1,
2622 /// Flag to request access to the simulation mesh's positions and inverse masses
2623 SimPositionInvmass = 4,
2624 /// Flag to request access to the simulation mesh's velocities and inverse masses
2625 SimVelocity = 8,
2626 /// Flag to request access to the simulation mesh's kinematic target position
2627 SimKinematicTarget = 16,
2628 All = 29,
2629}
2630
2631bitflags::bitflags! {
2632 /// Flags for [`PxSoftBodyData`]
2633 #[derive(Default)]
2634 #[repr(transparent)]
2635 pub struct PxSoftBodyDataFlags: u32 {
2636 const PositionInvmass = 1 << 0;
2637 const SimPositionInvmass = 1 << 2;
2638 const SimVelocity = 1 << 3;
2639 const SimKinematicTarget = 1 << 4;
2640 const All = Self::PositionInvmass.bits | Self::SimPositionInvmass.bits | Self::SimVelocity.bits | Self::SimKinematicTarget.bits;
2641 }
2642}
2643
2644/// Flags to enable or disable special modes of a SoftBody
2645#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2646#[repr(i32)]
2647pub enum PxSoftBodyFlag {
2648 /// Determines if self collision will be detected and resolved
2649 DisableSelfCollision = 1,
2650 /// Enables computation of a Cauchy stress tensor for every tetrahedron in the simulation mesh. The tensors can be accessed through the softbody direct API
2651 ComputeStressTensor = 2,
2652 /// Enables support for continuous collision detection
2653 EnableCcd = 4,
2654 /// Enable debug rendering to display the simulation mesh
2655 DisplaySimMesh = 8,
2656 /// Enables support for kinematic motion of the collision and simulation mesh.
2657 Kinematic = 16,
2658 /// Enables partially kinematic motion of the collisios and simulation mesh.
2659 PartiallyKinematic = 32,
2660}
2661
2662bitflags::bitflags! {
2663 /// Flags for [`PxSoftBodyFlag`]
2664 #[derive(Default)]
2665 #[repr(transparent)]
2666 pub struct PxSoftBodyFlags: u32 {
2667 const DisableSelfCollision = 1 << 0;
2668 const ComputeStressTensor = 1 << 1;
2669 const EnableCcd = 1 << 2;
2670 const DisplaySimMesh = 1 << 3;
2671 const Kinematic = 1 << 4;
2672 const PartiallyKinematic = 1 << 5;
2673 }
2674}
2675
2676/// The type of controller, eg box, sphere or capsule.
2677#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2678#[repr(i32)]
2679pub enum PxControllerShapeType {
2680 /// A box controller.
2681 Box = 0,
2682 /// A capsule controller
2683 Capsule = 1,
2684 /// A capsule controller
2685 ForceDword = 2147483647,
2686}
2687
2688/// specifies how a CCT interacts with non-walkable parts.
2689///
2690/// This is only used when slopeLimit is non zero. It is currently enabled for static actors only, and not supported for spheres or capsules.
2691#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2692#[repr(i32)]
2693pub enum PxControllerNonWalkableMode {
2694 /// Stops character from climbing up non-walkable slopes, but doesn't move it otherwise
2695 PreventClimbing = 0,
2696 /// Stops character from climbing up non-walkable slopes, and forces it to slide down those slopes
2697 PreventClimbingAndForceSliding = 1,
2698}
2699
2700/// specifies which sides a character is colliding with.
2701#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2702#[repr(i32)]
2703pub enum PxControllerCollisionFlag {
2704 /// Character is colliding to the sides.
2705 CollisionSides = 1,
2706 /// Character has collision above.
2707 CollisionUp = 2,
2708 /// Character has collision below.
2709 CollisionDown = 4,
2710}
2711
2712bitflags::bitflags! {
2713 /// Flags for [`PxControllerCollisionFlag`]
2714 #[derive(Default)]
2715 #[repr(transparent)]
2716 pub struct PxControllerCollisionFlags: u8 {
2717 const CollisionSides = 1 << 0;
2718 const CollisionUp = 1 << 1;
2719 const CollisionDown = 1 << 2;
2720 }
2721}
2722
2723#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2724#[repr(i32)]
2725pub enum PxCapsuleClimbingMode {
2726 /// Standard mode, let the capsule climb over surfaces according to impact normal
2727 Easy = 0,
2728 /// Constrained mode, try to limit climbing according to the step offset
2729 Constrained = 1,
2730 Last = 2,
2731}
2732
2733/// specifies controller behavior
2734#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2735#[repr(i32)]
2736pub enum PxControllerBehaviorFlag {
2737 /// Controller can ride on touched object (i.e. when this touched object is moving horizontally).
2738 ///
2739 /// The CCT vs. CCT case is not supported.
2740 CctCanRideOnObject = 1,
2741 /// Controller should slide on touched object
2742 CctSlide = 2,
2743 /// Disable all code dealing with controllers riding on objects, let users define it outside of the SDK.
2744 CctUserDefinedRide = 4,
2745}
2746
2747bitflags::bitflags! {
2748 /// Flags for [`PxControllerBehaviorFlag`]
2749 #[derive(Default)]
2750 #[repr(transparent)]
2751 pub struct PxControllerBehaviorFlags: u8 {
2752 const CctCanRideOnObject = 1 << 0;
2753 const CctSlide = 1 << 1;
2754 const CctUserDefinedRide = 1 << 2;
2755 }
2756}
2757
2758/// specifies debug-rendering flags
2759#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2760#[repr(u32)]
2761pub enum PxControllerDebugRenderFlag {
2762 /// Temporal bounding volume around controllers
2763 TemporalBv = 1,
2764 /// Cached bounding volume around controllers
2765 CachedBv = 2,
2766 /// User-defined obstacles
2767 Obstacles = 4,
2768 None = 0,
2769 All = 4294967295,
2770}
2771
2772bitflags::bitflags! {
2773 /// Flags for [`PxControllerDebugRenderFlag`]
2774 #[derive(Default)]
2775 #[repr(transparent)]
2776 pub struct PxControllerDebugRenderFlags: u32 {
2777 const TemporalBv = 1 << 0;
2778 const CachedBv = 1 << 1;
2779 const Obstacles = 1 << 2;
2780 const All = Self::TemporalBv.bits | Self::CachedBv.bits | Self::Obstacles.bits;
2781 }
2782}
2783
2784/// Defines the number of bits per subgrid pixel
2785#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2786#[repr(i32)]
2787pub enum PxSdfBitsPerSubgridPixel {
2788 /// 8 bit per subgrid pixel (values will be stored as normalized integers)
2789 E8BitPerPixel = 1,
2790 /// 16 bit per subgrid pixel (values will be stored as normalized integers)
2791 E16BitPerPixel = 2,
2792 /// 32 bit per subgrid pixel (values will be stored as floats in world scale units)
2793 E32BitPerPixel = 4,
2794}
2795
2796/// Flags which describe the format and behavior of a convex mesh.
2797#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2798#[repr(i32)]
2799pub enum PxConvexFlag {
2800 /// Denotes the use of 16-bit vertex indices in PxConvexMeshDesc::triangles or PxConvexMeshDesc::polygons.
2801 /// (otherwise, 32-bit indices are assumed)
2802 E16BitIndices = 1,
2803 /// Automatically recomputes the hull from the vertices. If this flag is not set, you must provide the entire geometry manually.
2804 ///
2805 /// There are two different algorithms for hull computation, please see PxConvexMeshCookingType.
2806 ComputeConvex = 2,
2807 /// Checks and removes almost zero-area triangles during convex hull computation.
2808 /// The rejected area size is specified in PxCookingParams::areaTestEpsilon
2809 ///
2810 /// This flag is only used in combination with eCOMPUTE_CONVEX.
2811 CheckZeroAreaTriangles = 4,
2812 /// Quantizes the input vertices using the k-means clustering
2813 ///
2814 /// The input vertices are quantized to PxConvexMeshDesc::quantizedCount
2815 /// see http://en.wikipedia.org/wiki/K-means_clustering
2816 QuantizeInput = 8,
2817 /// Disables the convex mesh validation to speed-up hull creation. Please use separate validation
2818 /// function in checked/debug builds. Creating a convex mesh with invalid input data without prior validation
2819 /// may result in undefined behavior.
2820 DisableMeshValidation = 16,
2821 /// Enables plane shifting vertex limit algorithm.
2822 ///
2823 /// Plane shifting is an alternative algorithm for the case when the computed hull has more vertices
2824 /// than the specified vertex limit.
2825 ///
2826 /// The default algorithm computes the full hull, and an OBB around the input vertices. This OBB is then sliced
2827 /// with the hull planes until the vertex limit is reached.The default algorithm requires the vertex limit
2828 /// to be set to at least 8, and typically produces results that are much better quality than are produced
2829 /// by plane shifting.
2830 ///
2831 /// When plane shifting is enabled, the hull computation stops when vertex limit is reached. The hull planes
2832 /// are then shifted to contain all input vertices, and the new plane intersection points are then used to
2833 /// generate the final hull with the given vertex limit.Plane shifting may produce sharp edges to vertices
2834 /// very far away from the input cloud, and does not guarantee that all input vertices are inside the resulting
2835 /// hull.However, it can be used with a vertex limit as low as 4.
2836 PlaneShifting = 32,
2837 /// Inertia tensor computation is faster using SIMD code, but the precision is lower, which may result
2838 /// in incorrect inertia for very thin hulls.
2839 FastInertiaComputation = 64,
2840 /// Convex hulls are created with respect to GPU simulation limitations. Vertex limit and polygon limit
2841 /// is set to 64 and vertex limit per face is internally set to 32.
2842 ///
2843 /// Can be used only with eCOMPUTE_CONVEX flag.
2844 GpuCompatible = 128,
2845 /// Convex hull input vertices are shifted to be around origin to provide better computation stability.
2846 /// It is recommended to provide input vertices around the origin, otherwise use this flag to improve
2847 /// numerical stability.
2848 ///
2849 /// Is used only with eCOMPUTE_CONVEX flag.
2850 ShiftVertices = 256,
2851}
2852
2853bitflags::bitflags! {
2854 /// Flags for [`PxConvexFlag`]
2855 #[derive(Default)]
2856 #[repr(transparent)]
2857 pub struct PxConvexFlags: u16 {
2858 const E16BitIndices = 1 << 0;
2859 const ComputeConvex = 1 << 1;
2860 const CheckZeroAreaTriangles = 1 << 2;
2861 const QuantizeInput = 1 << 3;
2862 const DisableMeshValidation = 1 << 4;
2863 const PlaneShifting = 1 << 5;
2864 const FastInertiaComputation = 1 << 6;
2865 const GpuCompatible = 1 << 7;
2866 const ShiftVertices = 1 << 8;
2867 }
2868}
2869
2870/// Defines the tetrahedron structure of a mesh.
2871#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2872#[repr(i32)]
2873pub enum PxMeshFormat {
2874 /// Normal tetmesh with arbitrary tetrahedra
2875 TetMesh = 0,
2876 /// 6 tetrahedra in a row will form a hexahedron
2877 HexMesh = 1,
2878}
2879
2880/// Desired build strategy for PxMeshMidPhase::eBVH34
2881#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2882#[repr(i32)]
2883pub enum PxBVH34BuildStrategy {
2884 /// Fast build strategy. Fast build speed, good runtime performance in most cases. Recommended for runtime mesh cooking.
2885 Fast = 0,
2886 /// Default build strategy. Medium build speed, good runtime performance in all cases.
2887 Default = 1,
2888 /// SAH build strategy. Slower builds, slightly improved runtime performance in some cases.
2889 Sah = 2,
2890 Last = 3,
2891}
2892
2893/// Result from convex cooking.
2894#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2895#[repr(i32)]
2896pub enum PxConvexMeshCookingResult {
2897 /// Convex mesh cooking succeeded.
2898 Success = 0,
2899 /// Convex mesh cooking failed, algorithm couldn't find 4 initial vertices without a small triangle.
2900 ZeroAreaTestFailed = 1,
2901 /// Convex mesh cooking succeeded, but the algorithm has reached the 255 polygons limit.
2902 /// The produced hull does not contain all input vertices. Try to simplify the input vertices
2903 /// or try to use the eINFLATE_CONVEX or the eQUANTIZE_INPUT flags.
2904 PolygonsLimitReached = 2,
2905 /// Something unrecoverable happened. Check the error stream to find out what.
2906 Failure = 3,
2907}
2908
2909/// Enumeration for convex mesh cooking algorithms.
2910#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2911#[repr(i32)]
2912pub enum PxConvexMeshCookingType {
2913 /// The Quickhull algorithm constructs the hull from the given input points. The resulting hull
2914 /// will only contain a subset of the input points.
2915 Quickhull = 0,
2916}
2917
2918/// Result from triangle mesh cooking
2919#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2920#[repr(i32)]
2921pub enum PxTriangleMeshCookingResult {
2922 /// Everything is A-OK.
2923 Success = 0,
2924 /// a triangle is too large for well-conditioned results. Tessellate the mesh for better behavior, see the user guide section on cooking for more details.
2925 LargeTriangle = 1,
2926 /// Something unrecoverable happened. Check the error stream to find out what.
2927 Failure = 2,
2928}
2929
2930/// Enum for the set of mesh pre-processing parameters.
2931#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2932#[repr(i32)]
2933pub enum PxMeshPreprocessingFlag {
2934 /// When set, mesh welding is performed. See PxCookingParams::meshWeldTolerance. Clean mesh must be enabled.
2935 WeldVertices = 1,
2936 /// When set, mesh cleaning is disabled. This makes cooking faster.
2937 ///
2938 /// When clean mesh is not performed, mesh welding is also not performed.
2939 ///
2940 /// It is recommended to use only meshes that passed during validateTriangleMesh.
2941 DisableCleanMesh = 2,
2942 /// When set, active edges are set for each triangle edge. This makes cooking faster but slow up contact generation.
2943 DisableActiveEdgesPrecompute = 4,
2944 /// When set, 32-bit indices will always be created regardless of triangle count.
2945 ///
2946 /// By default mesh will be created with 16-bit indices for triangle count
2947 /// <
2948 /// = 0xFFFF and 32-bit otherwise.
2949 Force32bitIndices = 8,
2950 /// When set, a list of triangles will be created for each associated vertex in the mesh
2951 EnableVertMapping = 16,
2952 /// When set, inertia tensor is calculated for the mesh
2953 EnableInertia = 32,
2954}
2955
2956bitflags::bitflags! {
2957 /// Flags for [`PxMeshPreprocessingFlag`]
2958 #[derive(Default)]
2959 #[repr(transparent)]
2960 pub struct PxMeshPreprocessingFlags: u32 {
2961 const WeldVertices = 1 << 0;
2962 const DisableCleanMesh = 1 << 1;
2963 const DisableActiveEdgesPrecompute = 1 << 2;
2964 const Force32bitIndices = 1 << 3;
2965 const EnableVertMapping = 1 << 4;
2966 const EnableInertia = 1 << 5;
2967 }
2968}
2969
2970/// Unique identifiers for extensions classes which implement a constraint based on PxConstraint.
2971///
2972/// Users which want to create their own custom constraint types should choose an ID larger or equal to eNEXT_FREE_ID
2973/// and not eINVALID_ID.
2974#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2975#[repr(i32)]
2976pub enum PxConstraintExtIDs {
2977 Joint = 0,
2978 VehicleSuspLimitDeprecated = 1,
2979 VehicleStickyTyreDeprecated = 2,
2980 VehicleJoint = 3,
2981 NextFreeId = 4,
2982 InvalidId = 2147483647,
2983}
2984
2985/// an enumeration of PhysX' built-in joint types
2986#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2987#[repr(i32)]
2988pub enum PxJointConcreteType {
2989 Spherical = 256,
2990 Revolute = 257,
2991 Prismatic = 258,
2992 Fixed = 259,
2993 Distance = 260,
2994 D6 = 261,
2995 Contact = 262,
2996 Gear = 263,
2997 RackAndPinion = 264,
2998 Last = 265,
2999}
3000
3001/// an enumeration for specifying one or other of the actors referenced by a joint
3002#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3003#[repr(i32)]
3004pub enum PxJointActorIndex {
3005 Actor0 = 0,
3006 Actor1 = 1,
3007 Count = 2,
3008}
3009
3010/// flags for configuring the drive of a PxDistanceJoint
3011#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3012#[repr(i32)]
3013pub enum PxDistanceJointFlag {
3014 MaxDistanceEnabled = 2,
3015 MinDistanceEnabled = 4,
3016 SpringEnabled = 8,
3017}
3018
3019bitflags::bitflags! {
3020 /// Flags for [`PxDistanceJointFlag`]
3021 #[derive(Default)]
3022 #[repr(transparent)]
3023 pub struct PxDistanceJointFlags: u16 {
3024 const MaxDistanceEnabled = 1 << 1;
3025 const MinDistanceEnabled = 1 << 2;
3026 const SpringEnabled = 1 << 3;
3027 }
3028}
3029
3030/// Flags specific to the prismatic joint.
3031#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3032#[repr(i32)]
3033pub enum PxPrismaticJointFlag {
3034 LimitEnabled = 2,
3035}
3036
3037bitflags::bitflags! {
3038 /// Flags for [`PxPrismaticJointFlag`]
3039 #[derive(Default)]
3040 #[repr(transparent)]
3041 pub struct PxPrismaticJointFlags: u16 {
3042 const LimitEnabled = 1 << 1;
3043 }
3044}
3045
3046/// Flags specific to the Revolute Joint.
3047#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3048#[repr(i32)]
3049pub enum PxRevoluteJointFlag {
3050 /// enable the limit
3051 LimitEnabled = 1,
3052 /// enable the drive
3053 DriveEnabled = 2,
3054 /// if the existing velocity is beyond the drive velocity, do not add force
3055 DriveFreespin = 4,
3056}
3057
3058bitflags::bitflags! {
3059 /// Flags for [`PxRevoluteJointFlag`]
3060 #[derive(Default)]
3061 #[repr(transparent)]
3062 pub struct PxRevoluteJointFlags: u16 {
3063 const LimitEnabled = 1 << 0;
3064 const DriveEnabled = 1 << 1;
3065 const DriveFreespin = 1 << 2;
3066 }
3067}
3068
3069/// Flags specific to the spherical joint.
3070#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3071#[repr(i32)]
3072pub enum PxSphericalJointFlag {
3073 /// the cone limit for the spherical joint is enabled
3074 LimitEnabled = 2,
3075}
3076
3077bitflags::bitflags! {
3078 /// Flags for [`PxSphericalJointFlag`]
3079 #[derive(Default)]
3080 #[repr(transparent)]
3081 pub struct PxSphericalJointFlags: u16 {
3082 const LimitEnabled = 1 << 1;
3083 }
3084}
3085
3086/// Used to specify one of the degrees of freedom of a D6 joint.
3087#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3088#[repr(i32)]
3089pub enum PxD6Axis {
3090 /// motion along the X axis
3091 X = 0,
3092 /// motion along the Y axis
3093 Y = 1,
3094 /// motion along the Z axis
3095 Z = 2,
3096 /// motion around the X axis
3097 Twist = 3,
3098 /// motion around the Y axis
3099 Swing1 = 4,
3100 /// motion around the Z axis
3101 Swing2 = 5,
3102 Count = 6,
3103}
3104
3105/// Used to specify the range of motions allowed for a degree of freedom in a D6 joint.
3106#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3107#[repr(i32)]
3108pub enum PxD6Motion {
3109 /// The DOF is locked, it does not allow relative motion.
3110 Locked = 0,
3111 /// The DOF is limited, it only allows motion within a specific range.
3112 Limited = 1,
3113 /// The DOF is free and has its full range of motion.
3114 Free = 2,
3115}
3116
3117/// Used to specify which axes of a D6 joint are driven.
3118///
3119/// Each drive is an implicit force-limited damped spring:
3120///
3121/// force = spring * (target position - position) + damping * (targetVelocity - velocity)
3122///
3123/// Alternatively, the spring may be configured to generate a specified acceleration instead of a force.
3124///
3125/// A linear axis is affected by drive only if the corresponding drive flag is set. There are two possible models
3126/// for angular drive: swing/twist, which may be used to drive one or more angular degrees of freedom, or slerp,
3127/// which may only be used to drive all three angular degrees simultaneously.
3128#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3129#[repr(i32)]
3130pub enum PxD6Drive {
3131 /// drive along the X-axis
3132 X = 0,
3133 /// drive along the Y-axis
3134 Y = 1,
3135 /// drive along the Z-axis
3136 Z = 2,
3137 /// drive of displacement from the X-axis
3138 Swing = 3,
3139 /// drive of the displacement around the X-axis
3140 Twist = 4,
3141 /// drive of all three angular degrees along a SLERP-path
3142 Slerp = 5,
3143 Count = 6,
3144}
3145
3146impl From<usize> for PxD6Drive {
3147 fn from(val: usize) -> Self {
3148 #[allow(clippy::match_same_arms)]
3149 match val {
3150 0 => Self::X,
3151 1 => Self::Y,
3152 2 => Self::Z,
3153 3 => Self::Swing,
3154 4 => Self::Twist,
3155 5 => Self::Slerp,
3156 6 => Self::Count,
3157 _ => Self::Count,
3158 }
3159 }
3160}
3161
3162/// flags for configuring the drive model of a PxD6Joint
3163#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3164#[repr(i32)]
3165pub enum PxD6JointDriveFlag {
3166 /// drive spring is for the acceleration at the joint (rather than the force)
3167 Acceleration = 1,
3168}
3169
3170bitflags::bitflags! {
3171 /// Flags for [`PxD6JointDriveFlag`]
3172 #[derive(Default)]
3173 #[repr(transparent)]
3174 pub struct PxD6JointDriveFlags: u32 {
3175 const Acceleration = 1 << 0;
3176 }
3177}
3178
3179/// Collision filtering operations.
3180#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3181#[repr(i32)]
3182pub enum PxFilterOp {
3183 PxFilteropAnd = 0,
3184 PxFilteropOr = 1,
3185 PxFilteropXor = 2,
3186 PxFilteropNand = 3,
3187 PxFilteropNor = 4,
3188 PxFilteropNxor = 5,
3189 PxFilteropSwapAnd = 6,
3190}
3191
3192/// If a thread ends up waiting for work it will find itself in a spin-wait loop until work becomes available.
3193/// Three strategies are available to limit wasted cycles.
3194/// The strategies are as follows:
3195/// a) wait until a work task signals the end of the spin-wait period.
3196/// b) yield the thread by providing a hint to reschedule thread execution, thereby allowing other threads to run.
3197/// c) yield the processor by informing it that it is waiting for work and requesting it to more efficiently use compute resources.
3198#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3199#[repr(i32)]
3200pub enum PxDefaultCpuDispatcherWaitForWorkMode {
3201 WaitForWork = 0,
3202 YieldThread = 1,
3203 YieldProcessor = 2,
3204}
3205
3206#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3207#[repr(i32)]
3208pub enum PxBatchQueryStatus {
3209 /// This is the initial state before a query starts.
3210 Pending = 0,
3211 /// The query is finished; results have been written into the result and hit buffers.
3212 Success = 1,
3213 /// The query results were incomplete due to touch hit buffer overflow. Blocking hit is still correct.
3214 Overflow = 2,
3215}
3216
3217/// types of instrumentation that PVD can do.
3218#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3219#[repr(i32)]
3220pub enum PxPvdInstrumentationFlag {
3221 /// Send debugging information to PVD.
3222 ///
3223 /// This information is the actual object data of the rigid statics, shapes,
3224 /// articulations, etc. Sending this information has a noticeable impact on
3225 /// performance and thus this flag should not be set if you want an accurate
3226 /// performance profile.
3227 Debug = 1,
3228 /// Send profile information to PVD.
3229 ///
3230 /// This information populates PVD's profile view. It has (at this time) negligible
3231 /// cost compared to Debug information and makes PVD *much* more useful so it is quite
3232 /// highly recommended.
3233 ///
3234 /// This flag works together with a PxCreatePhysics parameter.
3235 /// Using it allows the SDK to send profile events to PVD.
3236 Profile = 2,
3237 /// Send memory information to PVD.
3238 ///
3239 /// The PVD sdk side hooks into the Foundation memory controller and listens to
3240 /// allocation/deallocation events. This has a noticable hit on the first frame,
3241 /// however, this data is somewhat compressed and the PhysX SDK doesn't allocate much
3242 /// once it hits a steady state. This information also has a fairly negligible
3243 /// impact and thus is also highly recommended.
3244 ///
3245 /// This flag works together with a PxCreatePhysics parameter,
3246 /// trackOutstandingAllocations. Using both of them together allows users to have
3247 /// an accurate view of the overall memory usage of the simulation at the cost of
3248 /// a hashtable lookup per allocation/deallocation. Again, PhysX makes a best effort
3249 /// attempt not to allocate or deallocate during simulation so this hashtable lookup
3250 /// tends to have no effect past the first frame.
3251 ///
3252 /// Sending memory information without tracking outstanding allocations means that
3253 /// PVD will accurate information about the state of the memory system before the
3254 /// actual connection happened.
3255 Memory = 4,
3256 /// Send memory information to PVD.
3257 ///
3258 /// The PVD sdk side hooks into the Foundation memory controller and listens to
3259 /// allocation/deallocation events. This has a noticable hit on the first frame,
3260 /// however, this data is somewhat compressed and the PhysX SDK doesn't allocate much
3261 /// once it hits a steady state. This information also has a fairly negligible
3262 /// impact and thus is also highly recommended.
3263 ///
3264 /// This flag works together with a PxCreatePhysics parameter,
3265 /// trackOutstandingAllocations. Using both of them together allows users to have
3266 /// an accurate view of the overall memory usage of the simulation at the cost of
3267 /// a hashtable lookup per allocation/deallocation. Again, PhysX makes a best effort
3268 /// attempt not to allocate or deallocate during simulation so this hashtable lookup
3269 /// tends to have no effect past the first frame.
3270 ///
3271 /// Sending memory information without tracking outstanding allocations means that
3272 /// PVD will accurate information about the state of the memory system before the
3273 /// actual connection happened.
3274 All = 7,
3275}
3276
3277bitflags::bitflags! {
3278 /// Flags for [`PxPvdInstrumentationFlag`]
3279 #[derive(Default)]
3280 #[repr(transparent)]
3281 pub struct PxPvdInstrumentationFlags: u8 {
3282 const Debug = 1 << 0;
3283 const Profile = 1 << 1;
3284 const Memory = 1 << 2;
3285 const All = Self::Debug.bits | Self::Profile.bits | Self::Memory.bits;
3286 }
3287}
3288
3289#[derive(Copy, Clone)]
3290#[repr(C)]
3291pub struct PxMat34 {
3292 _unused: [u8; 0],
3293}
3294
3295#[derive(Clone, Copy)]
3296#[cfg_attr(feature = "debug-structs", derive(Debug))]
3297#[repr(C)]
3298pub struct PxAllocatorCallback {
3299 vtable_: *const std::ffi::c_void,
3300}
3301
3302#[derive(Clone, Copy)]
3303#[cfg_attr(feature = "debug-structs", derive(Debug))]
3304#[repr(C)]
3305pub struct PxAssertHandler {
3306 vtable_: *const std::ffi::c_void,
3307}
3308
3309#[derive(Clone, Copy)]
3310#[cfg_attr(feature = "debug-structs", derive(Debug))]
3311#[repr(C)]
3312pub struct PxFoundation {
3313 vtable_: *const std::ffi::c_void,
3314}
3315
3316#[derive(Clone, Copy)]
3317#[cfg_attr(feature = "debug-structs", derive(Debug))]
3318#[repr(C)]
3319pub struct PxVirtualAllocatorCallback {
3320 vtable_: *const std::ffi::c_void,
3321}
3322
3323#[derive(Clone, Copy)]
3324#[repr(C)]
3325pub union PxTempAllocatorChunk {
3326 pub mNext: *mut PxTempAllocatorChunk,
3327 pub mIndex: u32,
3328 pub mPad: [u8; 16],
3329}
3330#[cfg(feature = "debug-structs")]
3331impl std::fmt::Debug for PxTempAllocatorChunk {
3332 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3333 f.write_str("PxTempAllocatorChunk")
3334 }
3335}
3336
3337#[derive(Copy, Clone)]
3338#[repr(C)]
3339pub struct PxLogTwo {
3340 _unused: [u8; 0],
3341}
3342
3343#[derive(Copy, Clone)]
3344#[repr(C)]
3345pub struct PxUnConst {
3346 _unused: [u8; 0],
3347}
3348
3349#[derive(Clone, Copy)]
3350#[cfg_attr(feature = "debug-structs", derive(Debug))]
3351#[repr(C)]
3352pub struct PxErrorCallback {
3353 vtable_: *const std::ffi::c_void,
3354}
3355
3356#[derive(Clone, Copy)]
3357#[cfg_attr(feature = "debug-structs", derive(Debug))]
3358#[repr(C)]
3359pub struct PxAllocationListener {
3360 vtable_: *const std::ffi::c_void,
3361}
3362
3363#[derive(Copy, Clone)]
3364#[repr(C)]
3365pub struct PxHash {
3366 _unused: [u8; 0],
3367}
3368
3369#[derive(Clone, Copy)]
3370#[cfg_attr(feature = "debug-structs", derive(Debug))]
3371#[repr(C)]
3372pub struct PxInputStream {
3373 vtable_: *const std::ffi::c_void,
3374}
3375
3376#[derive(Clone, Copy)]
3377#[cfg_attr(feature = "debug-structs", derive(Debug))]
3378#[repr(C)]
3379pub struct PxInputData {
3380 vtable_: *const std::ffi::c_void,
3381}
3382
3383#[derive(Clone, Copy)]
3384#[cfg_attr(feature = "debug-structs", derive(Debug))]
3385#[repr(C)]
3386pub struct PxOutputStream {
3387 vtable_: *const std::ffi::c_void,
3388}
3389
3390#[derive(Clone, Copy)]
3391#[cfg_attr(feature = "debug-structs", derive(Debug))]
3392#[repr(C)]
3393pub struct PxProfilerCallback {
3394 vtable_: *const std::ffi::c_void,
3395}
3396
3397#[derive(Clone, Copy)]
3398#[cfg_attr(feature = "debug-structs", derive(Debug))]
3399#[repr(C)]
3400pub struct PxRunnable {
3401 vtable_: *const std::ffi::c_void,
3402}
3403
3404#[derive(Clone, Copy)]
3405#[cfg_attr(feature = "debug-structs", derive(Debug))]
3406#[repr(C)]
3407pub struct PxRenderBuffer {
3408 vtable_: *const std::ffi::c_void,
3409}
3410
3411#[derive(Clone, Copy)]
3412#[cfg_attr(feature = "debug-structs", derive(Debug))]
3413#[repr(C)]
3414pub struct PxProcessPxBaseCallback {
3415 vtable_: *const std::ffi::c_void,
3416}
3417
3418#[derive(Clone, Copy)]
3419#[cfg_attr(feature = "debug-structs", derive(Debug))]
3420#[repr(C)]
3421pub struct PxSerializationContext {
3422 vtable_: *const std::ffi::c_void,
3423}
3424
3425#[derive(Clone, Copy)]
3426#[cfg_attr(feature = "debug-structs", derive(Debug))]
3427#[repr(C)]
3428pub struct PxSerializationRegistry {
3429 vtable_: *const std::ffi::c_void,
3430}
3431
3432#[derive(Clone, Copy)]
3433#[cfg_attr(feature = "debug-structs", derive(Debug))]
3434#[repr(C)]
3435pub struct PxCollection {
3436 vtable_: *const std::ffi::c_void,
3437}
3438
3439#[derive(Copy, Clone)]
3440#[repr(C)]
3441pub struct PxTypeInfo {
3442 _unused: [u8; 0],
3443}
3444
3445#[derive(Copy, Clone)]
3446#[repr(C)]
3447pub struct PxFEMSoftBodyMaterial {
3448 _unused: [u8; 0],
3449}
3450
3451#[derive(Copy, Clone)]
3452#[repr(C)]
3453pub struct PxFEMClothMaterial {
3454 _unused: [u8; 0],
3455}
3456
3457#[derive(Copy, Clone)]
3458#[repr(C)]
3459pub struct PxPBDMaterial {
3460 _unused: [u8; 0],
3461}
3462
3463#[derive(Copy, Clone)]
3464#[repr(C)]
3465pub struct PxFLIPMaterial {
3466 _unused: [u8; 0],
3467}
3468
3469#[derive(Copy, Clone)]
3470#[repr(C)]
3471pub struct PxMPMMaterial {
3472 _unused: [u8; 0],
3473}
3474
3475#[derive(Copy, Clone)]
3476#[repr(C)]
3477pub struct PxCustomMaterial {
3478 _unused: [u8; 0],
3479}
3480
3481#[derive(Copy, Clone)]
3482#[repr(C)]
3483pub struct PxBVH33TriangleMesh {
3484 _unused: [u8; 0],
3485}
3486
3487#[derive(Copy, Clone)]
3488#[repr(C)]
3489pub struct PxParticleSystem {
3490 _unused: [u8; 0],
3491}
3492
3493#[derive(Copy, Clone)]
3494#[repr(C)]
3495pub struct PxPBDParticleSystem {
3496 _unused: [u8; 0],
3497}
3498
3499#[derive(Copy, Clone)]
3500#[repr(C)]
3501pub struct PxFLIPParticleSystem {
3502 _unused: [u8; 0],
3503}
3504
3505#[derive(Copy, Clone)]
3506#[repr(C)]
3507pub struct PxMPMParticleSystem {
3508 _unused: [u8; 0],
3509}
3510
3511#[derive(Copy, Clone)]
3512#[repr(C)]
3513pub struct PxCustomParticleSystem {
3514 _unused: [u8; 0],
3515}
3516
3517#[derive(Copy, Clone)]
3518#[repr(C)]
3519pub struct PxSoftBody {
3520 _unused: [u8; 0],
3521}
3522
3523#[derive(Copy, Clone)]
3524#[repr(C)]
3525pub struct PxFEMCloth {
3526 _unused: [u8; 0],
3527}
3528
3529#[derive(Copy, Clone)]
3530#[repr(C)]
3531pub struct PxHairSystem {
3532 _unused: [u8; 0],
3533}
3534
3535#[derive(Copy, Clone)]
3536#[repr(C)]
3537pub struct PxParticleBuffer {
3538 _unused: [u8; 0],
3539}
3540
3541#[derive(Copy, Clone)]
3542#[repr(C)]
3543pub struct PxParticleAndDiffuseBuffer {
3544 _unused: [u8; 0],
3545}
3546
3547#[derive(Copy, Clone)]
3548#[repr(C)]
3549pub struct PxParticleClothBuffer {
3550 _unused: [u8; 0],
3551}
3552
3553#[derive(Copy, Clone)]
3554#[repr(C)]
3555pub struct PxParticleRigidBuffer {
3556 _unused: [u8; 0],
3557}
3558
3559#[derive(Clone, Copy)]
3560#[cfg_attr(feature = "debug-structs", derive(Debug))]
3561#[repr(C)]
3562pub struct PxStringTable {
3563 vtable_: *const std::ffi::c_void,
3564}
3565
3566#[derive(Clone, Copy)]
3567#[cfg_attr(feature = "debug-structs", derive(Debug))]
3568#[repr(C)]
3569pub struct PxSerializer {
3570 vtable_: *const std::ffi::c_void,
3571}
3572
3573#[derive(Clone, Copy)]
3574#[cfg_attr(feature = "debug-structs", derive(Debug))]
3575#[repr(C)]
3576pub struct PxInsertionCallback {
3577 vtable_: *const std::ffi::c_void,
3578}
3579
3580#[derive(Clone, Copy)]
3581#[cfg_attr(feature = "debug-structs", derive(Debug))]
3582#[repr(C)]
3583pub struct PxTaskManager {
3584 vtable_: *const std::ffi::c_void,
3585}
3586
3587#[derive(Clone, Copy)]
3588#[cfg_attr(feature = "debug-structs", derive(Debug))]
3589#[repr(C)]
3590pub struct PxCpuDispatcher {
3591 vtable_: *const std::ffi::c_void,
3592}
3593
3594#[derive(Clone, Copy)]
3595#[cfg_attr(feature = "debug-structs", derive(Debug))]
3596#[repr(C)]
3597pub struct PxBVHRaycastCallback {
3598 vtable_: *const std::ffi::c_void,
3599}
3600
3601#[derive(Clone, Copy)]
3602#[cfg_attr(feature = "debug-structs", derive(Debug))]
3603#[repr(C)]
3604pub struct PxBVHOverlapCallback {
3605 vtable_: *const std::ffi::c_void,
3606}
3607
3608#[derive(Clone, Copy)]
3609#[cfg_attr(feature = "debug-structs", derive(Debug))]
3610#[repr(C)]
3611pub struct PxBVHTraversalCallback {
3612 vtable_: *const std::ffi::c_void,
3613}
3614
3615#[derive(Copy, Clone)]
3616#[repr(C)]
3617pub struct PxContactBuffer {
3618 _unused: [u8; 0],
3619}
3620
3621#[derive(Copy, Clone)]
3622#[repr(C)]
3623pub struct PxRenderOutput {
3624 _unused: [u8; 0],
3625}
3626
3627#[derive(Clone, Copy)]
3628#[cfg_attr(feature = "debug-structs", derive(Debug))]
3629#[repr(C)]
3630pub struct PxCustomGeometryCallbacks {
3631 vtable_: *const std::ffi::c_void,
3632}
3633
3634#[derive(Clone, Copy)]
3635#[repr(C)]
3636pub union Px1DConstraintMods {
3637 pub spring: PxSpringModifiers,
3638 pub bounce: PxRestitutionModifiers,
3639}
3640#[cfg(feature = "debug-structs")]
3641impl std::fmt::Debug for Px1DConstraintMods {
3642 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3643 f.write_str("Px1DConstraintMods")
3644 }
3645}
3646
3647#[derive(Clone, Copy)]
3648#[cfg_attr(feature = "debug-structs", derive(Debug))]
3649#[repr(C)]
3650pub struct PxConstraintVisualizer {
3651 vtable_: *const std::ffi::c_void,
3652}
3653
3654#[derive(Clone, Copy)]
3655#[cfg_attr(feature = "debug-structs", derive(Debug))]
3656#[repr(C)]
3657pub struct PxConstraintConnector {
3658 vtable_: *const std::ffi::c_void,
3659}
3660
3661#[derive(Clone, Copy)]
3662#[cfg_attr(feature = "debug-structs", derive(Debug))]
3663#[repr(C)]
3664pub struct PxConstraintAllocator {
3665 vtable_: *const std::ffi::c_void,
3666}
3667
3668#[derive(Clone, Copy)]
3669#[cfg_attr(feature = "debug-structs", derive(Debug))]
3670#[repr(C)]
3671pub struct PxContactModifyCallback {
3672 vtable_: *const std::ffi::c_void,
3673}
3674
3675#[derive(Clone, Copy)]
3676#[cfg_attr(feature = "debug-structs", derive(Debug))]
3677#[repr(C)]
3678pub struct PxCCDContactModifyCallback {
3679 vtable_: *const std::ffi::c_void,
3680}
3681
3682#[derive(Clone, Copy)]
3683#[cfg_attr(feature = "debug-structs", derive(Debug))]
3684#[repr(C)]
3685pub struct PxDeletionListener {
3686 vtable_: *const std::ffi::c_void,
3687}
3688
3689#[derive(Clone, Copy)]
3690#[cfg_attr(feature = "debug-structs", derive(Debug))]
3691#[repr(C)]
3692pub struct PxSimulationFilterCallback {
3693 vtable_: *const std::ffi::c_void,
3694}
3695
3696#[derive(Clone, Copy)]
3697#[cfg_attr(feature = "debug-structs", derive(Debug))]
3698#[repr(C)]
3699pub struct PxLockedData {
3700 vtable_: *const std::ffi::c_void,
3701}
3702
3703#[derive(Copy, Clone)]
3704#[repr(C)]
3705pub struct PxCudaContextManager {
3706 _unused: [u8; 0],
3707}
3708
3709#[derive(Copy, Clone)]
3710#[repr(C)]
3711pub struct PxParticleRigidAttachment {
3712 _unused: [u8; 0],
3713}
3714
3715#[derive(Copy, Clone)]
3716#[repr(C)]
3717pub struct PxOmniPvd {
3718 _unused: [u8; 0],
3719}
3720
3721#[derive(Clone, Copy)]
3722#[cfg_attr(feature = "debug-structs", derive(Debug))]
3723#[repr(C)]
3724pub struct PxPhysics {
3725 vtable_: *const std::ffi::c_void,
3726}
3727
3728#[derive(Clone, Copy)]
3729#[cfg_attr(feature = "debug-structs", derive(Debug))]
3730#[repr(C)]
3731pub struct PxQueryFilterCallback {
3732 vtable_: *const std::ffi::c_void,
3733}
3734
3735#[derive(Clone, Copy)]
3736#[cfg_attr(feature = "debug-structs", derive(Debug))]
3737#[repr(C)]
3738pub struct PxSceneQuerySystemBase {
3739 vtable_: *const std::ffi::c_void,
3740}
3741
3742#[derive(Clone, Copy)]
3743#[cfg_attr(feature = "debug-structs", derive(Debug))]
3744#[repr(C)]
3745pub struct PxSceneSQSystem {
3746 vtable_: *const std::ffi::c_void,
3747}
3748
3749#[derive(Clone, Copy)]
3750#[cfg_attr(feature = "debug-structs", derive(Debug))]
3751#[repr(C)]
3752pub struct PxSceneQuerySystem {
3753 vtable_: *const std::ffi::c_void,
3754}
3755
3756#[derive(Clone, Copy)]
3757#[cfg_attr(feature = "debug-structs", derive(Debug))]
3758#[repr(C)]
3759pub struct PxBroadPhaseRegions {
3760 vtable_: *const std::ffi::c_void,
3761}
3762
3763#[derive(Clone, Copy)]
3764#[cfg_attr(feature = "debug-structs", derive(Debug))]
3765#[repr(C)]
3766pub struct PxBroadPhase {
3767 vtable_: *const std::ffi::c_void,
3768}
3769
3770#[derive(Clone, Copy)]
3771#[cfg_attr(feature = "debug-structs", derive(Debug))]
3772#[repr(C)]
3773pub struct PxAABBManager {
3774 vtable_: *const std::ffi::c_void,
3775}
3776
3777#[derive(Clone, Copy)]
3778#[cfg_attr(feature = "debug-structs", derive(Debug))]
3779#[repr(C)]
3780pub struct PxPvdSceneClient {
3781 vtable_: *const std::ffi::c_void,
3782}
3783
3784#[derive(Clone, Copy)]
3785#[cfg_attr(feature = "debug-structs", derive(Debug))]
3786#[repr(C)]
3787pub struct PxBroadPhaseCallback {
3788 vtable_: *const std::ffi::c_void,
3789}
3790
3791#[derive(Clone, Copy)]
3792#[cfg_attr(feature = "debug-structs", derive(Debug))]
3793#[repr(C)]
3794pub struct PxSimulationEventCallback {
3795 vtable_: *const std::ffi::c_void,
3796}
3797
3798#[derive(Clone, Copy)]
3799#[cfg_attr(feature = "debug-structs", derive(Debug))]
3800#[repr(C)]
3801pub struct PxObstacleContext {
3802 vtable_: *const std::ffi::c_void,
3803}
3804
3805#[derive(Clone, Copy)]
3806#[cfg_attr(feature = "debug-structs", derive(Debug))]
3807#[repr(C)]
3808pub struct PxUserControllerHitReport {
3809 vtable_: *const std::ffi::c_void,
3810}
3811
3812#[derive(Clone, Copy)]
3813#[cfg_attr(feature = "debug-structs", derive(Debug))]
3814#[repr(C)]
3815pub struct PxControllerFilterCallback {
3816 vtable_: *const std::ffi::c_void,
3817}
3818
3819#[derive(Clone, Copy)]
3820#[cfg_attr(feature = "debug-structs", derive(Debug))]
3821#[repr(C)]
3822pub struct PxController {
3823 vtable_: *const std::ffi::c_void,
3824}
3825
3826#[derive(Clone, Copy)]
3827#[cfg_attr(feature = "debug-structs", derive(Debug))]
3828#[repr(C)]
3829pub struct PxBoxController {
3830 vtable_: *const std::ffi::c_void,
3831}
3832
3833#[derive(Clone, Copy)]
3834#[cfg_attr(feature = "debug-structs", derive(Debug))]
3835#[repr(C)]
3836pub struct PxCapsuleController {
3837 vtable_: *const std::ffi::c_void,
3838}
3839
3840#[derive(Clone, Copy)]
3841#[cfg_attr(feature = "debug-structs", derive(Debug))]
3842#[repr(C)]
3843pub struct PxControllerBehaviorCallback {
3844 vtable_: *const std::ffi::c_void,
3845}
3846
3847#[derive(Clone, Copy)]
3848#[cfg_attr(feature = "debug-structs", derive(Debug))]
3849#[repr(C)]
3850pub struct PxControllerManager {
3851 vtable_: *const std::ffi::c_void,
3852}
3853
3854#[derive(Clone, Copy)]
3855#[cfg_attr(feature = "debug-structs", derive(Debug))]
3856#[repr(C)]
3857pub struct PxDefaultAllocator {
3858 vtable_: *const std::ffi::c_void,
3859}
3860
3861#[derive(Clone, Copy)]
3862#[cfg_attr(feature = "debug-structs", derive(Debug))]
3863#[repr(C)]
3864pub struct PxDefaultErrorCallback {
3865 vtable_: *const std::ffi::c_void,
3866}
3867
3868#[derive(Copy, Clone)]
3869#[repr(C)]
3870pub struct PxBinaryConverter {
3871 _unused: [u8; 0],
3872}
3873
3874#[derive(Clone, Copy)]
3875#[cfg_attr(feature = "debug-structs", derive(Debug))]
3876#[repr(C)]
3877pub struct PxDefaultCpuDispatcher {
3878 vtable_: *const std::ffi::c_void,
3879}
3880
3881#[derive(Clone, Copy)]
3882#[cfg_attr(feature = "debug-structs", derive(Debug))]
3883#[repr(C)]
3884pub struct PxBatchQueryExt {
3885 vtable_: *const std::ffi::c_void,
3886}
3887
3888#[derive(Clone, Copy)]
3889#[cfg_attr(feature = "debug-structs", derive(Debug))]
3890#[repr(C)]
3891pub struct PxCustomSceneQuerySystem {
3892 vtable_: *const std::ffi::c_void,
3893}
3894
3895#[derive(Clone, Copy)]
3896#[cfg_attr(feature = "debug-structs", derive(Debug))]
3897#[repr(C)]
3898pub struct PxCustomSceneQuerySystemAdapter {
3899 vtable_: *const std::ffi::c_void,
3900}
3901
3902#[derive(Copy, Clone)]
3903#[repr(C)]
3904pub struct PxCooking {
3905 _unused: [u8; 0],
3906}
3907
3908#[derive(Copy, Clone)]
3909#[repr(C)]
3910pub struct XmlMemoryAllocator {
3911 _unused: [u8; 0],
3912}
3913
3914#[derive(Copy, Clone)]
3915#[repr(C)]
3916pub struct XmlWriter {
3917 _unused: [u8; 0],
3918}
3919
3920#[derive(Copy, Clone)]
3921#[repr(C)]
3922pub struct XmlReader {
3923 _unused: [u8; 0],
3924}
3925
3926#[derive(Copy, Clone)]
3927#[repr(C)]
3928pub struct MemoryBuffer {
3929 _unused: [u8; 0],
3930}
3931
3932#[derive(Clone, Copy)]
3933#[cfg_attr(feature = "debug-structs", derive(Debug))]
3934#[repr(C)]
3935pub struct PxRepXSerializer {
3936 vtable_: *const std::ffi::c_void,
3937}
3938
3939#[derive(Copy, Clone)]
3940#[repr(C)]
3941pub struct PxVehicleWheels4SimData {
3942 _unused: [u8; 0],
3943}
3944
3945#[derive(Copy, Clone)]
3946#[repr(C)]
3947pub struct PxVehicleWheels4DynData {
3948 _unused: [u8; 0],
3949}
3950
3951#[derive(Copy, Clone)]
3952#[repr(C)]
3953pub struct PxVehicleTireForceCalculator {
3954 _unused: [u8; 0],
3955}
3956
3957#[derive(Copy, Clone)]
3958#[repr(C)]
3959pub struct PxVehicleDrivableSurfaceToTireFrictionPairs {
3960 _unused: [u8; 0],
3961}
3962
3963#[derive(Copy, Clone)]
3964#[repr(C)]
3965pub struct PxVehicleTelemetryData {
3966 _unused: [u8; 0],
3967}
3968
3969#[derive(Clone, Copy)]
3970#[cfg_attr(feature = "debug-structs", derive(Debug))]
3971#[repr(C)]
3972pub struct PxPvd {
3973 vtable_: *const std::ffi::c_void,
3974}
3975
3976#[derive(Clone, Copy)]
3977#[cfg_attr(feature = "debug-structs", derive(Debug))]
3978#[repr(C)]
3979pub struct PxPvdTransport {
3980 vtable_: *const std::ffi::c_void,
3981}
3982extern "C" {
3983 pub fn PxAllocatorCallback_delete(self_: *mut PxAllocatorCallback);
3984
3985 /// Allocates size bytes of memory, which must be 16-byte aligned.
3986 ///
3987 /// This method should never return NULL. If you run out of memory, then
3988 /// you should terminate the app or take some other appropriate action.
3989 ///
3990 /// Threading:
3991 /// This function should be thread safe as it can be called in the context of the user thread
3992 /// and physics processing thread(s).
3993 ///
3994 /// The allocated block of memory.
3995 pub fn PxAllocatorCallback_allocate_mut(self_: *mut PxAllocatorCallback, size: usize, typeName: *const std::ffi::c_char, filename: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;
3996
3997 /// Frees memory previously allocated by allocate().
3998 ///
3999 /// Threading:
4000 /// This function should be thread safe as it can be called in the context of the user thread
4001 /// and physics processing thread(s).
4002 pub fn PxAllocatorCallback_deallocate_mut(self_: *mut PxAllocatorCallback, ptr: *mut std::ffi::c_void);
4003
4004 pub fn PxAssertHandler_delete(self_: *mut PxAssertHandler);
4005
4006 pub fn phys_PxGetAssertHandler() -> *mut PxAssertHandler;
4007
4008 pub fn phys_PxSetAssertHandler(handler: *mut PxAssertHandler);
4009
4010 /// Destroys the instance it is called on.
4011 ///
4012 /// The operation will fail, if there are still modules referencing the foundation object. Release all dependent modules
4013 /// prior to calling this method.
4014 pub fn PxFoundation_release_mut(self_: *mut PxFoundation);
4015
4016 /// retrieves error callback
4017 pub fn PxFoundation_getErrorCallback_mut(self_: *mut PxFoundation) -> *mut PxErrorCallback;
4018
4019 /// Sets mask of errors to report.
4020 pub fn PxFoundation_setErrorLevel_mut(self_: *mut PxFoundation, mask: u32);
4021
4022 /// Retrieves mask of errors to be reported.
4023 pub fn PxFoundation_getErrorLevel(self_: *const PxFoundation) -> u32;
4024
4025 /// Retrieves the allocator this object was created with.
4026 pub fn PxFoundation_getAllocatorCallback_mut(self_: *mut PxFoundation) -> *mut PxAllocatorCallback;
4027
4028 /// Retrieves if allocation names are being passed to allocator callback.
4029 pub fn PxFoundation_getReportAllocationNames(self_: *const PxFoundation) -> bool;
4030
4031 /// Set if allocation names are being passed to allocator callback.
4032 ///
4033 /// Enabled by default in debug and checked build, disabled by default in profile and release build.
4034 pub fn PxFoundation_setReportAllocationNames_mut(self_: *mut PxFoundation, value: bool);
4035
4036 pub fn PxFoundation_registerAllocationListener_mut(self_: *mut PxFoundation, listener: *mut PxAllocationListener);
4037
4038 pub fn PxFoundation_deregisterAllocationListener_mut(self_: *mut PxFoundation, listener: *mut PxAllocationListener);
4039
4040 pub fn PxFoundation_registerErrorCallback_mut(self_: *mut PxFoundation, callback: *mut PxErrorCallback);
4041
4042 pub fn PxFoundation_deregisterErrorCallback_mut(self_: *mut PxFoundation, callback: *mut PxErrorCallback);
4043
4044 /// Creates an instance of the foundation class
4045 ///
4046 /// The foundation class is needed to initialize higher level SDKs. There may be only one instance per process.
4047 /// Calling this method after an instance has been created already will result in an error message and NULL will be
4048 /// returned.
4049 ///
4050 /// Foundation instance on success, NULL if operation failed
4051 pub fn phys_PxCreateFoundation(version: u32, allocator: *mut PxAllocatorCallback, errorCallback: *mut PxErrorCallback) -> *mut PxFoundation;
4052
4053 pub fn phys_PxSetFoundationInstance(foundation: *mut PxFoundation);
4054
4055 pub fn phys_PxGetFoundation() -> *mut PxFoundation;
4056
4057 /// Get the callback that will be used for all profiling.
4058 pub fn phys_PxGetProfilerCallback() -> *mut PxProfilerCallback;
4059
4060 /// Set the callback that will be used for all profiling.
4061 pub fn phys_PxSetProfilerCallback(profiler: *mut PxProfilerCallback);
4062
4063 /// Get the allocator callback
4064 pub fn phys_PxGetAllocatorCallback() -> *mut PxAllocatorCallback;
4065
4066 /// Get the broadcasting allocator callback
4067 pub fn phys_PxGetBroadcastAllocator() -> *mut PxAllocatorCallback;
4068
4069 /// Get the error callback
4070 pub fn phys_PxGetErrorCallback() -> *mut PxErrorCallback;
4071
4072 /// Get the broadcasting error callback
4073 pub fn phys_PxGetBroadcastError() -> *mut PxErrorCallback;
4074
4075 /// Get the warn once timestamp
4076 pub fn phys_PxGetWarnOnceTimeStamp() -> u32;
4077
4078 /// Decrement the ref count of PxFoundation
4079 pub fn phys_PxDecFoundationRefCount();
4080
4081 /// Increment the ref count of PxFoundation
4082 pub fn phys_PxIncFoundationRefCount();
4083
4084 pub fn PxAllocator_new(anon_param0: *const std::ffi::c_char) -> PxAllocator;
4085
4086 pub fn PxAllocator_allocate_mut(self_: *mut PxAllocator, size: usize, file: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;
4087
4088 pub fn PxAllocator_deallocate_mut(self_: *mut PxAllocator, ptr: *mut std::ffi::c_void);
4089
4090 pub fn PxRawAllocator_new(anon_param0: *const std::ffi::c_char) -> PxRawAllocator;
4091
4092 pub fn PxRawAllocator_allocate_mut(self_: *mut PxRawAllocator, size: usize, anon_param1: *const std::ffi::c_char, anon_param2: i32) -> *mut std::ffi::c_void;
4093
4094 pub fn PxRawAllocator_deallocate_mut(self_: *mut PxRawAllocator, ptr: *mut std::ffi::c_void);
4095
4096 pub fn PxVirtualAllocatorCallback_delete(self_: *mut PxVirtualAllocatorCallback);
4097
4098 pub fn PxVirtualAllocatorCallback_allocate_mut(self_: *mut PxVirtualAllocatorCallback, size: usize, group: i32, file: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;
4099
4100 pub fn PxVirtualAllocatorCallback_deallocate_mut(self_: *mut PxVirtualAllocatorCallback, ptr: *mut std::ffi::c_void);
4101
4102 pub fn PxVirtualAllocator_new(callback: *mut PxVirtualAllocatorCallback, group: i32) -> PxVirtualAllocator;
4103
4104 pub fn PxVirtualAllocator_allocate_mut(self_: *mut PxVirtualAllocator, size: usize, file: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;
4105
4106 pub fn PxVirtualAllocator_deallocate_mut(self_: *mut PxVirtualAllocator, ptr: *mut std::ffi::c_void);
4107
4108 pub fn PxTempAllocatorChunk_new() -> PxTempAllocatorChunk;
4109
4110 pub fn PxTempAllocator_new(anon_param0: *const std::ffi::c_char) -> PxTempAllocator;
4111
4112 pub fn PxTempAllocator_allocate_mut(self_: *mut PxTempAllocator, size: usize, file: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;
4113
4114 pub fn PxTempAllocator_deallocate_mut(self_: *mut PxTempAllocator, ptr: *mut std::ffi::c_void);
4115
4116 /// Sets the bytes of the provided buffer to zero.
4117 ///
4118 /// Pointer to memory block (same as input)
4119 pub fn phys_PxMemZero(dest: *mut std::ffi::c_void, count: u32) -> *mut std::ffi::c_void;
4120
4121 /// Sets the bytes of the provided buffer to the specified value.
4122 ///
4123 /// Pointer to memory block (same as input)
4124 pub fn phys_PxMemSet(dest: *mut std::ffi::c_void, c: i32, count: u32) -> *mut std::ffi::c_void;
4125
4126 /// Copies the bytes of one memory block to another. The memory blocks must not overlap.
4127 ///
4128 /// Use [`PxMemMove`] if memory blocks overlap.
4129 ///
4130 /// Pointer to destination memory block
4131 pub fn phys_PxMemCopy(dest: *mut std::ffi::c_void, src: *const std::ffi::c_void, count: u32) -> *mut std::ffi::c_void;
4132
4133 /// Copies the bytes of one memory block to another. The memory blocks can overlap.
4134 ///
4135 /// Use [`PxMemCopy`] if memory blocks do not overlap.
4136 ///
4137 /// Pointer to destination memory block
4138 pub fn phys_PxMemMove(dest: *mut std::ffi::c_void, src: *const std::ffi::c_void, count: u32) -> *mut std::ffi::c_void;
4139
4140 /// Mark a specified amount of memory with 0xcd pattern. This is used to check that the meta data
4141 /// definition for serialized classes is complete in checked builds.
4142 pub fn phys_PxMarkSerializedMemory(ptr: *mut std::ffi::c_void, byteSize: u32);
4143
4144 pub fn phys_PxMemoryBarrier();
4145
4146 /// Return the index of the highest set bit. Undefined for zero arg.
4147 pub fn phys_PxHighestSetBitUnsafe(v: u32) -> u32;
4148
4149 /// Return the index of the highest set bit. Undefined for zero arg.
4150 pub fn phys_PxLowestSetBitUnsafe(v: u32) -> u32;
4151
4152 /// Returns the index of the highest set bit. Returns 32 for v=0.
4153 pub fn phys_PxCountLeadingZeros(v: u32) -> u32;
4154
4155 /// Prefetch aligned 64B x86, 32b ARM around
4156 pub fn phys_PxPrefetchLine(ptr: *const std::ffi::c_void, offset: u32);
4157
4158 /// Prefetch
4159 /// bytes starting at
4160 pub fn phys_PxPrefetch(ptr: *const std::ffi::c_void, count: u32);
4161
4162 pub fn phys_PxBitCount(v: u32) -> u32;
4163
4164 pub fn phys_PxIsPowerOfTwo(x: u32) -> bool;
4165
4166 pub fn phys_PxNextPowerOfTwo(x: u32) -> u32;
4167
4168 /// Return the index of the highest set bit. Not valid for zero arg.
4169 pub fn phys_PxLowestSetBit(x: u32) -> u32;
4170
4171 /// Return the index of the highest set bit. Not valid for zero arg.
4172 pub fn phys_PxHighestSetBit(x: u32) -> u32;
4173
4174 pub fn phys_PxILog2(num: u32) -> u32;
4175
4176 /// default constructor leaves data uninitialized.
4177 pub fn PxVec3_new() -> PxVec3;
4178
4179 /// zero constructor.
4180 pub fn PxVec3_new_1(anon_param0: PxZERO) -> PxVec3;
4181
4182 /// Assigns scalar parameter to all elements.
4183 ///
4184 /// Useful to initialize to zero or one.
4185 pub fn PxVec3_new_2(a: f32) -> PxVec3;
4186
4187 /// Initializes from 3 scalar parameters.
4188 pub fn PxVec3_new_3(nx: f32, ny: f32, nz: f32) -> PxVec3;
4189
4190 /// tests for exact zero vector
4191 pub fn PxVec3_isZero(self_: *const PxVec3) -> bool;
4192
4193 /// returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
4194 pub fn PxVec3_isFinite(self_: *const PxVec3) -> bool;
4195
4196 /// is normalized - used by API parameter validation
4197 pub fn PxVec3_isNormalized(self_: *const PxVec3) -> bool;
4198
4199 /// returns the squared magnitude
4200 ///
4201 /// Avoids calling PxSqrt()!
4202 pub fn PxVec3_magnitudeSquared(self_: *const PxVec3) -> f32;
4203
4204 /// returns the magnitude
4205 pub fn PxVec3_magnitude(self_: *const PxVec3) -> f32;
4206
4207 /// returns the scalar product of this and other.
4208 pub fn PxVec3_dot(self_: *const PxVec3, v: *const PxVec3) -> f32;
4209
4210 /// cross product
4211 pub fn PxVec3_cross(self_: *const PxVec3, v: *const PxVec3) -> PxVec3;
4212
4213 /// returns a unit vector
4214 pub fn PxVec3_getNormalized(self_: *const PxVec3) -> PxVec3;
4215
4216 /// normalizes the vector in place
4217 pub fn PxVec3_normalize_mut(self_: *mut PxVec3) -> f32;
4218
4219 /// normalizes the vector in place. Does nothing if vector magnitude is under PX_NORMALIZATION_EPSILON.
4220 /// Returns vector magnitude if >= PX_NORMALIZATION_EPSILON and 0.0f otherwise.
4221 pub fn PxVec3_normalizeSafe_mut(self_: *mut PxVec3) -> f32;
4222
4223 /// normalizes the vector in place. Asserts if vector magnitude is under PX_NORMALIZATION_EPSILON.
4224 /// returns vector magnitude.
4225 pub fn PxVec3_normalizeFast_mut(self_: *mut PxVec3) -> f32;
4226
4227 /// a[i] * b[i], for all i.
4228 pub fn PxVec3_multiply(self_: *const PxVec3, a: *const PxVec3) -> PxVec3;
4229
4230 /// element-wise minimum
4231 pub fn PxVec3_minimum(self_: *const PxVec3, v: *const PxVec3) -> PxVec3;
4232
4233 /// returns MIN(x, y, z);
4234 pub fn PxVec3_minElement(self_: *const PxVec3) -> f32;
4235
4236 /// element-wise maximum
4237 pub fn PxVec3_maximum(self_: *const PxVec3, v: *const PxVec3) -> PxVec3;
4238
4239 /// returns MAX(x, y, z);
4240 pub fn PxVec3_maxElement(self_: *const PxVec3) -> f32;
4241
4242 /// returns absolute values of components;
4243 pub fn PxVec3_abs(self_: *const PxVec3) -> PxVec3;
4244
4245 pub fn PxVec3Padded_new_alloc() -> *mut PxVec3Padded;
4246
4247 pub fn PxVec3Padded_delete(self_: *mut PxVec3Padded);
4248
4249 pub fn PxVec3Padded_new_alloc_1(p: *const PxVec3) -> *mut PxVec3Padded;
4250
4251 pub fn PxVec3Padded_new_alloc_2(f: f32) -> *mut PxVec3Padded;
4252
4253 /// Default constructor, does not do any initialization.
4254 pub fn PxQuat_new() -> PxQuat;
4255
4256 /// identity constructor
4257 pub fn PxQuat_new_1(anon_param0: PxIDENTITY) -> PxQuat;
4258
4259 /// Constructor from a scalar: sets the real part w to the scalar value, and the imaginary parts (x,y,z) to zero
4260 pub fn PxQuat_new_2(r: f32) -> PxQuat;
4261
4262 /// Constructor. Take note of the order of the elements!
4263 pub fn PxQuat_new_3(nx: f32, ny: f32, nz: f32, nw: f32) -> PxQuat;
4264
4265 /// Creates from angle-axis representation.
4266 ///
4267 /// Axis must be normalized!
4268 ///
4269 /// Angle is in radians!
4270 ///
4271 /// Unit:
4272 /// Radians
4273 pub fn PxQuat_new_4(angleRadians: f32, unitAxis: *const PxVec3) -> PxQuat;
4274
4275 /// Creates from orientation matrix.
4276 pub fn PxQuat_new_5(m: *const PxMat33) -> PxQuat;
4277
4278 /// returns true if quat is identity
4279 pub fn PxQuat_isIdentity(self_: *const PxQuat) -> bool;
4280
4281 /// returns true if all elements are finite (not NAN or INF, etc.)
4282 pub fn PxQuat_isFinite(self_: *const PxQuat) -> bool;
4283
4284 /// returns true if finite and magnitude is close to unit
4285 pub fn PxQuat_isUnit(self_: *const PxQuat) -> bool;
4286
4287 /// returns true if finite and magnitude is reasonably close to unit to allow for some accumulation of error vs
4288 /// isValid
4289 pub fn PxQuat_isSane(self_: *const PxQuat) -> bool;
4290
4291 /// converts this quaternion to angle-axis representation
4292 pub fn PxQuat_toRadiansAndUnitAxis(self_: *const PxQuat, angle: *mut f32, axis: *mut PxVec3);
4293
4294 /// Gets the angle between this quat and the identity quaternion.
4295 ///
4296 /// Unit:
4297 /// Radians
4298 pub fn PxQuat_getAngle(self_: *const PxQuat) -> f32;
4299
4300 /// Gets the angle between this quat and the argument
4301 ///
4302 /// Unit:
4303 /// Radians
4304 pub fn PxQuat_getAngle_1(self_: *const PxQuat, q: *const PxQuat) -> f32;
4305
4306 /// This is the squared 4D vector length, should be 1 for unit quaternions.
4307 pub fn PxQuat_magnitudeSquared(self_: *const PxQuat) -> f32;
4308
4309 /// returns the scalar product of this and other.
4310 pub fn PxQuat_dot(self_: *const PxQuat, v: *const PxQuat) -> f32;
4311
4312 pub fn PxQuat_getNormalized(self_: *const PxQuat) -> PxQuat;
4313
4314 pub fn PxQuat_magnitude(self_: *const PxQuat) -> f32;
4315
4316 /// maps to the closest unit quaternion.
4317 pub fn PxQuat_normalize_mut(self_: *mut PxQuat) -> f32;
4318
4319 pub fn PxQuat_getConjugate(self_: *const PxQuat) -> PxQuat;
4320
4321 pub fn PxQuat_getImaginaryPart(self_: *const PxQuat) -> PxVec3;
4322
4323 /// brief computes rotation of x-axis
4324 pub fn PxQuat_getBasisVector0(self_: *const PxQuat) -> PxVec3;
4325
4326 /// brief computes rotation of y-axis
4327 pub fn PxQuat_getBasisVector1(self_: *const PxQuat) -> PxVec3;
4328
4329 /// brief computes rotation of z-axis
4330 pub fn PxQuat_getBasisVector2(self_: *const PxQuat) -> PxVec3;
4331
4332 /// rotates passed vec by this (assumed unitary)
4333 pub fn PxQuat_rotate(self_: *const PxQuat, v: *const PxVec3) -> PxVec3;
4334
4335 /// inverse rotates passed vec by this (assumed unitary)
4336 pub fn PxQuat_rotateInv(self_: *const PxQuat, v: *const PxVec3) -> PxVec3;
4337
4338 pub fn PxTransform_new() -> PxTransform;
4339
4340 pub fn PxTransform_new_1(position: *const PxVec3) -> PxTransform;
4341
4342 pub fn PxTransform_new_2(anon_param0: PxIDENTITY) -> PxTransform;
4343
4344 pub fn PxTransform_new_3(orientation: *const PxQuat) -> PxTransform;
4345
4346 pub fn PxTransform_new_4(x: f32, y: f32, z: f32, aQ: PxQuat) -> PxTransform;
4347
4348 pub fn PxTransform_new_5(p0: *const PxVec3, q0: *const PxQuat) -> PxTransform;
4349
4350 pub fn PxTransform_new_6(m: *const PxMat44) -> PxTransform;
4351
4352 pub fn PxTransform_getInverse(self_: *const PxTransform) -> PxTransform;
4353
4354 pub fn PxTransform_transform(self_: *const PxTransform, input: *const PxVec3) -> PxVec3;
4355
4356 pub fn PxTransform_transformInv(self_: *const PxTransform, input: *const PxVec3) -> PxVec3;
4357
4358 pub fn PxTransform_rotate(self_: *const PxTransform, input: *const PxVec3) -> PxVec3;
4359
4360 pub fn PxTransform_rotateInv(self_: *const PxTransform, input: *const PxVec3) -> PxVec3;
4361
4362 /// Transform transform to parent (returns compound transform: first src, then *this)
4363 pub fn PxTransform_transform_1(self_: *const PxTransform, src: *const PxTransform) -> PxTransform;
4364
4365 /// returns true if finite and q is a unit quaternion
4366 pub fn PxTransform_isValid(self_: *const PxTransform) -> bool;
4367
4368 /// returns true if finite and quat magnitude is reasonably close to unit to allow for some accumulation of error
4369 /// vs isValid
4370 pub fn PxTransform_isSane(self_: *const PxTransform) -> bool;
4371
4372 /// returns true if all elems are finite (not NAN or INF, etc.)
4373 pub fn PxTransform_isFinite(self_: *const PxTransform) -> bool;
4374
4375 /// Transform transform from parent (returns compound transform: first src, then this->inverse)
4376 pub fn PxTransform_transformInv_1(self_: *const PxTransform, src: *const PxTransform) -> PxTransform;
4377
4378 /// return a normalized transform (i.e. one in which the quaternion has unit magnitude)
4379 pub fn PxTransform_getNormalized(self_: *const PxTransform) -> PxTransform;
4380
4381 /// Default constructor
4382 pub fn PxMat33_new() -> PxMat33;
4383
4384 /// identity constructor
4385 pub fn PxMat33_new_1(anon_param0: PxIDENTITY) -> PxMat33;
4386
4387 /// zero constructor
4388 pub fn PxMat33_new_2(anon_param0: PxZERO) -> PxMat33;
4389
4390 /// Construct from three base vectors
4391 pub fn PxMat33_new_3(col0: *const PxVec3, col1: *const PxVec3, col2: *const PxVec3) -> PxMat33;
4392
4393 /// constructor from a scalar, which generates a multiple of the identity matrix
4394 pub fn PxMat33_new_4(r: f32) -> PxMat33;
4395
4396 /// Construct from float[9]
4397 pub fn PxMat33_new_5(values: *mut f32) -> PxMat33;
4398
4399 /// Construct from a quaternion
4400 pub fn PxMat33_new_6(q: *const PxQuat) -> PxMat33;
4401
4402 /// Construct from diagonal, off-diagonals are zero.
4403 pub fn PxMat33_createDiagonal(d: *const PxVec3) -> PxMat33;
4404
4405 /// Computes the outer product of two vectors
4406 pub fn PxMat33_outer(a: *const PxVec3, b: *const PxVec3) -> PxMat33;
4407
4408 /// Get transposed matrix
4409 pub fn PxMat33_getTranspose(self_: *const PxMat33) -> PxMat33;
4410
4411 /// Get the real inverse
4412 pub fn PxMat33_getInverse(self_: *const PxMat33) -> PxMat33;
4413
4414 /// Get determinant
4415 pub fn PxMat33_getDeterminant(self_: *const PxMat33) -> f32;
4416
4417 /// Transform vector by matrix, equal to v' = M*v
4418 pub fn PxMat33_transform(self_: *const PxMat33, other: *const PxVec3) -> PxVec3;
4419
4420 /// Transform vector by matrix transpose, v' = M^t*v
4421 pub fn PxMat33_transformTranspose(self_: *const PxMat33, other: *const PxVec3) -> PxVec3;
4422
4423 pub fn PxMat33_front(self_: *const PxMat33) -> *const f32;
4424
4425 /// Default constructor, not performing any initialization for performance reason.
4426 ///
4427 /// Use empty() function below to construct empty bounds.
4428 pub fn PxBounds3_new() -> PxBounds3;
4429
4430 /// Construct from two bounding points
4431 pub fn PxBounds3_new_1(minimum: *const PxVec3, maximum: *const PxVec3) -> PxBounds3;
4432
4433 /// Return empty bounds.
4434 pub fn PxBounds3_empty() -> PxBounds3;
4435
4436 /// returns the AABB containing v0 and v1.
4437 pub fn PxBounds3_boundsOfPoints(v0: *const PxVec3, v1: *const PxVec3) -> PxBounds3;
4438
4439 /// returns the AABB from center and extents vectors.
4440 pub fn PxBounds3_centerExtents(center: *const PxVec3, extent: *const PxVec3) -> PxBounds3;
4441
4442 /// Construct from center, extent, and (not necessarily orthogonal) basis
4443 pub fn PxBounds3_basisExtent(center: *const PxVec3, basis: *const PxMat33, extent: *const PxVec3) -> PxBounds3;
4444
4445 /// Construct from pose and extent
4446 pub fn PxBounds3_poseExtent(pose: *const PxTransform, extent: *const PxVec3) -> PxBounds3;
4447
4448 /// gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
4449 ///
4450 /// This version is safe to call for empty bounds.
4451 pub fn PxBounds3_transformSafe(matrix: *const PxMat33, bounds: *const PxBounds3) -> PxBounds3;
4452
4453 /// gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
4454 ///
4455 /// Calling this method for empty bounds leads to undefined behavior. Use [`transformSafe`]() instead.
4456 pub fn PxBounds3_transformFast(matrix: *const PxMat33, bounds: *const PxBounds3) -> PxBounds3;
4457
4458 /// gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
4459 ///
4460 /// This version is safe to call for empty bounds.
4461 pub fn PxBounds3_transformSafe_1(transform: *const PxTransform, bounds: *const PxBounds3) -> PxBounds3;
4462
4463 /// gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
4464 ///
4465 /// Calling this method for empty bounds leads to undefined behavior. Use [`transformSafe`]() instead.
4466 pub fn PxBounds3_transformFast_1(transform: *const PxTransform, bounds: *const PxBounds3) -> PxBounds3;
4467
4468 /// Sets empty to true
4469 pub fn PxBounds3_setEmpty_mut(self_: *mut PxBounds3);
4470
4471 /// Sets the bounds to maximum size [-PX_MAX_BOUNDS_EXTENTS, PX_MAX_BOUNDS_EXTENTS].
4472 pub fn PxBounds3_setMaximal_mut(self_: *mut PxBounds3);
4473
4474 /// expands the volume to include v
4475 pub fn PxBounds3_include_mut(self_: *mut PxBounds3, v: *const PxVec3);
4476
4477 /// expands the volume to include b.
4478 pub fn PxBounds3_include_mut_1(self_: *mut PxBounds3, b: *const PxBounds3);
4479
4480 pub fn PxBounds3_isEmpty(self_: *const PxBounds3) -> bool;
4481
4482 /// indicates whether the intersection of this and b is empty or not.
4483 pub fn PxBounds3_intersects(self_: *const PxBounds3, b: *const PxBounds3) -> bool;
4484
4485 /// computes the 1D-intersection between two AABBs, on a given axis.
4486 pub fn PxBounds3_intersects1D(self_: *const PxBounds3, a: *const PxBounds3, axis: u32) -> bool;
4487
4488 /// indicates if these bounds contain v.
4489 pub fn PxBounds3_contains(self_: *const PxBounds3, v: *const PxVec3) -> bool;
4490
4491 /// checks a box is inside another box.
4492 pub fn PxBounds3_isInside(self_: *const PxBounds3, box_: *const PxBounds3) -> bool;
4493
4494 /// returns the center of this axis aligned box.
4495 pub fn PxBounds3_getCenter(self_: *const PxBounds3) -> PxVec3;
4496
4497 /// get component of the box's center along a given axis
4498 pub fn PxBounds3_getCenter_1(self_: *const PxBounds3, axis: u32) -> f32;
4499
4500 /// get component of the box's extents along a given axis
4501 pub fn PxBounds3_getExtents(self_: *const PxBounds3, axis: u32) -> f32;
4502
4503 /// returns the dimensions (width/height/depth) of this axis aligned box.
4504 pub fn PxBounds3_getDimensions(self_: *const PxBounds3) -> PxVec3;
4505
4506 /// returns the extents, which are half of the width/height/depth.
4507 pub fn PxBounds3_getExtents_1(self_: *const PxBounds3) -> PxVec3;
4508
4509 /// scales the AABB.
4510 ///
4511 /// This version is safe to call for empty bounds.
4512 pub fn PxBounds3_scaleSafe_mut(self_: *mut PxBounds3, scale: f32);
4513
4514 /// scales the AABB.
4515 ///
4516 /// Calling this method for empty bounds leads to undefined behavior. Use [`scaleSafe`]() instead.
4517 pub fn PxBounds3_scaleFast_mut(self_: *mut PxBounds3, scale: f32);
4518
4519 /// fattens the AABB in all 3 dimensions by the given distance.
4520 ///
4521 /// This version is safe to call for empty bounds.
4522 pub fn PxBounds3_fattenSafe_mut(self_: *mut PxBounds3, distance: f32);
4523
4524 /// fattens the AABB in all 3 dimensions by the given distance.
4525 ///
4526 /// Calling this method for empty bounds leads to undefined behavior. Use [`fattenSafe`]() instead.
4527 pub fn PxBounds3_fattenFast_mut(self_: *mut PxBounds3, distance: f32);
4528
4529 /// checks that the AABB values are not NaN
4530 pub fn PxBounds3_isFinite(self_: *const PxBounds3) -> bool;
4531
4532 /// checks that the AABB values describe a valid configuration.
4533 pub fn PxBounds3_isValid(self_: *const PxBounds3) -> bool;
4534
4535 /// Finds the closest point in the box to the point p. If p is contained, this will be p, otherwise it
4536 /// will be the closest point on the surface of the box.
4537 pub fn PxBounds3_closestPoint(self_: *const PxBounds3, p: *const PxVec3) -> PxVec3;
4538
4539 pub fn PxErrorCallback_delete(self_: *mut PxErrorCallback);
4540
4541 /// Reports an error code.
4542 pub fn PxErrorCallback_reportError_mut(self_: *mut PxErrorCallback, code: PxErrorCode, message: *const std::ffi::c_char, file: *const std::ffi::c_char, line: i32);
4543
4544 /// callback when memory is allocated.
4545 pub fn PxAllocationListener_onAllocation_mut(self_: *mut PxAllocationListener, size: usize, typeName: *const std::ffi::c_char, filename: *const std::ffi::c_char, line: i32, allocatedMemory: *mut std::ffi::c_void);
4546
4547 /// callback when memory is deallocated.
4548 pub fn PxAllocationListener_onDeallocation_mut(self_: *mut PxAllocationListener, allocatedMemory: *mut std::ffi::c_void);
4549
4550 /// The default constructor.
4551 pub fn PxBroadcastingAllocator_new_alloc(allocator: *mut PxAllocatorCallback, error: *mut PxErrorCallback) -> *mut PxBroadcastingAllocator;
4552
4553 /// The default constructor.
4554 pub fn PxBroadcastingAllocator_delete(self_: *mut PxBroadcastingAllocator);
4555
4556 /// Allocates size bytes of memory, which must be 16-byte aligned.
4557 ///
4558 /// This method should never return NULL. If you run out of memory, then
4559 /// you should terminate the app or take some other appropriate action.
4560 ///
4561 /// Threading:
4562 /// This function should be thread safe as it can be called in the context of the user thread
4563 /// and physics processing thread(s).
4564 ///
4565 /// The allocated block of memory.
4566 pub fn PxBroadcastingAllocator_allocate_mut(self_: *mut PxBroadcastingAllocator, size: usize, typeName: *const std::ffi::c_char, filename: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;
4567
4568 /// Frees memory previously allocated by allocate().
4569 ///
4570 /// Threading:
4571 /// This function should be thread safe as it can be called in the context of the user thread
4572 /// and physics processing thread(s).
4573 pub fn PxBroadcastingAllocator_deallocate_mut(self_: *mut PxBroadcastingAllocator, ptr: *mut std::ffi::c_void);
4574
4575 /// The default constructor.
4576 pub fn PxBroadcastingErrorCallback_new_alloc(errorCallback: *mut PxErrorCallback) -> *mut PxBroadcastingErrorCallback;
4577
4578 /// The default destructor.
4579 pub fn PxBroadcastingErrorCallback_delete(self_: *mut PxBroadcastingErrorCallback);
4580
4581 /// Reports an error code.
4582 pub fn PxBroadcastingErrorCallback_reportError_mut(self_: *mut PxBroadcastingErrorCallback, code: PxErrorCode, message: *const std::ffi::c_char, file: *const std::ffi::c_char, line: i32);
4583
4584 /// Enables floating point exceptions for the scalar and SIMD unit
4585 pub fn phys_PxEnableFPExceptions();
4586
4587 /// Disables floating point exceptions for the scalar and SIMD unit
4588 pub fn phys_PxDisableFPExceptions();
4589
4590 /// read from the stream. The number of bytes read may be less than the number requested.
4591 ///
4592 /// the number of bytes read from the stream.
4593 pub fn PxInputStream_read_mut(self_: *mut PxInputStream, dest: *mut std::ffi::c_void, count: u32) -> u32;
4594
4595 pub fn PxInputStream_delete(self_: *mut PxInputStream);
4596
4597 /// return the length of the input data
4598 ///
4599 /// size in bytes of the input data
4600 pub fn PxInputData_getLength(self_: *const PxInputData) -> u32;
4601
4602 /// seek to the given offset from the start of the data.
4603 pub fn PxInputData_seek_mut(self_: *mut PxInputData, offset: u32);
4604
4605 /// return the current offset from the start of the data
4606 ///
4607 /// the offset to seek to.
4608 pub fn PxInputData_tell(self_: *const PxInputData) -> u32;
4609
4610 pub fn PxInputData_delete(self_: *mut PxInputData);
4611
4612 /// write to the stream. The number of bytes written may be less than the number sent.
4613 ///
4614 /// the number of bytes written to the stream by this call.
4615 pub fn PxOutputStream_write_mut(self_: *mut PxOutputStream, src: *const std::ffi::c_void, count: u32) -> u32;
4616
4617 pub fn PxOutputStream_delete(self_: *mut PxOutputStream);
4618
4619 /// default constructor leaves data uninitialized.
4620 pub fn PxVec4_new() -> PxVec4;
4621
4622 /// zero constructor.
4623 pub fn PxVec4_new_1(anon_param0: PxZERO) -> PxVec4;
4624
4625 /// Assigns scalar parameter to all elements.
4626 ///
4627 /// Useful to initialize to zero or one.
4628 pub fn PxVec4_new_2(a: f32) -> PxVec4;
4629
4630 /// Initializes from 3 scalar parameters.
4631 pub fn PxVec4_new_3(nx: f32, ny: f32, nz: f32, nw: f32) -> PxVec4;
4632
4633 /// Initializes from 3 scalar parameters.
4634 pub fn PxVec4_new_4(v: *const PxVec3, nw: f32) -> PxVec4;
4635
4636 /// Initializes from an array of scalar parameters.
4637 pub fn PxVec4_new_5(v: *const f32) -> PxVec4;
4638
4639 /// tests for exact zero vector
4640 pub fn PxVec4_isZero(self_: *const PxVec4) -> bool;
4641
4642 /// returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
4643 pub fn PxVec4_isFinite(self_: *const PxVec4) -> bool;
4644
4645 /// is normalized - used by API parameter validation
4646 pub fn PxVec4_isNormalized(self_: *const PxVec4) -> bool;
4647
4648 /// returns the squared magnitude
4649 ///
4650 /// Avoids calling PxSqrt()!
4651 pub fn PxVec4_magnitudeSquared(self_: *const PxVec4) -> f32;
4652
4653 /// returns the magnitude
4654 pub fn PxVec4_magnitude(self_: *const PxVec4) -> f32;
4655
4656 /// returns the scalar product of this and other.
4657 pub fn PxVec4_dot(self_: *const PxVec4, v: *const PxVec4) -> f32;
4658
4659 /// returns a unit vector
4660 pub fn PxVec4_getNormalized(self_: *const PxVec4) -> PxVec4;
4661
4662 /// normalizes the vector in place
4663 pub fn PxVec4_normalize_mut(self_: *mut PxVec4) -> f32;
4664
4665 /// a[i] * b[i], for all i.
4666 pub fn PxVec4_multiply(self_: *const PxVec4, a: *const PxVec4) -> PxVec4;
4667
4668 /// element-wise minimum
4669 pub fn PxVec4_minimum(self_: *const PxVec4, v: *const PxVec4) -> PxVec4;
4670
4671 /// element-wise maximum
4672 pub fn PxVec4_maximum(self_: *const PxVec4, v: *const PxVec4) -> PxVec4;
4673
4674 pub fn PxVec4_getXYZ(self_: *const PxVec4) -> PxVec3;
4675
4676 /// Default constructor
4677 pub fn PxMat44_new() -> PxMat44;
4678
4679 /// identity constructor
4680 pub fn PxMat44_new_1(anon_param0: PxIDENTITY) -> PxMat44;
4681
4682 /// zero constructor
4683 pub fn PxMat44_new_2(anon_param0: PxZERO) -> PxMat44;
4684
4685 /// Construct from four 4-vectors
4686 pub fn PxMat44_new_3(col0: *const PxVec4, col1: *const PxVec4, col2: *const PxVec4, col3: *const PxVec4) -> PxMat44;
4687
4688 /// constructor that generates a multiple of the identity matrix
4689 pub fn PxMat44_new_4(r: f32) -> PxMat44;
4690
4691 /// Construct from three base vectors and a translation
4692 pub fn PxMat44_new_5(col0: *const PxVec3, col1: *const PxVec3, col2: *const PxVec3, col3: *const PxVec3) -> PxMat44;
4693
4694 /// Construct from float[16]
4695 pub fn PxMat44_new_6(values: *mut f32) -> PxMat44;
4696
4697 /// Construct from a quaternion
4698 pub fn PxMat44_new_7(q: *const PxQuat) -> PxMat44;
4699
4700 /// Construct from a diagonal vector
4701 pub fn PxMat44_new_8(diagonal: *const PxVec4) -> PxMat44;
4702
4703 /// Construct from Mat33 and a translation
4704 pub fn PxMat44_new_9(axes: *const PxMat33, position: *const PxVec3) -> PxMat44;
4705
4706 pub fn PxMat44_new_10(t: *const PxTransform) -> PxMat44;
4707
4708 /// Get transposed matrix
4709 pub fn PxMat44_getTranspose(self_: *const PxMat44) -> PxMat44;
4710
4711 /// Transform vector by matrix, equal to v' = M*v
4712 pub fn PxMat44_transform(self_: *const PxMat44, other: *const PxVec4) -> PxVec4;
4713
4714 /// Transform vector by matrix, equal to v' = M*v
4715 pub fn PxMat44_transform_1(self_: *const PxMat44, other: *const PxVec3) -> PxVec3;
4716
4717 /// Rotate vector by matrix, equal to v' = M*v
4718 pub fn PxMat44_rotate(self_: *const PxMat44, other: *const PxVec4) -> PxVec4;
4719
4720 /// Rotate vector by matrix, equal to v' = M*v
4721 pub fn PxMat44_rotate_1(self_: *const PxMat44, other: *const PxVec3) -> PxVec3;
4722
4723 pub fn PxMat44_getBasis(self_: *const PxMat44, num: u32) -> PxVec3;
4724
4725 pub fn PxMat44_getPosition(self_: *const PxMat44) -> PxVec3;
4726
4727 pub fn PxMat44_setPosition_mut(self_: *mut PxMat44, position: *const PxVec3);
4728
4729 pub fn PxMat44_front(self_: *const PxMat44) -> *const f32;
4730
4731 pub fn PxMat44_scale_mut(self_: *mut PxMat44, p: *const PxVec4);
4732
4733 pub fn PxMat44_inverseRT(self_: *const PxMat44) -> PxMat44;
4734
4735 pub fn PxMat44_isFinite(self_: *const PxMat44) -> bool;
4736
4737 /// Constructor
4738 pub fn PxPlane_new() -> PxPlane;
4739
4740 /// Constructor from a normal and a distance
4741 pub fn PxPlane_new_1(nx: f32, ny: f32, nz: f32, distance: f32) -> PxPlane;
4742
4743 /// Constructor from a normal and a distance
4744 pub fn PxPlane_new_2(normal: *const PxVec3, distance: f32) -> PxPlane;
4745
4746 /// Constructor from a point on the plane and a normal
4747 pub fn PxPlane_new_3(point: *const PxVec3, normal: *const PxVec3) -> PxPlane;
4748
4749 /// Constructor from three points
4750 pub fn PxPlane_new_4(p0: *const PxVec3, p1: *const PxVec3, p2: *const PxVec3) -> PxPlane;
4751
4752 pub fn PxPlane_distance(self_: *const PxPlane, p: *const PxVec3) -> f32;
4753
4754 pub fn PxPlane_contains(self_: *const PxPlane, p: *const PxVec3) -> bool;
4755
4756 /// projects p into the plane
4757 pub fn PxPlane_project(self_: *const PxPlane, p: *const PxVec3) -> PxVec3;
4758
4759 /// find an arbitrary point in the plane
4760 pub fn PxPlane_pointInPlane(self_: *const PxPlane) -> PxVec3;
4761
4762 /// equivalent plane with unit normal
4763 pub fn PxPlane_normalize_mut(self_: *mut PxPlane);
4764
4765 /// transform plane
4766 pub fn PxPlane_transform(self_: *const PxPlane, pose: *const PxTransform) -> PxPlane;
4767
4768 /// inverse-transform plane
4769 pub fn PxPlane_inverseTransform(self_: *const PxPlane, pose: *const PxTransform) -> PxPlane;
4770
4771 /// finds the shortest rotation between two vectors.
4772 ///
4773 /// a rotation about an axis normal to the two vectors which takes one to the other via the shortest path
4774 pub fn phys_PxShortestRotation(from: *const PxVec3, target: *const PxVec3) -> PxQuat;
4775
4776 pub fn phys_PxDiagonalize(m: *const PxMat33, axes: *mut PxQuat) -> PxVec3;
4777
4778 /// creates a transform from the endpoints of a segment, suitable for an actor transform for a PxCapsuleGeometry
4779 ///
4780 /// A PxTransform which will transform the vector (1,0,0) to the capsule axis shrunk by the halfHeight
4781 pub fn phys_PxTransformFromSegment(p0: *const PxVec3, p1: *const PxVec3, halfHeight: *mut f32) -> PxTransform;
4782
4783 /// creates a transform from a plane equation, suitable for an actor transform for a PxPlaneGeometry
4784 ///
4785 /// a PxTransform which will transform the plane PxPlane(1,0,0,0) to the specified plane
4786 pub fn phys_PxTransformFromPlaneEquation(plane: *const PxPlane) -> PxTransform;
4787
4788 /// creates a plane equation from a transform, such as the actor transform for a PxPlaneGeometry
4789 ///
4790 /// the plane
4791 pub fn phys_PxPlaneEquationFromTransform(pose: *const PxTransform) -> PxPlane;
4792
4793 /// Spherical linear interpolation of two quaternions.
4794 ///
4795 /// Returns left when t=0, right when t=1 and a linear interpolation of left and right when 0
4796 /// <
4797 /// t
4798 /// <
4799 /// 1.
4800 /// Returns angle between -PI and PI in radians
4801 pub fn phys_PxSlerp(t: f32, left: *const PxQuat, right: *const PxQuat) -> PxQuat;
4802
4803 /// integrate transform.
4804 pub fn phys_PxIntegrateTransform(curTrans: *const PxTransform, linvel: *const PxVec3, angvel: *const PxVec3, timeStep: f32, result: *mut PxTransform);
4805
4806 /// Compute the exponent of a PxVec3
4807 pub fn phys_PxExp(v: *const PxVec3) -> PxQuat;
4808
4809 /// computes a oriented bounding box around the scaled basis.
4810 ///
4811 /// Bounding box extent.
4812 pub fn phys_PxOptimizeBoundingBox(basis: *mut PxMat33) -> PxVec3;
4813
4814 /// return Returns the log of a PxQuat
4815 pub fn phys_PxLog(q: *const PxQuat) -> PxVec3;
4816
4817 /// return Returns 0 if v.x is largest element of v, 1 if v.y is largest element, 2 if v.z is largest element.
4818 pub fn phys_PxLargestAxis(v: *const PxVec3) -> u32;
4819
4820 /// Compute tan(theta/2) given sin(theta) and cos(theta) as inputs.
4821 ///
4822 /// Returns tan(theta/2)
4823 pub fn phys_PxTanHalf(sin: f32, cos: f32) -> f32;
4824
4825 /// Compute the closest point on an 2d ellipse to a given 2d point.
4826 ///
4827 /// Returns the 2d position on the surface of the ellipse that is closest to point.
4828 pub fn phys_PxEllipseClamp(point: *const PxVec3, radii: *const PxVec3) -> PxVec3;
4829
4830 /// Compute from an input quaternion q a pair of quaternions (swing, twist) such that
4831 /// q = swing * twist
4832 /// with the caveats that swing.x = twist.y = twist.z = 0.
4833 pub fn phys_PxSeparateSwingTwist(q: *const PxQuat, swing: *mut PxQuat, twist: *mut PxQuat);
4834
4835 /// Compute the angle between two non-unit vectors
4836 ///
4837 /// Returns the angle (in radians) between the two vector v0 and v1.
4838 pub fn phys_PxComputeAngle(v0: *const PxVec3, v1: *const PxVec3) -> f32;
4839
4840 /// Compute two normalized vectors (right and up) that are perpendicular to an input normalized vector (dir).
4841 pub fn phys_PxComputeBasisVectors(dir: *const PxVec3, right: *mut PxVec3, up: *mut PxVec3);
4842
4843 /// Compute three normalized vectors (dir, right and up) that are parallel to (dir) and perpendicular to (right, up) the
4844 /// normalized direction vector (p1 - p0)/||p1 - p0||.
4845 pub fn phys_PxComputeBasisVectors_1(p0: *const PxVec3, p1: *const PxVec3, dir: *mut PxVec3, right: *mut PxVec3, up: *mut PxVec3);
4846
4847 /// Compute (i+1)%3
4848 pub fn phys_PxGetNextIndex3(i: u32) -> u32;
4849
4850 pub fn phys_computeBarycentric(a: *const PxVec3, b: *const PxVec3, c: *const PxVec3, d: *const PxVec3, p: *const PxVec3, bary: *mut PxVec4);
4851
4852 pub fn phys_computeBarycentric_1(a: *const PxVec3, b: *const PxVec3, c: *const PxVec3, p: *const PxVec3, bary: *mut PxVec4);
4853
4854 pub fn Interpolation_PxLerp(a: f32, b: f32, t: f32) -> f32;
4855
4856 pub fn Interpolation_PxBiLerp(f00: f32, f10: f32, f01: f32, f11: f32, tx: f32, ty: f32) -> f32;
4857
4858 pub fn Interpolation_PxTriLerp(f000: f32, f100: f32, f010: f32, f110: f32, f001: f32, f101: f32, f011: f32, f111: f32, tx: f32, ty: f32, tz: f32) -> f32;
4859
4860 pub fn Interpolation_PxSDFIdx(i: u32, j: u32, k: u32, nbX: u32, nbY: u32) -> u32;
4861
4862 pub fn Interpolation_PxSDFSampleImpl(sdf: *const f32, localPos: *const PxVec3, sdfBoxLower: *const PxVec3, sdfBoxHigher: *const PxVec3, sdfDx: f32, invSdfDx: f32, dimX: u32, dimY: u32, dimZ: u32, tolerance: f32) -> f32;
4863
4864 pub fn phys_PxSdfSample(sdf: *const f32, localPos: *const PxVec3, sdfBoxLower: *const PxVec3, sdfBoxHigher: *const PxVec3, sdfDx: f32, invSdfDx: f32, dimX: u32, dimY: u32, dimZ: u32, gradient: *mut PxVec3, tolerance: f32) -> f32;
4865
4866 /// The constructor for Mutex creates a mutex. It is initially unlocked.
4867 pub fn PxMutexImpl_new_alloc() -> *mut PxMutexImpl;
4868
4869 /// The destructor for Mutex deletes the mutex.
4870 pub fn PxMutexImpl_delete(self_: *mut PxMutexImpl);
4871
4872 /// Acquire (lock) the mutex. If the mutex is already locked
4873 /// by another thread, this method blocks until the mutex is
4874 /// unlocked.
4875 pub fn PxMutexImpl_lock_mut(self_: *mut PxMutexImpl);
4876
4877 /// Acquire (lock) the mutex. If the mutex is already locked
4878 /// by another thread, this method returns false without blocking.
4879 pub fn PxMutexImpl_trylock_mut(self_: *mut PxMutexImpl) -> bool;
4880
4881 /// Release (unlock) the mutex.
4882 pub fn PxMutexImpl_unlock_mut(self_: *mut PxMutexImpl);
4883
4884 /// Size of this class.
4885 pub fn PxMutexImpl_getSize() -> u32;
4886
4887 pub fn PxReadWriteLock_new_alloc() -> *mut PxReadWriteLock;
4888
4889 pub fn PxReadWriteLock_delete(self_: *mut PxReadWriteLock);
4890
4891 pub fn PxReadWriteLock_lockReader_mut(self_: *mut PxReadWriteLock, takeLock: bool);
4892
4893 pub fn PxReadWriteLock_lockWriter_mut(self_: *mut PxReadWriteLock);
4894
4895 pub fn PxReadWriteLock_unlockReader_mut(self_: *mut PxReadWriteLock);
4896
4897 pub fn PxReadWriteLock_unlockWriter_mut(self_: *mut PxReadWriteLock);
4898
4899 /// Mark the beginning of a nested profile block
4900 ///
4901 /// Returns implementation-specific profiler data for this event
4902 pub fn PxProfilerCallback_zoneStart_mut(self_: *mut PxProfilerCallback, eventName: *const std::ffi::c_char, detached: bool, contextId: u64) -> *mut std::ffi::c_void;
4903
4904 /// Mark the end of a nested profile block
4905 ///
4906 /// eventName plus contextId can be used to uniquely match up start and end of a zone.
4907 pub fn PxProfilerCallback_zoneEnd_mut(self_: *mut PxProfilerCallback, profilerData: *mut std::ffi::c_void, eventName: *const std::ffi::c_char, detached: bool, contextId: u64);
4908
4909 pub fn PxProfileScoped_new_alloc(callback: *mut PxProfilerCallback, eventName: *const std::ffi::c_char, detached: bool, contextId: u64) -> *mut PxProfileScoped;
4910
4911 pub fn PxProfileScoped_delete(self_: *mut PxProfileScoped);
4912
4913 pub fn PxSListEntry_new() -> PxSListEntry;
4914
4915 pub fn PxSListEntry_next_mut(self_: *mut PxSListEntry) -> *mut PxSListEntry;
4916
4917 pub fn PxSListImpl_new_alloc() -> *mut PxSListImpl;
4918
4919 pub fn PxSListImpl_delete(self_: *mut PxSListImpl);
4920
4921 pub fn PxSListImpl_push_mut(self_: *mut PxSListImpl, entry: *mut PxSListEntry);
4922
4923 pub fn PxSListImpl_pop_mut(self_: *mut PxSListImpl) -> *mut PxSListEntry;
4924
4925 pub fn PxSListImpl_flush_mut(self_: *mut PxSListImpl) -> *mut PxSListEntry;
4926
4927 pub fn PxSListImpl_getSize() -> u32;
4928
4929 pub fn PxSyncImpl_new_alloc() -> *mut PxSyncImpl;
4930
4931 pub fn PxSyncImpl_delete(self_: *mut PxSyncImpl);
4932
4933 /// Wait on the object for at most the given number of ms. Returns
4934 /// true if the object is signaled. Sync::waitForever will block forever
4935 /// or until the object is signaled.
4936 pub fn PxSyncImpl_wait_mut(self_: *mut PxSyncImpl, milliseconds: u32) -> bool;
4937
4938 /// Signal the synchronization object, waking all threads waiting on it
4939 pub fn PxSyncImpl_set_mut(self_: *mut PxSyncImpl);
4940
4941 /// Reset the synchronization object
4942 pub fn PxSyncImpl_reset_mut(self_: *mut PxSyncImpl);
4943
4944 /// Size of this class.
4945 pub fn PxSyncImpl_getSize() -> u32;
4946
4947 pub fn PxRunnable_new_alloc() -> *mut PxRunnable;
4948
4949 pub fn PxRunnable_delete(self_: *mut PxRunnable);
4950
4951 pub fn PxRunnable_execute_mut(self_: *mut PxRunnable);
4952
4953 pub fn phys_PxTlsAlloc() -> u32;
4954
4955 pub fn phys_PxTlsFree(index: u32);
4956
4957 pub fn phys_PxTlsGet(index: u32) -> *mut std::ffi::c_void;
4958
4959 pub fn phys_PxTlsGetValue(index: u32) -> usize;
4960
4961 pub fn phys_PxTlsSet(index: u32, value: *mut std::ffi::c_void) -> u32;
4962
4963 pub fn phys_PxTlsSetValue(index: u32, value: usize) -> u32;
4964
4965 pub fn PxCounterFrequencyToTensOfNanos_new(inNum: u64, inDenom: u64) -> PxCounterFrequencyToTensOfNanos;
4966
4967 pub fn PxCounterFrequencyToTensOfNanos_toTensOfNanos(self_: *const PxCounterFrequencyToTensOfNanos, inCounter: u64) -> u64;
4968
4969 pub fn PxTime_getBootCounterFrequency() -> *const PxCounterFrequencyToTensOfNanos;
4970
4971 pub fn PxTime_getCounterFrequency() -> PxCounterFrequencyToTensOfNanos;
4972
4973 pub fn PxTime_getCurrentCounterValue() -> u64;
4974
4975 pub fn PxTime_getCurrentTimeInTensOfNanoSeconds() -> u64;
4976
4977 pub fn PxTime_new() -> PxTime;
4978
4979 pub fn PxTime_getElapsedSeconds_mut(self_: *mut PxTime) -> f64;
4980
4981 pub fn PxTime_peekElapsedSeconds_mut(self_: *mut PxTime) -> f64;
4982
4983 pub fn PxTime_getLastTime(self_: *const PxTime) -> f64;
4984
4985 /// default constructor leaves data uninitialized.
4986 pub fn PxVec2_new() -> PxVec2;
4987
4988 /// zero constructor.
4989 pub fn PxVec2_new_1(anon_param0: PxZERO) -> PxVec2;
4990
4991 /// Assigns scalar parameter to all elements.
4992 ///
4993 /// Useful to initialize to zero or one.
4994 pub fn PxVec2_new_2(a: f32) -> PxVec2;
4995
4996 /// Initializes from 2 scalar parameters.
4997 pub fn PxVec2_new_3(nx: f32, ny: f32) -> PxVec2;
4998
4999 /// tests for exact zero vector
5000 pub fn PxVec2_isZero(self_: *const PxVec2) -> bool;
5001
5002 /// returns true if all 2 elems of the vector are finite (not NAN or INF, etc.)
5003 pub fn PxVec2_isFinite(self_: *const PxVec2) -> bool;
5004
5005 /// is normalized - used by API parameter validation
5006 pub fn PxVec2_isNormalized(self_: *const PxVec2) -> bool;
5007
5008 /// returns the squared magnitude
5009 ///
5010 /// Avoids calling PxSqrt()!
5011 pub fn PxVec2_magnitudeSquared(self_: *const PxVec2) -> f32;
5012
5013 /// returns the magnitude
5014 pub fn PxVec2_magnitude(self_: *const PxVec2) -> f32;
5015
5016 /// returns the scalar product of this and other.
5017 pub fn PxVec2_dot(self_: *const PxVec2, v: *const PxVec2) -> f32;
5018
5019 /// returns a unit vector
5020 pub fn PxVec2_getNormalized(self_: *const PxVec2) -> PxVec2;
5021
5022 /// normalizes the vector in place
5023 pub fn PxVec2_normalize_mut(self_: *mut PxVec2) -> f32;
5024
5025 /// a[i] * b[i], for all i.
5026 pub fn PxVec2_multiply(self_: *const PxVec2, a: *const PxVec2) -> PxVec2;
5027
5028 /// element-wise minimum
5029 pub fn PxVec2_minimum(self_: *const PxVec2, v: *const PxVec2) -> PxVec2;
5030
5031 /// returns MIN(x, y);
5032 pub fn PxVec2_minElement(self_: *const PxVec2) -> f32;
5033
5034 /// element-wise maximum
5035 pub fn PxVec2_maximum(self_: *const PxVec2, v: *const PxVec2) -> PxVec2;
5036
5037 /// returns MAX(x, y);
5038 pub fn PxVec2_maxElement(self_: *const PxVec2) -> f32;
5039
5040 pub fn PxStridedData_new() -> PxStridedData;
5041
5042 pub fn PxBoundedData_new() -> PxBoundedData;
5043
5044 pub fn PxDebugPoint_new(p: *const PxVec3, c: *const u32) -> PxDebugPoint;
5045
5046 pub fn PxDebugLine_new(p0: *const PxVec3, p1: *const PxVec3, c: *const u32) -> PxDebugLine;
5047
5048 pub fn PxDebugTriangle_new(p0: *const PxVec3, p1: *const PxVec3, p2: *const PxVec3, c: *const u32) -> PxDebugTriangle;
5049
5050 pub fn PxDebugText_new() -> PxDebugText;
5051
5052 pub fn PxDebugText_new_1(pos: *const PxVec3, sz: *const f32, clr: *const u32, str: *const std::ffi::c_char) -> PxDebugText;
5053
5054 pub fn PxRenderBuffer_delete(self_: *mut PxRenderBuffer);
5055
5056 pub fn PxRenderBuffer_getNbPoints(self_: *const PxRenderBuffer) -> u32;
5057
5058 pub fn PxRenderBuffer_getPoints(self_: *const PxRenderBuffer) -> *const PxDebugPoint;
5059
5060 pub fn PxRenderBuffer_addPoint_mut(self_: *mut PxRenderBuffer, point: *const PxDebugPoint);
5061
5062 pub fn PxRenderBuffer_getNbLines(self_: *const PxRenderBuffer) -> u32;
5063
5064 pub fn PxRenderBuffer_getLines(self_: *const PxRenderBuffer) -> *const PxDebugLine;
5065
5066 pub fn PxRenderBuffer_addLine_mut(self_: *mut PxRenderBuffer, line: *const PxDebugLine);
5067
5068 pub fn PxRenderBuffer_reserveLines_mut(self_: *mut PxRenderBuffer, nbLines: u32) -> *mut PxDebugLine;
5069
5070 pub fn PxRenderBuffer_reservePoints_mut(self_: *mut PxRenderBuffer, nbLines: u32) -> *mut PxDebugPoint;
5071
5072 pub fn PxRenderBuffer_getNbTriangles(self_: *const PxRenderBuffer) -> u32;
5073
5074 pub fn PxRenderBuffer_getTriangles(self_: *const PxRenderBuffer) -> *const PxDebugTriangle;
5075
5076 pub fn PxRenderBuffer_addTriangle_mut(self_: *mut PxRenderBuffer, triangle: *const PxDebugTriangle);
5077
5078 pub fn PxRenderBuffer_append_mut(self_: *mut PxRenderBuffer, other: *const PxRenderBuffer);
5079
5080 pub fn PxRenderBuffer_clear_mut(self_: *mut PxRenderBuffer);
5081
5082 pub fn PxRenderBuffer_shift_mut(self_: *mut PxRenderBuffer, delta: *const PxVec3);
5083
5084 pub fn PxRenderBuffer_empty(self_: *const PxRenderBuffer) -> bool;
5085
5086 pub fn PxProcessPxBaseCallback_delete(self_: *mut PxProcessPxBaseCallback);
5087
5088 pub fn PxProcessPxBaseCallback_process_mut(self_: *mut PxProcessPxBaseCallback, anon_param0: *mut PxBase);
5089
5090 /// Registers a reference value corresponding to a PxBase object.
5091 ///
5092 /// This method is assumed to be called in the implementation of PxSerializer::registerReferences for serialized
5093 /// references that need to be resolved on deserialization.
5094 ///
5095 /// A reference needs to be associated with exactly one PxBase object in either the collection or the
5096 /// external references collection.
5097 ///
5098 /// Different kinds of references are supported and need to be specified. In the most common case
5099 /// (PX_SERIAL_REF_KIND_PXBASE) the PxBase object matches the reference value (which is the pointer
5100 /// to the PxBase object). Integer references maybe registered as well (used for internal material
5101 /// indices with PX_SERIAL_REF_KIND_MATERIAL_IDX). Other kinds could be added with the restriction that
5102 /// for pointer types the kind value needs to be marked with the PX_SERIAL_REF_KIND_PTR_TYPE_BIT.
5103 pub fn PxSerializationContext_registerReference_mut(self_: *mut PxSerializationContext, base: *mut PxBase, kind: u32, reference: usize);
5104
5105 /// Returns the collection that is being serialized.
5106 pub fn PxSerializationContext_getCollection(self_: *const PxSerializationContext) -> *const PxCollection;
5107
5108 /// Serializes object data and object extra data.
5109 ///
5110 /// This function is assumed to be called within the implementation of PxSerializer::exportData and PxSerializer::exportExtraData.
5111 pub fn PxSerializationContext_writeData_mut(self_: *mut PxSerializationContext, data: *const std::ffi::c_void, size: u32);
5112
5113 /// Aligns the serialized data.
5114 ///
5115 /// This function is assumed to be called within the implementation of PxSerializer::exportData and PxSerializer::exportExtraData.
5116 pub fn PxSerializationContext_alignData_mut(self_: *mut PxSerializationContext, alignment: u32);
5117
5118 /// Helper function to write a name to the extraData if serialization is configured to save names.
5119 ///
5120 /// This function is assumed to be called within the implementation of PxSerializer::exportExtraData.
5121 pub fn PxSerializationContext_writeName_mut(self_: *mut PxSerializationContext, name: *const std::ffi::c_char);
5122
5123 /// Retrieves a pointer to a deserialized PxBase object given a corresponding deserialized reference value
5124 ///
5125 /// This method is assumed to be called in the implementation of PxSerializer::createObject in order
5126 /// to update reference values on deserialization.
5127 ///
5128 /// To update a PxBase reference the corresponding deserialized pointer value needs to be provided in order to retrieve
5129 /// the location of the corresponding deserialized PxBase object. (PxDeserializationContext::translatePxBase simplifies
5130 /// this common case).
5131 ///
5132 /// For other kinds of references the reverence values need to be updated by deduction given the corresponding PxBase instance.
5133 ///
5134 /// PxBase object associated with the reference value
5135 pub fn PxDeserializationContext_resolveReference(self_: *const PxDeserializationContext, kind: u32, reference: usize) -> *mut PxBase;
5136
5137 /// Helper function to read a name from the extra data during deserialization.
5138 ///
5139 /// This function is assumed to be called within the implementation of PxSerializer::createObject.
5140 pub fn PxDeserializationContext_readName_mut(self_: *mut PxDeserializationContext, name: *mut *const std::ffi::c_char);
5141
5142 /// Function to align the extra data stream to a power of 2 alignment
5143 ///
5144 /// This function is assumed to be called within the implementation of PxSerializer::createObject.
5145 pub fn PxDeserializationContext_alignExtraData_mut(self_: *mut PxDeserializationContext, alignment: u32);
5146
5147 /// Register a serializer for a concrete type
5148 pub fn PxSerializationRegistry_registerSerializer_mut(self_: *mut PxSerializationRegistry, type_: u16, serializer: *mut PxSerializer);
5149
5150 /// Unregister a serializer for a concrete type, and retrieves the corresponding serializer object.
5151 ///
5152 /// Unregistered serializer corresponding to type, NULL for types for which no serializer has been registered.
5153 pub fn PxSerializationRegistry_unregisterSerializer_mut(self_: *mut PxSerializationRegistry, type_: u16) -> *mut PxSerializer;
5154
5155 /// Returns PxSerializer corresponding to type
5156 ///
5157 /// Registered PxSerializer object corresponding to type
5158 pub fn PxSerializationRegistry_getSerializer(self_: *const PxSerializationRegistry, type_: u16) -> *const PxSerializer;
5159
5160 /// Register a RepX serializer for a concrete type
5161 pub fn PxSerializationRegistry_registerRepXSerializer_mut(self_: *mut PxSerializationRegistry, type_: u16, serializer: *mut PxRepXSerializer);
5162
5163 /// Unregister a RepX serializer for a concrete type, and retrieves the corresponding serializer object.
5164 ///
5165 /// Unregistered PxRepxSerializer corresponding to type, NULL for types for which no RepX serializer has been registered.
5166 pub fn PxSerializationRegistry_unregisterRepXSerializer_mut(self_: *mut PxSerializationRegistry, type_: u16) -> *mut PxRepXSerializer;
5167
5168 /// Returns RepX serializer given the corresponding type name
5169 ///
5170 /// Registered PxRepXSerializer object corresponding to type name
5171 pub fn PxSerializationRegistry_getRepXSerializer(self_: *const PxSerializationRegistry, typeName: *const std::ffi::c_char) -> *mut PxRepXSerializer;
5172
5173 /// Releases PxSerializationRegistry instance.
5174 ///
5175 /// This unregisters all PhysX and PhysXExtension serializers. Make sure to unregister all custom type
5176 /// serializers before releasing the PxSerializationRegistry.
5177 pub fn PxSerializationRegistry_release_mut(self_: *mut PxSerializationRegistry);
5178
5179 /// Adds a PxBase object to the collection.
5180 ///
5181 /// Adds a PxBase object to the collection. Optionally a PxSerialObjectId can be provided
5182 /// in order to resolve dependencies between collections. A PxSerialObjectId value of PX_SERIAL_OBJECT_ID_INVALID
5183 /// means the object remains without id. Objects can be added regardless of other objects they require. If the object
5184 /// is already in the collection, the ID will be set if it was PX_SERIAL_OBJECT_ID_INVALID previously, otherwise the
5185 /// operation fails.
5186 pub fn PxCollection_add_mut(self_: *mut PxCollection, object: *mut PxBase, id: u64);
5187
5188 /// Removes a PxBase member object from the collection.
5189 ///
5190 /// Object needs to be contained by the collection.
5191 pub fn PxCollection_remove_mut(self_: *mut PxCollection, object: *mut PxBase);
5192
5193 /// Returns whether the collection contains a certain PxBase object.
5194 ///
5195 /// Whether object is contained.
5196 pub fn PxCollection_contains(self_: *const PxCollection, object: *mut PxBase) -> bool;
5197
5198 /// Adds an id to a member PxBase object.
5199 ///
5200 /// If the object is already associated with an id within the collection, the id is replaced.
5201 /// May only be called for objects that are members of the collection. The id needs to be unique
5202 /// within the collection.
5203 pub fn PxCollection_addId_mut(self_: *mut PxCollection, object: *mut PxBase, id: u64);
5204
5205 /// Removes id from a contained PxBase object.
5206 ///
5207 /// May only be called for ids that are associated with an object in the collection.
5208 pub fn PxCollection_removeId_mut(self_: *mut PxCollection, id: u64);
5209
5210 /// Adds all PxBase objects and their ids of collection to this collection.
5211 ///
5212 /// PxBase objects already in this collection are ignored. Object ids need to be conflict
5213 /// free, i.e. the same object may not have two different ids within the two collections.
5214 pub fn PxCollection_add_mut_1(self_: *mut PxCollection, collection: *mut PxCollection);
5215
5216 /// Removes all PxBase objects of collection from this collection.
5217 ///
5218 /// PxBase objects not present in this collection are ignored. Ids of objects
5219 /// which are removed are also removed.
5220 pub fn PxCollection_remove_mut_1(self_: *mut PxCollection, collection: *mut PxCollection);
5221
5222 /// Gets number of PxBase objects in this collection.
5223 ///
5224 /// Number of objects in this collection
5225 pub fn PxCollection_getNbObjects(self_: *const PxCollection) -> u32;
5226
5227 /// Gets the PxBase object of this collection given its index.
5228 ///
5229 /// PxBase object at index index
5230 pub fn PxCollection_getObject(self_: *const PxCollection, index: u32) -> *mut PxBase;
5231
5232 /// Copies member PxBase pointers to a user specified buffer.
5233 ///
5234 /// number of members PxBase objects that have been written to the userBuffer
5235 pub fn PxCollection_getObjects(self_: *const PxCollection, userBuffer: *mut *mut PxBase, bufferSize: u32, startIndex: u32) -> u32;
5236
5237 /// Looks for a PxBase object given a PxSerialObjectId value.
5238 ///
5239 /// If there is no PxBase object in the collection with the given id, NULL is returned.
5240 ///
5241 /// PxBase object with the given id value or NULL
5242 pub fn PxCollection_find(self_: *const PxCollection, id: u64) -> *mut PxBase;
5243
5244 /// Gets number of PxSerialObjectId names in this collection.
5245 ///
5246 /// Number of PxSerialObjectId names in this collection
5247 pub fn PxCollection_getNbIds(self_: *const PxCollection) -> u32;
5248
5249 /// Copies member PxSerialObjectId values to a user specified buffer.
5250 ///
5251 /// number of members PxSerialObjectId values that have been written to the userBuffer
5252 pub fn PxCollection_getIds(self_: *const PxCollection, userBuffer: *mut u64, bufferSize: u32, startIndex: u32) -> u32;
5253
5254 /// Gets the PxSerialObjectId name of a PxBase object within the collection.
5255 ///
5256 /// The PxBase object needs to be a member of the collection.
5257 ///
5258 /// PxSerialObjectId name of the object or PX_SERIAL_OBJECT_ID_INVALID if the object is unnamed
5259 pub fn PxCollection_getId(self_: *const PxCollection, object: *const PxBase) -> u64;
5260
5261 /// Deletes a collection object.
5262 ///
5263 /// This function only deletes the collection object, i.e. the container class. It doesn't delete objects
5264 /// that are part of the collection.
5265 pub fn PxCollection_release_mut(self_: *mut PxCollection);
5266
5267 /// Creates a collection object.
5268 ///
5269 /// Objects can only be serialized or deserialized through a collection.
5270 /// For serialization, users must add objects to the collection and serialize the collection as a whole.
5271 /// For deserialization, the system gives back a collection of deserialized objects to users.
5272 ///
5273 /// The new collection object.
5274 pub fn phys_PxCreateCollection() -> *mut PxCollection;
5275
5276 /// Releases the PxBase instance, please check documentation of release in derived class.
5277 pub fn PxBase_release_mut(self_: *mut PxBase);
5278
5279 /// Returns string name of dynamic type.
5280 ///
5281 /// Class name of most derived type of this object.
5282 pub fn PxBase_getConcreteTypeName(self_: *const PxBase) -> *const std::ffi::c_char;
5283
5284 /// Returns concrete type of object.
5285 ///
5286 /// PxConcreteType::Enum of serialized object
5287 pub fn PxBase_getConcreteType(self_: *const PxBase) -> u16;
5288
5289 /// Set PxBaseFlag
5290 pub fn PxBase_setBaseFlag_mut(self_: *mut PxBase, flag: PxBaseFlag, value: bool);
5291
5292 /// Set PxBaseFlags
5293 pub fn PxBase_setBaseFlags_mut(self_: *mut PxBase, inFlags: PxBaseFlags);
5294
5295 /// Returns PxBaseFlags
5296 ///
5297 /// PxBaseFlags
5298 pub fn PxBase_getBaseFlags(self_: *const PxBase) -> PxBaseFlags;
5299
5300 /// Whether the object is subordinate.
5301 ///
5302 /// A class is subordinate, if it can only be instantiated in the context of another class.
5303 ///
5304 /// Whether the class is subordinate
5305 pub fn PxBase_isReleasable(self_: *const PxBase) -> bool;
5306
5307 /// Decrements the reference count of the object and releases it if the new reference count is zero.
5308 pub fn PxRefCounted_release_mut(self_: *mut PxRefCounted);
5309
5310 /// Returns the reference count of the object.
5311 ///
5312 /// At creation, the reference count of the object is 1. Every other object referencing this object increments the
5313 /// count by 1. When the reference count reaches 0, and only then, the object gets destroyed automatically.
5314 ///
5315 /// the current reference count.
5316 pub fn PxRefCounted_getReferenceCount(self_: *const PxRefCounted) -> u32;
5317
5318 /// Acquires a counted reference to this object.
5319 ///
5320 /// This method increases the reference count of the object by 1. Decrement the reference count by calling release()
5321 pub fn PxRefCounted_acquireReference_mut(self_: *mut PxRefCounted);
5322
5323 /// constructor sets to default
5324 pub fn PxTolerancesScale_new(defaultLength: f32, defaultSpeed: f32) -> PxTolerancesScale;
5325
5326 /// Returns true if the descriptor is valid.
5327 ///
5328 /// true if the current settings are valid (returns always true).
5329 pub fn PxTolerancesScale_isValid(self_: *const PxTolerancesScale) -> bool;
5330
5331 /// Allocate a new string.
5332 ///
5333 /// *Always* a valid null terminated string. "" is returned if "" or null is passed in.
5334 pub fn PxStringTable_allocateStr_mut(self_: *mut PxStringTable, inSrc: *const std::ffi::c_char) -> *const std::ffi::c_char;
5335
5336 /// Release the string table and all the strings associated with it.
5337 pub fn PxStringTable_release_mut(self_: *mut PxStringTable);
5338
5339 /// Returns string name of dynamic type.
5340 ///
5341 /// Class name of most derived type of this object.
5342 pub fn PxSerializer_getConcreteTypeName(self_: *const PxSerializer) -> *const std::ffi::c_char;
5343
5344 /// Adds required objects to the collection.
5345 ///
5346 /// This method does not add the required objects recursively, e.g. objects required by required objects.
5347 pub fn PxSerializer_requiresObjects(self_: *const PxSerializer, anon_param0: *mut PxBase, anon_param1: *mut PxProcessPxBaseCallback);
5348
5349 /// Whether the object is subordinate.
5350 ///
5351 /// A class is subordinate, if it can only be instantiated in the context of another class.
5352 ///
5353 /// Whether the class is subordinate
5354 pub fn PxSerializer_isSubordinate(self_: *const PxSerializer) -> bool;
5355
5356 /// Exports object's extra data to stream.
5357 pub fn PxSerializer_exportExtraData(self_: *const PxSerializer, anon_param0: *mut PxBase, anon_param1: *mut PxSerializationContext);
5358
5359 /// Exports object's data to stream.
5360 pub fn PxSerializer_exportData(self_: *const PxSerializer, anon_param0: *mut PxBase, anon_param1: *mut PxSerializationContext);
5361
5362 /// Register references that the object maintains to other objects.
5363 pub fn PxSerializer_registerReferences(self_: *const PxSerializer, obj: *mut PxBase, s: *mut PxSerializationContext);
5364
5365 /// Returns size needed to create the class instance.
5366 ///
5367 /// sizeof class instance.
5368 pub fn PxSerializer_getClassSize(self_: *const PxSerializer) -> usize;
5369
5370 /// Create object at a given address, resolve references and import extra data.
5371 ///
5372 /// Created PxBase pointer (needs to be identical to address before increment).
5373 pub fn PxSerializer_createObject(self_: *const PxSerializer, address: *mut *mut u8, context: *mut PxDeserializationContext) -> *mut PxBase;
5374
5375 /// *******************************************************************************************************************
5376 pub fn PxSerializer_delete(self_: *mut PxSerializer);
5377
5378 /// Builds object (TriangleMesh, Heightfield, ConvexMesh or BVH) from given data in PxPhysics.
5379 ///
5380 /// PxBase Created object in PxPhysics.
5381 pub fn PxInsertionCallback_buildObjectFromData_mut(self_: *mut PxInsertionCallback, type_: PxConcreteType, data: *mut std::ffi::c_void) -> *mut PxBase;
5382
5383 /// Set the user-provided dispatcher object for CPU tasks
5384 pub fn PxTaskManager_setCpuDispatcher_mut(self_: *mut PxTaskManager, ref_: *mut PxCpuDispatcher);
5385
5386 /// Get the user-provided dispatcher object for CPU tasks
5387 ///
5388 /// The CPU dispatcher object.
5389 pub fn PxTaskManager_getCpuDispatcher(self_: *const PxTaskManager) -> *mut PxCpuDispatcher;
5390
5391 /// Reset any dependencies between Tasks
5392 ///
5393 /// Will be called at the start of every frame before tasks are submitted.
5394 pub fn PxTaskManager_resetDependencies_mut(self_: *mut PxTaskManager);
5395
5396 /// Called by the owning scene to start the task graph.
5397 ///
5398 /// All tasks with ref count of 1 will be dispatched.
5399 pub fn PxTaskManager_startSimulation_mut(self_: *mut PxTaskManager);
5400
5401 /// Called by the owning scene at the end of a simulation step.
5402 pub fn PxTaskManager_stopSimulation_mut(self_: *mut PxTaskManager);
5403
5404 /// Called by the worker threads to inform the PxTaskManager that a task has completed processing.
5405 pub fn PxTaskManager_taskCompleted_mut(self_: *mut PxTaskManager, task: *mut PxTask);
5406
5407 /// Retrieve a task by name
5408 ///
5409 /// The ID of the task with that name, or eNOT_PRESENT if not found
5410 pub fn PxTaskManager_getNamedTask_mut(self_: *mut PxTaskManager, name: *const std::ffi::c_char) -> u32;
5411
5412 /// Submit a task with a unique name.
5413 ///
5414 /// The ID of the task with that name, or eNOT_PRESENT if not found
5415 pub fn PxTaskManager_submitNamedTask_mut(self_: *mut PxTaskManager, task: *mut PxTask, name: *const std::ffi::c_char, type_: PxTaskType) -> u32;
5416
5417 /// Submit an unnamed task.
5418 ///
5419 /// The ID of the task with that name, or eNOT_PRESENT if not found
5420 pub fn PxTaskManager_submitUnnamedTask_mut(self_: *mut PxTaskManager, task: *mut PxTask, type_: PxTaskType) -> u32;
5421
5422 /// Retrieve a task given a task ID
5423 ///
5424 /// The task associated with the ID
5425 pub fn PxTaskManager_getTaskFromID_mut(self_: *mut PxTaskManager, id: u32) -> *mut PxTask;
5426
5427 /// Release the PxTaskManager object, referenced dispatchers will not be released
5428 pub fn PxTaskManager_release_mut(self_: *mut PxTaskManager);
5429
5430 /// Construct a new PxTaskManager instance with the given [optional] dispatchers
5431 pub fn PxTaskManager_createTaskManager(errorCallback: *mut PxErrorCallback, anon_param1: *mut PxCpuDispatcher) -> *mut PxTaskManager;
5432
5433 /// Called by the TaskManager when a task is to be queued for execution.
5434 ///
5435 /// Upon receiving a task, the dispatcher should schedule the task to run.
5436 /// After the task has been run, it should call the release() method and
5437 /// discard its pointer.
5438 pub fn PxCpuDispatcher_submitTask_mut(self_: *mut PxCpuDispatcher, task: *mut PxBaseTask);
5439
5440 /// Returns the number of available worker threads for this dispatcher.
5441 ///
5442 /// The SDK will use this count to control how many tasks are submitted. By
5443 /// matching the number of tasks with the number of execution units task
5444 /// overhead can be reduced.
5445 pub fn PxCpuDispatcher_getWorkerCount(self_: *const PxCpuDispatcher) -> u32;
5446
5447 pub fn PxCpuDispatcher_delete(self_: *mut PxCpuDispatcher);
5448
5449 /// The user-implemented run method where the task's work should be performed
5450 ///
5451 /// run() methods must be thread safe, stack friendly (no alloca, etc), and
5452 /// must never block.
5453 pub fn PxBaseTask_run_mut(self_: *mut PxBaseTask);
5454
5455 /// Return a user-provided task name for profiling purposes.
5456 ///
5457 /// It does not have to be unique, but unique names are helpful.
5458 ///
5459 /// The name of this task
5460 pub fn PxBaseTask_getName(self_: *const PxBaseTask) -> *const std::ffi::c_char;
5461
5462 /// Implemented by derived implementation classes
5463 pub fn PxBaseTask_addReference_mut(self_: *mut PxBaseTask);
5464
5465 /// Implemented by derived implementation classes
5466 pub fn PxBaseTask_removeReference_mut(self_: *mut PxBaseTask);
5467
5468 /// Implemented by derived implementation classes
5469 pub fn PxBaseTask_getReference(self_: *const PxBaseTask) -> i32;
5470
5471 /// Implemented by derived implementation classes
5472 ///
5473 /// A task may assume in its release() method that the task system no longer holds
5474 /// references to it - so it may safely run its destructor, recycle itself, etc.
5475 /// provided no additional user references to the task exist
5476 pub fn PxBaseTask_release_mut(self_: *mut PxBaseTask);
5477
5478 /// Return PxTaskManager to which this task was submitted
5479 ///
5480 /// Note, can return NULL if task was not submitted, or has been
5481 /// completed.
5482 pub fn PxBaseTask_getTaskManager(self_: *const PxBaseTask) -> *mut PxTaskManager;
5483
5484 pub fn PxBaseTask_setContextId_mut(self_: *mut PxBaseTask, id: u64);
5485
5486 pub fn PxBaseTask_getContextId(self_: *const PxBaseTask) -> u64;
5487
5488 /// Release method implementation
5489 pub fn PxTask_release_mut(self_: *mut PxTask);
5490
5491 /// Inform the PxTaskManager this task must finish before the given
5492 pub fn PxTask_finishBefore_mut(self_: *mut PxTask, taskID: u32);
5493
5494 /// Inform the PxTaskManager this task cannot start until the given
5495 pub fn PxTask_startAfter_mut(self_: *mut PxTask, taskID: u32);
5496
5497 /// Manually increment this task's reference count. The task will
5498 /// not be allowed to run until removeReference() is called.
5499 pub fn PxTask_addReference_mut(self_: *mut PxTask);
5500
5501 /// Manually decrement this task's reference count. If the reference
5502 /// count reaches zero, the task will be dispatched.
5503 pub fn PxTask_removeReference_mut(self_: *mut PxTask);
5504
5505 /// Return the ref-count for this task
5506 pub fn PxTask_getReference(self_: *const PxTask) -> i32;
5507
5508 /// Return the unique ID for this task
5509 pub fn PxTask_getTaskID(self_: *const PxTask) -> u32;
5510
5511 /// Called by PxTaskManager at submission time for initialization
5512 ///
5513 /// Perform simulation step initialization here.
5514 pub fn PxTask_submitted_mut(self_: *mut PxTask);
5515
5516 /// Initialize this task and specify the task that will have its ref count decremented on completion.
5517 ///
5518 /// Submission is deferred until the task's mRefCount is decremented to zero.
5519 /// Note that we only use the PxTaskManager to query the appropriate dispatcher.
5520 pub fn PxLightCpuTask_setContinuation_mut(self_: *mut PxLightCpuTask, tm: *mut PxTaskManager, c: *mut PxBaseTask);
5521
5522 /// Initialize this task and specify the task that will have its ref count decremented on completion.
5523 ///
5524 /// This overload of setContinuation() queries the PxTaskManager from the continuation
5525 /// task, which cannot be NULL.
5526 pub fn PxLightCpuTask_setContinuation_mut_1(self_: *mut PxLightCpuTask, c: *mut PxBaseTask);
5527
5528 /// Retrieves continuation task
5529 pub fn PxLightCpuTask_getContinuation(self_: *const PxLightCpuTask) -> *mut PxBaseTask;
5530
5531 /// Manually decrement this task's reference count. If the reference
5532 /// count reaches zero, the task will be dispatched.
5533 pub fn PxLightCpuTask_removeReference_mut(self_: *mut PxLightCpuTask);
5534
5535 /// Return the ref-count for this task
5536 pub fn PxLightCpuTask_getReference(self_: *const PxLightCpuTask) -> i32;
5537
5538 /// Manually increment this task's reference count. The task will
5539 /// not be allowed to run until removeReference() is called.
5540 pub fn PxLightCpuTask_addReference_mut(self_: *mut PxLightCpuTask);
5541
5542 /// called by CpuDispatcher after run method has completed
5543 ///
5544 /// Decrements the continuation task's reference count, if specified.
5545 pub fn PxLightCpuTask_release_mut(self_: *mut PxLightCpuTask);
5546
5547 /// Returns the type of the geometry.
5548 ///
5549 /// The type of the object.
5550 pub fn PxGeometry_getType(self_: *const PxGeometry) -> PxGeometryType;
5551
5552 /// Constructor to initialize half extents from scalar parameters.
5553 pub fn PxBoxGeometry_new(hx: f32, hy: f32, hz: f32) -> PxBoxGeometry;
5554
5555 /// Constructor to initialize half extents from vector parameter.
5556 pub fn PxBoxGeometry_new_1(halfExtents_: PxVec3) -> PxBoxGeometry;
5557
5558 /// Returns true if the geometry is valid.
5559 ///
5560 /// True if the current settings are valid
5561 ///
5562 /// A valid box has a positive extent in each direction (halfExtents.x > 0, halfExtents.y > 0, halfExtents.z > 0).
5563 /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a box that has zero extent in any direction.
5564 pub fn PxBoxGeometry_isValid(self_: *const PxBoxGeometry) -> bool;
5565
5566 pub fn PxBVHRaycastCallback_delete(self_: *mut PxBVHRaycastCallback);
5567
5568 pub fn PxBVHRaycastCallback_reportHit_mut(self_: *mut PxBVHRaycastCallback, boundsIndex: u32, distance: *mut f32) -> bool;
5569
5570 pub fn PxBVHOverlapCallback_delete(self_: *mut PxBVHOverlapCallback);
5571
5572 pub fn PxBVHOverlapCallback_reportHit_mut(self_: *mut PxBVHOverlapCallback, boundsIndex: u32) -> bool;
5573
5574 pub fn PxBVHTraversalCallback_delete(self_: *mut PxBVHTraversalCallback);
5575
5576 pub fn PxBVHTraversalCallback_visitNode_mut(self_: *mut PxBVHTraversalCallback, bounds: *const PxBounds3) -> bool;
5577
5578 pub fn PxBVHTraversalCallback_reportLeaf_mut(self_: *mut PxBVHTraversalCallback, nbPrims: u32, prims: *const u32) -> bool;
5579
5580 /// Raycast test against a BVH.
5581 ///
5582 /// false if query has been aborted
5583 pub fn PxBVH_raycast(self_: *const PxBVH, origin: *const PxVec3, unitDir: *const PxVec3, maxDist: f32, cb: *mut PxBVHRaycastCallback, queryFlags: PxGeometryQueryFlags) -> bool;
5584
5585 /// Sweep test against a BVH.
5586 ///
5587 /// false if query has been aborted
5588 pub fn PxBVH_sweep(self_: *const PxBVH, geom: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, maxDist: f32, cb: *mut PxBVHRaycastCallback, queryFlags: PxGeometryQueryFlags) -> bool;
5589
5590 /// Overlap test against a BVH.
5591 ///
5592 /// false if query has been aborted
5593 pub fn PxBVH_overlap(self_: *const PxBVH, geom: *const PxGeometry, pose: *const PxTransform, cb: *mut PxBVHOverlapCallback, queryFlags: PxGeometryQueryFlags) -> bool;
5594
5595 /// Frustum culling test against a BVH.
5596 ///
5597 /// This is similar in spirit to an overlap query using a convex object around the frustum.
5598 /// However this specialized query has better performance, and can support more than the 6 planes
5599 /// of a frustum, which can be useful in portal-based engines.
5600 ///
5601 /// On the other hand this test only returns a conservative number of bounds, i.e. some of the returned
5602 /// bounds may actually be outside the frustum volume, close to it but not touching it. This is usually
5603 /// an ok performance trade-off when the function is used for view-frustum culling.
5604 ///
5605 /// false if query has been aborted
5606 pub fn PxBVH_cull(self_: *const PxBVH, nbPlanes: u32, planes: *const PxPlane, cb: *mut PxBVHOverlapCallback, queryFlags: PxGeometryQueryFlags) -> bool;
5607
5608 /// Returns the number of bounds in the BVH.
5609 ///
5610 /// You can use [`getBounds`]() to retrieve the bounds.
5611 ///
5612 /// These are the user-defined bounds passed to the BVH builder, not the internal bounds around each BVH node.
5613 ///
5614 /// Number of bounds in the BVH.
5615 pub fn PxBVH_getNbBounds(self_: *const PxBVH) -> u32;
5616
5617 /// Retrieve the read-only bounds in the BVH.
5618 ///
5619 /// These are the user-defined bounds passed to the BVH builder, not the internal bounds around each BVH node.
5620 pub fn PxBVH_getBounds(self_: *const PxBVH) -> *const PxBounds3;
5621
5622 /// Retrieve the bounds in the BVH.
5623 ///
5624 /// These bounds can be modified. Call refit() after modifications are done.
5625 ///
5626 /// These are the user-defined bounds passed to the BVH builder, not the internal bounds around each BVH node.
5627 pub fn PxBVH_getBoundsForModification_mut(self_: *mut PxBVH) -> *mut PxBounds3;
5628
5629 /// Refit the BVH.
5630 ///
5631 /// This function "refits" the tree, i.e. takes the new (leaf) bounding boxes into account and
5632 /// recomputes all the BVH bounds accordingly. This is an O(n) operation with n = number of bounds in the BVH.
5633 ///
5634 /// This works best with minor bounds modifications, i.e. when the bounds remain close to their initial values.
5635 /// With large modifications the tree quality degrades more and more, and subsequent query performance suffers.
5636 /// It might be a better strategy to create a brand new BVH if bounds change drastically.
5637 ///
5638 /// This function refits the whole tree after an arbitrary number of bounds have potentially been modified by
5639 /// users (via getBoundsForModification()). If you only have a small number of bounds to update, it might be
5640 /// more efficient to use setBounds() and partialRefit() instead.
5641 pub fn PxBVH_refit_mut(self_: *mut PxBVH);
5642
5643 /// Update single bounds.
5644 ///
5645 /// This is an alternative to getBoundsForModification() / refit(). If you only have a small set of bounds to
5646 /// update, it can be inefficient to call the refit() function, because it refits the whole BVH.
5647 ///
5648 /// Instead, one can update individual bounds with this updateBounds() function. It sets the new bounds and
5649 /// marks the corresponding BVH nodes for partial refit. Once all the individual bounds have been updated,
5650 /// call partialRefit() to only refit the subset of marked nodes.
5651 ///
5652 /// true if success
5653 pub fn PxBVH_updateBounds_mut(self_: *mut PxBVH, boundsIndex: u32, newBounds: *const PxBounds3) -> bool;
5654
5655 /// Refits subset of marked nodes.
5656 ///
5657 /// This is an alternative to the refit() function, to be called after updateBounds() calls.
5658 /// See updateBounds() for details.
5659 pub fn PxBVH_partialRefit_mut(self_: *mut PxBVH);
5660
5661 /// Generic BVH traversal function.
5662 ///
5663 /// This can be used to implement custom BVH traversal functions if provided ones are not enough.
5664 /// In particular this can be used to visualize the tree's bounds.
5665 ///
5666 /// false if query has been aborted
5667 pub fn PxBVH_traverse(self_: *const PxBVH, cb: *mut PxBVHTraversalCallback) -> bool;
5668
5669 pub fn PxBVH_getConcreteTypeName(self_: *const PxBVH) -> *const std::ffi::c_char;
5670
5671 /// Constructor, initializes to a capsule with passed radius and half height.
5672 pub fn PxCapsuleGeometry_new(radius_: f32, halfHeight_: f32) -> PxCapsuleGeometry;
5673
5674 /// Returns true if the geometry is valid.
5675 ///
5676 /// True if the current settings are valid.
5677 ///
5678 /// A valid capsule has radius > 0, halfHeight >= 0.
5679 /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a capsule that has zero radius or height.
5680 pub fn PxCapsuleGeometry_isValid(self_: *const PxCapsuleGeometry) -> bool;
5681
5682 /// Returns the number of vertices.
5683 ///
5684 /// Number of vertices.
5685 pub fn PxConvexMesh_getNbVertices(self_: *const PxConvexMesh) -> u32;
5686
5687 /// Returns the vertices.
5688 ///
5689 /// Array of vertices.
5690 pub fn PxConvexMesh_getVertices(self_: *const PxConvexMesh) -> *const PxVec3;
5691
5692 /// Returns the index buffer.
5693 ///
5694 /// Index buffer.
5695 pub fn PxConvexMesh_getIndexBuffer(self_: *const PxConvexMesh) -> *const u8;
5696
5697 /// Returns the number of polygons.
5698 ///
5699 /// Number of polygons.
5700 pub fn PxConvexMesh_getNbPolygons(self_: *const PxConvexMesh) -> u32;
5701
5702 /// Returns the polygon data.
5703 ///
5704 /// True if success.
5705 pub fn PxConvexMesh_getPolygonData(self_: *const PxConvexMesh, index: u32, data: *mut PxHullPolygon) -> bool;
5706
5707 /// Decrements the reference count of a convex mesh and releases it if the new reference count is zero.
5708 pub fn PxConvexMesh_release_mut(self_: *mut PxConvexMesh);
5709
5710 /// Returns the mass properties of the mesh assuming unit density.
5711 ///
5712 /// The following relationship holds between mass and volume:
5713 ///
5714 /// mass = volume * density
5715 ///
5716 /// The mass of a unit density mesh is equal to its volume, so this function returns the volume of the mesh.
5717 ///
5718 /// Similarly, to obtain the localInertia of an identically shaped object with a uniform density of d, simply multiply the
5719 /// localInertia of the unit density mesh by d.
5720 pub fn PxConvexMesh_getMassInformation(self_: *const PxConvexMesh, mass: *mut f32, localInertia: *mut PxMat33, localCenterOfMass: *mut PxVec3);
5721
5722 /// Returns the local-space (vertex space) AABB from the convex mesh.
5723 ///
5724 /// local-space bounds
5725 pub fn PxConvexMesh_getLocalBounds(self_: *const PxConvexMesh) -> PxBounds3;
5726
5727 /// Returns the local-space Signed Distance Field for this mesh if it has one.
5728 ///
5729 /// local-space SDF.
5730 pub fn PxConvexMesh_getSDF(self_: *const PxConvexMesh) -> *const f32;
5731
5732 pub fn PxConvexMesh_getConcreteTypeName(self_: *const PxConvexMesh) -> *const std::ffi::c_char;
5733
5734 /// This method decides whether a convex mesh is gpu compatible. If the total number of vertices are more than 64 or any number of vertices in a polygon is more than 32, or
5735 /// convex hull data was not cooked with GPU data enabled during cooking or was loaded from a serialized collection, the convex hull is incompatible with GPU collision detection. Otherwise
5736 /// it is compatible.
5737 ///
5738 /// True if the convex hull is gpu compatible
5739 pub fn PxConvexMesh_isGpuCompatible(self_: *const PxConvexMesh) -> bool;
5740
5741 /// Constructor initializes to identity scale.
5742 pub fn PxMeshScale_new() -> PxMeshScale;
5743
5744 /// Constructor from scalar.
5745 pub fn PxMeshScale_new_1(r: f32) -> PxMeshScale;
5746
5747 /// Constructor to initialize to arbitrary scale and identity scale rotation.
5748 pub fn PxMeshScale_new_2(s: *const PxVec3) -> PxMeshScale;
5749
5750 /// Constructor to initialize to arbitrary scaling.
5751 pub fn PxMeshScale_new_3(s: *const PxVec3, r: *const PxQuat) -> PxMeshScale;
5752
5753 /// Returns true if the scaling is an identity transformation.
5754 pub fn PxMeshScale_isIdentity(self_: *const PxMeshScale) -> bool;
5755
5756 /// Returns the inverse of this scaling transformation.
5757 pub fn PxMeshScale_getInverse(self_: *const PxMeshScale) -> PxMeshScale;
5758
5759 /// Converts this transformation to a 3x3 matrix representation.
5760 pub fn PxMeshScale_toMat33(self_: *const PxMeshScale) -> PxMat33;
5761
5762 /// Returns true if combination of negative scale components will cause the triangle normal to flip. The SDK will flip the normals internally.
5763 pub fn PxMeshScale_hasNegativeDeterminant(self_: *const PxMeshScale) -> bool;
5764
5765 pub fn PxMeshScale_transform(self_: *const PxMeshScale, v: *const PxVec3) -> PxVec3;
5766
5767 pub fn PxMeshScale_isValidForTriangleMesh(self_: *const PxMeshScale) -> bool;
5768
5769 pub fn PxMeshScale_isValidForConvexMesh(self_: *const PxMeshScale) -> bool;
5770
5771 /// Constructor. By default creates an empty object with a NULL mesh and identity scale.
5772 pub fn PxConvexMeshGeometry_new(mesh: *mut PxConvexMesh, scaling: *const PxMeshScale, flags: PxConvexMeshGeometryFlags) -> PxConvexMeshGeometry;
5773
5774 /// Returns true if the geometry is valid.
5775 ///
5776 /// True if the current settings are valid for shape creation.
5777 ///
5778 /// A valid convex mesh has a positive scale value in each direction (scale.x > 0, scale.y > 0, scale.z > 0).
5779 /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a convex that has zero extent in any direction.
5780 pub fn PxConvexMeshGeometry_isValid(self_: *const PxConvexMeshGeometry) -> bool;
5781
5782 /// Constructor.
5783 pub fn PxSphereGeometry_new(ir: f32) -> PxSphereGeometry;
5784
5785 /// Returns true if the geometry is valid.
5786 ///
5787 /// True if the current settings are valid
5788 ///
5789 /// A valid sphere has radius > 0.
5790 /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a sphere that has zero radius.
5791 pub fn PxSphereGeometry_isValid(self_: *const PxSphereGeometry) -> bool;
5792
5793 /// Constructor.
5794 pub fn PxPlaneGeometry_new() -> PxPlaneGeometry;
5795
5796 /// Returns true if the geometry is valid.
5797 ///
5798 /// True if the current settings are valid
5799 pub fn PxPlaneGeometry_isValid(self_: *const PxPlaneGeometry) -> bool;
5800
5801 /// Constructor. By default creates an empty object with a NULL mesh and identity scale.
5802 pub fn PxTriangleMeshGeometry_new(mesh: *mut PxTriangleMesh, scaling: *const PxMeshScale, flags: PxMeshGeometryFlags) -> PxTriangleMeshGeometry;
5803
5804 /// Returns true if the geometry is valid.
5805 ///
5806 /// True if the current settings are valid for shape creation.
5807 ///
5808 /// A valid triangle mesh has a positive scale value in each direction (scale.scale.x > 0, scale.scale.y > 0, scale.scale.z > 0).
5809 /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a triangle mesh that has zero extents in any direction.
5810 pub fn PxTriangleMeshGeometry_isValid(self_: *const PxTriangleMeshGeometry) -> bool;
5811
5812 /// Constructor.
5813 pub fn PxHeightFieldGeometry_new(hf: *mut PxHeightField, flags: PxMeshGeometryFlags, heightScale_: f32, rowScale_: f32, columnScale_: f32) -> PxHeightFieldGeometry;
5814
5815 /// Returns true if the geometry is valid.
5816 ///
5817 /// True if the current settings are valid
5818 ///
5819 /// A valid height field has a positive scale value in each direction (heightScale > 0, rowScale > 0, columnScale > 0).
5820 /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a height field that has zero extents in any direction.
5821 pub fn PxHeightFieldGeometry_isValid(self_: *const PxHeightFieldGeometry) -> bool;
5822
5823 /// Default constructor.
5824 ///
5825 /// Creates an empty object with no particles.
5826 pub fn PxParticleSystemGeometry_new() -> PxParticleSystemGeometry;
5827
5828 /// Returns true if the geometry is valid.
5829 ///
5830 /// True if the current settings are valid for shape creation.
5831 pub fn PxParticleSystemGeometry_isValid(self_: *const PxParticleSystemGeometry) -> bool;
5832
5833 /// Default constructor.
5834 pub fn PxHairSystemGeometry_new() -> PxHairSystemGeometry;
5835
5836 /// Returns true if the geometry is valid.
5837 ///
5838 /// True if the current settings are valid for shape creation.
5839 pub fn PxHairSystemGeometry_isValid(self_: *const PxHairSystemGeometry) -> bool;
5840
5841 /// Constructor. By default creates an empty object with a NULL mesh and identity scale.
5842 pub fn PxTetrahedronMeshGeometry_new(mesh: *mut PxTetrahedronMesh) -> PxTetrahedronMeshGeometry;
5843
5844 /// Returns true if the geometry is valid.
5845 ///
5846 /// True if the current settings are valid for shape creation.
5847 ///
5848 /// A valid tetrahedron mesh has a positive scale value in each direction (scale.scale.x > 0, scale.scale.y > 0, scale.scale.z > 0).
5849 /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a tetrahedron mesh that has zero extents in any direction.
5850 pub fn PxTetrahedronMeshGeometry_isValid(self_: *const PxTetrahedronMeshGeometry) -> bool;
5851
5852 pub fn PxQueryHit_new() -> PxQueryHit;
5853
5854 pub fn PxLocationHit_new() -> PxLocationHit;
5855
5856 /// For raycast hits: true for shapes overlapping with raycast origin.
5857 ///
5858 /// For sweep hits: true for shapes overlapping at zero sweep distance.
5859 pub fn PxLocationHit_hadInitialOverlap(self_: *const PxLocationHit) -> bool;
5860
5861 pub fn PxGeomRaycastHit_new() -> PxGeomRaycastHit;
5862
5863 pub fn PxGeomOverlapHit_new() -> PxGeomOverlapHit;
5864
5865 pub fn PxGeomSweepHit_new() -> PxGeomSweepHit;
5866
5867 pub fn PxGeomIndexPair_new() -> PxGeomIndexPair;
5868
5869 pub fn PxGeomIndexPair_new_1(_id0: u32, _id1: u32) -> PxGeomIndexPair;
5870
5871 /// For internal use
5872 pub fn phys_PxCustomGeometry_getUniqueID() -> u32;
5873
5874 /// Default constructor
5875 pub fn PxCustomGeometryType_new() -> PxCustomGeometryType;
5876
5877 /// Invalid type
5878 pub fn PxCustomGeometryType_INVALID() -> PxCustomGeometryType;
5879
5880 /// Return custom type. The type purpose is for user to differentiate custom geometries. Not used by PhysX.
5881 ///
5882 /// Unique ID of a custom geometry type.
5883 ///
5884 /// User should use DECLARE_CUSTOM_GEOMETRY_TYPE and IMPLEMENT_CUSTOM_GEOMETRY_TYPE intead of overwriting this function.
5885 pub fn PxCustomGeometryCallbacks_getCustomType(self_: *const PxCustomGeometryCallbacks) -> PxCustomGeometryType;
5886
5887 /// Return local bounds.
5888 ///
5889 /// Bounding box in the geometry local space.
5890 pub fn PxCustomGeometryCallbacks_getLocalBounds(self_: *const PxCustomGeometryCallbacks, geometry: *const PxGeometry) -> PxBounds3;
5891
5892 /// Raycast. Cast a ray against the geometry in given pose.
5893 ///
5894 /// Number of hits.
5895 pub fn PxCustomGeometryCallbacks_raycast(self_: *const PxCustomGeometryCallbacks, origin: *const PxVec3, unitDir: *const PxVec3, geom: *const PxGeometry, pose: *const PxTransform, maxDist: f32, hitFlags: PxHitFlags, maxHits: u32, rayHits: *mut PxGeomRaycastHit, stride: u32, threadContext: *mut PxQueryThreadContext) -> u32;
5896
5897 /// Overlap. Test if geometries overlap.
5898 ///
5899 /// True if there is overlap. False otherwise.
5900 pub fn PxCustomGeometryCallbacks_overlap(self_: *const PxCustomGeometryCallbacks, geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, threadContext: *mut PxQueryThreadContext) -> bool;
5901
5902 /// Sweep. Sweep one geometry against the other.
5903 ///
5904 /// True if there is hit. False otherwise.
5905 pub fn PxCustomGeometryCallbacks_sweep(self_: *const PxCustomGeometryCallbacks, unitDir: *const PxVec3, maxDist: f32, geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, sweepHit: *mut PxGeomSweepHit, hitFlags: PxHitFlags, inflation: f32, threadContext: *mut PxQueryThreadContext) -> bool;
5906
5907 /// Compute custom geometry mass properties. For geometries usable with dynamic rigidbodies.
5908 pub fn PxCustomGeometryCallbacks_computeMassProperties(self_: *const PxCustomGeometryCallbacks, geometry: *const PxGeometry, massProperties: *mut PxMassProperties);
5909
5910 /// Compatible with PhysX's PCM feature. Allows to optimize contact generation.
5911 pub fn PxCustomGeometryCallbacks_usePersistentContactManifold(self_: *const PxCustomGeometryCallbacks, geometry: *const PxGeometry, breakingThreshold: *mut f32) -> bool;
5912
5913 pub fn PxCustomGeometryCallbacks_delete(self_: *mut PxCustomGeometryCallbacks);
5914
5915 /// Default constructor.
5916 ///
5917 /// Creates an empty object with a NULL callbacks pointer.
5918 pub fn PxCustomGeometry_new() -> PxCustomGeometry;
5919
5920 /// Constructor.
5921 pub fn PxCustomGeometry_new_1(_callbacks: *mut PxCustomGeometryCallbacks) -> PxCustomGeometry;
5922
5923 /// Returns true if the geometry is valid.
5924 ///
5925 /// True if the current settings are valid for shape creation.
5926 pub fn PxCustomGeometry_isValid(self_: *const PxCustomGeometry) -> bool;
5927
5928 /// Returns the custom type of the custom geometry.
5929 pub fn PxCustomGeometry_getCustomType(self_: *const PxCustomGeometry) -> PxCustomGeometryType;
5930
5931 pub fn PxGeometryHolder_getType(self_: *const PxGeometryHolder) -> PxGeometryType;
5932
5933 pub fn PxGeometryHolder_any_mut(self_: *mut PxGeometryHolder) -> *mut PxGeometry;
5934
5935 pub fn PxGeometryHolder_any(self_: *const PxGeometryHolder) -> *const PxGeometry;
5936
5937 pub fn PxGeometryHolder_sphere_mut(self_: *mut PxGeometryHolder) -> *mut PxSphereGeometry;
5938
5939 pub fn PxGeometryHolder_sphere(self_: *const PxGeometryHolder) -> *const PxSphereGeometry;
5940
5941 pub fn PxGeometryHolder_plane_mut(self_: *mut PxGeometryHolder) -> *mut PxPlaneGeometry;
5942
5943 pub fn PxGeometryHolder_plane(self_: *const PxGeometryHolder) -> *const PxPlaneGeometry;
5944
5945 pub fn PxGeometryHolder_capsule_mut(self_: *mut PxGeometryHolder) -> *mut PxCapsuleGeometry;
5946
5947 pub fn PxGeometryHolder_capsule(self_: *const PxGeometryHolder) -> *const PxCapsuleGeometry;
5948
5949 pub fn PxGeometryHolder_box_mut(self_: *mut PxGeometryHolder) -> *mut PxBoxGeometry;
5950
5951 pub fn PxGeometryHolder_box(self_: *const PxGeometryHolder) -> *const PxBoxGeometry;
5952
5953 pub fn PxGeometryHolder_convexMesh_mut(self_: *mut PxGeometryHolder) -> *mut PxConvexMeshGeometry;
5954
5955 pub fn PxGeometryHolder_convexMesh(self_: *const PxGeometryHolder) -> *const PxConvexMeshGeometry;
5956
5957 pub fn PxGeometryHolder_tetMesh_mut(self_: *mut PxGeometryHolder) -> *mut PxTetrahedronMeshGeometry;
5958
5959 pub fn PxGeometryHolder_tetMesh(self_: *const PxGeometryHolder) -> *const PxTetrahedronMeshGeometry;
5960
5961 pub fn PxGeometryHolder_triangleMesh_mut(self_: *mut PxGeometryHolder) -> *mut PxTriangleMeshGeometry;
5962
5963 pub fn PxGeometryHolder_triangleMesh(self_: *const PxGeometryHolder) -> *const PxTriangleMeshGeometry;
5964
5965 pub fn PxGeometryHolder_heightField_mut(self_: *mut PxGeometryHolder) -> *mut PxHeightFieldGeometry;
5966
5967 pub fn PxGeometryHolder_heightField(self_: *const PxGeometryHolder) -> *const PxHeightFieldGeometry;
5968
5969 pub fn PxGeometryHolder_particleSystem_mut(self_: *mut PxGeometryHolder) -> *mut PxParticleSystemGeometry;
5970
5971 pub fn PxGeometryHolder_particleSystem(self_: *const PxGeometryHolder) -> *const PxParticleSystemGeometry;
5972
5973 pub fn PxGeometryHolder_hairSystem_mut(self_: *mut PxGeometryHolder) -> *mut PxHairSystemGeometry;
5974
5975 pub fn PxGeometryHolder_hairSystem(self_: *const PxGeometryHolder) -> *const PxHairSystemGeometry;
5976
5977 pub fn PxGeometryHolder_custom_mut(self_: *mut PxGeometryHolder) -> *mut PxCustomGeometry;
5978
5979 pub fn PxGeometryHolder_custom(self_: *const PxGeometryHolder) -> *const PxCustomGeometry;
5980
5981 pub fn PxGeometryHolder_storeAny_mut(self_: *mut PxGeometryHolder, geometry: *const PxGeometry);
5982
5983 pub fn PxGeometryHolder_new() -> PxGeometryHolder;
5984
5985 pub fn PxGeometryHolder_new_1(geometry: *const PxGeometry) -> PxGeometryHolder;
5986
5987 /// Raycast test against a geometry object.
5988 ///
5989 /// All geometry types are supported except PxParticleSystemGeometry, PxTetrahedronMeshGeometry and PxHairSystemGeometry.
5990 ///
5991 /// Number of hits between the ray and the geometry object
5992 pub fn PxGeometryQuery_raycast(origin: *const PxVec3, unitDir: *const PxVec3, geom: *const PxGeometry, pose: *const PxTransform, maxDist: f32, hitFlags: PxHitFlags, maxHits: u32, rayHits: *mut PxGeomRaycastHit, stride: u32, queryFlags: PxGeometryQueryFlags, threadContext: *mut PxQueryThreadContext) -> u32;
5993
5994 /// Overlap test for two geometry objects.
5995 ///
5996 /// All combinations are supported except:
5997 ///
5998 /// PxPlaneGeometry vs. {PxPlaneGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
5999 ///
6000 /// PxTriangleMeshGeometry vs. PxHeightFieldGeometry
6001 ///
6002 /// PxHeightFieldGeometry vs. PxHeightFieldGeometry
6003 ///
6004 /// Anything involving PxParticleSystemGeometry, PxTetrahedronMeshGeometry or PxHairSystemGeometry.
6005 ///
6006 /// True if the two geometry objects overlap
6007 pub fn PxGeometryQuery_overlap(geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, queryFlags: PxGeometryQueryFlags, threadContext: *mut PxQueryThreadContext) -> bool;
6008
6009 /// Sweep a specified geometry object in space and test for collision with a given object.
6010 ///
6011 /// The following combinations are supported.
6012 ///
6013 /// PxSphereGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
6014 ///
6015 /// PxCapsuleGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
6016 ///
6017 /// PxBoxGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
6018 ///
6019 /// PxConvexMeshGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
6020 ///
6021 /// True if the swept geometry object geom0 hits the object geom1
6022 pub fn PxGeometryQuery_sweep(unitDir: *const PxVec3, maxDist: f32, geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, sweepHit: *mut PxGeomSweepHit, hitFlags: PxHitFlags, inflation: f32, queryFlags: PxGeometryQueryFlags, threadContext: *mut PxQueryThreadContext) -> bool;
6023
6024 /// Compute minimum translational distance (MTD) between two geometry objects.
6025 ///
6026 /// All combinations of geom objects are supported except:
6027 /// - plane/plane
6028 /// - plane/mesh
6029 /// - plane/heightfield
6030 /// - mesh/mesh
6031 /// - mesh/heightfield
6032 /// - heightfield/heightfield
6033 /// - anything involving PxParticleSystemGeometry, PxTetrahedronMeshGeometry or PxHairSystemGeometry
6034 ///
6035 /// The function returns a unit vector ('direction') and a penetration depth ('depth').
6036 ///
6037 /// The depenetration vector D = direction * depth should be applied to the first object, to
6038 /// get out of the second object.
6039 ///
6040 /// Returned depth should always be positive or null.
6041 ///
6042 /// If objects do not overlap, the function can not compute the MTD and returns false.
6043 ///
6044 /// True if the MTD has successfully been computed, i.e. if objects do overlap.
6045 pub fn PxGeometryQuery_computePenetration(direction: *mut PxVec3, depth: *mut f32, geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, queryFlags: PxGeometryQueryFlags) -> bool;
6046
6047 /// Computes distance between a point and a geometry object.
6048 ///
6049 /// Currently supported geometry objects: box, sphere, capsule, convex, mesh.
6050 ///
6051 /// For meshes, only the BVH34 midphase data-structure is supported.
6052 ///
6053 /// Square distance between the point and the geom object, or 0.0 if the point is inside the object, or -1.0 if an error occured (geometry type is not supported, or invalid pose)
6054 pub fn PxGeometryQuery_pointDistance(point: *const PxVec3, geom: *const PxGeometry, pose: *const PxTransform, closestPoint: *mut PxVec3, closestIndex: *mut u32, queryFlags: PxGeometryQueryFlags) -> f32;
6055
6056 /// computes the bounds for a geometry object
6057 pub fn PxGeometryQuery_computeGeomBounds(bounds: *mut PxBounds3, geom: *const PxGeometry, pose: *const PxTransform, offset: f32, inflation: f32, queryFlags: PxGeometryQueryFlags);
6058
6059 /// Checks if provided geometry is valid.
6060 ///
6061 /// True if geometry is valid.
6062 pub fn PxGeometryQuery_isValid(geom: *const PxGeometry) -> bool;
6063
6064 pub fn PxHeightFieldSample_tessFlag(self_: *const PxHeightFieldSample) -> u8;
6065
6066 pub fn PxHeightFieldSample_setTessFlag_mut(self_: *mut PxHeightFieldSample);
6067
6068 pub fn PxHeightFieldSample_clearTessFlag_mut(self_: *mut PxHeightFieldSample);
6069
6070 /// Decrements the reference count of a height field and releases it if the new reference count is zero.
6071 pub fn PxHeightField_release_mut(self_: *mut PxHeightField);
6072
6073 /// Writes out the sample data array.
6074 ///
6075 /// The user provides destBufferSize bytes storage at destBuffer.
6076 /// The data is formatted and arranged as PxHeightFieldDesc.samples.
6077 ///
6078 /// The number of bytes written.
6079 pub fn PxHeightField_saveCells(self_: *const PxHeightField, destBuffer: *mut std::ffi::c_void, destBufferSize: u32) -> u32;
6080
6081 /// Replaces a rectangular subfield in the sample data array.
6082 ///
6083 /// The user provides the description of a rectangular subfield in subfieldDesc.
6084 /// The data is formatted and arranged as PxHeightFieldDesc.samples.
6085 ///
6086 /// True on success, false on failure. Failure can occur due to format mismatch.
6087 ///
6088 /// Modified samples are constrained to the same height quantization range as the original heightfield.
6089 /// Source samples that are out of range of target heightfield will be clipped with no error.
6090 /// PhysX does not keep a mapping from the heightfield to heightfield shapes that reference it.
6091 /// Call PxShape::setGeometry on each shape which references the height field, to ensure that internal data structures are updated to reflect the new geometry.
6092 /// Please note that PxShape::setGeometry does not guarantee correct/continuous behavior when objects are resting on top of old or new geometry.
6093 pub fn PxHeightField_modifySamples_mut(self_: *mut PxHeightField, startCol: i32, startRow: i32, subfieldDesc: *const PxHeightFieldDesc, shrinkBounds: bool) -> bool;
6094
6095 /// Retrieves the number of sample rows in the samples array.
6096 ///
6097 /// The number of sample rows in the samples array.
6098 pub fn PxHeightField_getNbRows(self_: *const PxHeightField) -> u32;
6099
6100 /// Retrieves the number of sample columns in the samples array.
6101 ///
6102 /// The number of sample columns in the samples array.
6103 pub fn PxHeightField_getNbColumns(self_: *const PxHeightField) -> u32;
6104
6105 /// Retrieves the format of the sample data.
6106 ///
6107 /// The format of the sample data.
6108 pub fn PxHeightField_getFormat(self_: *const PxHeightField) -> PxHeightFieldFormat;
6109
6110 /// Retrieves the offset in bytes between consecutive samples in the array.
6111 ///
6112 /// The offset in bytes between consecutive samples in the array.
6113 pub fn PxHeightField_getSampleStride(self_: *const PxHeightField) -> u32;
6114
6115 /// Retrieves the convex edge threshold.
6116 ///
6117 /// The convex edge threshold.
6118 pub fn PxHeightField_getConvexEdgeThreshold(self_: *const PxHeightField) -> f32;
6119
6120 /// Retrieves the flags bits, combined from values of the enum ::PxHeightFieldFlag.
6121 ///
6122 /// The flags bits, combined from values of the enum ::PxHeightFieldFlag.
6123 pub fn PxHeightField_getFlags(self_: *const PxHeightField) -> PxHeightFieldFlags;
6124
6125 /// Retrieves the height at the given coordinates in grid space.
6126 ///
6127 /// The height at the given coordinates or 0 if the coordinates are out of range.
6128 pub fn PxHeightField_getHeight(self_: *const PxHeightField, x: f32, z: f32) -> f32;
6129
6130 /// Returns material table index of given triangle
6131 ///
6132 /// This function takes a post cooking triangle index.
6133 ///
6134 /// Material table index, or 0xffff if no per-triangle materials are used
6135 pub fn PxHeightField_getTriangleMaterialIndex(self_: *const PxHeightField, triangleIndex: u32) -> u16;
6136
6137 /// Returns a triangle face normal for a given triangle index
6138 ///
6139 /// This function takes a post cooking triangle index.
6140 ///
6141 /// Triangle normal for a given triangle index
6142 pub fn PxHeightField_getTriangleNormal(self_: *const PxHeightField, triangleIndex: u32) -> PxVec3;
6143
6144 /// Returns heightfield sample of given row and column
6145 ///
6146 /// Heightfield sample
6147 pub fn PxHeightField_getSample(self_: *const PxHeightField, row: u32, column: u32) -> *const PxHeightFieldSample;
6148
6149 /// Returns the number of times the heightfield data has been modified
6150 ///
6151 /// This method returns the number of times modifySamples has been called on this heightfield, so that code that has
6152 /// retained state that depends on the heightfield can efficiently determine whether it has been modified.
6153 ///
6154 /// the number of times the heightfield sample data has been modified.
6155 pub fn PxHeightField_getTimestamp(self_: *const PxHeightField) -> u32;
6156
6157 pub fn PxHeightField_getConcreteTypeName(self_: *const PxHeightField) -> *const std::ffi::c_char;
6158
6159 /// Constructor sets to default.
6160 pub fn PxHeightFieldDesc_new() -> PxHeightFieldDesc;
6161
6162 /// (re)sets the structure to the default.
6163 pub fn PxHeightFieldDesc_setToDefault_mut(self_: *mut PxHeightFieldDesc);
6164
6165 /// Returns true if the descriptor is valid.
6166 ///
6167 /// True if the current settings are valid.
6168 pub fn PxHeightFieldDesc_isValid(self_: *const PxHeightFieldDesc) -> bool;
6169
6170 /// Retrieves triangle data from a triangle ID.
6171 ///
6172 /// This function can be used together with [`findOverlapTriangleMesh`]() to retrieve triangle properties.
6173 ///
6174 /// This function will flip the triangle normal whenever triGeom.scale.hasNegativeDeterminant() is true.
6175 pub fn PxMeshQuery_getTriangle(triGeom: *const PxTriangleMeshGeometry, transform: *const PxTransform, triangleIndex: u32, triangle: *mut PxTriangle, vertexIndices: *mut u32, adjacencyIndices: *mut u32);
6176
6177 /// Retrieves triangle data from a triangle ID.
6178 ///
6179 /// This function can be used together with [`findOverlapHeightField`]() to retrieve triangle properties.
6180 ///
6181 /// This function will flip the triangle normal whenever triGeom.scale.hasNegativeDeterminant() is true.
6182 ///
6183 /// TriangleIndex is an index used in internal format, which does have an index out of the bounds in last row.
6184 /// To traverse all tri indices in the HF, the following code can be applied:
6185 /// for (PxU32 row = 0; row
6186 /// <
6187 /// (nbRows - 1); row++)
6188 /// {
6189 /// for (PxU32 col = 0; col
6190 /// <
6191 /// (nbCols - 1); col++)
6192 /// {
6193 /// for (PxU32 k = 0; k
6194 /// <
6195 /// 2; k++)
6196 /// {
6197 /// const PxU32 triIndex = 2 * (row*nbCols + col) + k;
6198 /// ....
6199 /// }
6200 /// }
6201 /// }
6202 pub fn PxMeshQuery_getTriangle_1(hfGeom: *const PxHeightFieldGeometry, transform: *const PxTransform, triangleIndex: u32, triangle: *mut PxTriangle, vertexIndices: *mut u32, adjacencyIndices: *mut u32);
6203
6204 /// Find the mesh triangles which touch the specified geometry object.
6205 ///
6206 /// For mesh-vs-mesh overlap tests, please use the specialized function below.
6207 ///
6208 /// Returned triangle indices can be used with [`getTriangle`]() to retrieve the triangle properties.
6209 ///
6210 /// Number of overlaps found, i.e. number of elements written to the results buffer
6211 pub fn PxMeshQuery_findOverlapTriangleMesh(geom: *const PxGeometry, geomPose: *const PxTransform, meshGeom: *const PxTriangleMeshGeometry, meshPose: *const PxTransform, results: *mut u32, maxResults: u32, startIndex: u32, overflow: *mut bool, queryFlags: PxGeometryQueryFlags) -> u32;
6212
6213 /// Find the height field triangles which touch the specified geometry object.
6214 ///
6215 /// Returned triangle indices can be used with [`getTriangle`]() to retrieve the triangle properties.
6216 ///
6217 /// Number of overlaps found, i.e. number of elements written to the results buffer
6218 pub fn PxMeshQuery_findOverlapHeightField(geom: *const PxGeometry, geomPose: *const PxTransform, hfGeom: *const PxHeightFieldGeometry, hfPose: *const PxTransform, results: *mut u32, maxResults: u32, startIndex: u32, overflow: *mut bool, queryFlags: PxGeometryQueryFlags) -> u32;
6219
6220 /// Sweep a specified geometry object in space and test for collision with a set of given triangles.
6221 ///
6222 /// This function simply sweeps input geometry against each input triangle, in the order they are given.
6223 /// This is an O(N) operation with N = number of input triangles. It does not use any particular acceleration structure.
6224 ///
6225 /// True if the swept geometry object hits the specified triangles
6226 ///
6227 /// Only the following geometry types are currently supported: PxSphereGeometry, PxCapsuleGeometry, PxBoxGeometry
6228 ///
6229 /// If a shape from the scene is already overlapping with the query shape in its starting position, the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified.
6230 ///
6231 /// This function returns a single closest hit across all the input triangles. Multiple hits are not supported.
6232 ///
6233 /// Supported hitFlags are PxHitFlag::eDEFAULT, PxHitFlag::eASSUME_NO_INITIAL_OVERLAP, PxHitFlag::ePRECISE_SWEEP, PxHitFlag::eMESH_BOTH_SIDES, PxHitFlag::eMESH_ANY.
6234 ///
6235 /// ePOSITION is only defined when there is no initial overlap (sweepHit.hadInitialOverlap() == false)
6236 ///
6237 /// The returned normal for initially overlapping sweeps is set to -unitDir.
6238 ///
6239 /// Otherwise the returned normal is the front normal of the triangle even if PxHitFlag::eMESH_BOTH_SIDES is set.
6240 ///
6241 /// The returned PxGeomSweepHit::faceIndex parameter will hold the index of the hit triangle in input array, i.e. the range is [0; triangleCount). For initially overlapping sweeps, this is the index of overlapping triangle.
6242 ///
6243 /// The inflation parameter is not compatible with PxHitFlag::ePRECISE_SWEEP.
6244 pub fn PxMeshQuery_sweep(unitDir: *const PxVec3, distance: f32, geom: *const PxGeometry, pose: *const PxTransform, triangleCount: u32, triangles: *const PxTriangle, sweepHit: *mut PxGeomSweepHit, hitFlags: PxHitFlags, cachedIndex: *const u32, inflation: f32, doubleSided: bool, queryFlags: PxGeometryQueryFlags) -> bool;
6245
6246 /// constructor sets to default.
6247 pub fn PxSimpleTriangleMesh_new() -> PxSimpleTriangleMesh;
6248
6249 /// (re)sets the structure to the default.
6250 pub fn PxSimpleTriangleMesh_setToDefault_mut(self_: *mut PxSimpleTriangleMesh);
6251
6252 /// returns true if the current settings are valid
6253 pub fn PxSimpleTriangleMesh_isValid(self_: *const PxSimpleTriangleMesh) -> bool;
6254
6255 /// Constructor
6256 pub fn PxTriangle_new_alloc() -> *mut PxTriangle;
6257
6258 /// Constructor
6259 pub fn PxTriangle_new_alloc_1(p0: *const PxVec3, p1: *const PxVec3, p2: *const PxVec3) -> *mut PxTriangle;
6260
6261 /// Destructor
6262 pub fn PxTriangle_delete(self_: *mut PxTriangle);
6263
6264 /// Compute the normal of the Triangle.
6265 pub fn PxTriangle_normal(self_: *const PxTriangle, _normal: *mut PxVec3);
6266
6267 /// Compute the unnormalized normal of the triangle.
6268 pub fn PxTriangle_denormalizedNormal(self_: *const PxTriangle, _normal: *mut PxVec3);
6269
6270 /// Compute the area of the triangle.
6271 ///
6272 /// Area of the triangle.
6273 pub fn PxTriangle_area(self_: *const PxTriangle) -> f32;
6274
6275 /// Computes a point on the triangle from u and v barycentric coordinates.
6276 pub fn PxTriangle_pointFromUV(self_: *const PxTriangle, u: f32, v: f32) -> PxVec3;
6277
6278 pub fn PxTrianglePadded_new_alloc() -> *mut PxTrianglePadded;
6279
6280 pub fn PxTrianglePadded_delete(self_: *mut PxTrianglePadded);
6281
6282 /// Returns the number of vertices.
6283 ///
6284 /// number of vertices
6285 pub fn PxTriangleMesh_getNbVertices(self_: *const PxTriangleMesh) -> u32;
6286
6287 /// Returns the vertices.
6288 ///
6289 /// array of vertices
6290 pub fn PxTriangleMesh_getVertices(self_: *const PxTriangleMesh) -> *const PxVec3;
6291
6292 /// Returns all mesh vertices for modification.
6293 ///
6294 /// This function will return the vertices of the mesh so that their positions can be changed in place.
6295 /// After modifying the vertices you must call refitBVH for the refitting to actually take place.
6296 /// This function maintains the old mesh topology (triangle indices).
6297 ///
6298 /// inplace vertex coordinates for each existing mesh vertex.
6299 ///
6300 /// It is recommended to use this feature for scene queries only.
6301 ///
6302 /// Size of array returned is equal to the number returned by getNbVertices().
6303 ///
6304 /// This function operates on cooked vertex indices.
6305 ///
6306 /// This means the index mapping and vertex count can be different from what was provided as an input to the cooking routine.
6307 ///
6308 /// To achieve unchanged 1-to-1 index mapping with orignal mesh data (before cooking) please use the following cooking flags:
6309 ///
6310 /// eWELD_VERTICES = 0, eDISABLE_CLEAN_MESH = 1.
6311 ///
6312 /// It is also recommended to make sure that a call to validateTriangleMesh returns true if mesh cleaning is disabled.
6313 pub fn PxTriangleMesh_getVerticesForModification_mut(self_: *mut PxTriangleMesh) -> *mut PxVec3;
6314
6315 /// Refits BVH for mesh vertices.
6316 ///
6317 /// This function will refit the mesh BVH to correctly enclose the new positions updated by getVerticesForModification.
6318 /// Mesh BVH will not be reoptimized by this function so significantly different new positions will cause significantly reduced performance.
6319 ///
6320 /// New bounds for the entire mesh.
6321 ///
6322 /// For PxMeshMidPhase::eBVH34 trees the refit operation is only available on non-quantized trees (see PxBVH34MidphaseDesc::quantized)
6323 ///
6324 /// PhysX does not keep a mapping from the mesh to mesh shapes that reference it.
6325 ///
6326 /// Call PxShape::setGeometry on each shape which references the mesh, to ensure that internal data structures are updated to reflect the new geometry.
6327 ///
6328 /// PxShape::setGeometry does not guarantee correct/continuous behavior when objects are resting on top of old or new geometry.
6329 ///
6330 /// It is also recommended to make sure that a call to validateTriangleMesh returns true if mesh cleaning is disabled.
6331 ///
6332 /// Active edges information will be lost during refit, the rigid body mesh contact generation might not perform as expected.
6333 pub fn PxTriangleMesh_refitBVH_mut(self_: *mut PxTriangleMesh) -> PxBounds3;
6334
6335 /// Returns the number of triangles.
6336 ///
6337 /// number of triangles
6338 pub fn PxTriangleMesh_getNbTriangles(self_: *const PxTriangleMesh) -> u32;
6339
6340 /// Returns the triangle indices.
6341 ///
6342 /// The indices can be 16 or 32bit depending on the number of triangles in the mesh.
6343 /// Call getTriangleMeshFlags() to know if the indices are 16 or 32 bits.
6344 ///
6345 /// The number of indices is the number of triangles * 3.
6346 ///
6347 /// array of triangles
6348 pub fn PxTriangleMesh_getTriangles(self_: *const PxTriangleMesh) -> *const std::ffi::c_void;
6349
6350 /// Reads the PxTriangleMesh flags.
6351 ///
6352 /// See the list of flags [`PxTriangleMeshFlag`]
6353 ///
6354 /// The values of the PxTriangleMesh flags.
6355 pub fn PxTriangleMesh_getTriangleMeshFlags(self_: *const PxTriangleMesh) -> PxTriangleMeshFlags;
6356
6357 /// Returns the triangle remapping table.
6358 ///
6359 /// The triangles are internally sorted according to various criteria. Hence the internal triangle order
6360 /// does not always match the original (user-defined) order. The remapping table helps finding the old
6361 /// indices knowing the new ones:
6362 ///
6363 /// remapTable[ internalTriangleIndex ] = originalTriangleIndex
6364 ///
6365 /// the remapping table (or NULL if 'PxCookingParams::suppressTriangleMeshRemapTable' has been used)
6366 pub fn PxTriangleMesh_getTrianglesRemap(self_: *const PxTriangleMesh) -> *const u32;
6367
6368 /// Decrements the reference count of a triangle mesh and releases it if the new reference count is zero.
6369 pub fn PxTriangleMesh_release_mut(self_: *mut PxTriangleMesh);
6370
6371 /// Returns material table index of given triangle
6372 ///
6373 /// This function takes a post cooking triangle index.
6374 ///
6375 /// Material table index, or 0xffff if no per-triangle materials are used
6376 pub fn PxTriangleMesh_getTriangleMaterialIndex(self_: *const PxTriangleMesh, triangleIndex: u32) -> u16;
6377
6378 /// Returns the local-space (vertex space) AABB from the triangle mesh.
6379 ///
6380 /// local-space bounds
6381 pub fn PxTriangleMesh_getLocalBounds(self_: *const PxTriangleMesh) -> PxBounds3;
6382
6383 /// Returns the local-space Signed Distance Field for this mesh if it has one.
6384 ///
6385 /// local-space SDF.
6386 pub fn PxTriangleMesh_getSDF(self_: *const PxTriangleMesh) -> *const f32;
6387
6388 /// Returns the resolution of the local-space dense SDF.
6389 pub fn PxTriangleMesh_getSDFDimensions(self_: *const PxTriangleMesh, numX: *mut u32, numY: *mut u32, numZ: *mut u32);
6390
6391 /// Sets whether this mesh should be preferred for SDF projection.
6392 ///
6393 /// By default, meshes are flagged as preferring projection and the decisions on which mesh to project is based on the triangle and vertex
6394 /// count. The model with the fewer triangles is projected onto the SDF of the more detailed mesh.
6395 /// If one of the meshes is set to prefer SDF projection (default) and the other is set to not prefer SDF projection, model flagged as
6396 /// preferring SDF projection will be projected onto the model flagged as not preferring, regardless of the detail of the respective meshes.
6397 /// Where both models are flagged as preferring no projection, the less detailed model will be projected as before.
6398 pub fn PxTriangleMesh_setPreferSDFProjection_mut(self_: *mut PxTriangleMesh, preferProjection: bool);
6399
6400 /// Returns whether this mesh prefers SDF projection.
6401 ///
6402 /// whether this mesh prefers SDF projection.
6403 pub fn PxTriangleMesh_getPreferSDFProjection(self_: *const PxTriangleMesh) -> bool;
6404
6405 /// Returns the mass properties of the mesh assuming unit density.
6406 ///
6407 /// The following relationship holds between mass and volume:
6408 ///
6409 /// mass = volume * density
6410 ///
6411 /// The mass of a unit density mesh is equal to its volume, so this function returns the volume of the mesh.
6412 ///
6413 /// Similarly, to obtain the localInertia of an identically shaped object with a uniform density of d, simply multiply the
6414 /// localInertia of the unit density mesh by d.
6415 pub fn PxTriangleMesh_getMassInformation(self_: *const PxTriangleMesh, mass: *mut f32, localInertia: *mut PxMat33, localCenterOfMass: *mut PxVec3);
6416
6417 /// Constructor
6418 pub fn PxTetrahedron_new_alloc() -> *mut PxTetrahedron;
6419
6420 /// Constructor
6421 pub fn PxTetrahedron_new_alloc_1(p0: *const PxVec3, p1: *const PxVec3, p2: *const PxVec3, p3: *const PxVec3) -> *mut PxTetrahedron;
6422
6423 /// Destructor
6424 pub fn PxTetrahedron_delete(self_: *mut PxTetrahedron);
6425
6426 /// Decrements the reference count of a tetrahedron mesh and releases it if the new reference count is zero.
6427 pub fn PxSoftBodyAuxData_release_mut(self_: *mut PxSoftBodyAuxData);
6428
6429 /// Returns the number of vertices.
6430 ///
6431 /// number of vertices
6432 pub fn PxTetrahedronMesh_getNbVertices(self_: *const PxTetrahedronMesh) -> u32;
6433
6434 /// Returns the vertices
6435 ///
6436 /// array of vertices
6437 pub fn PxTetrahedronMesh_getVertices(self_: *const PxTetrahedronMesh) -> *const PxVec3;
6438
6439 /// Returns the number of tetrahedrons.
6440 ///
6441 /// number of tetrahedrons
6442 pub fn PxTetrahedronMesh_getNbTetrahedrons(self_: *const PxTetrahedronMesh) -> u32;
6443
6444 /// Returns the tetrahedron indices.
6445 ///
6446 /// The indices can be 16 or 32bit depending on the number of tetrahedrons in the mesh.
6447 /// Call getTetrahedronMeshFlags() to know if the indices are 16 or 32 bits.
6448 ///
6449 /// The number of indices is the number of tetrahedrons * 4.
6450 ///
6451 /// array of tetrahedrons
6452 pub fn PxTetrahedronMesh_getTetrahedrons(self_: *const PxTetrahedronMesh) -> *const std::ffi::c_void;
6453
6454 /// Reads the PxTetrahedronMesh flags.
6455 ///
6456 /// See the list of flags [`PxTetrahedronMeshFlags`]
6457 ///
6458 /// The values of the PxTetrahedronMesh flags.
6459 pub fn PxTetrahedronMesh_getTetrahedronMeshFlags(self_: *const PxTetrahedronMesh) -> PxTetrahedronMeshFlags;
6460
6461 /// Returns the tetrahedra remapping table.
6462 ///
6463 /// The tetrahedra are internally sorted according to various criteria. Hence the internal tetrahedron order
6464 /// does not always match the original (user-defined) order. The remapping table helps finding the old
6465 /// indices knowing the new ones:
6466 ///
6467 /// remapTable[ internalTetrahedronIndex ] = originalTetrahedronIndex
6468 ///
6469 /// the remapping table (or NULL if 'PxCookingParams::suppressTriangleMeshRemapTable' has been used)
6470 pub fn PxTetrahedronMesh_getTetrahedraRemap(self_: *const PxTetrahedronMesh) -> *const u32;
6471
6472 /// Returns the local-space (vertex space) AABB from the tetrahedron mesh.
6473 ///
6474 /// local-space bounds
6475 pub fn PxTetrahedronMesh_getLocalBounds(self_: *const PxTetrahedronMesh) -> PxBounds3;
6476
6477 /// Decrements the reference count of a tetrahedron mesh and releases it if the new reference count is zero.
6478 pub fn PxTetrahedronMesh_release_mut(self_: *mut PxTetrahedronMesh);
6479
6480 /// Const accecssor to the softbody's collision mesh.
6481 pub fn PxSoftBodyMesh_getCollisionMesh(self_: *const PxSoftBodyMesh) -> *const PxTetrahedronMesh;
6482
6483 /// Accecssor to the softbody's collision mesh.
6484 pub fn PxSoftBodyMesh_getCollisionMesh_mut(self_: *mut PxSoftBodyMesh) -> *mut PxTetrahedronMesh;
6485
6486 /// Const accessor to the softbody's simulation mesh.
6487 pub fn PxSoftBodyMesh_getSimulationMesh(self_: *const PxSoftBodyMesh) -> *const PxTetrahedronMesh;
6488
6489 /// Accecssor to the softbody's simulation mesh.
6490 pub fn PxSoftBodyMesh_getSimulationMesh_mut(self_: *mut PxSoftBodyMesh) -> *mut PxTetrahedronMesh;
6491
6492 /// Const accessor to the softbodies simulation state.
6493 pub fn PxSoftBodyMesh_getSoftBodyAuxData(self_: *const PxSoftBodyMesh) -> *const PxSoftBodyAuxData;
6494
6495 /// Accessor to the softbody's auxilary data like mass and rest pose information
6496 pub fn PxSoftBodyMesh_getSoftBodyAuxData_mut(self_: *mut PxSoftBodyMesh) -> *mut PxSoftBodyAuxData;
6497
6498 /// Decrements the reference count of a tetrahedron mesh and releases it if the new reference count is zero.
6499 pub fn PxSoftBodyMesh_release_mut(self_: *mut PxSoftBodyMesh);
6500
6501 pub fn PxCollisionMeshMappingData_release_mut(self_: *mut PxCollisionMeshMappingData);
6502
6503 pub fn PxCollisionTetrahedronMeshData_getMesh(self_: *const PxCollisionTetrahedronMeshData) -> *const PxTetrahedronMeshData;
6504
6505 pub fn PxCollisionTetrahedronMeshData_getMesh_mut(self_: *mut PxCollisionTetrahedronMeshData) -> *mut PxTetrahedronMeshData;
6506
6507 pub fn PxCollisionTetrahedronMeshData_getData(self_: *const PxCollisionTetrahedronMeshData) -> *const PxSoftBodyCollisionData;
6508
6509 pub fn PxCollisionTetrahedronMeshData_getData_mut(self_: *mut PxCollisionTetrahedronMeshData) -> *mut PxSoftBodyCollisionData;
6510
6511 pub fn PxCollisionTetrahedronMeshData_release_mut(self_: *mut PxCollisionTetrahedronMeshData);
6512
6513 pub fn PxSimulationTetrahedronMeshData_getMesh_mut(self_: *mut PxSimulationTetrahedronMeshData) -> *mut PxTetrahedronMeshData;
6514
6515 pub fn PxSimulationTetrahedronMeshData_getData_mut(self_: *mut PxSimulationTetrahedronMeshData) -> *mut PxSoftBodySimulationData;
6516
6517 pub fn PxSimulationTetrahedronMeshData_release_mut(self_: *mut PxSimulationTetrahedronMeshData);
6518
6519 /// Deletes the actor.
6520 ///
6521 /// Do not keep a reference to the deleted instance.
6522 ///
6523 /// If the actor belongs to a [`PxAggregate`] object, it is automatically removed from the aggregate.
6524 pub fn PxActor_release_mut(self_: *mut PxActor);
6525
6526 /// Retrieves the type of actor.
6527 ///
6528 /// The actor type of the actor.
6529 pub fn PxActor_getType(self_: *const PxActor) -> PxActorType;
6530
6531 /// Retrieves the scene which this actor belongs to.
6532 ///
6533 /// Owner Scene. NULL if not part of a scene.
6534 pub fn PxActor_getScene(self_: *const PxActor) -> *mut PxScene;
6535
6536 /// Sets a name string for the object that can be retrieved with getName().
6537 ///
6538 /// This is for debugging and is not used by the SDK. The string is not copied by the SDK,
6539 /// only the pointer is stored.
6540 ///
6541 /// Default:
6542 /// NULL
6543 pub fn PxActor_setName_mut(self_: *mut PxActor, name: *const std::ffi::c_char);
6544
6545 /// Retrieves the name string set with setName().
6546 ///
6547 /// Name string associated with object.
6548 pub fn PxActor_getName(self_: *const PxActor) -> *const std::ffi::c_char;
6549
6550 /// Retrieves the axis aligned bounding box enclosing the actor.
6551 ///
6552 /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
6553 /// in PxContactModifyCallback or in contact report callbacks).
6554 ///
6555 /// The actor's bounding box.
6556 pub fn PxActor_getWorldBounds(self_: *const PxActor, inflation: f32) -> PxBounds3;
6557
6558 /// Raises or clears a particular actor flag.
6559 ///
6560 /// See the list of flags [`PxActorFlag`]
6561 ///
6562 /// Sleeping:
6563 /// Does
6564 /// NOT
6565 /// wake the actor up automatically.
6566 pub fn PxActor_setActorFlag_mut(self_: *mut PxActor, flag: PxActorFlag, value: bool);
6567
6568 /// Sets the actor flags.
6569 ///
6570 /// See the list of flags [`PxActorFlag`]
6571 pub fn PxActor_setActorFlags_mut(self_: *mut PxActor, inFlags: PxActorFlags);
6572
6573 /// Reads the PxActor flags.
6574 ///
6575 /// See the list of flags [`PxActorFlag`]
6576 ///
6577 /// The values of the PxActor flags.
6578 pub fn PxActor_getActorFlags(self_: *const PxActor) -> PxActorFlags;
6579
6580 /// Assigns dynamic actors a dominance group identifier.
6581 ///
6582 /// PxDominanceGroup is a 5 bit group identifier (legal range from 0 to 31).
6583 ///
6584 /// The PxScene::setDominanceGroupPair() lets you set certain behaviors for pairs of dominance groups.
6585 /// By default every dynamic actor is created in group 0.
6586 ///
6587 /// Default:
6588 /// 0
6589 ///
6590 /// Sleeping:
6591 /// Changing the dominance group does
6592 /// NOT
6593 /// wake the actor up automatically.
6594 pub fn PxActor_setDominanceGroup_mut(self_: *mut PxActor, dominanceGroup: u8);
6595
6596 /// Retrieves the value set with setDominanceGroup().
6597 ///
6598 /// The dominance group of this actor.
6599 pub fn PxActor_getDominanceGroup(self_: *const PxActor) -> u8;
6600
6601 /// Sets the owner client of an actor.
6602 ///
6603 /// This cannot be done once the actor has been placed into a scene.
6604 ///
6605 /// Default:
6606 /// PX_DEFAULT_CLIENT
6607 pub fn PxActor_setOwnerClient_mut(self_: *mut PxActor, inClient: u8);
6608
6609 /// Returns the owner client that was specified at creation time.
6610 ///
6611 /// This value cannot be changed once the object is placed into the scene.
6612 pub fn PxActor_getOwnerClient(self_: *const PxActor) -> u8;
6613
6614 /// Retrieves the aggregate the actor might be a part of.
6615 ///
6616 /// The aggregate the actor is a part of, or NULL if the actor does not belong to an aggregate.
6617 pub fn PxActor_getAggregate(self_: *const PxActor) -> *mut PxAggregate;
6618
6619 pub fn phys_PxGetAggregateFilterHint(type_: PxAggregateType, enableSelfCollision: bool) -> u32;
6620
6621 pub fn phys_PxGetAggregateSelfCollisionBit(hint: u32) -> u32;
6622
6623 pub fn phys_PxGetAggregateType(hint: u32) -> PxAggregateType;
6624
6625 /// Deletes the aggregate object.
6626 ///
6627 /// Deleting the PxAggregate object does not delete the aggregated actors. If the PxAggregate object
6628 /// belongs to a scene, the aggregated actors are automatically re-inserted in that scene. If you intend
6629 /// to delete both the PxAggregate and its actors, it is best to release the actors first, then release
6630 /// the PxAggregate when it is empty.
6631 pub fn PxAggregate_release_mut(self_: *mut PxAggregate);
6632
6633 /// Adds an actor to the aggregate object.
6634 ///
6635 /// A warning is output if the total number of actors is reached, or if the incoming actor already belongs
6636 /// to an aggregate.
6637 ///
6638 /// If the aggregate belongs to a scene, adding an actor to the aggregate also adds the actor to that scene.
6639 ///
6640 /// If the actor already belongs to a scene, a warning is output and the call is ignored. You need to remove
6641 /// the actor from the scene first, before adding it to the aggregate.
6642 ///
6643 /// When a BVH is provided the actor shapes are grouped together.
6644 /// The scene query pruning structure inside PhysX SDK will store/update one
6645 /// bound per actor. The scene queries against such an actor will query actor
6646 /// bounds and then make a local space query against the provided BVH, which is in actor's local space.
6647 pub fn PxAggregate_addActor_mut(self_: *mut PxAggregate, actor: *mut PxActor, bvh: *const PxBVH) -> bool;
6648
6649 /// Removes an actor from the aggregate object.
6650 ///
6651 /// A warning is output if the incoming actor does not belong to the aggregate. Otherwise the actor is
6652 /// removed from the aggregate. If the aggregate belongs to a scene, the actor is reinserted in that
6653 /// scene. If you intend to delete the actor, it is best to call [`PxActor::release`]() directly. That way
6654 /// the actor will be automatically removed from its aggregate (if any) and not reinserted in a scene.
6655 pub fn PxAggregate_removeActor_mut(self_: *mut PxAggregate, actor: *mut PxActor) -> bool;
6656
6657 /// Adds an articulation to the aggregate object.
6658 ///
6659 /// A warning is output if the total number of actors is reached (every articulation link counts as an actor),
6660 /// or if the incoming articulation already belongs to an aggregate.
6661 ///
6662 /// If the aggregate belongs to a scene, adding an articulation to the aggregate also adds the articulation to that scene.
6663 ///
6664 /// If the articulation already belongs to a scene, a warning is output and the call is ignored. You need to remove
6665 /// the articulation from the scene first, before adding it to the aggregate.
6666 pub fn PxAggregate_addArticulation_mut(self_: *mut PxAggregate, articulation: *mut PxArticulationReducedCoordinate) -> bool;
6667
6668 /// Removes an articulation from the aggregate object.
6669 ///
6670 /// A warning is output if the incoming articulation does not belong to the aggregate. Otherwise the articulation is
6671 /// removed from the aggregate. If the aggregate belongs to a scene, the articulation is reinserted in that
6672 /// scene. If you intend to delete the articulation, it is best to call [`PxArticulationReducedCoordinate::release`]() directly. That way
6673 /// the articulation will be automatically removed from its aggregate (if any) and not reinserted in a scene.
6674 pub fn PxAggregate_removeArticulation_mut(self_: *mut PxAggregate, articulation: *mut PxArticulationReducedCoordinate) -> bool;
6675
6676 /// Returns the number of actors contained in the aggregate.
6677 ///
6678 /// You can use [`getActors`]() to retrieve the actor pointers.
6679 ///
6680 /// Number of actors contained in the aggregate.
6681 pub fn PxAggregate_getNbActors(self_: *const PxAggregate) -> u32;
6682
6683 /// Retrieves max amount of shapes that can be contained in the aggregate.
6684 ///
6685 /// Max shape size.
6686 pub fn PxAggregate_getMaxNbShapes(self_: *const PxAggregate) -> u32;
6687
6688 /// Retrieve all actors contained in the aggregate.
6689 ///
6690 /// You can retrieve the number of actor pointers by calling [`getNbActors`]()
6691 ///
6692 /// Number of actor pointers written to the buffer.
6693 pub fn PxAggregate_getActors(self_: *const PxAggregate, userBuffer: *mut *mut PxActor, bufferSize: u32, startIndex: u32) -> u32;
6694
6695 /// Retrieves the scene which this aggregate belongs to.
6696 ///
6697 /// Owner Scene. NULL if not part of a scene.
6698 pub fn PxAggregate_getScene_mut(self_: *mut PxAggregate) -> *mut PxScene;
6699
6700 /// Retrieves aggregate's self-collision flag.
6701 ///
6702 /// self-collision flag
6703 pub fn PxAggregate_getSelfCollision(self_: *const PxAggregate) -> bool;
6704
6705 pub fn PxAggregate_getConcreteTypeName(self_: *const PxAggregate) -> *const std::ffi::c_char;
6706
6707 pub fn PxConstraintInvMassScale_new() -> PxConstraintInvMassScale;
6708
6709 pub fn PxConstraintInvMassScale_new_1(lin0: f32, ang0: f32, lin1: f32, ang1: f32) -> PxConstraintInvMassScale;
6710
6711 /// Visualize joint frames
6712 pub fn PxConstraintVisualizer_visualizeJointFrames_mut(self_: *mut PxConstraintVisualizer, parent: *const PxTransform, child: *const PxTransform);
6713
6714 /// Visualize joint linear limit
6715 pub fn PxConstraintVisualizer_visualizeLinearLimit_mut(self_: *mut PxConstraintVisualizer, t0: *const PxTransform, t1: *const PxTransform, value: f32, active: bool);
6716
6717 /// Visualize joint angular limit
6718 pub fn PxConstraintVisualizer_visualizeAngularLimit_mut(self_: *mut PxConstraintVisualizer, t0: *const PxTransform, lower: f32, upper: f32, active: bool);
6719
6720 /// Visualize limit cone
6721 pub fn PxConstraintVisualizer_visualizeLimitCone_mut(self_: *mut PxConstraintVisualizer, t: *const PxTransform, tanQSwingY: f32, tanQSwingZ: f32, active: bool);
6722
6723 /// Visualize joint double cone
6724 pub fn PxConstraintVisualizer_visualizeDoubleCone_mut(self_: *mut PxConstraintVisualizer, t: *const PxTransform, angle: f32, active: bool);
6725
6726 /// Visualize line
6727 pub fn PxConstraintVisualizer_visualizeLine_mut(self_: *mut PxConstraintVisualizer, p0: *const PxVec3, p1: *const PxVec3, color: u32);
6728
6729 /// Pre-simulation data preparation
6730 /// when the constraint is marked dirty, this function is called at the start of the simulation
6731 /// step for the SDK to copy the constraint data block.
6732 pub fn PxConstraintConnector_prepareData_mut(self_: *mut PxConstraintConnector) -> *mut std::ffi::c_void;
6733
6734 /// Constraint release callback
6735 ///
6736 /// When the SDK deletes a PxConstraint object this function is called by the SDK. In general
6737 /// custom constraints should not be deleted directly by applications: rather, the constraint
6738 /// should respond to a release() request by calling PxConstraint::release(), then wait for
6739 /// this call to release its own resources.
6740 ///
6741 /// This function is also called when a PxConstraint object is deleted on cleanup due to
6742 /// destruction of the PxPhysics object.
6743 pub fn PxConstraintConnector_onConstraintRelease_mut(self_: *mut PxConstraintConnector);
6744
6745 /// Center-of-mass shift callback
6746 ///
6747 /// This function is called by the SDK when the CoM of one of the actors is moved. Since the
6748 /// API specifies constraint positions relative to actors, and the constraint shader functions
6749 /// are supplied with coordinates relative to bodies, some synchronization is usually required
6750 /// when the application moves an object's center of mass.
6751 pub fn PxConstraintConnector_onComShift_mut(self_: *mut PxConstraintConnector, actor: u32);
6752
6753 /// Origin shift callback
6754 ///
6755 /// This function is called by the SDK when the scene origin gets shifted and allows to adjust
6756 /// custom data which contains world space transforms.
6757 ///
6758 /// If the adjustments affect constraint shader data, it is necessary to call PxConstraint::markDirty()
6759 /// to make sure that the data gets synced at the beginning of the next simulation step.
6760 pub fn PxConstraintConnector_onOriginShift_mut(self_: *mut PxConstraintConnector, shift: *const PxVec3);
6761
6762 /// Obtain a reference to a PxBase interface if the constraint has one.
6763 ///
6764 /// If the constraint does not implement the PxBase interface, it should return NULL.
6765 pub fn PxConstraintConnector_getSerializable_mut(self_: *mut PxConstraintConnector) -> *mut PxBase;
6766
6767 /// Obtain the pointer to the constraint's constant data
6768 pub fn PxConstraintConnector_getConstantBlock(self_: *const PxConstraintConnector) -> *const std::ffi::c_void;
6769
6770 /// Let the connector know it has been connected to a constraint.
6771 pub fn PxConstraintConnector_connectToConstraint_mut(self_: *mut PxConstraintConnector, anon_param0: *mut PxConstraint);
6772
6773 /// virtual destructor
6774 pub fn PxConstraintConnector_delete(self_: *mut PxConstraintConnector);
6775
6776 pub fn PxSolverBody_new() -> PxSolverBody;
6777
6778 pub fn PxSolverBodyData_projectVelocity(self_: *const PxSolverBodyData, lin: *const PxVec3, ang: *const PxVec3) -> f32;
6779
6780 pub fn PxSolverConstraintPrepDesc_delete(self_: *mut PxSolverConstraintPrepDesc);
6781
6782 /// Allocates constraint data. It is the application's responsibility to release this memory after PxSolveConstraints has completed.
6783 ///
6784 /// The allocated memory. This address must be 16-byte aligned.
6785 pub fn PxConstraintAllocator_reserveConstraintData_mut(self_: *mut PxConstraintAllocator, byteSize: u32) -> *mut u8;
6786
6787 /// Allocates friction data. Friction data can be retained by the application for a given pair and provided as an input to PxSolverContactDesc to improve simulation stability.
6788 /// It is the application's responsibility to release this memory. If this memory is released, the application should ensure it does not pass pointers to this memory to PxSolverContactDesc.
6789 ///
6790 /// The allocated memory. This address must be 4-byte aligned.
6791 pub fn PxConstraintAllocator_reserveFrictionData_mut(self_: *mut PxConstraintAllocator, byteSize: u32) -> *mut u8;
6792
6793 pub fn PxConstraintAllocator_delete(self_: *mut PxConstraintAllocator);
6794
6795 pub fn PxArticulationLimit_new() -> PxArticulationLimit;
6796
6797 pub fn PxArticulationLimit_new_1(low_: f32, high_: f32) -> PxArticulationLimit;
6798
6799 pub fn PxArticulationDrive_new() -> PxArticulationDrive;
6800
6801 pub fn PxArticulationDrive_new_1(stiffness_: f32, damping_: f32, maxForce_: f32, driveType_: PxArticulationDriveType) -> PxArticulationDrive;
6802
6803 pub fn PxTGSSolverBodyVel_projectVelocity(self_: *const PxTGSSolverBodyVel, lin: *const PxVec3, ang: *const PxVec3) -> f32;
6804
6805 pub fn PxTGSSolverBodyData_projectVelocity(self_: *const PxTGSSolverBodyData, linear: *const PxVec3, angular: *const PxVec3) -> f32;
6806
6807 pub fn PxTGSSolverConstraintPrepDesc_delete(self_: *mut PxTGSSolverConstraintPrepDesc);
6808
6809 /// Sets the spring rest length for the sub-tendon from the root to this leaf attachment.
6810 ///
6811 /// Setting this on non-leaf attachments has no effect.
6812 pub fn PxArticulationAttachment_setRestLength_mut(self_: *mut PxArticulationAttachment, restLength: f32);
6813
6814 /// Gets the spring rest length for the sub-tendon from the root to this leaf attachment.
6815 ///
6816 /// The rest length.
6817 pub fn PxArticulationAttachment_getRestLength(self_: *const PxArticulationAttachment) -> f32;
6818
6819 /// Sets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.
6820 ///
6821 /// Setting this on non-leaf attachments has no effect.
6822 pub fn PxArticulationAttachment_setLimitParameters_mut(self_: *mut PxArticulationAttachment, parameters: *const PxArticulationTendonLimit);
6823
6824 /// Gets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.
6825 ///
6826 /// Struct with the low and high limit.
6827 pub fn PxArticulationAttachment_getLimitParameters(self_: *const PxArticulationAttachment) -> PxArticulationTendonLimit;
6828
6829 /// Sets the attachment's relative offset in the link actor frame.
6830 pub fn PxArticulationAttachment_setRelativeOffset_mut(self_: *mut PxArticulationAttachment, offset: *const PxVec3);
6831
6832 /// Gets the attachment's relative offset in the link actor frame.
6833 ///
6834 /// The relative offset in the link actor frame.
6835 pub fn PxArticulationAttachment_getRelativeOffset(self_: *const PxArticulationAttachment) -> PxVec3;
6836
6837 /// Sets the attachment coefficient.
6838 pub fn PxArticulationAttachment_setCoefficient_mut(self_: *mut PxArticulationAttachment, coefficient: f32);
6839
6840 /// Gets the attachment coefficient.
6841 ///
6842 /// The scale that the distance between this attachment and its parent is multiplied by when summing up the spatial tendon's length.
6843 pub fn PxArticulationAttachment_getCoefficient(self_: *const PxArticulationAttachment) -> f32;
6844
6845 /// Gets the articulation link.
6846 ///
6847 /// The articulation link that this attachment is attached to.
6848 pub fn PxArticulationAttachment_getLink(self_: *const PxArticulationAttachment) -> *mut PxArticulationLink;
6849
6850 /// Gets the parent attachment.
6851 ///
6852 /// The parent attachment.
6853 pub fn PxArticulationAttachment_getParent(self_: *const PxArticulationAttachment) -> *mut PxArticulationAttachment;
6854
6855 /// Indicates that this attachment is a leaf, and thus defines a sub-tendon from the root to this attachment.
6856 ///
6857 /// True: This attachment is a leaf and has zero children; False: Not a leaf.
6858 pub fn PxArticulationAttachment_isLeaf(self_: *const PxArticulationAttachment) -> bool;
6859
6860 /// Gets the spatial tendon that the attachment is a part of.
6861 ///
6862 /// The tendon.
6863 pub fn PxArticulationAttachment_getTendon(self_: *const PxArticulationAttachment) -> *mut PxArticulationSpatialTendon;
6864
6865 /// Releases the attachment.
6866 ///
6867 /// Releasing the attachment is not allowed while the articulation is in a scene. In order to
6868 /// release the attachment, remove and then re-add the articulation to the scene.
6869 pub fn PxArticulationAttachment_release_mut(self_: *mut PxArticulationAttachment);
6870
6871 /// Returns the string name of the dynamic type.
6872 ///
6873 /// The string name.
6874 pub fn PxArticulationAttachment_getConcreteTypeName(self_: *const PxArticulationAttachment) -> *const std::ffi::c_char;
6875
6876 /// Sets the tendon joint coefficient.
6877 ///
6878 /// RecipCoefficient is commonly expected to be 1/coefficient, but it can be set to different values to tune behavior; for example, zero can be used to
6879 /// have a joint axis only participate in the length computation of the tendon, but not have any tendon force applied to it.
6880 pub fn PxArticulationTendonJoint_setCoefficient_mut(self_: *mut PxArticulationTendonJoint, axis: PxArticulationAxis, coefficient: f32, recipCoefficient: f32);
6881
6882 /// Gets the tendon joint coefficient.
6883 pub fn PxArticulationTendonJoint_getCoefficient(self_: *const PxArticulationTendonJoint, axis: *mut PxArticulationAxis, coefficient: *mut f32, recipCoefficient: *mut f32);
6884
6885 /// Gets the articulation link.
6886 ///
6887 /// The articulation link (and its incoming joint in particular) that this tendon joint is associated with.
6888 pub fn PxArticulationTendonJoint_getLink(self_: *const PxArticulationTendonJoint) -> *mut PxArticulationLink;
6889
6890 /// Gets the parent tendon joint.
6891 ///
6892 /// The parent tendon joint.
6893 pub fn PxArticulationTendonJoint_getParent(self_: *const PxArticulationTendonJoint) -> *mut PxArticulationTendonJoint;
6894
6895 /// Gets the tendon that the joint is a part of.
6896 ///
6897 /// The tendon.
6898 pub fn PxArticulationTendonJoint_getTendon(self_: *const PxArticulationTendonJoint) -> *mut PxArticulationFixedTendon;
6899
6900 /// Releases a tendon joint.
6901 ///
6902 /// Releasing a tendon joint is not allowed while the articulation is in a scene. In order to
6903 /// release the joint, remove and then re-add the articulation to the scene.
6904 pub fn PxArticulationTendonJoint_release_mut(self_: *mut PxArticulationTendonJoint);
6905
6906 /// Returns the string name of the dynamic type.
6907 ///
6908 /// The string name.
6909 pub fn PxArticulationTendonJoint_getConcreteTypeName(self_: *const PxArticulationTendonJoint) -> *const std::ffi::c_char;
6910
6911 /// Sets the spring stiffness term acting on the tendon length.
6912 pub fn PxArticulationTendon_setStiffness_mut(self_: *mut PxArticulationTendon, stiffness: f32);
6913
6914 /// Gets the spring stiffness of the tendon.
6915 ///
6916 /// The spring stiffness.
6917 pub fn PxArticulationTendon_getStiffness(self_: *const PxArticulationTendon) -> f32;
6918
6919 /// Sets the damping term acting both on the tendon length and tendon-length limits.
6920 pub fn PxArticulationTendon_setDamping_mut(self_: *mut PxArticulationTendon, damping: f32);
6921
6922 /// Gets the damping term acting both on the tendon length and tendon-length limits.
6923 ///
6924 /// The damping term.
6925 pub fn PxArticulationTendon_getDamping(self_: *const PxArticulationTendon) -> f32;
6926
6927 /// Sets the limit stiffness term acting on the tendon's length limits.
6928 ///
6929 /// For spatial tendons, this parameter applies to all its leaf attachments / sub-tendons.
6930 pub fn PxArticulationTendon_setLimitStiffness_mut(self_: *mut PxArticulationTendon, stiffness: f32);
6931
6932 /// Gets the limit stiffness term acting on the tendon's length limits.
6933 ///
6934 /// For spatial tendons, this parameter applies to all its leaf attachments / sub-tendons.
6935 ///
6936 /// The limit stiffness term.
6937 pub fn PxArticulationTendon_getLimitStiffness(self_: *const PxArticulationTendon) -> f32;
6938
6939 /// Sets the length offset term for the tendon.
6940 ///
6941 /// An offset defines an amount to be added to the accumulated length computed for the tendon. It allows the
6942 /// application to actuate the tendon by shortening or lengthening it.
6943 pub fn PxArticulationTendon_setOffset_mut(self_: *mut PxArticulationTendon, offset: f32, autowake: bool);
6944
6945 /// Gets the length offset term for the tendon.
6946 ///
6947 /// The offset term.
6948 pub fn PxArticulationTendon_getOffset(self_: *const PxArticulationTendon) -> f32;
6949
6950 /// Gets the articulation that the tendon is a part of.
6951 ///
6952 /// The articulation.
6953 pub fn PxArticulationTendon_getArticulation(self_: *const PxArticulationTendon) -> *mut PxArticulationReducedCoordinate;
6954
6955 /// Releases a tendon to remove it from the articulation and free its associated memory.
6956 ///
6957 /// When an articulation is released, its attached tendons are automatically released.
6958 ///
6959 /// Releasing a tendon is not allowed while the articulation is in a scene. In order to
6960 /// release the tendon, remove and then re-add the articulation to the scene.
6961 pub fn PxArticulationTendon_release_mut(self_: *mut PxArticulationTendon);
6962
6963 /// Creates an articulation attachment and adds it to the list of children in the parent attachment.
6964 ///
6965 /// Creating an attachment is not allowed while the articulation is in a scene. In order to
6966 /// add the attachment, remove and then re-add the articulation to the scene.
6967 ///
6968 /// The newly-created attachment if creation was successful, otherwise a null pointer.
6969 pub fn PxArticulationSpatialTendon_createAttachment_mut(self_: *mut PxArticulationSpatialTendon, parent: *mut PxArticulationAttachment, coefficient: f32, relativeOffset: PxVec3, link: *mut PxArticulationLink) -> *mut PxArticulationAttachment;
6970
6971 /// Fills a user-provided buffer of attachment pointers with the set of attachments.
6972 ///
6973 /// The number of attachments that were filled into the user buffer.
6974 pub fn PxArticulationSpatialTendon_getAttachments(self_: *const PxArticulationSpatialTendon, userBuffer: *mut *mut PxArticulationAttachment, bufferSize: u32, startIndex: u32) -> u32;
6975
6976 /// Returns the number of attachments in the tendon.
6977 ///
6978 /// The number of attachments.
6979 pub fn PxArticulationSpatialTendon_getNbAttachments(self_: *const PxArticulationSpatialTendon) -> u32;
6980
6981 /// Returns the string name of the dynamic type.
6982 ///
6983 /// The string name.
6984 pub fn PxArticulationSpatialTendon_getConcreteTypeName(self_: *const PxArticulationSpatialTendon) -> *const std::ffi::c_char;
6985
6986 /// Creates an articulation tendon joint and adds it to the list of children in the parent tendon joint.
6987 ///
6988 /// Creating a tendon joint is not allowed while the articulation is in a scene. In order to
6989 /// add the joint, remove and then re-add the articulation to the scene.
6990 ///
6991 /// The newly-created tendon joint if creation was successful, otherwise a null pointer.
6992 ///
6993 /// - The axis motion must not be configured as PxArticulationMotion::eLOCKED.
6994 /// - The axis cannot be part of a fixed joint, i.e. joint configured as PxArticulationJointType::eFIX.
6995 pub fn PxArticulationFixedTendon_createTendonJoint_mut(self_: *mut PxArticulationFixedTendon, parent: *mut PxArticulationTendonJoint, axis: PxArticulationAxis, coefficient: f32, recipCoefficient: f32, link: *mut PxArticulationLink) -> *mut PxArticulationTendonJoint;
6996
6997 /// Fills a user-provided buffer of tendon-joint pointers with the set of tendon joints.
6998 ///
6999 /// The number of tendon joints filled into the user buffer.
7000 pub fn PxArticulationFixedTendon_getTendonJoints(self_: *const PxArticulationFixedTendon, userBuffer: *mut *mut PxArticulationTendonJoint, bufferSize: u32, startIndex: u32) -> u32;
7001
7002 /// Returns the number of tendon joints in the tendon.
7003 ///
7004 /// The number of tendon joints.
7005 pub fn PxArticulationFixedTendon_getNbTendonJoints(self_: *const PxArticulationFixedTendon) -> u32;
7006
7007 /// Sets the spring rest length of the tendon.
7008 ///
7009 /// The accumulated "length" of a fixed tendon is a linear combination of the joint axis positions that the tendon is
7010 /// associated with, scaled by the respective tendon joints' coefficients. As such, when the joint positions of all
7011 /// joints are zero, the accumulated length of a fixed tendon is zero.
7012 ///
7013 /// The spring of the tendon is not exerting any force on the articulation when the rest length is equal to the
7014 /// tendon's accumulated length plus the tendon offset.
7015 pub fn PxArticulationFixedTendon_setRestLength_mut(self_: *mut PxArticulationFixedTendon, restLength: f32);
7016
7017 /// Gets the spring rest length of the tendon.
7018 ///
7019 /// The spring rest length of the tendon.
7020 pub fn PxArticulationFixedTendon_getRestLength(self_: *const PxArticulationFixedTendon) -> f32;
7021
7022 /// Sets the low and high limit on the length of the tendon.
7023 ///
7024 /// The limits, together with the damping and limit stiffness parameters, act on the accumulated length of the tendon.
7025 pub fn PxArticulationFixedTendon_setLimitParameters_mut(self_: *mut PxArticulationFixedTendon, parameter: *const PxArticulationTendonLimit);
7026
7027 /// Gets the low and high limit on the length of the tendon.
7028 ///
7029 /// Struct with the low and high limit.
7030 pub fn PxArticulationFixedTendon_getLimitParameters(self_: *const PxArticulationFixedTendon) -> PxArticulationTendonLimit;
7031
7032 /// Returns the string name of the dynamic type.
7033 ///
7034 /// The string name.
7035 pub fn PxArticulationFixedTendon_getConcreteTypeName(self_: *const PxArticulationFixedTendon) -> *const std::ffi::c_char;
7036
7037 pub fn PxArticulationCache_new() -> PxArticulationCache;
7038
7039 /// Releases an articulation cache.
7040 pub fn PxArticulationCache_release_mut(self_: *mut PxArticulationCache);
7041
7042 /// Releases the sensor.
7043 ///
7044 /// Releasing a sensor is not allowed while the articulation is in a scene. In order to
7045 /// release a sensor, remove and then re-add the articulation to the scene.
7046 pub fn PxArticulationSensor_release_mut(self_: *mut PxArticulationSensor);
7047
7048 /// Returns the spatial force in the local frame of the sensor.
7049 ///
7050 /// The spatial force.
7051 ///
7052 /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
7053 /// and in PxContactModifyCallback or in contact report callbacks.
7054 pub fn PxArticulationSensor_getForces(self_: *const PxArticulationSensor) -> PxSpatialForce;
7055
7056 /// Returns the relative pose between this sensor and the body frame of the link that the sensor is attached to.
7057 ///
7058 /// The link body frame is at the center of mass and aligned with the principal axes of inertia, see PxRigidBody::getCMassLocalPose.
7059 ///
7060 /// The transform link body frame -> sensor frame.
7061 pub fn PxArticulationSensor_getRelativePose(self_: *const PxArticulationSensor) -> PxTransform;
7062
7063 /// Sets the relative pose between this sensor and the body frame of the link that the sensor is attached to.
7064 ///
7065 /// The link body frame is at the center of mass and aligned with the principal axes of inertia, see PxRigidBody::getCMassLocalPose.
7066 ///
7067 /// Setting the sensor relative pose is not allowed while the articulation is in a scene. In order to
7068 /// set the pose, remove and then re-add the articulation to the scene.
7069 pub fn PxArticulationSensor_setRelativePose_mut(self_: *mut PxArticulationSensor, pose: *const PxTransform);
7070
7071 /// Returns the link that this sensor is attached to.
7072 ///
7073 /// A pointer to the link.
7074 pub fn PxArticulationSensor_getLink(self_: *const PxArticulationSensor) -> *mut PxArticulationLink;
7075
7076 /// Returns the index of this sensor inside the articulation.
7077 ///
7078 /// The return value is only valid for sensors attached to articulations that are in a scene.
7079 ///
7080 /// The low-level index, or 0xFFFFFFFF if the articulation is not in a scene.
7081 pub fn PxArticulationSensor_getIndex(self_: *const PxArticulationSensor) -> u32;
7082
7083 /// Returns the articulation that this sensor is part of.
7084 ///
7085 /// A pointer to the articulation.
7086 pub fn PxArticulationSensor_getArticulation(self_: *const PxArticulationSensor) -> *mut PxArticulationReducedCoordinate;
7087
7088 /// Returns the sensor's flags.
7089 ///
7090 /// The current set of flags of the sensor.
7091 pub fn PxArticulationSensor_getFlags(self_: *const PxArticulationSensor) -> PxArticulationSensorFlags;
7092
7093 /// Sets a flag of the sensor.
7094 ///
7095 /// Setting the sensor flags is not allowed while the articulation is in a scene. In order to
7096 /// set the flags, remove and then re-add the articulation to the scene.
7097 pub fn PxArticulationSensor_setFlag_mut(self_: *mut PxArticulationSensor, flag: PxArticulationSensorFlag, enabled: bool);
7098
7099 /// Returns the string name of the dynamic type.
7100 ///
7101 /// The string name.
7102 pub fn PxArticulationSensor_getConcreteTypeName(self_: *const PxArticulationSensor) -> *const std::ffi::c_char;
7103
7104 /// Returns the scene which this articulation belongs to.
7105 ///
7106 /// Owner Scene. NULL if not part of a scene.
7107 pub fn PxArticulationReducedCoordinate_getScene(self_: *const PxArticulationReducedCoordinate) -> *mut PxScene;
7108
7109 /// Sets the solver iteration counts for the articulation.
7110 ///
7111 /// The solver iteration count determines how accurately contacts, drives, and limits are resolved.
7112 /// Setting a higher position iteration count may therefore help in scenarios where the articulation
7113 /// is subject to many constraints; for example, a manipulator articulation with drives and joint limits
7114 /// that is grasping objects, or several such articulations interacting through contacts. Other situations
7115 /// where higher position iterations may improve simulation fidelity are: large mass ratios within the
7116 /// articulation or between the articulation and an object in contact with it; or strong drives in the
7117 /// articulation being used to manipulate a light object.
7118 ///
7119 /// If intersecting bodies are being depenetrated too violently, increase the number of velocity
7120 /// iterations. More velocity iterations will drive the relative exit velocity of the intersecting
7121 /// objects closer to the correct value given the restitution.
7122 ///
7123 /// This call may not be made during simulation.
7124 pub fn PxArticulationReducedCoordinate_setSolverIterationCounts_mut(self_: *mut PxArticulationReducedCoordinate, minPositionIters: u32, minVelocityIters: u32);
7125
7126 /// Returns the solver iteration counts.
7127 pub fn PxArticulationReducedCoordinate_getSolverIterationCounts(self_: *const PxArticulationReducedCoordinate, minPositionIters: *mut u32, minVelocityIters: *mut u32);
7128
7129 /// Returns true if this articulation is sleeping.
7130 ///
7131 /// When an actor does not move for a period of time, it is no longer simulated in order to save time. This state
7132 /// is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object,
7133 /// or a sleep-affecting property is changed by the user, the entire sleep mechanism should be transparent to the user.
7134 ///
7135 /// An articulation can only go to sleep if all links are ready for sleeping. An articulation is guaranteed to be awake
7136 /// if at least one of the following holds:
7137 ///
7138 /// The wake counter is positive (see [`setWakeCounter`]()).
7139 ///
7140 /// The linear or angular velocity of any link is non-zero.
7141 ///
7142 /// A non-zero force or torque has been applied to the articulation or any of its links.
7143 ///
7144 /// If an articulation is sleeping, the following state is guaranteed:
7145 ///
7146 /// The wake counter is zero.
7147 ///
7148 /// The linear and angular velocity of all links is zero.
7149 ///
7150 /// There is no force update pending.
7151 ///
7152 /// When an articulation gets inserted into a scene, it will be considered asleep if all the points above hold, else it will
7153 /// be treated as awake.
7154 ///
7155 /// If an articulation is asleep after the call to [`PxScene::fetchResults`]() returns, it is guaranteed that the poses of the
7156 /// links were not changed. You can use this information to avoid updating the transforms of associated objects.
7157 ///
7158 /// True if the articulation is sleeping.
7159 ///
7160 /// This call may only be made on articulations that are in a scene, and may not be made during simulation,
7161 /// except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
7162 pub fn PxArticulationReducedCoordinate_isSleeping(self_: *const PxArticulationReducedCoordinate) -> bool;
7163
7164 /// Sets the mass-normalized energy threshold below which the articulation may go to sleep.
7165 ///
7166 /// The articulation will sleep if the energy of each link is below this threshold.
7167 ///
7168 /// This call may not be made during simulation.
7169 pub fn PxArticulationReducedCoordinate_setSleepThreshold_mut(self_: *mut PxArticulationReducedCoordinate, threshold: f32);
7170
7171 /// Returns the mass-normalized energy below which the articulation may go to sleep.
7172 ///
7173 /// The energy threshold for sleeping.
7174 pub fn PxArticulationReducedCoordinate_getSleepThreshold(self_: *const PxArticulationReducedCoordinate) -> f32;
7175
7176 /// Sets the mass-normalized kinetic energy threshold below which the articulation may participate in stabilization.
7177 ///
7178 /// Articulations whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
7179 ///
7180 /// This value has no effect if PxSceneFlag::eENABLE_STABILIZATION was not enabled on the PxSceneDesc.
7181 ///
7182 /// Default:
7183 /// 0.01 * PxTolerancesScale::speed * PxTolerancesScale::speed
7184 ///
7185 /// This call may not be made during simulation.
7186 pub fn PxArticulationReducedCoordinate_setStabilizationThreshold_mut(self_: *mut PxArticulationReducedCoordinate, threshold: f32);
7187
7188 /// Returns the mass-normalized kinetic energy below which the articulation may participate in stabilization.
7189 ///
7190 /// Articulations whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
7191 ///
7192 /// The energy threshold for participating in stabilization.
7193 pub fn PxArticulationReducedCoordinate_getStabilizationThreshold(self_: *const PxArticulationReducedCoordinate) -> f32;
7194
7195 /// Sets the wake counter for the articulation in seconds.
7196 ///
7197 /// - The wake counter value determines the minimum amount of time until the articulation can be put to sleep.
7198 /// - An articulation will not be put to sleep if the energy is above the specified threshold (see [`setSleepThreshold`]())
7199 /// or if other awake objects are touching it.
7200 /// - Passing in a positive value will wake up the articulation automatically.
7201 ///
7202 /// Default:
7203 /// 0.4s (which corresponds to 20 frames for a time step of 0.02s)
7204 ///
7205 /// This call may not be made during simulation, except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
7206 pub fn PxArticulationReducedCoordinate_setWakeCounter_mut(self_: *mut PxArticulationReducedCoordinate, wakeCounterValue: f32);
7207
7208 /// Returns the wake counter of the articulation in seconds.
7209 ///
7210 /// The wake counter of the articulation in seconds.
7211 ///
7212 /// This call may not be made during simulation, except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
7213 pub fn PxArticulationReducedCoordinate_getWakeCounter(self_: *const PxArticulationReducedCoordinate) -> f32;
7214
7215 /// Wakes up the articulation if it is sleeping.
7216 ///
7217 /// - The articulation will get woken up and might cause other touching objects to wake up as well during the next simulation step.
7218 /// - This will set the wake counter of the articulation to the value specified in [`PxSceneDesc::wakeCounterResetValue`].
7219 ///
7220 /// This call may only be made on articulations that are in a scene, and may not be made during simulation,
7221 /// except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
7222 pub fn PxArticulationReducedCoordinate_wakeUp_mut(self_: *mut PxArticulationReducedCoordinate);
7223
7224 /// Forces the articulation to sleep.
7225 ///
7226 /// - The articulation will stay asleep during the next simulation step if not touched by another non-sleeping actor.
7227 /// - This will set any applied force, the velocity, and the wake counter of all bodies in the articulation to zero.
7228 ///
7229 /// This call may not be made during simulation, and may only be made on articulations that are in a scene.
7230 pub fn PxArticulationReducedCoordinate_putToSleep_mut(self_: *mut PxArticulationReducedCoordinate);
7231
7232 /// Sets the limit on the magnitude of the linear velocity of the articulation's center of mass.
7233 ///
7234 /// - The limit acts on the linear velocity of the entire articulation. The velocity is calculated from the total momentum
7235 /// and the spatial inertia of the articulation.
7236 /// - The limit only applies to floating-base articulations.
7237 /// - A benefit of the COM velocity limit is that it is evenly applied to the whole articulation, which results in fewer visual
7238 /// artifacts compared to link rigid-body damping or joint-velocity limits. However, these per-link or per-degree-of-freedom
7239 /// limits may still help avoid numerical issues.
7240 ///
7241 /// This call may not be made during simulation.
7242 pub fn PxArticulationReducedCoordinate_setMaxCOMLinearVelocity_mut(self_: *mut PxArticulationReducedCoordinate, maxLinearVelocity: f32);
7243
7244 /// Gets the limit on the magnitude of the linear velocity of the articulation's center of mass.
7245 ///
7246 /// The maximal linear velocity magnitude.
7247 pub fn PxArticulationReducedCoordinate_getMaxCOMLinearVelocity(self_: *const PxArticulationReducedCoordinate) -> f32;
7248
7249 /// Sets the limit on the magnitude of the angular velocity at the articulation's center of mass.
7250 ///
7251 /// - The limit acts on the angular velocity of the entire articulation. The velocity is calculated from the total momentum
7252 /// and the spatial inertia of the articulation.
7253 /// - The limit only applies to floating-base articulations.
7254 /// - A benefit of the COM velocity limit is that it is evenly applied to the whole articulation, which results in fewer visual
7255 /// artifacts compared to link rigid-body damping or joint-velocity limits. However, these per-link or per-degree-of-freedom
7256 /// limits may still help avoid numerical issues.
7257 ///
7258 /// This call may not be made during simulation.
7259 pub fn PxArticulationReducedCoordinate_setMaxCOMAngularVelocity_mut(self_: *mut PxArticulationReducedCoordinate, maxAngularVelocity: f32);
7260
7261 /// Gets the limit on the magnitude of the angular velocity at the articulation's center of mass.
7262 ///
7263 /// The maximal angular velocity magnitude.
7264 pub fn PxArticulationReducedCoordinate_getMaxCOMAngularVelocity(self_: *const PxArticulationReducedCoordinate) -> f32;
7265
7266 /// Adds a link to the articulation with default attribute values.
7267 ///
7268 /// The new link, or NULL if the link cannot be created.
7269 ///
7270 /// Creating a link is not allowed while the articulation is in a scene. In order to add a link,
7271 /// remove and then re-add the articulation to the scene.
7272 pub fn PxArticulationReducedCoordinate_createLink_mut(self_: *mut PxArticulationReducedCoordinate, parent: *mut PxArticulationLink, pose: *const PxTransform) -> *mut PxArticulationLink;
7273
7274 /// Releases the articulation, and all its links and corresponding joints.
7275 ///
7276 /// Attached sensors and tendons are released automatically when the articulation is released.
7277 ///
7278 /// This call may not be made during simulation.
7279 pub fn PxArticulationReducedCoordinate_release_mut(self_: *mut PxArticulationReducedCoordinate);
7280
7281 /// Returns the number of links in the articulation.
7282 ///
7283 /// The number of links.
7284 pub fn PxArticulationReducedCoordinate_getNbLinks(self_: *const PxArticulationReducedCoordinate) -> u32;
7285
7286 /// Returns the set of links in the articulation in the order that they were added to the articulation using createLink.
7287 ///
7288 /// The number of links written into the buffer.
7289 pub fn PxArticulationReducedCoordinate_getLinks(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxArticulationLink, bufferSize: u32, startIndex: u32) -> u32;
7290
7291 /// Returns the number of shapes in the articulation.
7292 ///
7293 /// The number of shapes.
7294 pub fn PxArticulationReducedCoordinate_getNbShapes(self_: *const PxArticulationReducedCoordinate) -> u32;
7295
7296 /// Sets a name string for the articulation that can be retrieved with getName().
7297 ///
7298 /// This is for debugging and is not used by the SDK. The string is not copied by the SDK,
7299 /// only the pointer is stored.
7300 pub fn PxArticulationReducedCoordinate_setName_mut(self_: *mut PxArticulationReducedCoordinate, name: *const std::ffi::c_char);
7301
7302 /// Returns the name string set with setName().
7303 ///
7304 /// Name string associated with the articulation.
7305 pub fn PxArticulationReducedCoordinate_getName(self_: *const PxArticulationReducedCoordinate) -> *const std::ffi::c_char;
7306
7307 /// Returns the axis-aligned bounding box enclosing the articulation.
7308 ///
7309 /// The articulation's bounding box.
7310 ///
7311 /// It is not allowed to use this method while the simulation is running, except in a split simulation
7312 /// during [`PxScene::collide`]() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
7313 pub fn PxArticulationReducedCoordinate_getWorldBounds(self_: *const PxArticulationReducedCoordinate, inflation: f32) -> PxBounds3;
7314
7315 /// Returns the aggregate the articulation might be a part of.
7316 ///
7317 /// The aggregate the articulation is a part of, or NULL if the articulation does not belong to an aggregate.
7318 pub fn PxArticulationReducedCoordinate_getAggregate(self_: *const PxArticulationReducedCoordinate) -> *mut PxAggregate;
7319
7320 /// Sets flags on the articulation.
7321 ///
7322 /// This call may not be made during simulation.
7323 pub fn PxArticulationReducedCoordinate_setArticulationFlags_mut(self_: *mut PxArticulationReducedCoordinate, flags: PxArticulationFlags);
7324
7325 /// Raises or clears a flag on the articulation.
7326 ///
7327 /// This call may not be made during simulation.
7328 pub fn PxArticulationReducedCoordinate_setArticulationFlag_mut(self_: *mut PxArticulationReducedCoordinate, flag: PxArticulationFlag, value: bool);
7329
7330 /// Returns the articulation's flags.
7331 ///
7332 /// The flags.
7333 pub fn PxArticulationReducedCoordinate_getArticulationFlags(self_: *const PxArticulationReducedCoordinate) -> PxArticulationFlags;
7334
7335 /// Returns the total number of joint degrees-of-freedom (DOFs) of the articulation.
7336 ///
7337 /// - The six DOFs of the base of a floating-base articulation are not included in this count.
7338 /// - Example: Both a fixed-base and a floating-base double-pendulum with two revolute joints will have getDofs() == 2.
7339 /// - The return value is only valid for articulations that are in a scene.
7340 ///
7341 /// The number of joint DOFs, or 0xFFFFFFFF if the articulation is not in a scene.
7342 pub fn PxArticulationReducedCoordinate_getDofs(self_: *const PxArticulationReducedCoordinate) -> u32;
7343
7344 /// Creates an articulation cache that can be used to read and write internal articulation data.
7345 ///
7346 /// - When the structure of the articulation changes (e.g. adding a link or sensor) after the cache was created,
7347 /// the cache needs to be released and recreated.
7348 /// - Free the memory allocated for the cache by calling the release() method on the cache.
7349 /// - Caches can only be created by articulations that are in a scene.
7350 ///
7351 /// The cache, or NULL if the articulation is not in a scene.
7352 pub fn PxArticulationReducedCoordinate_createCache(self_: *const PxArticulationReducedCoordinate) -> *mut PxArticulationCache;
7353
7354 /// Returns the size of the articulation cache in bytes.
7355 ///
7356 /// - The size does not include: the user-allocated memory for the coefficient matrix or lambda values;
7357 /// the scratch-related memory/members; and the cache version. See comment in [`PxArticulationCache`].
7358 /// - The return value is only valid for articulations that are in a scene.
7359 ///
7360 /// The byte size of the cache, or 0xFFFFFFFF if the articulation is not in a scene.
7361 pub fn PxArticulationReducedCoordinate_getCacheDataSize(self_: *const PxArticulationReducedCoordinate) -> u32;
7362
7363 /// Zeroes all data in the articulation cache, except user-provided and scratch memory, and cache version.
7364 ///
7365 /// This call may only be made on articulations that are in a scene.
7366 pub fn PxArticulationReducedCoordinate_zeroCache(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);
7367
7368 /// Applies the data in the cache to the articulation.
7369 ///
7370 /// This call wakes the articulation if it is sleeping, and the autowake parameter is true (default) or:
7371 /// - a nonzero joint velocity is applied or
7372 /// - a nonzero joint force is applied or
7373 /// - a nonzero root velocity is applied
7374 ///
7375 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7376 pub fn PxArticulationReducedCoordinate_applyCache_mut(self_: *mut PxArticulationReducedCoordinate, cache: *mut PxArticulationCache, flags: PxArticulationCacheFlags, autowake: bool);
7377
7378 /// Copies internal data of the articulation to the cache.
7379 ///
7380 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7381 pub fn PxArticulationReducedCoordinate_copyInternalStateToCache(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache, flags: PxArticulationCacheFlags);
7382
7383 /// Converts maximal-coordinate joint DOF data to reduced coordinates.
7384 ///
7385 /// - Indexing into the maximal joint DOF data is via the link's low-level index minus 1 (the root link is not included).
7386 /// - The reduced-coordinate data follows the cache indexing convention, see PxArticulationCache::jointVelocity.
7387 ///
7388 /// The articulation must be in a scene.
7389 pub fn PxArticulationReducedCoordinate_packJointData(self_: *const PxArticulationReducedCoordinate, maximum: *const f32, reduced: *mut f32);
7390
7391 /// Converts reduced-coordinate joint DOF data to maximal coordinates.
7392 ///
7393 /// - Indexing into the maximal joint DOF data is via the link's low-level index minus 1 (the root link is not included).
7394 /// - The reduced-coordinate data follows the cache indexing convention, see PxArticulationCache::jointVelocity.
7395 ///
7396 /// The articulation must be in a scene.
7397 pub fn PxArticulationReducedCoordinate_unpackJointData(self_: *const PxArticulationReducedCoordinate, reduced: *const f32, maximum: *mut f32);
7398
7399 /// Prepares common articulation data based on articulation pose for inverse dynamics calculations.
7400 ///
7401 /// Usage:
7402 /// 1. Set articulation pose (joint positions and base transform) via articulation cache and applyCache().
7403 /// 1. Call commonInit.
7404 /// 1. Call inverse dynamics computation method.
7405 ///
7406 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7407 pub fn PxArticulationReducedCoordinate_commonInit(self_: *const PxArticulationReducedCoordinate);
7408
7409 /// Computes the joint DOF forces required to counteract gravitational forces for the given articulation pose.
7410 ///
7411 /// - Inputs - Articulation pose (joint positions + base transform).
7412 /// - Outputs - Joint forces to counteract gravity (in cache).
7413 ///
7414 /// - The joint forces returned are determined purely by gravity for the articulation in the current joint and base pose, and joints at rest;
7415 /// i.e. external forces, joint velocities, and joint accelerations are set to zero. Joint drives are also not considered in the computation.
7416 /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
7417 ///
7418 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7419 pub fn PxArticulationReducedCoordinate_computeGeneralizedGravityForce(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);
7420
7421 /// Computes the joint DOF forces required to counteract Coriolis and centrifugal forces for the given articulation state.
7422 ///
7423 /// - Inputs - Articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
7424 /// - Outputs - Joint forces to counteract Coriolis and centrifugal forces (in cache).
7425 ///
7426 /// - The joint forces returned are determined purely by the articulation's state; i.e. external forces, gravity, and joint accelerations are set to zero.
7427 /// Joint drives and potential damping terms, such as link angular or linear damping, or joint friction, are also not considered in the computation.
7428 /// - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
7429 /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
7430 ///
7431 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7432 pub fn PxArticulationReducedCoordinate_computeCoriolisAndCentrifugalForce(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);
7433
7434 /// Computes the joint DOF forces required to counteract external spatial forces applied to articulation links.
7435 ///
7436 /// - Inputs - External forces on links (in cache), articulation pose (joint positions + base transform).
7437 /// - Outputs - Joint forces to counteract the external forces (in cache).
7438 ///
7439 /// - Only the external spatial forces provided in the cache and the articulation pose are considered in the computation.
7440 /// - The external spatial forces are with respect to the links' centers of mass, and not the actor's origin.
7441 /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
7442 ///
7443 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7444 pub fn PxArticulationReducedCoordinate_computeGeneralizedExternalForce(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);
7445
7446 /// Computes the joint accelerations for the given articulation state and joint forces.
7447 ///
7448 /// - Inputs - Joint forces (in cache) and articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
7449 /// - Outputs - Joint accelerations (in cache).
7450 ///
7451 /// - The computation includes Coriolis terms and gravity. However, joint drives and potential damping terms are not considered in the computation
7452 /// (for example, linear link damping or joint friction).
7453 /// - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
7454 /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
7455 ///
7456 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7457 pub fn PxArticulationReducedCoordinate_computeJointAcceleration(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);
7458
7459 /// Computes the joint forces for the given articulation state and joint accelerations, not considering gravity.
7460 ///
7461 /// - Inputs - Joint accelerations (in cache) and articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
7462 /// - Outputs - Joint forces (in cache).
7463 ///
7464 /// - The computation includes Coriolis terms. However, joint drives and potential damping terms are not considered in the computation
7465 /// (for example, linear link damping or joint friction).
7466 /// - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
7467 /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
7468 ///
7469 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7470 pub fn PxArticulationReducedCoordinate_computeJointForce(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);
7471
7472 /// Compute the dense Jacobian for the articulation in world space, including the DOFs of a potentially floating base.
7473 ///
7474 /// This computes the dense representation of an inherently sparse matrix. Multiplication with this matrix maps
7475 /// joint space velocities to world-space linear and angular (i.e. spatial) velocities of the centers of mass of the links.
7476 ///
7477 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7478 pub fn PxArticulationReducedCoordinate_computeDenseJacobian(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache, nRows: *mut u32, nCols: *mut u32);
7479
7480 /// Computes the coefficient matrix for contact forces.
7481 ///
7482 /// - The matrix dimension is getCoefficientMatrixSize() = getDofs() * getNbLoopJoints(), and the DOF (column) indexing follows the internal DOF order, see PxArticulationCache::jointVelocity.
7483 /// - Each column in the matrix is the joint forces effected by a contact based on impulse strength 1.
7484 /// - The user must allocate memory for PxArticulationCache::coefficientMatrix where the required size of the PxReal array is equal to getCoefficientMatrixSize().
7485 /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
7486 ///
7487 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7488 pub fn PxArticulationReducedCoordinate_computeCoefficientMatrix(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);
7489
7490 /// Computes the lambda values when the test impulse is 1.
7491 ///
7492 /// - The user must allocate memory for PxArticulationCache::lambda where the required size of the PxReal array is equal to getNbLoopJoints().
7493 /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
7494 ///
7495 /// True if convergence was achieved within maxIter; False if convergence was not achieved or the operation failed otherwise.
7496 ///
7497 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7498 pub fn PxArticulationReducedCoordinate_computeLambda(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache, initialState: *mut PxArticulationCache, jointTorque: *const f32, maxIter: u32) -> bool;
7499
7500 /// Compute the joint-space inertia matrix that maps joint accelerations to joint forces: forces = M * accelerations.
7501 ///
7502 /// - Inputs - Articulation pose (joint positions and base transform).
7503 /// - Outputs - Mass matrix (in cache).
7504 ///
7505 /// commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
7506 ///
7507 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7508 pub fn PxArticulationReducedCoordinate_computeGeneralizedMassMatrix(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);
7509
7510 /// Adds a loop joint to the articulation system for inverse dynamics.
7511 ///
7512 /// This call may not be made during simulation.
7513 pub fn PxArticulationReducedCoordinate_addLoopJoint_mut(self_: *mut PxArticulationReducedCoordinate, joint: *mut PxConstraint);
7514
7515 /// Removes a loop joint from the articulation for inverse dynamics.
7516 ///
7517 /// This call may not be made during simulation.
7518 pub fn PxArticulationReducedCoordinate_removeLoopJoint_mut(self_: *mut PxArticulationReducedCoordinate, joint: *mut PxConstraint);
7519
7520 /// Returns the number of loop joints in the articulation for inverse dynamics.
7521 ///
7522 /// The number of loop joints.
7523 pub fn PxArticulationReducedCoordinate_getNbLoopJoints(self_: *const PxArticulationReducedCoordinate) -> u32;
7524
7525 /// Returns the set of loop constraints (i.e. joints) in the articulation.
7526 ///
7527 /// The number of constraints written into the buffer.
7528 pub fn PxArticulationReducedCoordinate_getLoopJoints(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxConstraint, bufferSize: u32, startIndex: u32) -> u32;
7529
7530 /// Returns the required size of the coefficient matrix in the articulation.
7531 ///
7532 /// Size of the coefficient matrix (equal to getDofs() * getNbLoopJoints()).
7533 ///
7534 /// This call may only be made on articulations that are in a scene.
7535 pub fn PxArticulationReducedCoordinate_getCoefficientMatrixSize(self_: *const PxArticulationReducedCoordinate) -> u32;
7536
7537 /// Sets the root link transform (world to actor frame).
7538 ///
7539 /// - For performance, prefer PxArticulationCache::rootLinkData to set the root link transform in a batch articulation state update.
7540 /// - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method,
7541 /// in order to update link states for the next simulation frame or querying.
7542 ///
7543 /// This call may not be made during simulation.
7544 pub fn PxArticulationReducedCoordinate_setRootGlobalPose_mut(self_: *mut PxArticulationReducedCoordinate, pose: *const PxTransform, autowake: bool);
7545
7546 /// Returns the root link transform (world to actor frame).
7547 ///
7548 /// For performance, prefer PxArticulationCache::rootLinkData to get the root link transform in a batch query.
7549 ///
7550 /// The root link transform.
7551 ///
7552 /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
7553 /// and in PxContactModifyCallback or in contact report callbacks.
7554 pub fn PxArticulationReducedCoordinate_getRootGlobalPose(self_: *const PxArticulationReducedCoordinate) -> PxTransform;
7555
7556 /// Sets the root link linear center-of-mass velocity.
7557 ///
7558 /// - The linear velocity is with respect to the link's center of mass and not the actor frame origin.
7559 /// - For performance, prefer PxArticulationCache::rootLinkData to set the root link velocity in a batch articulation state update.
7560 /// - The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene.
7561 /// - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method,
7562 /// in order to update link states for the next simulation frame or querying.
7563 ///
7564 /// This call may not be made during simulation, except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
7565 pub fn PxArticulationReducedCoordinate_setRootLinearVelocity_mut(self_: *mut PxArticulationReducedCoordinate, linearVelocity: *const PxVec3, autowake: bool);
7566
7567 /// Gets the root link center-of-mass linear velocity.
7568 ///
7569 /// - The linear velocity is with respect to the link's center of mass and not the actor frame origin.
7570 /// - For performance, prefer PxArticulationCache::rootLinkData to get the root link velocity in a batch query.
7571 ///
7572 /// The root link center-of-mass linear velocity.
7573 ///
7574 /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
7575 /// and in PxContactModifyCallback or in contact report callbacks.
7576 pub fn PxArticulationReducedCoordinate_getRootLinearVelocity(self_: *const PxArticulationReducedCoordinate) -> PxVec3;
7577
7578 /// Sets the root link angular velocity.
7579 ///
7580 /// - For performance, prefer PxArticulationCache::rootLinkData to set the root link velocity in a batch articulation state update.
7581 /// - The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene.
7582 /// - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method,
7583 /// in order to update link states for the next simulation frame or querying.
7584 ///
7585 /// This call may not be made during simulation, except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
7586 pub fn PxArticulationReducedCoordinate_setRootAngularVelocity_mut(self_: *mut PxArticulationReducedCoordinate, angularVelocity: *const PxVec3, autowake: bool);
7587
7588 /// Gets the root link angular velocity.
7589 ///
7590 /// For performance, prefer PxArticulationCache::rootLinkData to get the root link velocity in a batch query.
7591 ///
7592 /// The root link angular velocity.
7593 ///
7594 /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
7595 /// and in PxContactModifyCallback or in contact report callbacks.
7596 pub fn PxArticulationReducedCoordinate_getRootAngularVelocity(self_: *const PxArticulationReducedCoordinate) -> PxVec3;
7597
7598 /// Returns the (classical) link acceleration in world space for the given low-level link index.
7599 ///
7600 /// - The returned acceleration is not a spatial, but a classical, i.e. body-fixed acceleration (https://en.wikipedia.org/wiki/Spatial_acceleration).
7601 /// - The (linear) acceleration is with respect to the link's center of mass and not the actor frame origin.
7602 ///
7603 /// The link's center-of-mass classical acceleration, or 0 if the call is made before the articulation participated in a first simulation step.
7604 ///
7605 /// This call may only be made on articulations that are in a scene, and it is not allowed to use this method while the simulation
7606 /// is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
7607 pub fn PxArticulationReducedCoordinate_getLinkAcceleration_mut(self_: *mut PxArticulationReducedCoordinate, linkId: u32) -> PxSpatialVelocity;
7608
7609 /// Returns the GPU articulation index.
7610 ///
7611 /// The GPU index, or 0xFFFFFFFF if the articulation is not in a scene or PxSceneFlag::eSUPPRESS_READBACK is not set.
7612 pub fn PxArticulationReducedCoordinate_getGpuArticulationIndex_mut(self_: *mut PxArticulationReducedCoordinate) -> u32;
7613
7614 /// Creates a spatial tendon to attach to the articulation with default attribute values.
7615 ///
7616 /// The new spatial tendon.
7617 ///
7618 /// Creating a spatial tendon is not allowed while the articulation is in a scene. In order to
7619 /// add the tendon, remove and then re-add the articulation to the scene.
7620 pub fn PxArticulationReducedCoordinate_createSpatialTendon_mut(self_: *mut PxArticulationReducedCoordinate) -> *mut PxArticulationSpatialTendon;
7621
7622 /// Creates a fixed tendon to attach to the articulation with default attribute values.
7623 ///
7624 /// The new fixed tendon.
7625 ///
7626 /// Creating a fixed tendon is not allowed while the articulation is in a scene. In order to
7627 /// add the tendon, remove and then re-add the articulation to the scene.
7628 pub fn PxArticulationReducedCoordinate_createFixedTendon_mut(self_: *mut PxArticulationReducedCoordinate) -> *mut PxArticulationFixedTendon;
7629
7630 /// Creates a force sensor attached to a link of the articulation.
7631 ///
7632 /// The new sensor.
7633 ///
7634 /// Creating a sensor is not allowed while the articulation is in a scene. In order to
7635 /// add the sensor, remove and then re-add the articulation to the scene.
7636 pub fn PxArticulationReducedCoordinate_createSensor_mut(self_: *mut PxArticulationReducedCoordinate, link: *mut PxArticulationLink, relativePose: *const PxTransform) -> *mut PxArticulationSensor;
7637
7638 /// Returns the spatial tendons attached to the articulation.
7639 ///
7640 /// The order of the tendons in the buffer is not necessarily identical to the order in which the tendons were added to the articulation.
7641 ///
7642 /// The number of tendons written into the buffer.
7643 pub fn PxArticulationReducedCoordinate_getSpatialTendons(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxArticulationSpatialTendon, bufferSize: u32, startIndex: u32) -> u32;
7644
7645 /// Returns the number of spatial tendons in the articulation.
7646 ///
7647 /// The number of tendons.
7648 pub fn PxArticulationReducedCoordinate_getNbSpatialTendons_mut(self_: *mut PxArticulationReducedCoordinate) -> u32;
7649
7650 /// Returns the fixed tendons attached to the articulation.
7651 ///
7652 /// The order of the tendons in the buffer is not necessarily identical to the order in which the tendons were added to the articulation.
7653 ///
7654 /// The number of tendons written into the buffer.
7655 pub fn PxArticulationReducedCoordinate_getFixedTendons(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxArticulationFixedTendon, bufferSize: u32, startIndex: u32) -> u32;
7656
7657 /// Returns the number of fixed tendons in the articulation.
7658 ///
7659 /// The number of tendons.
7660 pub fn PxArticulationReducedCoordinate_getNbFixedTendons_mut(self_: *mut PxArticulationReducedCoordinate) -> u32;
7661
7662 /// Returns the sensors attached to the articulation.
7663 ///
7664 /// The order of the sensors in the buffer is not necessarily identical to the order in which the sensors were added to the articulation.
7665 ///
7666 /// The number of sensors written into the buffer.
7667 pub fn PxArticulationReducedCoordinate_getSensors(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxArticulationSensor, bufferSize: u32, startIndex: u32) -> u32;
7668
7669 /// Returns the number of sensors in the articulation.
7670 ///
7671 /// The number of sensors.
7672 pub fn PxArticulationReducedCoordinate_getNbSensors_mut(self_: *mut PxArticulationReducedCoordinate) -> u32;
7673
7674 /// Update link velocities and/or positions in the articulation.
7675 ///
7676 /// For performance, prefer the PxArticulationCache API that performs batch articulation state updates.
7677 ///
7678 /// If the application updates the root state (position and velocity) or joint state via any combination of
7679 /// the non-cache API calls
7680 ///
7681 /// - setRootGlobalPose(), setRootLinearVelocity(), setRootAngularVelocity()
7682 /// - PxArticulationJointReducedCoordinate::setJointPosition(), PxArticulationJointReducedCoordinate::setJointVelocity()
7683 ///
7684 /// the application needs to call this method after the state setting in order to update the link states for
7685 /// the next simulation frame or querying.
7686 ///
7687 /// Use
7688 /// - PxArticulationKinematicFlag::ePOSITION after any changes to the articulation root or joint positions using non-cache API calls. Updates links' positions and velocities.
7689 /// - PxArticulationKinematicFlag::eVELOCITY after velocity-only changes to the articulation root or joints using non-cache API calls. Updates links' velocities only.
7690 ///
7691 /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
7692 pub fn PxArticulationReducedCoordinate_updateKinematic_mut(self_: *mut PxArticulationReducedCoordinate, flags: PxArticulationKinematicFlags);
7693
7694 /// Gets the parent articulation link of this joint.
7695 ///
7696 /// The parent link.
7697 pub fn PxArticulationJointReducedCoordinate_getParentArticulationLink(self_: *const PxArticulationJointReducedCoordinate) -> *mut PxArticulationLink;
7698
7699 /// Sets the joint pose in the parent link actor frame.
7700 ///
7701 /// This call is not allowed while the simulation is running.
7702 pub fn PxArticulationJointReducedCoordinate_setParentPose_mut(self_: *mut PxArticulationJointReducedCoordinate, pose: *const PxTransform);
7703
7704 /// Gets the joint pose in the parent link actor frame.
7705 ///
7706 /// The joint pose.
7707 pub fn PxArticulationJointReducedCoordinate_getParentPose(self_: *const PxArticulationJointReducedCoordinate) -> PxTransform;
7708
7709 /// Gets the child articulation link of this joint.
7710 ///
7711 /// The child link.
7712 pub fn PxArticulationJointReducedCoordinate_getChildArticulationLink(self_: *const PxArticulationJointReducedCoordinate) -> *mut PxArticulationLink;
7713
7714 /// Sets the joint pose in the child link actor frame.
7715 ///
7716 /// This call is not allowed while the simulation is running.
7717 pub fn PxArticulationJointReducedCoordinate_setChildPose_mut(self_: *mut PxArticulationJointReducedCoordinate, pose: *const PxTransform);
7718
7719 /// Gets the joint pose in the child link actor frame.
7720 ///
7721 /// The joint pose.
7722 pub fn PxArticulationJointReducedCoordinate_getChildPose(self_: *const PxArticulationJointReducedCoordinate) -> PxTransform;
7723
7724 /// Sets the joint type (e.g. revolute).
7725 ///
7726 /// Setting the joint type is not allowed while the articulation is in a scene.
7727 /// In order to set the joint type, remove and then re-add the articulation to the scene.
7728 pub fn PxArticulationJointReducedCoordinate_setJointType_mut(self_: *mut PxArticulationJointReducedCoordinate, jointType: PxArticulationJointType);
7729
7730 /// Gets the joint type.
7731 ///
7732 /// The joint type.
7733 pub fn PxArticulationJointReducedCoordinate_getJointType(self_: *const PxArticulationJointReducedCoordinate) -> PxArticulationJointType;
7734
7735 /// Sets the joint motion for a given axis.
7736 ///
7737 /// Setting the motion of joint axes is not allowed while the articulation is in a scene.
7738 /// In order to set the motion, remove and then re-add the articulation to the scene.
7739 pub fn PxArticulationJointReducedCoordinate_setMotion_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, motion: PxArticulationMotion);
7740
7741 /// Returns the joint motion for the given axis.
7742 ///
7743 /// The joint motion of the given axis.
7744 pub fn PxArticulationJointReducedCoordinate_getMotion(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> PxArticulationMotion;
7745
7746 /// Sets the joint limits for a given axis.
7747 ///
7748 /// - The motion of the corresponding axis should be set to PxArticulationMotion::eLIMITED in order for the limits to be enforced.
7749 /// - The lower limit should be strictly smaller than the higher limit. If the limits should be equal, use PxArticulationMotion::eLOCKED
7750 /// and an appropriate offset in the parent/child joint frames.
7751 ///
7752 /// This call is not allowed while the simulation is running.
7753 ///
7754 /// For spherical joints, limit.min and limit.max must both be in range [-Pi, Pi].
7755 pub fn PxArticulationJointReducedCoordinate_setLimitParams_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, limit: *const PxArticulationLimit);
7756
7757 /// Returns the joint limits for a given axis.
7758 ///
7759 /// The joint limits.
7760 pub fn PxArticulationJointReducedCoordinate_getLimitParams(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> PxArticulationLimit;
7761
7762 /// Configures a joint drive for the given axis.
7763 ///
7764 /// See PxArticulationDrive for parameter details; and the manual for further information, and the drives' implicit spring-damper (i.e. PD control) implementation in particular.
7765 ///
7766 /// This call is not allowed while the simulation is running.
7767 pub fn PxArticulationJointReducedCoordinate_setDriveParams_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, drive: *const PxArticulationDrive);
7768
7769 /// Gets the joint drive configuration for the given axis.
7770 ///
7771 /// The drive parameters.
7772 pub fn PxArticulationJointReducedCoordinate_getDriveParams(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> PxArticulationDrive;
7773
7774 /// Sets the joint drive position target for the given axis.
7775 ///
7776 /// The target units are linear units (equivalent to scene units) for a translational axis, or rad for a rotational axis.
7777 ///
7778 /// This call is not allowed while the simulation is running.
7779 ///
7780 /// For spherical joints, target must be in range [-Pi, Pi].
7781 ///
7782 /// The target is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the joint will drive the parent and child links to poses that obey Gp * Lp * J = Gc * Lc. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistTarget, swing1Target, swing2Target))). For joints restricted to linear motion, J has the form PxTransform(PxVec3(XTarget, YTarget, ZTarget), PxQuat(PxIdentity)).
7783 ///
7784 /// For spherical joints with more than 1 degree of freedom, the joint target angles taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint drive target is not the shortest path rotation. The joint pose J that is the outcome after driving to the target pose will always be the equivalent of the shortest path rotation.
7785 pub fn PxArticulationJointReducedCoordinate_setDriveTarget_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, target: f32, autowake: bool);
7786
7787 /// Returns the joint drive position target for the given axis.
7788 ///
7789 /// The target position.
7790 pub fn PxArticulationJointReducedCoordinate_getDriveTarget(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;
7791
7792 /// Sets the joint drive velocity target for the given axis.
7793 ///
7794 /// The target units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
7795 ///
7796 /// This call is not allowed while the simulation is running.
7797 pub fn PxArticulationJointReducedCoordinate_setDriveVelocity_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, targetVel: f32, autowake: bool);
7798
7799 /// Returns the joint drive velocity target for the given axis.
7800 ///
7801 /// The target velocity.
7802 pub fn PxArticulationJointReducedCoordinate_getDriveVelocity(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;
7803
7804 /// Sets the joint armature for the given axis.
7805 ///
7806 /// - The armature is directly added to the joint-space spatial inertia of the corresponding axis.
7807 /// - The armature is in mass units for a prismatic (i.e. linear) joint, and in mass units * (scene linear units)^2 for a rotational joint.
7808 ///
7809 /// This call is not allowed while the simulation is running.
7810 pub fn PxArticulationJointReducedCoordinate_setArmature_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, armature: f32);
7811
7812 /// Gets the joint armature for the given axis.
7813 ///
7814 /// The armature set on the given axis.
7815 pub fn PxArticulationJointReducedCoordinate_getArmature(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;
7816
7817 /// Sets the joint friction coefficient, which applies to all joint axes.
7818 ///
7819 /// - The joint friction is unitless and relates the magnitude of the spatial force [F_trans, T_trans] transmitted from parent to child link to
7820 /// the maximal friction force F_resist that may be applied by the solver to resist joint motion, per axis; i.e. |F_resist|
7821 /// <
7822 /// = coefficient * (|F_trans| + |T_trans|),
7823 /// where F_resist may refer to a linear force or torque depending on the joint axis.
7824 /// - The simulated friction effect is therefore similar to static and Coulomb friction. In order to simulate dynamic joint friction, use a joint drive with
7825 /// zero stiffness and zero velocity target, and an appropriately dimensioned damping parameter.
7826 ///
7827 /// This call is not allowed while the simulation is running.
7828 pub fn PxArticulationJointReducedCoordinate_setFrictionCoefficient_mut(self_: *mut PxArticulationJointReducedCoordinate, coefficient: f32);
7829
7830 /// Gets the joint friction coefficient.
7831 ///
7832 /// The joint friction coefficient.
7833 pub fn PxArticulationJointReducedCoordinate_getFrictionCoefficient(self_: *const PxArticulationJointReducedCoordinate) -> f32;
7834
7835 /// Sets the maximal joint velocity enforced for all axes.
7836 ///
7837 /// - The solver will apply appropriate joint-space impulses in order to enforce the per-axis joint-velocity limit.
7838 /// - The velocity units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
7839 ///
7840 /// This call is not allowed while the simulation is running.
7841 pub fn PxArticulationJointReducedCoordinate_setMaxJointVelocity_mut(self_: *mut PxArticulationJointReducedCoordinate, maxJointV: f32);
7842
7843 /// Gets the maximal joint velocity enforced for all axes.
7844 ///
7845 /// The maximal per-axis joint velocity.
7846 pub fn PxArticulationJointReducedCoordinate_getMaxJointVelocity(self_: *const PxArticulationJointReducedCoordinate) -> f32;
7847
7848 /// Sets the joint position for the given axis.
7849 ///
7850 /// - For performance, prefer PxArticulationCache::jointPosition to set joint positions in a batch articulation state update.
7851 /// - Use PxArticulationReducedCoordinate::updateKinematic after all state updates to the articulation via non-cache API such as this method,
7852 /// in order to update link states for the next simulation frame or querying.
7853 ///
7854 /// This call is not allowed while the simulation is running.
7855 ///
7856 /// For spherical joints, jointPos must be in range [-Pi, Pi].
7857 ///
7858 /// Joint position is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the parent and child links will be given poses that obey Gp * Lp * J = Gc * Lc with J denoting the joint pose. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistPos, swing1Pos, swing2Pos))). For joints restricted to linear motion, J has the form PxTransform(PxVec3(xPos, yPos, zPos), PxQuat(PxIdentity)).
7859 ///
7860 /// For spherical joints with more than 1 degree of freedom, the input joint positions taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint positions is not the shortest path rotation. The joint pose J that is the outcome of setting and applying the joint positions will always be the equivalent of the shortest path rotation.
7861 pub fn PxArticulationJointReducedCoordinate_setJointPosition_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, jointPos: f32);
7862
7863 /// Gets the joint position for the given axis, i.e. joint degree of freedom (DOF).
7864 ///
7865 /// For performance, prefer PxArticulationCache::jointPosition to get joint positions in a batch query.
7866 ///
7867 /// The joint position in linear units (equivalent to scene units) for a translational axis, or radians for a rotational axis.
7868 ///
7869 /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
7870 /// and in PxContactModifyCallback or in contact report callbacks.
7871 pub fn PxArticulationJointReducedCoordinate_getJointPosition(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;
7872
7873 /// Sets the joint velocity for the given axis.
7874 ///
7875 /// - For performance, prefer PxArticulationCache::jointVelocity to set joint velocities in a batch articulation state update.
7876 /// - Use PxArticulationReducedCoordinate::updateKinematic after all state updates to the articulation via non-cache API such as this method,
7877 /// in order to update link states for the next simulation frame or querying.
7878 ///
7879 /// This call is not allowed while the simulation is running.
7880 pub fn PxArticulationJointReducedCoordinate_setJointVelocity_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, jointVel: f32);
7881
7882 /// Gets the joint velocity for the given axis.
7883 ///
7884 /// For performance, prefer PxArticulationCache::jointVelocity to get joint velocities in a batch query.
7885 ///
7886 /// The joint velocity in linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
7887 ///
7888 /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
7889 /// and in PxContactModifyCallback or in contact report callbacks.
7890 pub fn PxArticulationJointReducedCoordinate_getJointVelocity(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;
7891
7892 /// Returns the string name of the dynamic type.
7893 ///
7894 /// The string name.
7895 pub fn PxArticulationJointReducedCoordinate_getConcreteTypeName(self_: *const PxArticulationJointReducedCoordinate) -> *const std::ffi::c_char;
7896
7897 /// Decrements the reference count of a shape and releases it if the new reference count is zero.
7898 ///
7899 /// Note that in releases prior to PhysX 3.3 this method did not have reference counting semantics and was used to destroy a shape
7900 /// created with PxActor::createShape(). In PhysX 3.3 and above, this usage is deprecated, instead, use PxRigidActor::detachShape() to detach
7901 /// a shape from an actor. If the shape to be detached was created with PxActor::createShape(), the actor holds the only counted reference,
7902 /// and so when the shape is detached it will also be destroyed.
7903 pub fn PxShape_release_mut(self_: *mut PxShape);
7904
7905 /// Adjust the geometry of the shape.
7906 ///
7907 /// The type of the passed in geometry must match the geometry type of the shape.
7908 ///
7909 /// It is not allowed to change the geometry type of a shape.
7910 ///
7911 /// This function does not guarantee correct/continuous behavior when objects are resting on top of old or new geometry.
7912 pub fn PxShape_setGeometry_mut(self_: *mut PxShape, geometry: *const PxGeometry);
7913
7914 /// Retrieve a reference to the shape's geometry.
7915 ///
7916 /// The returned reference has the same lifetime as the PxShape it comes from.
7917 ///
7918 /// Reference to internal PxGeometry object.
7919 pub fn PxShape_getGeometry(self_: *const PxShape) -> *const PxGeometry;
7920
7921 /// Retrieves the actor which this shape is associated with.
7922 ///
7923 /// The actor this shape is associated with, if it is an exclusive shape, else NULL
7924 pub fn PxShape_getActor(self_: *const PxShape) -> *mut PxRigidActor;
7925
7926 /// Sets the pose of the shape in actor space, i.e. relative to the actors to which they are attached.
7927 ///
7928 /// This transformation is identity by default.
7929 ///
7930 /// The local pose is an attribute of the shape, and so will apply to all actors to which the shape is attached.
7931 ///
7932 /// Sleeping:
7933 /// Does
7934 /// NOT
7935 /// wake the associated actor up automatically.
7936 ///
7937 /// Note:
7938 /// Does not automatically update the inertia properties of the owning actor (if applicable); use the
7939 /// PhysX extensions method [`PxRigidBodyExt::updateMassAndInertia`]() to do this.
7940 ///
7941 /// Default:
7942 /// the identity transform
7943 pub fn PxShape_setLocalPose_mut(self_: *mut PxShape, pose: *const PxTransform);
7944
7945 /// Retrieves the pose of the shape in actor space, i.e. relative to the actor they are owned by.
7946 ///
7947 /// This transformation is identity by default.
7948 ///
7949 /// Pose of shape relative to the actor's frame.
7950 pub fn PxShape_getLocalPose(self_: *const PxShape) -> PxTransform;
7951
7952 /// Sets the user definable collision filter data.
7953 ///
7954 /// Sleeping:
7955 /// Does wake up the actor if the filter data change causes a formerly suppressed
7956 /// collision pair to be enabled.
7957 ///
7958 /// Default:
7959 /// (0,0,0,0)
7960 pub fn PxShape_setSimulationFilterData_mut(self_: *mut PxShape, data: *const PxFilterData);
7961
7962 /// Retrieves the shape's collision filter data.
7963 pub fn PxShape_getSimulationFilterData(self_: *const PxShape) -> PxFilterData;
7964
7965 /// Sets the user definable query filter data.
7966 ///
7967 /// Default:
7968 /// (0,0,0,0)
7969 pub fn PxShape_setQueryFilterData_mut(self_: *mut PxShape, data: *const PxFilterData);
7970
7971 /// Retrieves the shape's Query filter data.
7972 pub fn PxShape_getQueryFilterData(self_: *const PxShape) -> PxFilterData;
7973
7974 /// Assigns material(s) to the shape. Will remove existing materials from the shape.
7975 ///
7976 /// Sleeping:
7977 /// Does
7978 /// NOT
7979 /// wake the associated actor up automatically.
7980 pub fn PxShape_setMaterials_mut(self_: *mut PxShape, materials: *const *mut PxMaterial, materialCount: u16);
7981
7982 /// Returns the number of materials assigned to the shape.
7983 ///
7984 /// You can use [`getMaterials`]() to retrieve the material pointers.
7985 ///
7986 /// Number of materials associated with this shape.
7987 pub fn PxShape_getNbMaterials(self_: *const PxShape) -> u16;
7988
7989 /// Retrieve all the material pointers associated with the shape.
7990 ///
7991 /// You can retrieve the number of material pointers by calling [`getNbMaterials`]()
7992 ///
7993 /// Note: The returned data may contain invalid pointers if you release materials using [`PxMaterial::release`]().
7994 ///
7995 /// Number of material pointers written to the buffer.
7996 pub fn PxShape_getMaterials(self_: *const PxShape, userBuffer: *mut *mut PxMaterial, bufferSize: u32, startIndex: u32) -> u32;
7997
7998 /// Retrieve material from given triangle index.
7999 ///
8000 /// The input index is the internal triangle index as used inside the SDK. This is the index
8001 /// returned to users by various SDK functions such as raycasts.
8002 ///
8003 /// This function is only useful for triangle meshes or heightfields, which have per-triangle
8004 /// materials. For other shapes or SDF triangle meshes, the function returns the single material
8005 /// associated with the shape, regardless of the index.
8006 ///
8007 /// Material from input triangle
8008 ///
8009 /// If faceIndex value of 0xFFFFffff is passed as an input for mesh and heightfield shapes, this function will issue a warning and return NULL.
8010 ///
8011 /// Scene queries set the value of PxQueryHit::faceIndex to 0xFFFFffff whenever it is undefined or does not apply.
8012 pub fn PxShape_getMaterialFromInternalFaceIndex(self_: *const PxShape, faceIndex: u32) -> *mut PxBaseMaterial;
8013
8014 /// Sets the contact offset.
8015 ///
8016 /// Shapes whose distance is less than the sum of their contactOffset values will generate contacts. The contact offset must be positive and
8017 /// greater than the rest offset. Having a contactOffset greater than than the restOffset allows the collision detection system to
8018 /// predictively enforce the contact constraint even when the objects are slightly separated. This prevents jitter that would occur
8019 /// if the constraint were enforced only when shapes were within the rest distance.
8020 ///
8021 /// Default:
8022 /// 0.02f * PxTolerancesScale::length
8023 ///
8024 /// Sleeping:
8025 /// Does
8026 /// NOT
8027 /// wake the associated actor up automatically.
8028 pub fn PxShape_setContactOffset_mut(self_: *mut PxShape, contactOffset: f32);
8029
8030 /// Retrieves the contact offset.
8031 ///
8032 /// The contact offset of the shape.
8033 pub fn PxShape_getContactOffset(self_: *const PxShape) -> f32;
8034
8035 /// Sets the rest offset.
8036 ///
8037 /// Two shapes will come to rest at a distance equal to the sum of their restOffset values. If the restOffset is 0, they should converge to touching
8038 /// exactly. Having a restOffset greater than zero is useful to have objects slide smoothly, so that they do not get hung up on irregularities of
8039 /// each others' surfaces.
8040 ///
8041 /// Default:
8042 /// 0.0f
8043 ///
8044 /// Sleeping:
8045 /// Does
8046 /// NOT
8047 /// wake the associated actor up automatically.
8048 pub fn PxShape_setRestOffset_mut(self_: *mut PxShape, restOffset: f32);
8049
8050 /// Retrieves the rest offset.
8051 ///
8052 /// The rest offset of the shape.
8053 pub fn PxShape_getRestOffset(self_: *const PxShape) -> f32;
8054
8055 /// Sets the density used to interact with fluids.
8056 ///
8057 /// To be physically accurate, the density of a rigid body should be computed as its mass divided by its volume. To
8058 /// simplify tuning the interaction of fluid and rigid bodies, the density for fluid can differ from the real density. This
8059 /// allows to create floating bodies, even if they are supposed to sink with their mass and volume.
8060 ///
8061 /// Default:
8062 /// 800.0f
8063 pub fn PxShape_setDensityForFluid_mut(self_: *mut PxShape, densityForFluid: f32);
8064
8065 /// Retrieves the density used to interact with fluids.
8066 ///
8067 /// The density of the body when interacting with fluid.
8068 pub fn PxShape_getDensityForFluid(self_: *const PxShape) -> f32;
8069
8070 /// Sets torsional patch radius.
8071 ///
8072 /// This defines the radius of the contact patch used to apply torsional friction. If the radius is 0, no torsional friction
8073 /// will be applied. If the radius is > 0, some torsional friction will be applied. This is proportional to the penetration depth
8074 /// so, if the shapes are separated or penetration is zero, no torsional friction will be applied. It is used to approximate
8075 /// rotational friction introduced by the compression of contacting surfaces.
8076 ///
8077 /// Default:
8078 /// 0.0
8079 pub fn PxShape_setTorsionalPatchRadius_mut(self_: *mut PxShape, radius: f32);
8080
8081 /// Gets torsional patch radius.
8082 ///
8083 /// This defines the radius of the contact patch used to apply torsional friction. If the radius is 0, no torsional friction
8084 /// will be applied. If the radius is > 0, some torsional friction will be applied. This is proportional to the penetration depth
8085 /// so, if the shapes are separated or penetration is zero, no torsional friction will be applied. It is used to approximate
8086 /// rotational friction introduced by the compression of contacting surfaces.
8087 ///
8088 /// The torsional patch radius of the shape.
8089 pub fn PxShape_getTorsionalPatchRadius(self_: *const PxShape) -> f32;
8090
8091 /// Sets minimum torsional patch radius.
8092 ///
8093 /// This defines the minimum radius of the contact patch used to apply torsional friction. If the radius is 0, the amount of torsional friction
8094 /// that will be applied will be entirely dependent on the value of torsionalPatchRadius.
8095 ///
8096 /// If the radius is > 0, some torsional friction will be applied regardless of the value of torsionalPatchRadius or the amount of penetration.
8097 ///
8098 /// Default:
8099 /// 0.0
8100 pub fn PxShape_setMinTorsionalPatchRadius_mut(self_: *mut PxShape, radius: f32);
8101
8102 /// Gets minimum torsional patch radius.
8103 ///
8104 /// This defines the minimum radius of the contact patch used to apply torsional friction. If the radius is 0, the amount of torsional friction
8105 /// that will be applied will be entirely dependent on the value of torsionalPatchRadius.
8106 ///
8107 /// If the radius is > 0, some torsional friction will be applied regardless of the value of torsionalPatchRadius or the amount of penetration.
8108 ///
8109 /// The minimum torsional patch radius of the shape.
8110 pub fn PxShape_getMinTorsionalPatchRadius(self_: *const PxShape) -> f32;
8111
8112 /// Sets shape flags
8113 ///
8114 /// Sleeping:
8115 /// Does
8116 /// NOT
8117 /// wake the associated actor up automatically.
8118 ///
8119 /// Default:
8120 /// PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSIMULATION_SHAPE | PxShapeFlag::eSCENE_QUERY_SHAPE
8121 pub fn PxShape_setFlag_mut(self_: *mut PxShape, flag: PxShapeFlag, value: bool);
8122
8123 /// Sets shape flags
8124 pub fn PxShape_setFlags_mut(self_: *mut PxShape, inFlags: PxShapeFlags);
8125
8126 /// Retrieves shape flags.
8127 ///
8128 /// The values of the shape flags.
8129 pub fn PxShape_getFlags(self_: *const PxShape) -> PxShapeFlags;
8130
8131 /// Returns true if the shape is exclusive to an actor.
8132 pub fn PxShape_isExclusive(self_: *const PxShape) -> bool;
8133
8134 /// Sets a name string for the object that can be retrieved with [`getName`]().
8135 ///
8136 /// This is for debugging and is not used by the SDK.
8137 /// The string is not copied by the SDK, only the pointer is stored.
8138 ///
8139 /// Default:
8140 /// NULL
8141 pub fn PxShape_setName_mut(self_: *mut PxShape, name: *const std::ffi::c_char);
8142
8143 /// retrieves the name string set with setName().
8144 ///
8145 /// The name associated with the shape.
8146 pub fn PxShape_getName(self_: *const PxShape) -> *const std::ffi::c_char;
8147
8148 pub fn PxShape_getConcreteTypeName(self_: *const PxShape) -> *const std::ffi::c_char;
8149
8150 /// Deletes the rigid actor object.
8151 ///
8152 /// Also releases any shapes associated with the actor.
8153 ///
8154 /// Releasing an actor will affect any objects that are connected to the actor (constraint shaders like joints etc.).
8155 /// Such connected objects will be deleted upon scene deletion, or explicitly by the user by calling release()
8156 /// on these objects. It is recommended to always remove all objects that reference actors before the actors
8157 /// themselves are removed. It is not possible to retrieve list of dead connected objects.
8158 ///
8159 /// Sleeping:
8160 /// This call will awaken any sleeping actors contacting the deleted actor (directly or indirectly).
8161 ///
8162 /// Calls [`PxActor::release`]() so you might want to check the documentation of that method as well.
8163 pub fn PxRigidActor_release_mut(self_: *mut PxRigidActor);
8164
8165 /// Returns the internal actor index.
8166 ///
8167 /// This is only defined for actors that have been added to a scene.
8168 ///
8169 /// The internal actor index, or 0xffffffff if the actor is not part of a scene.
8170 pub fn PxRigidActor_getInternalActorIndex(self_: *const PxRigidActor) -> u32;
8171
8172 /// Retrieves the actors world space transform.
8173 ///
8174 /// The getGlobalPose() method retrieves the actor's current actor space to world space transformation.
8175 ///
8176 /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
8177 /// in PxContactModifyCallback or in contact report callbacks).
8178 ///
8179 /// Global pose of object.
8180 pub fn PxRigidActor_getGlobalPose(self_: *const PxRigidActor) -> PxTransform;
8181
8182 /// Method for setting an actor's pose in the world.
8183 ///
8184 /// This method instantaneously changes the actor space to world space transformation.
8185 ///
8186 /// This method is mainly for dynamic rigid bodies (see [`PxRigidDynamic`]). Calling this method on static actors is
8187 /// likely to result in a performance penalty, since internal optimization structures for static actors may need to be
8188 /// recomputed. In addition, moving static actors will not interact correctly with dynamic actors or joints.
8189 ///
8190 /// To directly control an actor's position and have it correctly interact with dynamic bodies and joints, create a dynamic
8191 /// body with the PxRigidBodyFlag::eKINEMATIC flag, then use the setKinematicTarget() commands to define its path.
8192 ///
8193 /// Even when moving dynamic actors, exercise restraint in making use of this method. Where possible, avoid:
8194 ///
8195 /// moving actors into other actors, thus causing overlap (an invalid physical state)
8196 ///
8197 /// moving an actor that is connected by a joint to another away from the other (thus causing joint error)
8198 ///
8199 /// Sleeping:
8200 /// This call wakes dynamic actors if they are sleeping and the autowake parameter is true (default).
8201 pub fn PxRigidActor_setGlobalPose_mut(self_: *mut PxRigidActor, pose: *const PxTransform, autowake: bool);
8202
8203 /// Attach a shape to an actor
8204 ///
8205 /// This call will increment the reference count of the shape.
8206 ///
8207 /// Mass properties of dynamic rigid actors will not automatically be recomputed
8208 /// to reflect the new mass distribution implied by the shape. Follow this call with a call to
8209 /// the PhysX extensions method [`PxRigidBodyExt::updateMassAndInertia`]() to do that.
8210 ///
8211 /// Attaching a triangle mesh, heightfield or plane geometry shape configured as eSIMULATION_SHAPE is not supported for
8212 /// non-kinematic PxRigidDynamic instances.
8213 ///
8214 /// Sleeping:
8215 /// Does
8216 /// NOT
8217 /// wake the actor up automatically.
8218 ///
8219 /// True if success.
8220 pub fn PxRigidActor_attachShape_mut(self_: *mut PxRigidActor, shape: *mut PxShape) -> bool;
8221
8222 /// Detach a shape from an actor.
8223 ///
8224 /// This will also decrement the reference count of the PxShape, and if the reference count is zero, will cause it to be deleted.
8225 ///
8226 /// Sleeping:
8227 /// Does
8228 /// NOT
8229 /// wake the actor up automatically.
8230 pub fn PxRigidActor_detachShape_mut(self_: *mut PxRigidActor, shape: *mut PxShape, wakeOnLostTouch: bool);
8231
8232 /// Returns the number of shapes assigned to the actor.
8233 ///
8234 /// You can use [`getShapes`]() to retrieve the shape pointers.
8235 ///
8236 /// Number of shapes associated with this actor.
8237 pub fn PxRigidActor_getNbShapes(self_: *const PxRigidActor) -> u32;
8238
8239 /// Retrieve all the shape pointers belonging to the actor.
8240 ///
8241 /// These are the shapes used by the actor for collision detection.
8242 ///
8243 /// You can retrieve the number of shape pointers by calling [`getNbShapes`]()
8244 ///
8245 /// Note: Removing shapes with [`PxShape::release`]() will invalidate the pointer of the released shape.
8246 ///
8247 /// Number of shape pointers written to the buffer.
8248 pub fn PxRigidActor_getShapes(self_: *const PxRigidActor, userBuffer: *mut *mut PxShape, bufferSize: u32, startIndex: u32) -> u32;
8249
8250 /// Returns the number of constraint shaders attached to the actor.
8251 ///
8252 /// You can use [`getConstraints`]() to retrieve the constraint shader pointers.
8253 ///
8254 /// Number of constraint shaders attached to this actor.
8255 pub fn PxRigidActor_getNbConstraints(self_: *const PxRigidActor) -> u32;
8256
8257 /// Retrieve all the constraint shader pointers belonging to the actor.
8258 ///
8259 /// You can retrieve the number of constraint shader pointers by calling [`getNbConstraints`]()
8260 ///
8261 /// Note: Removing constraint shaders with [`PxConstraint::release`]() will invalidate the pointer of the released constraint.
8262 ///
8263 /// Number of constraint shader pointers written to the buffer.
8264 pub fn PxRigidActor_getConstraints(self_: *const PxRigidActor, userBuffer: *mut *mut PxConstraint, bufferSize: u32, startIndex: u32) -> u32;
8265
8266 pub fn PxNodeIndex_new(id: u32, articLinkId: u32) -> PxNodeIndex;
8267
8268 pub fn PxNodeIndex_new_1(id: u32) -> PxNodeIndex;
8269
8270 pub fn PxNodeIndex_index(self_: *const PxNodeIndex) -> u32;
8271
8272 pub fn PxNodeIndex_articulationLinkId(self_: *const PxNodeIndex) -> u32;
8273
8274 pub fn PxNodeIndex_isArticulation(self_: *const PxNodeIndex) -> u32;
8275
8276 pub fn PxNodeIndex_isStaticBody(self_: *const PxNodeIndex) -> bool;
8277
8278 pub fn PxNodeIndex_isValid(self_: *const PxNodeIndex) -> bool;
8279
8280 pub fn PxNodeIndex_setIndices_mut(self_: *mut PxNodeIndex, index: u32, articLinkId: u32);
8281
8282 pub fn PxNodeIndex_setIndices_mut_1(self_: *mut PxNodeIndex, index: u32);
8283
8284 pub fn PxNodeIndex_getInd(self_: *const PxNodeIndex) -> u64;
8285
8286 /// Sets the pose of the center of mass relative to the actor.
8287 ///
8288 /// Changing this transform will not move the actor in the world!
8289 ///
8290 /// Setting an unrealistic center of mass which is a long way from the body can make it difficult for
8291 /// the SDK to solve constraints. Perhaps leading to instability and jittering bodies.
8292 ///
8293 /// Default:
8294 /// the identity transform
8295 pub fn PxRigidBody_setCMassLocalPose_mut(self_: *mut PxRigidBody, pose: *const PxTransform);
8296
8297 /// Retrieves the center of mass pose relative to the actor frame.
8298 ///
8299 /// The center of mass pose relative to the actor frame.
8300 pub fn PxRigidBody_getCMassLocalPose(self_: *const PxRigidBody) -> PxTransform;
8301
8302 /// Sets the mass of a dynamic actor.
8303 ///
8304 /// The mass must be non-negative.
8305 ///
8306 /// setMass() does not update the inertial properties of the body, to change the inertia tensor
8307 /// use setMassSpaceInertiaTensor() or the PhysX extensions method [`PxRigidBodyExt::updateMassAndInertia`]().
8308 ///
8309 /// A value of 0 is interpreted as infinite mass.
8310 ///
8311 /// Values of 0 are not permitted for instances of PxArticulationLink but are permitted for instances of PxRigidDynamic.
8312 ///
8313 /// Default:
8314 /// 1.0
8315 ///
8316 /// Sleeping:
8317 /// Does
8318 /// NOT
8319 /// wake the actor up automatically.
8320 pub fn PxRigidBody_setMass_mut(self_: *mut PxRigidBody, mass: f32);
8321
8322 /// Retrieves the mass of the actor.
8323 ///
8324 /// A value of 0 is interpreted as infinite mass.
8325 ///
8326 /// The mass of this actor.
8327 pub fn PxRigidBody_getMass(self_: *const PxRigidBody) -> f32;
8328
8329 /// Retrieves the inverse mass of the actor.
8330 ///
8331 /// The inverse mass of this actor.
8332 pub fn PxRigidBody_getInvMass(self_: *const PxRigidBody) -> f32;
8333
8334 /// Sets the inertia tensor, using a parameter specified in mass space coordinates.
8335 ///
8336 /// Note that such matrices are diagonal -- the passed vector is the diagonal.
8337 ///
8338 /// If you have a non diagonal world/actor space inertia tensor(3x3 matrix). Then you need to
8339 /// diagonalize it and set an appropriate mass space transform. See [`setCMassLocalPose`]().
8340 ///
8341 /// The inertia tensor elements must be non-negative.
8342 ///
8343 /// A value of 0 in an element is interpreted as infinite inertia along that axis.
8344 ///
8345 /// Values of 0 are not permitted for instances of PxArticulationLink but are permitted for instances of PxRigidDynamic.
8346 ///
8347 /// Default:
8348 /// (1.0, 1.0, 1.0)
8349 ///
8350 /// Sleeping:
8351 /// Does
8352 /// NOT
8353 /// wake the actor up automatically.
8354 pub fn PxRigidBody_setMassSpaceInertiaTensor_mut(self_: *mut PxRigidBody, m: *const PxVec3);
8355
8356 /// Retrieves the diagonal inertia tensor of the actor relative to the mass coordinate frame.
8357 ///
8358 /// This method retrieves a mass frame inertia vector.
8359 ///
8360 /// The mass space inertia tensor of this actor.
8361 ///
8362 /// A value of 0 in an element is interpreted as infinite inertia along that axis.
8363 pub fn PxRigidBody_getMassSpaceInertiaTensor(self_: *const PxRigidBody) -> PxVec3;
8364
8365 /// Retrieves the diagonal inverse inertia tensor of the actor relative to the mass coordinate frame.
8366 ///
8367 /// This method retrieves a mass frame inverse inertia vector.
8368 ///
8369 /// A value of 0 in an element is interpreted as infinite inertia along that axis.
8370 ///
8371 /// The mass space inverse inertia tensor of this actor.
8372 pub fn PxRigidBody_getMassSpaceInvInertiaTensor(self_: *const PxRigidBody) -> PxVec3;
8373
8374 /// Sets the linear damping coefficient.
8375 ///
8376 /// Zero represents no damping. The damping coefficient must be nonnegative.
8377 ///
8378 /// Default:
8379 /// 0.0
8380 pub fn PxRigidBody_setLinearDamping_mut(self_: *mut PxRigidBody, linDamp: f32);
8381
8382 /// Retrieves the linear damping coefficient.
8383 ///
8384 /// The linear damping coefficient associated with this actor.
8385 pub fn PxRigidBody_getLinearDamping(self_: *const PxRigidBody) -> f32;
8386
8387 /// Sets the angular damping coefficient.
8388 ///
8389 /// Zero represents no damping.
8390 ///
8391 /// The angular damping coefficient must be nonnegative.
8392 ///
8393 /// Default:
8394 /// 0.05
8395 pub fn PxRigidBody_setAngularDamping_mut(self_: *mut PxRigidBody, angDamp: f32);
8396
8397 /// Retrieves the angular damping coefficient.
8398 ///
8399 /// The angular damping coefficient associated with this actor.
8400 pub fn PxRigidBody_getAngularDamping(self_: *const PxRigidBody) -> f32;
8401
8402 /// Retrieves the linear velocity of an actor.
8403 ///
8404 /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
8405 /// in PxContactModifyCallback or in contact report callbacks).
8406 ///
8407 /// The linear velocity of the actor.
8408 pub fn PxRigidBody_getLinearVelocity(self_: *const PxRigidBody) -> PxVec3;
8409
8410 /// Retrieves the angular velocity of the actor.
8411 ///
8412 /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
8413 /// in PxContactModifyCallback or in contact report callbacks).
8414 ///
8415 /// The angular velocity of the actor.
8416 pub fn PxRigidBody_getAngularVelocity(self_: *const PxRigidBody) -> PxVec3;
8417
8418 /// Lets you set the maximum linear velocity permitted for this actor.
8419 ///
8420 /// With this function, you can set the maximum linear velocity permitted for this rigid body.
8421 /// Higher angular velocities are clamped to this value.
8422 ///
8423 /// Note: The angular velocity is clamped to the set value
8424 /// before
8425 /// the solver, which means that
8426 /// the limit may still be momentarily exceeded.
8427 ///
8428 /// Default:
8429 /// PX_MAX_F32
8430 pub fn PxRigidBody_setMaxLinearVelocity_mut(self_: *mut PxRigidBody, maxLinVel: f32);
8431
8432 /// Retrieves the maximum angular velocity permitted for this actor.
8433 ///
8434 /// The maximum allowed angular velocity for this actor.
8435 pub fn PxRigidBody_getMaxLinearVelocity(self_: *const PxRigidBody) -> f32;
8436
8437 /// Lets you set the maximum angular velocity permitted for this actor.
8438 ///
8439 /// For various internal computations, very quickly rotating actors introduce error
8440 /// into the simulation, which leads to undesired results.
8441 ///
8442 /// With this function, you can set the maximum angular velocity permitted for this rigid body.
8443 /// Higher angular velocities are clamped to this value.
8444 ///
8445 /// Note: The angular velocity is clamped to the set value
8446 /// before
8447 /// the solver, which means that
8448 /// the limit may still be momentarily exceeded.
8449 ///
8450 /// Default:
8451 /// 100.0
8452 pub fn PxRigidBody_setMaxAngularVelocity_mut(self_: *mut PxRigidBody, maxAngVel: f32);
8453
8454 /// Retrieves the maximum angular velocity permitted for this actor.
8455 ///
8456 /// The maximum allowed angular velocity for this actor.
8457 pub fn PxRigidBody_getMaxAngularVelocity(self_: *const PxRigidBody) -> f32;
8458
8459 /// Applies a force (or impulse) defined in the global coordinate frame to the actor at its center of mass.
8460 ///
8461 /// This will not induce a torque
8462 /// .
8463 ///
8464 /// ::PxForceMode determines if the force is to be conventional or impulsive.
8465 ///
8466 /// Each actor has an acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION
8467 /// and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same
8468 /// accumulators and are just short hand for multiplying the vector parameter by inverse mass and then using PxForceMode::eACCELERATION and
8469 /// PxForceMode::eVELOCITY_CHANGE respectively.
8470 ///
8471 /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
8472 ///
8473 /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
8474 ///
8475 /// if this is called on an articulation link, only the link is updated, not the entire articulation.
8476 ///
8477 /// see [`PxRigidBodyExt::computeVelocityDeltaFromImpulse`] for details of how to compute the change in linear velocity that
8478 /// will arise from the application of an impulsive force, where an impulsive force is applied force multiplied by a timestep.
8479 ///
8480 /// Sleeping:
8481 /// This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the force is non-zero.
8482 pub fn PxRigidBody_addForce_mut(self_: *mut PxRigidBody, force: *const PxVec3, mode: PxForceMode, autowake: bool);
8483
8484 /// Applies an impulsive torque defined in the global coordinate frame to the actor.
8485 ///
8486 /// ::PxForceMode determines if the torque is to be conventional or impulsive.
8487 ///
8488 /// Each actor has an angular acceleration and an angular velocity change accumulator which are directly modified using the modes
8489 /// PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE
8490 /// also modify these same accumulators and are just short hand for multiplying the vector parameter by inverse inertia and then
8491 /// using PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively.
8492 ///
8493 /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
8494 ///
8495 /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
8496 ///
8497 /// if this called on an articulation link, only the link is updated, not the entire articulation.
8498 ///
8499 /// see [`PxRigidBodyExt::computeVelocityDeltaFromImpulse`] for details of how to compute the change in angular velocity that
8500 /// will arise from the application of an impulsive torque, where an impulsive torque is an applied torque multiplied by a timestep.
8501 ///
8502 /// Sleeping:
8503 /// This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the torque is non-zero.
8504 pub fn PxRigidBody_addTorque_mut(self_: *mut PxRigidBody, torque: *const PxVec3, mode: PxForceMode, autowake: bool);
8505
8506 /// Clears the accumulated forces (sets the accumulated force back to zero).
8507 ///
8508 /// Each actor has an acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION
8509 /// and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same
8510 /// accumulators (see PxRigidBody::addForce() for details); therefore the effect of calling clearForce(PxForceMode::eFORCE) is equivalent to calling
8511 /// clearForce(PxForceMode::eACCELERATION), and the effect of calling clearForce(PxForceMode::eIMPULSE) is equivalent to calling
8512 /// clearForce(PxForceMode::eVELOCITY_CHANGE).
8513 ///
8514 /// ::PxForceMode determines if the cleared force is to be conventional or impulsive.
8515 ///
8516 /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
8517 ///
8518 /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
8519 pub fn PxRigidBody_clearForce_mut(self_: *mut PxRigidBody, mode: PxForceMode);
8520
8521 /// Clears the impulsive torque defined in the global coordinate frame to the actor.
8522 ///
8523 /// ::PxForceMode determines if the cleared torque is to be conventional or impulsive.
8524 ///
8525 /// Each actor has an angular acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION
8526 /// and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same
8527 /// accumulators (see PxRigidBody::addTorque() for details); therefore the effect of calling clearTorque(PxForceMode::eFORCE) is equivalent to calling
8528 /// clearTorque(PxForceMode::eACCELERATION), and the effect of calling clearTorque(PxForceMode::eIMPULSE) is equivalent to calling
8529 /// clearTorque(PxForceMode::eVELOCITY_CHANGE).
8530 ///
8531 /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
8532 ///
8533 /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
8534 pub fn PxRigidBody_clearTorque_mut(self_: *mut PxRigidBody, mode: PxForceMode);
8535
8536 /// Sets the impulsive force and torque defined in the global coordinate frame to the actor.
8537 ///
8538 /// ::PxForceMode determines if the cleared torque is to be conventional or impulsive.
8539 ///
8540 /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
8541 ///
8542 /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
8543 pub fn PxRigidBody_setForceAndTorque_mut(self_: *mut PxRigidBody, force: *const PxVec3, torque: *const PxVec3, mode: PxForceMode);
8544
8545 /// Raises or clears a particular rigid body flag.
8546 ///
8547 /// See the list of flags [`PxRigidBodyFlag`]
8548 ///
8549 /// Default:
8550 /// no flags are set
8551 ///
8552 /// Sleeping:
8553 /// Does
8554 /// NOT
8555 /// wake the actor up automatically.
8556 pub fn PxRigidBody_setRigidBodyFlag_mut(self_: *mut PxRigidBody, flag: PxRigidBodyFlag, value: bool);
8557
8558 pub fn PxRigidBody_setRigidBodyFlags_mut(self_: *mut PxRigidBody, inFlags: PxRigidBodyFlags);
8559
8560 /// Reads the PxRigidBody flags.
8561 ///
8562 /// See the list of flags [`PxRigidBodyFlag`]
8563 ///
8564 /// The values of the PxRigidBody flags.
8565 pub fn PxRigidBody_getRigidBodyFlags(self_: *const PxRigidBody) -> PxRigidBodyFlags;
8566
8567 /// Sets the CCD minimum advance coefficient.
8568 ///
8569 /// The CCD minimum advance coefficient is a value in the range [0, 1] that is used to control the minimum amount of time a body is integrated when
8570 /// it has a CCD contact. The actual minimum amount of time that is integrated depends on various properties, including the relative speed and collision shapes
8571 /// of the bodies involved in the contact. From these properties, a numeric value is calculated that determines the maximum distance (and therefore maximum time)
8572 /// which these bodies could be integrated forwards that would ensure that these bodies did not pass through each-other. This value is then scaled by CCD minimum advance
8573 /// coefficient to determine the amount of time that will be consumed in the CCD pass.
8574 ///
8575 /// Things to consider:
8576 /// A large value (approaching 1) ensures that the objects will always advance some time. However, larger values increase the chances of objects gently drifting through each-other in
8577 /// scenes which the constraint solver can't converge, e.g. scenes where an object is being dragged through a wall with a constraint.
8578 /// A value of 0 ensures that the pair of objects stop at the exact time-of-impact and will not gently drift through each-other. However, with very small/thin objects initially in
8579 /// contact, this can lead to a large amount of time being dropped and increases the chances of jamming. Jamming occurs when the an object is persistently in contact with an object
8580 /// such that the time-of-impact is 0, which results in no time being advanced for those objects in that CCD pass.
8581 ///
8582 /// The chances of jamming can be reduced by increasing the number of CCD mass
8583 pub fn PxRigidBody_setMinCCDAdvanceCoefficient_mut(self_: *mut PxRigidBody, advanceCoefficient: f32);
8584
8585 /// Gets the CCD minimum advance coefficient.
8586 ///
8587 /// The value of the CCD min advance coefficient.
8588 pub fn PxRigidBody_getMinCCDAdvanceCoefficient(self_: *const PxRigidBody) -> f32;
8589
8590 /// Sets the maximum depenetration velocity permitted to be introduced by the solver.
8591 /// This value controls how much velocity the solver can introduce to correct for penetrations in contacts.
8592 pub fn PxRigidBody_setMaxDepenetrationVelocity_mut(self_: *mut PxRigidBody, biasClamp: f32);
8593
8594 /// Returns the maximum depenetration velocity the solver is permitted to introduced.
8595 /// This value controls how much velocity the solver can introduce to correct for penetrations in contacts.
8596 ///
8597 /// The maximum penetration bias applied by the solver.
8598 pub fn PxRigidBody_getMaxDepenetrationVelocity(self_: *const PxRigidBody) -> f32;
8599
8600 /// Sets a limit on the impulse that may be applied at a contact. The maximum impulse at a contact between two dynamic or kinematic
8601 /// bodies will be the minimum of the two limit values. For a collision between a static and a dynamic body, the impulse is limited
8602 /// by the value for the dynamic body.
8603 pub fn PxRigidBody_setMaxContactImpulse_mut(self_: *mut PxRigidBody, maxImpulse: f32);
8604
8605 /// Returns the maximum impulse that may be applied at a contact.
8606 ///
8607 /// The maximum impulse that may be applied at a contact
8608 pub fn PxRigidBody_getMaxContactImpulse(self_: *const PxRigidBody) -> f32;
8609
8610 /// Sets a distance scale whereby the angular influence of a contact on the normal constraint in a contact is
8611 /// zeroed if normal.cross(offset) falls below this tolerance. Rather than acting as an absolute value, this tolerance
8612 /// is scaled by the ratio rXn.dot(angVel)/normal.dot(linVel) such that contacts that have relatively larger angular velocity
8613 /// than linear normal velocity (e.g. rolling wheels) achieve larger slop values as the angular velocity increases.
8614 pub fn PxRigidBody_setContactSlopCoefficient_mut(self_: *mut PxRigidBody, slopCoefficient: f32);
8615
8616 /// Returns the contact slop coefficient.
8617 ///
8618 /// The contact slop coefficient.
8619 pub fn PxRigidBody_getContactSlopCoefficient(self_: *const PxRigidBody) -> f32;
8620
8621 /// Returns the island node index
8622 ///
8623 /// The island node index.
8624 pub fn PxRigidBody_getInternalIslandNodeIndex(self_: *const PxRigidBody) -> PxNodeIndex;
8625
8626 /// Releases the link from the articulation.
8627 ///
8628 /// Only a leaf articulation link can be released.
8629 ///
8630 /// Releasing a link is not allowed while the articulation link is in a scene. In order to release a link,
8631 /// remove and then re-add the corresponding articulation to the scene.
8632 pub fn PxArticulationLink_release_mut(self_: *mut PxArticulationLink);
8633
8634 /// Gets the articulation that the link is a part of.
8635 ///
8636 /// The articulation.
8637 pub fn PxArticulationLink_getArticulation(self_: *const PxArticulationLink) -> *mut PxArticulationReducedCoordinate;
8638
8639 /// Gets the joint which connects this link to its parent.
8640 ///
8641 /// The joint connecting the link to the parent. NULL for the root link.
8642 pub fn PxArticulationLink_getInboundJoint(self_: *const PxArticulationLink) -> *mut PxArticulationJointReducedCoordinate;
8643
8644 /// Gets the number of degrees of freedom of the joint which connects this link to its parent.
8645 ///
8646 /// - The root link DOF-count is defined to be 0 regardless of PxArticulationFlag::eFIX_BASE.
8647 /// - The return value is only valid for articulations that are in a scene.
8648 ///
8649 /// The number of degrees of freedom, or 0xFFFFFFFF if the articulation is not in a scene.
8650 pub fn PxArticulationLink_getInboundJointDof(self_: *const PxArticulationLink) -> u32;
8651
8652 /// Gets the number of child links.
8653 ///
8654 /// The number of child links.
8655 pub fn PxArticulationLink_getNbChildren(self_: *const PxArticulationLink) -> u32;
8656
8657 /// Gets the low-level link index that may be used to index into members of PxArticulationCache.
8658 ///
8659 /// The return value is only valid for articulations that are in a scene.
8660 ///
8661 /// The low-level index, or 0xFFFFFFFF if the articulation is not in a scene.
8662 pub fn PxArticulationLink_getLinkIndex(self_: *const PxArticulationLink) -> u32;
8663
8664 /// Retrieves the child links.
8665 ///
8666 /// The number of articulation links written to the buffer.
8667 pub fn PxArticulationLink_getChildren(self_: *const PxArticulationLink, userBuffer: *mut *mut PxArticulationLink, bufferSize: u32, startIndex: u32) -> u32;
8668
8669 /// Set the constraint-force-mixing scale term.
8670 ///
8671 /// The cfm scale term is a stabilization term that helps avoid instabilities with over-constrained
8672 /// configurations. It should be a small value that is multiplied by 1/mass internally to produce
8673 /// an additional bias added to the unit response term in the solver.
8674 ///
8675 /// Default:
8676 /// 0.025
8677 /// Range:
8678 /// [0, 1]
8679 ///
8680 /// This call is not allowed while the simulation is running.
8681 pub fn PxArticulationLink_setCfmScale_mut(self_: *mut PxArticulationLink, cfm: f32);
8682
8683 /// Get the constraint-force-mixing scale term.
8684 ///
8685 /// The constraint-force-mixing scale term.
8686 pub fn PxArticulationLink_getCfmScale(self_: *const PxArticulationLink) -> f32;
8687
8688 /// Get the linear velocity of the link.
8689 ///
8690 /// - The linear velocity is with respect to the link's center of mass and not the actor frame origin.
8691 /// - For performance, prefer PxArticulationCache::linkVelocity to get link spatial velocities in a batch query.
8692 /// - When the articulation state is updated via non-cache API, use PxArticulationReducedCoordinate::updateKinematic before querying velocity.
8693 ///
8694 /// The linear velocity of the link.
8695 ///
8696 /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
8697 /// and in PxContactModifyCallback or in contact report callbacks.
8698 pub fn PxArticulationLink_getLinearVelocity(self_: *const PxArticulationLink) -> PxVec3;
8699
8700 /// Get the angular velocity of the link.
8701 ///
8702 /// - For performance, prefer PxArticulationCache::linkVelocity to get link spatial velocities in a batch query.
8703 /// - When the articulation state is updated via non-cache API, use PxArticulationReducedCoordinate::updateKinematic before querying velocity.
8704 ///
8705 /// The angular velocity of the link.
8706 ///
8707 /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
8708 /// and in PxContactModifyCallback or in contact report callbacks.
8709 pub fn PxArticulationLink_getAngularVelocity(self_: *const PxArticulationLink) -> PxVec3;
8710
8711 /// Returns the string name of the dynamic type.
8712 ///
8713 /// The string name.
8714 pub fn PxArticulationLink_getConcreteTypeName(self_: *const PxArticulationLink) -> *const std::ffi::c_char;
8715
8716 pub fn PxConeLimitedConstraint_new() -> PxConeLimitedConstraint;
8717
8718 /// Releases a PxConstraint instance.
8719 ///
8720 /// This call does not wake up the connected rigid bodies.
8721 pub fn PxConstraint_release_mut(self_: *mut PxConstraint);
8722
8723 /// Retrieves the scene which this constraint belongs to.
8724 ///
8725 /// Owner Scene. NULL if not part of a scene.
8726 pub fn PxConstraint_getScene(self_: *const PxConstraint) -> *mut PxScene;
8727
8728 /// Retrieves the actors for this constraint.
8729 pub fn PxConstraint_getActors(self_: *const PxConstraint, actor0: *mut *mut PxRigidActor, actor1: *mut *mut PxRigidActor);
8730
8731 /// Sets the actors for this constraint.
8732 pub fn PxConstraint_setActors_mut(self_: *mut PxConstraint, actor0: *mut PxRigidActor, actor1: *mut PxRigidActor);
8733
8734 /// Notify the scene that the constraint shader data has been updated by the application
8735 pub fn PxConstraint_markDirty_mut(self_: *mut PxConstraint);
8736
8737 /// Retrieve the flags for this constraint
8738 ///
8739 /// the constraint flags
8740 pub fn PxConstraint_getFlags(self_: *const PxConstraint) -> PxConstraintFlags;
8741
8742 /// Set the flags for this constraint
8743 ///
8744 /// default: PxConstraintFlag::eDRIVE_LIMITS_ARE_FORCES
8745 pub fn PxConstraint_setFlags_mut(self_: *mut PxConstraint, flags: PxConstraintFlags);
8746
8747 /// Set a flag for this constraint
8748 pub fn PxConstraint_setFlag_mut(self_: *mut PxConstraint, flag: PxConstraintFlag, value: bool);
8749
8750 /// Retrieve the constraint force most recently applied to maintain this constraint.
8751 ///
8752 /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
8753 /// in PxContactModifyCallback or in contact report callbacks).
8754 pub fn PxConstraint_getForce(self_: *const PxConstraint, linear: *mut PxVec3, angular: *mut PxVec3);
8755
8756 /// whether the constraint is valid.
8757 ///
8758 /// A constraint is valid if it has at least one dynamic rigid body or articulation link. A constraint that
8759 /// is not valid may not be inserted into a scene, and therefore a static actor to which an invalid constraint
8760 /// is attached may not be inserted into a scene.
8761 ///
8762 /// Invalid constraints arise only when an actor to which the constraint is attached has been deleted.
8763 pub fn PxConstraint_isValid(self_: *const PxConstraint) -> bool;
8764
8765 /// Set the break force and torque thresholds for this constraint.
8766 ///
8767 /// If either the force or torque measured at the constraint exceed these thresholds the constraint will break.
8768 pub fn PxConstraint_setBreakForce_mut(self_: *mut PxConstraint, linear: f32, angular: f32);
8769
8770 /// Retrieve the constraint break force and torque thresholds
8771 pub fn PxConstraint_getBreakForce(self_: *const PxConstraint, linear: *mut f32, angular: *mut f32);
8772
8773 /// Set the minimum response threshold for a constraint row
8774 ///
8775 /// When using mass modification for a joint or infinite inertia for a jointed body, very stiff solver constraints can be generated which
8776 /// can destabilize simulation. Setting this value to a small positive value (e.g. 1e-8) will cause constraint rows to be ignored if very
8777 /// large changes in impulses will generate only small changes in velocity. When setting this value, also set
8778 /// PxConstraintFlag::eDISABLE_PREPROCESSING. The solver accuracy for this joint may be reduced.
8779 pub fn PxConstraint_setMinResponseThreshold_mut(self_: *mut PxConstraint, threshold: f32);
8780
8781 /// Retrieve the constraint break force and torque thresholds
8782 ///
8783 /// the minimum response threshold for a constraint row
8784 pub fn PxConstraint_getMinResponseThreshold(self_: *const PxConstraint) -> f32;
8785
8786 /// Fetch external owner of the constraint.
8787 ///
8788 /// Provides a reference to the external owner of a constraint and a unique owner type ID.
8789 ///
8790 /// Reference to the external object which owns the constraint.
8791 pub fn PxConstraint_getExternalReference_mut(self_: *mut PxConstraint, typeID: *mut u32) -> *mut std::ffi::c_void;
8792
8793 /// Set the constraint functions for this constraint
8794 pub fn PxConstraint_setConstraintFunctions_mut(self_: *mut PxConstraint, connector: *mut PxConstraintConnector, shaders: *const PxConstraintShaderTable);
8795
8796 pub fn PxConstraint_getConcreteTypeName(self_: *const PxConstraint) -> *const std::ffi::c_char;
8797
8798 /// Constructor
8799 pub fn PxContactStreamIterator_new(contactPatches: *const u8, contactPoints: *const u8, contactFaceIndices: *const u32, nbPatches: u32, nbContacts: u32) -> PxContactStreamIterator;
8800
8801 /// Returns whether there are more patches in this stream.
8802 ///
8803 /// Whether there are more patches in this stream.
8804 pub fn PxContactStreamIterator_hasNextPatch(self_: *const PxContactStreamIterator) -> bool;
8805
8806 /// Returns the total contact count.
8807 ///
8808 /// Total contact count.
8809 pub fn PxContactStreamIterator_getTotalContactCount(self_: *const PxContactStreamIterator) -> u32;
8810
8811 /// Returns the total patch count.
8812 ///
8813 /// Total patch count.
8814 pub fn PxContactStreamIterator_getTotalPatchCount(self_: *const PxContactStreamIterator) -> u32;
8815
8816 /// Advances iterator to next contact patch.
8817 pub fn PxContactStreamIterator_nextPatch_mut(self_: *mut PxContactStreamIterator);
8818
8819 /// Returns if the current patch has more contacts.
8820 ///
8821 /// If there are more contacts in the current patch.
8822 pub fn PxContactStreamIterator_hasNextContact(self_: *const PxContactStreamIterator) -> bool;
8823
8824 /// Advances to the next contact in the patch.
8825 pub fn PxContactStreamIterator_nextContact_mut(self_: *mut PxContactStreamIterator);
8826
8827 /// Gets the current contact's normal
8828 ///
8829 /// The current contact's normal.
8830 pub fn PxContactStreamIterator_getContactNormal(self_: *const PxContactStreamIterator) -> *const PxVec3;
8831
8832 /// Gets the inverse mass scale for body 0.
8833 ///
8834 /// The inverse mass scale for body 0.
8835 pub fn PxContactStreamIterator_getInvMassScale0(self_: *const PxContactStreamIterator) -> f32;
8836
8837 /// Gets the inverse mass scale for body 1.
8838 ///
8839 /// The inverse mass scale for body 1.
8840 pub fn PxContactStreamIterator_getInvMassScale1(self_: *const PxContactStreamIterator) -> f32;
8841
8842 /// Gets the inverse inertia scale for body 0.
8843 ///
8844 /// The inverse inertia scale for body 0.
8845 pub fn PxContactStreamIterator_getInvInertiaScale0(self_: *const PxContactStreamIterator) -> f32;
8846
8847 /// Gets the inverse inertia scale for body 1.
8848 ///
8849 /// The inverse inertia scale for body 1.
8850 pub fn PxContactStreamIterator_getInvInertiaScale1(self_: *const PxContactStreamIterator) -> f32;
8851
8852 /// Gets the contact's max impulse.
8853 ///
8854 /// The contact's max impulse.
8855 pub fn PxContactStreamIterator_getMaxImpulse(self_: *const PxContactStreamIterator) -> f32;
8856
8857 /// Gets the contact's target velocity.
8858 ///
8859 /// The contact's target velocity.
8860 pub fn PxContactStreamIterator_getTargetVel(self_: *const PxContactStreamIterator) -> *const PxVec3;
8861
8862 /// Gets the contact's contact point.
8863 ///
8864 /// The contact's contact point.
8865 pub fn PxContactStreamIterator_getContactPoint(self_: *const PxContactStreamIterator) -> *const PxVec3;
8866
8867 /// Gets the contact's separation.
8868 ///
8869 /// The contact's separation.
8870 pub fn PxContactStreamIterator_getSeparation(self_: *const PxContactStreamIterator) -> f32;
8871
8872 /// Gets the contact's face index for shape 0.
8873 ///
8874 /// The contact's face index for shape 0.
8875 pub fn PxContactStreamIterator_getFaceIndex0(self_: *const PxContactStreamIterator) -> u32;
8876
8877 /// Gets the contact's face index for shape 1.
8878 ///
8879 /// The contact's face index for shape 1.
8880 pub fn PxContactStreamIterator_getFaceIndex1(self_: *const PxContactStreamIterator) -> u32;
8881
8882 /// Gets the contact's static friction coefficient.
8883 ///
8884 /// The contact's static friction coefficient.
8885 pub fn PxContactStreamIterator_getStaticFriction(self_: *const PxContactStreamIterator) -> f32;
8886
8887 /// Gets the contact's dynamic friction coefficient.
8888 ///
8889 /// The contact's dynamic friction coefficient.
8890 pub fn PxContactStreamIterator_getDynamicFriction(self_: *const PxContactStreamIterator) -> f32;
8891
8892 /// Gets the contact's restitution coefficient.
8893 ///
8894 /// The contact's restitution coefficient.
8895 pub fn PxContactStreamIterator_getRestitution(self_: *const PxContactStreamIterator) -> f32;
8896
8897 /// Gets the contact's damping value.
8898 ///
8899 /// The contact's damping value.
8900 pub fn PxContactStreamIterator_getDamping(self_: *const PxContactStreamIterator) -> f32;
8901
8902 /// Gets the contact's material flags.
8903 ///
8904 /// The contact's material flags.
8905 pub fn PxContactStreamIterator_getMaterialFlags(self_: *const PxContactStreamIterator) -> u32;
8906
8907 /// Gets the contact's material index for shape 0.
8908 ///
8909 /// The contact's material index for shape 0.
8910 pub fn PxContactStreamIterator_getMaterialIndex0(self_: *const PxContactStreamIterator) -> u16;
8911
8912 /// Gets the contact's material index for shape 1.
8913 ///
8914 /// The contact's material index for shape 1.
8915 pub fn PxContactStreamIterator_getMaterialIndex1(self_: *const PxContactStreamIterator) -> u16;
8916
8917 /// Advances the contact stream iterator to a specific contact index.
8918 ///
8919 /// True if advancing was possible
8920 pub fn PxContactStreamIterator_advanceToIndex_mut(self_: *mut PxContactStreamIterator, initialIndex: u32) -> bool;
8921
8922 /// Get the position of a specific contact point in the set.
8923 ///
8924 /// Position to the requested point in world space
8925 pub fn PxContactSet_getPoint(self_: *const PxContactSet, i: u32) -> *const PxVec3;
8926
8927 /// Alter the position of a specific contact point in the set.
8928 pub fn PxContactSet_setPoint_mut(self_: *mut PxContactSet, i: u32, p: *const PxVec3);
8929
8930 /// Get the contact normal of a specific contact point in the set.
8931 ///
8932 /// The requested normal in world space
8933 pub fn PxContactSet_getNormal(self_: *const PxContactSet, i: u32) -> *const PxVec3;
8934
8935 /// Alter the contact normal of a specific contact point in the set.
8936 ///
8937 /// Changing the normal can cause contact points to be ignored.
8938 pub fn PxContactSet_setNormal_mut(self_: *mut PxContactSet, i: u32, n: *const PxVec3);
8939
8940 /// Get the separation distance of a specific contact point in the set.
8941 ///
8942 /// The separation. Negative implies penetration.
8943 pub fn PxContactSet_getSeparation(self_: *const PxContactSet, i: u32) -> f32;
8944
8945 /// Alter the separation of a specific contact point in the set.
8946 pub fn PxContactSet_setSeparation_mut(self_: *mut PxContactSet, i: u32, s: f32);
8947
8948 /// Get the target velocity of a specific contact point in the set.
8949 ///
8950 /// The target velocity in world frame
8951 pub fn PxContactSet_getTargetVelocity(self_: *const PxContactSet, i: u32) -> *const PxVec3;
8952
8953 /// Alter the target velocity of a specific contact point in the set.
8954 pub fn PxContactSet_setTargetVelocity_mut(self_: *mut PxContactSet, i: u32, v: *const PxVec3);
8955
8956 /// Get the face index with respect to the first shape of the pair for a specific contact point in the set.
8957 ///
8958 /// The face index of the first shape
8959 ///
8960 /// At the moment, the first shape is never a tri-mesh, therefore this function always returns PXC_CONTACT_NO_FACE_INDEX
8961 pub fn PxContactSet_getInternalFaceIndex0(self_: *const PxContactSet, i: u32) -> u32;
8962
8963 /// Get the face index with respect to the second shape of the pair for a specific contact point in the set.
8964 ///
8965 /// The face index of the second shape
8966 pub fn PxContactSet_getInternalFaceIndex1(self_: *const PxContactSet, i: u32) -> u32;
8967
8968 /// Get the maximum impulse for a specific contact point in the set.
8969 ///
8970 /// The maximum impulse
8971 pub fn PxContactSet_getMaxImpulse(self_: *const PxContactSet, i: u32) -> f32;
8972
8973 /// Alter the maximum impulse for a specific contact point in the set.
8974 ///
8975 /// Must be nonnegative. If set to zero, the contact point will be ignored
8976 pub fn PxContactSet_setMaxImpulse_mut(self_: *mut PxContactSet, i: u32, s: f32);
8977
8978 /// Get the restitution coefficient for a specific contact point in the set.
8979 ///
8980 /// The restitution coefficient
8981 pub fn PxContactSet_getRestitution(self_: *const PxContactSet, i: u32) -> f32;
8982
8983 /// Alter the restitution coefficient for a specific contact point in the set.
8984 ///
8985 /// Valid ranges [0,1]
8986 pub fn PxContactSet_setRestitution_mut(self_: *mut PxContactSet, i: u32, r: f32);
8987
8988 /// Get the static friction coefficient for a specific contact point in the set.
8989 ///
8990 /// The friction coefficient (dimensionless)
8991 pub fn PxContactSet_getStaticFriction(self_: *const PxContactSet, i: u32) -> f32;
8992
8993 /// Alter the static friction coefficient for a specific contact point in the set.
8994 pub fn PxContactSet_setStaticFriction_mut(self_: *mut PxContactSet, i: u32, f: f32);
8995
8996 /// Get the static friction coefficient for a specific contact point in the set.
8997 ///
8998 /// The friction coefficient
8999 pub fn PxContactSet_getDynamicFriction(self_: *const PxContactSet, i: u32) -> f32;
9000
9001 /// Alter the static dynamic coefficient for a specific contact point in the set.
9002 pub fn PxContactSet_setDynamicFriction_mut(self_: *mut PxContactSet, i: u32, f: f32);
9003
9004 /// Ignore the contact point.
9005 ///
9006 /// If a contact point is ignored then no force will get applied at this point. This can be used to disable collision in certain areas of a shape, for example.
9007 pub fn PxContactSet_ignore_mut(self_: *mut PxContactSet, i: u32);
9008
9009 /// The number of contact points in the set.
9010 pub fn PxContactSet_size(self_: *const PxContactSet) -> u32;
9011
9012 /// Returns the invMassScale of body 0
9013 ///
9014 /// A value
9015 /// <
9016 /// 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact
9017 /// treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.
9018 pub fn PxContactSet_getInvMassScale0(self_: *const PxContactSet) -> f32;
9019
9020 /// Returns the invMassScale of body 1
9021 ///
9022 /// A value
9023 /// <
9024 /// 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact
9025 /// treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.
9026 pub fn PxContactSet_getInvMassScale1(self_: *const PxContactSet) -> f32;
9027
9028 /// Returns the invInertiaScale of body 0
9029 ///
9030 /// A value
9031 /// <
9032 /// 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact
9033 /// treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.
9034 pub fn PxContactSet_getInvInertiaScale0(self_: *const PxContactSet) -> f32;
9035
9036 /// Returns the invInertiaScale of body 1
9037 ///
9038 /// A value
9039 /// <
9040 /// 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact
9041 /// treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.
9042 pub fn PxContactSet_getInvInertiaScale1(self_: *const PxContactSet) -> f32;
9043
9044 /// Sets the invMassScale of body 0
9045 ///
9046 /// This can be set to any value in the range [0, PX_MAX_F32). A value
9047 /// <
9048 /// 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact
9049 /// treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.
9050 pub fn PxContactSet_setInvMassScale0_mut(self_: *mut PxContactSet, scale: f32);
9051
9052 /// Sets the invMassScale of body 1
9053 ///
9054 /// This can be set to any value in the range [0, PX_MAX_F32). A value
9055 /// <
9056 /// 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact
9057 /// treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.
9058 pub fn PxContactSet_setInvMassScale1_mut(self_: *mut PxContactSet, scale: f32);
9059
9060 /// Sets the invInertiaScale of body 0
9061 ///
9062 /// This can be set to any value in the range [0, PX_MAX_F32). A value
9063 /// <
9064 /// 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact
9065 /// treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.
9066 pub fn PxContactSet_setInvInertiaScale0_mut(self_: *mut PxContactSet, scale: f32);
9067
9068 /// Sets the invInertiaScale of body 1
9069 ///
9070 /// This can be set to any value in the range [0, PX_MAX_F32). A value
9071 /// <
9072 /// 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact
9073 /// treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.
9074 pub fn PxContactSet_setInvInertiaScale1_mut(self_: *mut PxContactSet, scale: f32);
9075
9076 /// Passes modifiable arrays of contacts to the application.
9077 ///
9078 /// The initial contacts are regenerated from scratch each frame by collision detection.
9079 ///
9080 /// The number of contacts can not be changed, so you cannot add your own contacts. You may however
9081 /// disable contacts using PxContactSet::ignore().
9082 pub fn PxContactModifyCallback_onContactModify_mut(self_: *mut PxContactModifyCallback, pairs: *mut PxContactModifyPair, count: u32);
9083
9084 /// Passes modifiable arrays of contacts to the application.
9085 ///
9086 /// The initial contacts are regenerated from scratch each frame by collision detection.
9087 ///
9088 /// The number of contacts can not be changed, so you cannot add your own contacts. You may however
9089 /// disable contacts using PxContactSet::ignore().
9090 pub fn PxCCDContactModifyCallback_onCCDContactModify_mut(self_: *mut PxCCDContactModifyCallback, pairs: *mut PxContactModifyPair, count: u32);
9091
9092 /// Notification if an object or its memory gets released
9093 ///
9094 /// If release() gets called on a PxBase object, an eUSER_RELEASE event will get fired immediately. The object state can be queried in the callback but
9095 /// it is not allowed to change the state. Furthermore, when reading from the object it is the user's responsibility to make sure that no other thread
9096 /// is writing at the same time to the object (this includes the simulation itself, i.e., [`PxScene::fetchResults`]() must not get called at the same time).
9097 ///
9098 /// Calling release() on a PxBase object does not necessarily trigger its destructor immediately. For example, the object can be shared and might still
9099 /// be referenced by other objects or the simulation might still be running and accessing the object state. In such cases the destructor will be called
9100 /// as soon as it is safe to do so. After the destruction of the object and its memory, an eMEMORY_RELEASE event will get fired. In this case it is not
9101 /// allowed to dereference the object pointer in the callback.
9102 pub fn PxDeletionListener_onRelease_mut(self_: *mut PxDeletionListener, observed: *const PxBase, userData: *mut std::ffi::c_void, deletionEvent: PxDeletionEventFlag);
9103
9104 pub fn PxBaseMaterial_isKindOf(self_: *const PxBaseMaterial, name: *const std::ffi::c_char) -> bool;
9105
9106 /// Sets young's modulus which defines the body's stiffness
9107 pub fn PxFEMMaterial_setYoungsModulus_mut(self_: *mut PxFEMMaterial, young: f32);
9108
9109 /// Retrieves the young's modulus value.
9110 ///
9111 /// The young's modulus value.
9112 pub fn PxFEMMaterial_getYoungsModulus(self_: *const PxFEMMaterial) -> f32;
9113
9114 /// Sets the Poisson's ratio which defines the body's volume preservation. Completely incompressible materials have a poisson ratio of 0.5. Its value should not be set to exactly 0.5 because this leads to numerical problems.
9115 pub fn PxFEMMaterial_setPoissons_mut(self_: *mut PxFEMMaterial, poisson: f32);
9116
9117 /// Retrieves the Poisson's ratio.
9118 ///
9119 /// The Poisson's ratio.
9120 pub fn PxFEMMaterial_getPoissons(self_: *const PxFEMMaterial) -> f32;
9121
9122 /// Sets the dynamic friction value which defines the strength of resistance when two objects slide relative to each other while in contact.
9123 pub fn PxFEMMaterial_setDynamicFriction_mut(self_: *mut PxFEMMaterial, dynamicFriction: f32);
9124
9125 /// Retrieves the dynamic friction value
9126 ///
9127 /// The dynamic friction value
9128 pub fn PxFEMMaterial_getDynamicFriction(self_: *const PxFEMMaterial) -> f32;
9129
9130 pub fn PxFilterData_new(anon_param0: PxEMPTY) -> PxFilterData;
9131
9132 /// Default constructor.
9133 pub fn PxFilterData_new_1() -> PxFilterData;
9134
9135 /// Constructor to set filter data initially.
9136 pub fn PxFilterData_new_2(w0: u32, w1: u32, w2: u32, w3: u32) -> PxFilterData;
9137
9138 /// (re)sets the structure to the default.
9139 pub fn PxFilterData_setToDefault_mut(self_: *mut PxFilterData);
9140
9141 /// Extract filter object type from the filter attributes of a collision pair object
9142 ///
9143 /// The type of the collision pair object.
9144 pub fn phys_PxGetFilterObjectType(attr: u32) -> PxFilterObjectType;
9145
9146 /// Specifies whether the collision object belongs to a kinematic rigid body
9147 ///
9148 /// True if the object belongs to a kinematic rigid body, else false
9149 pub fn phys_PxFilterObjectIsKinematic(attr: u32) -> bool;
9150
9151 /// Specifies whether the collision object is a trigger shape
9152 ///
9153 /// True if the object is a trigger shape, else false
9154 pub fn phys_PxFilterObjectIsTrigger(attr: u32) -> bool;
9155
9156 /// Filter method to specify how a pair of potentially colliding objects should be processed.
9157 ///
9158 /// This method gets called when the filter flags returned by the filter shader (see [`PxSimulationFilterShader`])
9159 /// indicate that the filter callback should be invoked ([`PxFilterFlag::eCALLBACK`] or #PxFilterFlag::eNOTIFY set).
9160 /// Return the PxFilterFlag flags and set the PxPairFlag flags to define what the simulation should do with the given
9161 /// collision pair.
9162 ///
9163 /// Filter flags defining whether the pair should be discarded, temporarily ignored or processed and whether the pair
9164 /// should be tracked and send a report on pair deletion through the filter callback
9165 pub fn PxSimulationFilterCallback_pairFound_mut(self_: *mut PxSimulationFilterCallback, pairID: u32, attributes0: u32, filterData0: PxFilterData, a0: *const PxActor, s0: *const PxShape, attributes1: u32, filterData1: PxFilterData, a1: *const PxActor, s1: *const PxShape, pairFlags: *mut PxPairFlags) -> PxFilterFlags;
9166
9167 /// Callback to inform that a tracked collision pair is gone.
9168 ///
9169 /// This method gets called when a collision pair disappears or gets re-filtered. Only applies to
9170 /// collision pairs which have been marked as filter callback pairs ([`PxFilterFlag::eNOTIFY`] set in #pairFound()).
9171 pub fn PxSimulationFilterCallback_pairLost_mut(self_: *mut PxSimulationFilterCallback, pairID: u32, attributes0: u32, filterData0: PxFilterData, attributes1: u32, filterData1: PxFilterData, objectRemoved: bool);
9172
9173 /// Callback to give the opportunity to change the filter state of a tracked collision pair.
9174 ///
9175 /// This method gets called once per simulation step to let the application change the filter and pair
9176 /// flags of a collision pair that has been reported in [`pairFound`]() and requested callbacks by
9177 /// setting [`PxFilterFlag::eNOTIFY`]. To request a change of filter status, the target pair has to be
9178 /// specified by its ID, the new filter and pair flags have to be provided and the method should return true.
9179 ///
9180 /// If this method changes the filter status of a collision pair and the pair should keep being tracked
9181 /// by the filter callbacks then [`PxFilterFlag::eNOTIFY`] has to be set.
9182 ///
9183 /// The application is responsible to ensure that this method does not get called for pairs that have been
9184 /// reported as lost, see [`pairLost`]().
9185 ///
9186 /// True if the changes should be applied. In this case the method will get called again. False if
9187 /// no more status changes should be done in the current simulation step. In that case the provided flags will be discarded.
9188 pub fn PxSimulationFilterCallback_statusChange_mut(self_: *mut PxSimulationFilterCallback, pairID: *mut u32, pairFlags: *mut PxPairFlags, filterFlags: *mut PxFilterFlags) -> bool;
9189
9190 /// Any combination of PxDataAccessFlag::eREADABLE and PxDataAccessFlag::eWRITABLE
9191 pub fn PxLockedData_getDataAccessFlags_mut(self_: *mut PxLockedData) -> PxDataAccessFlags;
9192
9193 /// Unlocks the bulk data.
9194 pub fn PxLockedData_unlock_mut(self_: *mut PxLockedData);
9195
9196 /// virtual destructor
9197 pub fn PxLockedData_delete(self_: *mut PxLockedData);
9198
9199 /// Sets the coefficient of dynamic friction.
9200 ///
9201 /// The coefficient of dynamic friction should be in [0, PX_MAX_F32). If set to greater than staticFriction, the effective value of staticFriction will be increased to match.
9202 ///
9203 /// Sleeping:
9204 /// Does
9205 /// NOT
9206 /// wake any actors which may be affected.
9207 pub fn PxMaterial_setDynamicFriction_mut(self_: *mut PxMaterial, coef: f32);
9208
9209 /// Retrieves the DynamicFriction value.
9210 ///
9211 /// The coefficient of dynamic friction.
9212 pub fn PxMaterial_getDynamicFriction(self_: *const PxMaterial) -> f32;
9213
9214 /// Sets the coefficient of static friction
9215 ///
9216 /// The coefficient of static friction should be in the range [0, PX_MAX_F32)
9217 ///
9218 /// Sleeping:
9219 /// Does
9220 /// NOT
9221 /// wake any actors which may be affected.
9222 pub fn PxMaterial_setStaticFriction_mut(self_: *mut PxMaterial, coef: f32);
9223
9224 /// Retrieves the coefficient of static friction.
9225 ///
9226 /// The coefficient of static friction.
9227 pub fn PxMaterial_getStaticFriction(self_: *const PxMaterial) -> f32;
9228
9229 /// Sets the coefficient of restitution
9230 ///
9231 /// A coefficient of 0 makes the object bounce as little as possible, higher values up to 1.0 result in more bounce.
9232 ///
9233 /// This property is overloaded when PxMaterialFlag::eCOMPLIANT_CONTACT flag is enabled. This permits negative values for restitution to be provided.
9234 /// The negative values are converted into spring stiffness terms for an implicit spring simulated at the contact site, with the spring positional error defined by
9235 /// the contact separation value. Higher stiffness terms produce stiffer springs that behave more like a rigid contact.
9236 ///
9237 /// Sleeping:
9238 /// Does
9239 /// NOT
9240 /// wake any actors which may be affected.
9241 pub fn PxMaterial_setRestitution_mut(self_: *mut PxMaterial, rest: f32);
9242
9243 /// Retrieves the coefficient of restitution.
9244 ///
9245 /// See [`setRestitution`].
9246 ///
9247 /// The coefficient of restitution.
9248 pub fn PxMaterial_getRestitution(self_: *const PxMaterial) -> f32;
9249
9250 /// Sets the coefficient of damping
9251 ///
9252 /// This property only affects the simulation if PxMaterialFlag::eCOMPLIANT_CONTACT is raised.
9253 /// Damping works together with spring stiffness (set through a negative restitution value). Spring stiffness corrects positional error while
9254 /// damping resists relative velocity. Setting a high damping coefficient can produce spongy contacts.
9255 ///
9256 /// Sleeping:
9257 /// Does
9258 /// NOT
9259 /// wake any actors which may be affected.
9260 pub fn PxMaterial_setDamping_mut(self_: *mut PxMaterial, damping: f32);
9261
9262 /// Retrieves the coefficient of damping.
9263 ///
9264 /// See [`setDamping`].
9265 ///
9266 /// The coefficient of damping.
9267 pub fn PxMaterial_getDamping(self_: *const PxMaterial) -> f32;
9268
9269 /// Raises or clears a particular material flag.
9270 ///
9271 /// See the list of flags [`PxMaterialFlag`]
9272 ///
9273 /// Default:
9274 /// eIMPROVED_PATCH_FRICTION
9275 ///
9276 /// Sleeping:
9277 /// Does
9278 /// NOT
9279 /// wake any actors which may be affected.
9280 pub fn PxMaterial_setFlag_mut(self_: *mut PxMaterial, flag: PxMaterialFlag, b: bool);
9281
9282 /// sets all the material flags.
9283 ///
9284 /// See the list of flags [`PxMaterialFlag`]
9285 ///
9286 /// Default:
9287 /// eIMPROVED_PATCH_FRICTION
9288 ///
9289 /// Sleeping:
9290 /// Does
9291 /// NOT
9292 /// wake any actors which may be affected.
9293 pub fn PxMaterial_setFlags_mut(self_: *mut PxMaterial, flags: PxMaterialFlags);
9294
9295 /// Retrieves the flags. See [`PxMaterialFlag`].
9296 ///
9297 /// The material flags.
9298 pub fn PxMaterial_getFlags(self_: *const PxMaterial) -> PxMaterialFlags;
9299
9300 /// Sets the friction combine mode.
9301 ///
9302 /// See the enum ::PxCombineMode .
9303 ///
9304 /// Default:
9305 /// PxCombineMode::eAVERAGE
9306 ///
9307 /// Sleeping:
9308 /// Does
9309 /// NOT
9310 /// wake any actors which may be affected.
9311 pub fn PxMaterial_setFrictionCombineMode_mut(self_: *mut PxMaterial, combMode: PxCombineMode);
9312
9313 /// Retrieves the friction combine mode.
9314 ///
9315 /// See [`setFrictionCombineMode`].
9316 ///
9317 /// The friction combine mode for this material.
9318 pub fn PxMaterial_getFrictionCombineMode(self_: *const PxMaterial) -> PxCombineMode;
9319
9320 /// Sets the restitution combine mode.
9321 ///
9322 /// See the enum ::PxCombineMode .
9323 ///
9324 /// Default:
9325 /// PxCombineMode::eAVERAGE
9326 ///
9327 /// Sleeping:
9328 /// Does
9329 /// NOT
9330 /// wake any actors which may be affected.
9331 pub fn PxMaterial_setRestitutionCombineMode_mut(self_: *mut PxMaterial, combMode: PxCombineMode);
9332
9333 /// Retrieves the restitution combine mode.
9334 ///
9335 /// See [`setRestitutionCombineMode`].
9336 ///
9337 /// The coefficient of restitution combine mode for this material.
9338 pub fn PxMaterial_getRestitutionCombineMode(self_: *const PxMaterial) -> PxCombineMode;
9339
9340 pub fn PxMaterial_getConcreteTypeName(self_: *const PxMaterial) -> *const std::ffi::c_char;
9341
9342 /// Construct parameters with default values.
9343 pub fn PxDiffuseParticleParams_new() -> PxDiffuseParticleParams;
9344
9345 /// (re)sets the structure to the default.
9346 pub fn PxDiffuseParticleParams_setToDefault_mut(self_: *mut PxDiffuseParticleParams);
9347
9348 /// Sets friction
9349 pub fn PxParticleMaterial_setFriction_mut(self_: *mut PxParticleMaterial, friction: f32);
9350
9351 /// Retrieves the friction value.
9352 ///
9353 /// The friction value.
9354 pub fn PxParticleMaterial_getFriction(self_: *const PxParticleMaterial) -> f32;
9355
9356 /// Sets velocity damping term
9357 pub fn PxParticleMaterial_setDamping_mut(self_: *mut PxParticleMaterial, damping: f32);
9358
9359 /// Retrieves the velocity damping term
9360 ///
9361 /// The velocity damping term.
9362 pub fn PxParticleMaterial_getDamping(self_: *const PxParticleMaterial) -> f32;
9363
9364 /// Sets adhesion term
9365 pub fn PxParticleMaterial_setAdhesion_mut(self_: *mut PxParticleMaterial, adhesion: f32);
9366
9367 /// Retrieves the adhesion term
9368 ///
9369 /// The adhesion term.
9370 pub fn PxParticleMaterial_getAdhesion(self_: *const PxParticleMaterial) -> f32;
9371
9372 /// Sets gravity scale term
9373 pub fn PxParticleMaterial_setGravityScale_mut(self_: *mut PxParticleMaterial, scale: f32);
9374
9375 /// Retrieves the gravity scale term
9376 ///
9377 /// The gravity scale term.
9378 pub fn PxParticleMaterial_getGravityScale(self_: *const PxParticleMaterial) -> f32;
9379
9380 /// Sets material adhesion radius scale. This is multiplied by the particle rest offset to compute the fall-off distance
9381 /// at which point adhesion ceases to operate.
9382 pub fn PxParticleMaterial_setAdhesionRadiusScale_mut(self_: *mut PxParticleMaterial, scale: f32);
9383
9384 /// Retrieves the adhesion radius scale.
9385 ///
9386 /// The adhesion radius scale.
9387 pub fn PxParticleMaterial_getAdhesionRadiusScale(self_: *const PxParticleMaterial) -> f32;
9388
9389 /// Destroys the instance it is called on.
9390 ///
9391 /// Use this release method to destroy an instance of this class. Be sure
9392 /// to not keep a reference to this object after calling release.
9393 /// Avoid release calls while a scene is simulating (in between simulate() and fetchResults() calls).
9394 ///
9395 /// Note that this must be called once for each prior call to PxCreatePhysics, as
9396 /// there is a reference counter. Also note that you mustn't destroy the PxFoundation instance (holding the allocator, error callback etc.)
9397 /// until after the reference count reaches 0 and the SDK is actually removed.
9398 ///
9399 /// Releasing an SDK will also release any objects created through it (scenes, triangle meshes, convex meshes, heightfields, shapes etc.),
9400 /// provided the user hasn't already done so.
9401 ///
9402 /// Releasing the PxPhysics instance is a prerequisite to releasing the PxFoundation instance.
9403 pub fn PxPhysics_release_mut(self_: *mut PxPhysics);
9404
9405 /// Retrieves the Foundation instance.
9406 ///
9407 /// A reference to the Foundation object.
9408 pub fn PxPhysics_getFoundation_mut(self_: *mut PxPhysics) -> *mut PxFoundation;
9409
9410 /// Creates an aggregate with the specified maximum size and filtering hint.
9411 ///
9412 /// The previous API used "bool enableSelfCollision" which should now silently evaluates
9413 /// to a PxAggregateType::eGENERIC aggregate with its self-collision bit.
9414 ///
9415 /// Use PxAggregateType::eSTATIC or PxAggregateType::eKINEMATIC for aggregates that will
9416 /// only contain static or kinematic actors. This provides faster filtering when used in
9417 /// combination with PxPairFilteringMode.
9418 ///
9419 /// The new aggregate.
9420 pub fn PxPhysics_createAggregate_mut(self_: *mut PxPhysics, maxActor: u32, maxShape: u32, filterHint: u32) -> *mut PxAggregate;
9421
9422 /// Returns the simulation tolerance parameters.
9423 ///
9424 /// The current simulation tolerance parameters.
9425 pub fn PxPhysics_getTolerancesScale(self_: *const PxPhysics) -> *const PxTolerancesScale;
9426
9427 /// Creates a triangle mesh object.
9428 ///
9429 /// This can then be instanced into [`PxShape`] objects.
9430 ///
9431 /// The new triangle mesh.
9432 pub fn PxPhysics_createTriangleMesh_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxTriangleMesh;
9433
9434 /// Return the number of triangle meshes that currently exist.
9435 ///
9436 /// Number of triangle meshes.
9437 pub fn PxPhysics_getNbTriangleMeshes(self_: *const PxPhysics) -> u32;
9438
9439 /// Writes the array of triangle mesh pointers to a user buffer.
9440 ///
9441 /// Returns the number of pointers written.
9442 ///
9443 /// The ordering of the triangle meshes in the array is not specified.
9444 ///
9445 /// The number of triangle mesh pointers written to userBuffer, this should be less or equal to bufferSize.
9446 pub fn PxPhysics_getTriangleMeshes(self_: *const PxPhysics, userBuffer: *mut *mut PxTriangleMesh, bufferSize: u32, startIndex: u32) -> u32;
9447
9448 /// Creates a tetrahedron mesh object.
9449 ///
9450 /// This can then be instanced into [`PxShape`] objects.
9451 ///
9452 /// The new tetrahedron mesh.
9453 pub fn PxPhysics_createTetrahedronMesh_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxTetrahedronMesh;
9454
9455 /// Creates a softbody mesh object.
9456 ///
9457 /// The new softbody mesh.
9458 pub fn PxPhysics_createSoftBodyMesh_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxSoftBodyMesh;
9459
9460 /// Return the number of tetrahedron meshes that currently exist.
9461 ///
9462 /// Number of tetrahedron meshes.
9463 pub fn PxPhysics_getNbTetrahedronMeshes(self_: *const PxPhysics) -> u32;
9464
9465 /// Writes the array of tetrahedron mesh pointers to a user buffer.
9466 ///
9467 /// Returns the number of pointers written.
9468 ///
9469 /// The ordering of the tetrahedron meshes in the array is not specified.
9470 ///
9471 /// The number of tetrahedron mesh pointers written to userBuffer, this should be less or equal to bufferSize.
9472 pub fn PxPhysics_getTetrahedronMeshes(self_: *const PxPhysics, userBuffer: *mut *mut PxTetrahedronMesh, bufferSize: u32, startIndex: u32) -> u32;
9473
9474 /// Creates a heightfield object from previously cooked stream.
9475 ///
9476 /// This can then be instanced into [`PxShape`] objects.
9477 ///
9478 /// The new heightfield.
9479 pub fn PxPhysics_createHeightField_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxHeightField;
9480
9481 /// Return the number of heightfields that currently exist.
9482 ///
9483 /// Number of heightfields.
9484 pub fn PxPhysics_getNbHeightFields(self_: *const PxPhysics) -> u32;
9485
9486 /// Writes the array of heightfield pointers to a user buffer.
9487 ///
9488 /// Returns the number of pointers written.
9489 ///
9490 /// The ordering of the heightfields in the array is not specified.
9491 ///
9492 /// The number of heightfield pointers written to userBuffer, this should be less or equal to bufferSize.
9493 pub fn PxPhysics_getHeightFields(self_: *const PxPhysics, userBuffer: *mut *mut PxHeightField, bufferSize: u32, startIndex: u32) -> u32;
9494
9495 /// Creates a convex mesh object.
9496 ///
9497 /// This can then be instanced into [`PxShape`] objects.
9498 ///
9499 /// The new convex mesh.
9500 pub fn PxPhysics_createConvexMesh_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxConvexMesh;
9501
9502 /// Return the number of convex meshes that currently exist.
9503 ///
9504 /// Number of convex meshes.
9505 pub fn PxPhysics_getNbConvexMeshes(self_: *const PxPhysics) -> u32;
9506
9507 /// Writes the array of convex mesh pointers to a user buffer.
9508 ///
9509 /// Returns the number of pointers written.
9510 ///
9511 /// The ordering of the convex meshes in the array is not specified.
9512 ///
9513 /// The number of convex mesh pointers written to userBuffer, this should be less or equal to bufferSize.
9514 pub fn PxPhysics_getConvexMeshes(self_: *const PxPhysics, userBuffer: *mut *mut PxConvexMesh, bufferSize: u32, startIndex: u32) -> u32;
9515
9516 /// Creates a bounding volume hierarchy.
9517 ///
9518 /// The new BVH.
9519 pub fn PxPhysics_createBVH_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxBVH;
9520
9521 /// Return the number of bounding volume hierarchies that currently exist.
9522 ///
9523 /// Number of bounding volume hierarchies.
9524 pub fn PxPhysics_getNbBVHs(self_: *const PxPhysics) -> u32;
9525
9526 /// Writes the array of bounding volume hierarchy pointers to a user buffer.
9527 ///
9528 /// Returns the number of pointers written.
9529 ///
9530 /// The ordering of the BVHs in the array is not specified.
9531 ///
9532 /// The number of BVH pointers written to userBuffer, this should be less or equal to bufferSize.
9533 pub fn PxPhysics_getBVHs(self_: *const PxPhysics, userBuffer: *mut *mut PxBVH, bufferSize: u32, startIndex: u32) -> u32;
9534
9535 /// Creates a scene.
9536 ///
9537 /// Every scene uses a Thread Local Storage slot. This imposes a platform specific limit on the
9538 /// number of scenes that can be created.
9539 ///
9540 /// The new scene object.
9541 pub fn PxPhysics_createScene_mut(self_: *mut PxPhysics, sceneDesc: *const PxSceneDesc) -> *mut PxScene;
9542
9543 /// Gets number of created scenes.
9544 ///
9545 /// The number of scenes created.
9546 pub fn PxPhysics_getNbScenes(self_: *const PxPhysics) -> u32;
9547
9548 /// Writes the array of scene pointers to a user buffer.
9549 ///
9550 /// Returns the number of pointers written.
9551 ///
9552 /// The ordering of the scene pointers in the array is not specified.
9553 ///
9554 /// The number of scene pointers written to userBuffer, this should be less or equal to bufferSize.
9555 pub fn PxPhysics_getScenes(self_: *const PxPhysics, userBuffer: *mut *mut PxScene, bufferSize: u32, startIndex: u32) -> u32;
9556
9557 /// Creates a static rigid actor with the specified pose and all other fields initialized
9558 /// to their default values.
9559 pub fn PxPhysics_createRigidStatic_mut(self_: *mut PxPhysics, pose: *const PxTransform) -> *mut PxRigidStatic;
9560
9561 /// Creates a dynamic rigid actor with the specified pose and all other fields initialized
9562 /// to their default values.
9563 pub fn PxPhysics_createRigidDynamic_mut(self_: *mut PxPhysics, pose: *const PxTransform) -> *mut PxRigidDynamic;
9564
9565 /// Creates a pruning structure from actors.
9566 ///
9567 /// Every provided actor needs at least one shape with the eSCENE_QUERY_SHAPE flag set.
9568 ///
9569 /// Both static and dynamic actors can be provided.
9570 ///
9571 /// It is not allowed to pass in actors which are already part of a scene.
9572 ///
9573 /// Articulation links cannot be provided.
9574 ///
9575 /// Pruning structure created from given actors, or NULL if any of the actors did not comply with the above requirements.
9576 pub fn PxPhysics_createPruningStructure_mut(self_: *mut PxPhysics, actors: *const *mut PxRigidActor, nbActors: u32) -> *mut PxPruningStructure;
9577
9578 /// Creates a shape which may be attached to multiple actors
9579 ///
9580 /// The shape will be created with a reference count of 1.
9581 ///
9582 /// The shape
9583 ///
9584 /// Shared shapes are not mutable when they are attached to an actor
9585 pub fn PxPhysics_createShape_mut(self_: *mut PxPhysics, geometry: *const PxGeometry, material: *const PxMaterial, isExclusive: bool, shapeFlags: PxShapeFlags) -> *mut PxShape;
9586
9587 /// Creates a shape which may be attached to multiple actors
9588 ///
9589 /// The shape will be created with a reference count of 1.
9590 ///
9591 /// The shape
9592 ///
9593 /// Shared shapes are not mutable when they are attached to an actor
9594 ///
9595 /// Shapes created from *SDF* triangle-mesh geometries do not support more than one material.
9596 pub fn PxPhysics_createShape_mut_1(self_: *mut PxPhysics, geometry: *const PxGeometry, materials: *const *mut PxMaterial, materialCount: u16, isExclusive: bool, shapeFlags: PxShapeFlags) -> *mut PxShape;
9597
9598 /// Return the number of shapes that currently exist.
9599 ///
9600 /// Number of shapes.
9601 pub fn PxPhysics_getNbShapes(self_: *const PxPhysics) -> u32;
9602
9603 /// Writes the array of shape pointers to a user buffer.
9604 ///
9605 /// Returns the number of pointers written.
9606 ///
9607 /// The ordering of the shapes in the array is not specified.
9608 ///
9609 /// The number of shape pointers written to userBuffer, this should be less or equal to bufferSize.
9610 pub fn PxPhysics_getShapes(self_: *const PxPhysics, userBuffer: *mut *mut PxShape, bufferSize: u32, startIndex: u32) -> u32;
9611
9612 /// Creates a constraint shader.
9613 ///
9614 /// A constraint shader will get added automatically to the scene the two linked actors belong to. Either, but not both, of actor0 and actor1 may
9615 /// be NULL to denote attachment to the world.
9616 ///
9617 /// The new constraint shader.
9618 pub fn PxPhysics_createConstraint_mut(self_: *mut PxPhysics, actor0: *mut PxRigidActor, actor1: *mut PxRigidActor, connector: *mut PxConstraintConnector, shaders: *const PxConstraintShaderTable, dataSize: u32) -> *mut PxConstraint;
9619
9620 /// Creates a reduced-coordinate articulation with all fields initialized to their default values.
9621 ///
9622 /// the new articulation
9623 pub fn PxPhysics_createArticulationReducedCoordinate_mut(self_: *mut PxPhysics) -> *mut PxArticulationReducedCoordinate;
9624
9625 /// Creates a new rigid body material with certain default properties.
9626 ///
9627 /// The new rigid body material.
9628 pub fn PxPhysics_createMaterial_mut(self_: *mut PxPhysics, staticFriction: f32, dynamicFriction: f32, restitution: f32) -> *mut PxMaterial;
9629
9630 /// Return the number of rigid body materials that currently exist.
9631 ///
9632 /// Number of rigid body materials.
9633 pub fn PxPhysics_getNbMaterials(self_: *const PxPhysics) -> u32;
9634
9635 /// Writes the array of rigid body material pointers to a user buffer.
9636 ///
9637 /// Returns the number of pointers written.
9638 ///
9639 /// The ordering of the materials in the array is not specified.
9640 ///
9641 /// The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
9642 pub fn PxPhysics_getMaterials(self_: *const PxPhysics, userBuffer: *mut *mut PxMaterial, bufferSize: u32, startIndex: u32) -> u32;
9643
9644 /// Register a deletion listener. Listeners will be called whenever an object is deleted.
9645 ///
9646 /// It is illegal to register or unregister a deletion listener while deletions are being processed.
9647 ///
9648 /// By default a registered listener will receive events from all objects. Set the restrictedObjectSet parameter to true on registration and use [`registerDeletionListenerObjects`] to restrict the received events to specific objects.
9649 ///
9650 /// The deletion events are only supported on core PhysX objects. In general, objects in extension modules do not provide this functionality, however, in the case of PxJoint objects, the underlying PxConstraint will send the events.
9651 pub fn PxPhysics_registerDeletionListener_mut(self_: *mut PxPhysics, observer: *mut PxDeletionListener, deletionEvents: *const PxDeletionEventFlags, restrictedObjectSet: bool);
9652
9653 /// Unregister a deletion listener.
9654 ///
9655 /// It is illegal to register or unregister a deletion listener while deletions are being processed.
9656 pub fn PxPhysics_unregisterDeletionListener_mut(self_: *mut PxPhysics, observer: *mut PxDeletionListener);
9657
9658 /// Register specific objects for deletion events.
9659 ///
9660 /// This method allows for a deletion listener to limit deletion events to specific objects only.
9661 ///
9662 /// It is illegal to register or unregister objects while deletions are being processed.
9663 ///
9664 /// The deletion listener has to be registered through [`registerDeletionListener`]() and configured to support restricted object sets prior to this method being used.
9665 pub fn PxPhysics_registerDeletionListenerObjects_mut(self_: *mut PxPhysics, observer: *mut PxDeletionListener, observables: *const *const PxBase, observableCount: u32);
9666
9667 /// Unregister specific objects for deletion events.
9668 ///
9669 /// This method allows to clear previously registered objects for a deletion listener (see [`registerDeletionListenerObjects`]()).
9670 ///
9671 /// It is illegal to register or unregister objects while deletions are being processed.
9672 ///
9673 /// The deletion listener has to be registered through [`registerDeletionListener`]() and configured to support restricted object sets prior to this method being used.
9674 pub fn PxPhysics_unregisterDeletionListenerObjects_mut(self_: *mut PxPhysics, observer: *mut PxDeletionListener, observables: *const *const PxBase, observableCount: u32);
9675
9676 /// Gets PxPhysics object insertion interface.
9677 ///
9678 /// The insertion interface is needed for PxCreateTriangleMesh, PxCooking::createTriangleMesh etc., this allows runtime mesh creation.
9679 pub fn PxPhysics_getPhysicsInsertionCallback_mut(self_: *mut PxPhysics) -> *mut PxInsertionCallback;
9680
9681 /// Creates an instance of the physics SDK.
9682 ///
9683 /// Creates an instance of this class. May not be a class member to avoid name mangling.
9684 /// Pass the constant [`PX_PHYSICS_VERSION`] as the argument.
9685 /// There may be only one instance of this class per process. Calling this method after an instance
9686 /// has been created already will result in an error message and NULL will be returned.
9687 ///
9688 /// Calling this will register all optional code modules (Articulations and HeightFields), preparing them for use.
9689 /// If you do not need some of these modules, consider calling PxCreateBasePhysics() instead and registering needed
9690 /// modules manually.
9691 ///
9692 /// PxPhysics instance on success, NULL if operation failed
9693 pub fn phys_PxCreatePhysics(version: u32, foundation: *mut PxFoundation, scale: *const PxTolerancesScale, trackOutstandingAllocations: bool, pvd: *mut PxPvd, omniPvd: *mut PxOmniPvd) -> *mut PxPhysics;
9694
9695 pub fn phys_PxGetPhysics() -> *mut PxPhysics;
9696
9697 pub fn PxActorShape_new() -> PxActorShape;
9698
9699 pub fn PxActorShape_new_1(a: *mut PxRigidActor, s: *mut PxShape) -> PxActorShape;
9700
9701 /// constructor sets to default
9702 pub fn PxQueryCache_new() -> PxQueryCache;
9703
9704 /// constructor to set properties
9705 pub fn PxQueryCache_new_1(s: *mut PxShape, findex: u32) -> PxQueryCache;
9706
9707 /// default constructor
9708 pub fn PxQueryFilterData_new() -> PxQueryFilterData;
9709
9710 /// constructor to set both filter data and filter flags
9711 pub fn PxQueryFilterData_new_1(fd: *const PxFilterData, f: PxQueryFlags) -> PxQueryFilterData;
9712
9713 /// constructor to set filter flags only
9714 pub fn PxQueryFilterData_new_2(f: PxQueryFlags) -> PxQueryFilterData;
9715
9716 /// This filter callback is executed before the exact intersection test if PxQueryFlag::ePREFILTER flag was set.
9717 ///
9718 /// the updated type for this hit (see [`PxQueryHitType`])
9719 pub fn PxQueryFilterCallback_preFilter_mut(self_: *mut PxQueryFilterCallback, filterData: *const PxFilterData, shape: *const PxShape, actor: *const PxRigidActor, queryFlags: *mut PxHitFlags) -> PxQueryHitType;
9720
9721 /// This filter callback is executed if the exact intersection test returned true and PxQueryFlag::ePOSTFILTER flag was set.
9722 ///
9723 /// the updated hit type for this hit (see [`PxQueryHitType`])
9724 pub fn PxQueryFilterCallback_postFilter_mut(self_: *mut PxQueryFilterCallback, filterData: *const PxFilterData, hit: *const PxQueryHit, shape: *const PxShape, actor: *const PxRigidActor) -> PxQueryHitType;
9725
9726 /// virtual destructor
9727 pub fn PxQueryFilterCallback_delete(self_: *mut PxQueryFilterCallback);
9728
9729 /// Moves kinematically controlled dynamic actors through the game world.
9730 ///
9731 /// You set a dynamic actor to be kinematic using the PxRigidBodyFlag::eKINEMATIC flag
9732 /// with setRigidBodyFlag().
9733 ///
9734 /// The move command will result in a velocity that will move the body into
9735 /// the desired pose. After the move is carried out during a single time step,
9736 /// the velocity is returned to zero. Thus, you must continuously call
9737 /// this in every time step for kinematic actors so that they move along a path.
9738 ///
9739 /// This function simply stores the move destination until the next simulation
9740 /// step is processed, so consecutive calls will simply overwrite the stored target variable.
9741 ///
9742 /// The motion is always fully carried out.
9743 ///
9744 /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
9745 ///
9746 /// Sleeping:
9747 /// This call wakes the actor if it is sleeping and will set the wake counter to [`PxSceneDesc::wakeCounterResetValue`].
9748 pub fn PxRigidDynamic_setKinematicTarget_mut(self_: *mut PxRigidDynamic, destination: *const PxTransform);
9749
9750 /// Get target pose of a kinematically controlled dynamic actor.
9751 ///
9752 /// True if the actor is a kinematically controlled dynamic and the target has been set, else False.
9753 pub fn PxRigidDynamic_getKinematicTarget(self_: *const PxRigidDynamic, target: *mut PxTransform) -> bool;
9754
9755 /// Returns true if this body is sleeping.
9756 ///
9757 /// When an actor does not move for a period of time, it is no longer simulated in order to save time. This state
9758 /// is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object,
9759 /// or one of its properties is changed by the user, the entire sleep mechanism should be transparent to the user.
9760 ///
9761 /// In general, a dynamic rigid actor is guaranteed to be awake if at least one of the following holds:
9762 ///
9763 /// The wake counter is positive (see [`setWakeCounter`]()).
9764 ///
9765 /// The linear or angular velocity is non-zero.
9766 ///
9767 /// A non-zero force or torque has been applied.
9768 ///
9769 /// If a dynamic rigid actor is sleeping, the following state is guaranteed:
9770 ///
9771 /// The wake counter is zero.
9772 ///
9773 /// The linear and angular velocity is zero.
9774 ///
9775 /// There is no force update pending.
9776 ///
9777 /// When an actor gets inserted into a scene, it will be considered asleep if all the points above hold, else it will be treated as awake.
9778 ///
9779 /// If an actor is asleep after the call to PxScene::fetchResults() returns, it is guaranteed that the pose of the actor
9780 /// was not changed. You can use this information to avoid updating the transforms of associated objects.
9781 ///
9782 /// A kinematic actor is asleep unless a target pose has been set (in which case it will stay awake until two consecutive
9783 /// simulation steps without a target pose being set have passed). The wake counter will get set to zero or to the reset value
9784 /// [`PxSceneDesc::wakeCounterResetValue`] in the case where a target pose has been set to be consistent with the definitions above.
9785 ///
9786 /// It is invalid to use this method if the actor has not been added to a scene already.
9787 ///
9788 /// It is not allowed to use this method while the simulation is running.
9789 ///
9790 /// True if the actor is sleeping.
9791 pub fn PxRigidDynamic_isSleeping(self_: *const PxRigidDynamic) -> bool;
9792
9793 /// Sets the mass-normalized kinetic energy threshold below which an actor may go to sleep.
9794 ///
9795 /// Actors whose kinetic energy divided by their mass is below this threshold will be candidates for sleeping.
9796 ///
9797 /// Default:
9798 /// 5e-5f * PxTolerancesScale::speed * PxTolerancesScale::speed
9799 pub fn PxRigidDynamic_setSleepThreshold_mut(self_: *mut PxRigidDynamic, threshold: f32);
9800
9801 /// Returns the mass-normalized kinetic energy below which an actor may go to sleep.
9802 ///
9803 /// The energy threshold for sleeping.
9804 pub fn PxRigidDynamic_getSleepThreshold(self_: *const PxRigidDynamic) -> f32;
9805
9806 /// Sets the mass-normalized kinetic energy threshold below which an actor may participate in stabilization.
9807 ///
9808 /// Actors whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
9809 ///
9810 /// This value has no effect if PxSceneFlag::eENABLE_STABILIZATION was not enabled on the PxSceneDesc.
9811 ///
9812 /// Default:
9813 /// 1e-5f * PxTolerancesScale::speed * PxTolerancesScale::speed
9814 pub fn PxRigidDynamic_setStabilizationThreshold_mut(self_: *mut PxRigidDynamic, threshold: f32);
9815
9816 /// Returns the mass-normalized kinetic energy below which an actor may participate in stabilization.
9817 ///
9818 /// Actors whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
9819 ///
9820 /// The energy threshold for participating in stabilization.
9821 pub fn PxRigidDynamic_getStabilizationThreshold(self_: *const PxRigidDynamic) -> f32;
9822
9823 /// Reads the PxRigidDynamic lock flags.
9824 ///
9825 /// See the list of flags [`PxRigidDynamicLockFlag`]
9826 ///
9827 /// The values of the PxRigidDynamicLock flags.
9828 pub fn PxRigidDynamic_getRigidDynamicLockFlags(self_: *const PxRigidDynamic) -> PxRigidDynamicLockFlags;
9829
9830 /// Raises or clears a particular rigid dynamic lock flag.
9831 ///
9832 /// See the list of flags [`PxRigidDynamicLockFlag`]
9833 ///
9834 /// Default:
9835 /// no flags are set
9836 pub fn PxRigidDynamic_setRigidDynamicLockFlag_mut(self_: *mut PxRigidDynamic, flag: PxRigidDynamicLockFlag, value: bool);
9837
9838 pub fn PxRigidDynamic_setRigidDynamicLockFlags_mut(self_: *mut PxRigidDynamic, flags: PxRigidDynamicLockFlags);
9839
9840 /// Retrieves the linear velocity of an actor.
9841 ///
9842 /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
9843 /// in PxContactModifyCallback or in contact report callbacks).
9844 ///
9845 /// The linear velocity of the actor.
9846 pub fn PxRigidDynamic_getLinearVelocity(self_: *const PxRigidDynamic) -> PxVec3;
9847
9848 /// Sets the linear velocity of the actor.
9849 ///
9850 /// Note that if you continuously set the velocity of an actor yourself,
9851 /// forces such as gravity or friction will not be able to manifest themselves, because forces directly
9852 /// influence only the velocity/momentum of an actor.
9853 ///
9854 /// Default:
9855 /// (0.0, 0.0, 0.0)
9856 ///
9857 /// Sleeping:
9858 /// This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the
9859 /// new velocity is non-zero.
9860 ///
9861 /// It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
9862 pub fn PxRigidDynamic_setLinearVelocity_mut(self_: *mut PxRigidDynamic, linVel: *const PxVec3, autowake: bool);
9863
9864 /// Retrieves the angular velocity of the actor.
9865 ///
9866 /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
9867 /// in PxContactModifyCallback or in contact report callbacks).
9868 ///
9869 /// The angular velocity of the actor.
9870 pub fn PxRigidDynamic_getAngularVelocity(self_: *const PxRigidDynamic) -> PxVec3;
9871
9872 /// Sets the angular velocity of the actor.
9873 ///
9874 /// Note that if you continuously set the angular velocity of an actor yourself,
9875 /// forces such as friction will not be able to rotate the actor, because forces directly influence only the velocity/momentum.
9876 ///
9877 /// Default:
9878 /// (0.0, 0.0, 0.0)
9879 ///
9880 /// Sleeping:
9881 /// This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the
9882 /// new velocity is non-zero.
9883 ///
9884 /// It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
9885 pub fn PxRigidDynamic_setAngularVelocity_mut(self_: *mut PxRigidDynamic, angVel: *const PxVec3, autowake: bool);
9886
9887 /// Sets the wake counter for the actor.
9888 ///
9889 /// The wake counter value determines the minimum amount of time until the body can be put to sleep. Please note
9890 /// that a body will not be put to sleep if the energy is above the specified threshold (see [`setSleepThreshold`]())
9891 /// or if other awake bodies are touching it.
9892 ///
9893 /// Passing in a positive value will wake the actor up automatically.
9894 ///
9895 /// It is invalid to use this method for kinematic actors since the wake counter for kinematics is defined
9896 /// based on whether a target pose has been set (see the comment in [`isSleeping`]()).
9897 ///
9898 /// It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
9899 ///
9900 /// Default:
9901 /// 0.4 (which corresponds to 20 frames for a time step of 0.02)
9902 pub fn PxRigidDynamic_setWakeCounter_mut(self_: *mut PxRigidDynamic, wakeCounterValue: f32);
9903
9904 /// Returns the wake counter of the actor.
9905 ///
9906 /// It is not allowed to use this method while the simulation is running.
9907 ///
9908 /// The wake counter of the actor.
9909 pub fn PxRigidDynamic_getWakeCounter(self_: *const PxRigidDynamic) -> f32;
9910
9911 /// Wakes up the actor if it is sleeping.
9912 ///
9913 /// The actor will get woken up and might cause other touching actors to wake up as well during the next simulation step.
9914 ///
9915 /// This will set the wake counter of the actor to the value specified in [`PxSceneDesc::wakeCounterResetValue`].
9916 ///
9917 /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
9918 ///
9919 /// It is invalid to use this method for kinematic actors since the sleep state for kinematics is defined
9920 /// based on whether a target pose has been set (see the comment in [`isSleeping`]()).
9921 pub fn PxRigidDynamic_wakeUp_mut(self_: *mut PxRigidDynamic);
9922
9923 /// Forces the actor to sleep.
9924 ///
9925 /// The actor will stay asleep during the next simulation step if not touched by another non-sleeping actor.
9926 ///
9927 /// Any applied force will be cleared and the velocity and the wake counter of the actor will be set to 0.
9928 ///
9929 /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
9930 ///
9931 /// It is invalid to use this method for kinematic actors since the sleep state for kinematics is defined
9932 /// based on whether a target pose has been set (see the comment in [`isSleeping`]()).
9933 pub fn PxRigidDynamic_putToSleep_mut(self_: *mut PxRigidDynamic);
9934
9935 /// Sets the solver iteration counts for the body.
9936 ///
9937 /// The solver iteration count determines how accurately joints and contacts are resolved.
9938 /// If you are having trouble with jointed bodies oscillating and behaving erratically, then
9939 /// setting a higher position iteration count may improve their stability.
9940 ///
9941 /// If intersecting bodies are being depenetrated too violently, increase the number of velocity
9942 /// iterations. More velocity iterations will drive the relative exit velocity of the intersecting
9943 /// objects closer to the correct value given the restitution.
9944 ///
9945 /// Default:
9946 /// 4 position iterations, 1 velocity iteration
9947 pub fn PxRigidDynamic_setSolverIterationCounts_mut(self_: *mut PxRigidDynamic, minPositionIters: u32, minVelocityIters: u32);
9948
9949 /// Retrieves the solver iteration counts.
9950 pub fn PxRigidDynamic_getSolverIterationCounts(self_: *const PxRigidDynamic, minPositionIters: *mut u32, minVelocityIters: *mut u32);
9951
9952 /// Retrieves the force threshold for contact reports.
9953 ///
9954 /// The contact report threshold is a force threshold. If the force between
9955 /// two actors exceeds this threshold for either of the two actors, a contact report
9956 /// will be generated according to the contact report threshold flags provided by
9957 /// the filter shader/callback.
9958 /// See [`PxPairFlag`].
9959 ///
9960 /// The threshold used for a collision between a dynamic actor and the static environment is
9961 /// the threshold of the dynamic actor, and all contacts with static actors are summed to find
9962 /// the total normal force.
9963 ///
9964 /// Default:
9965 /// PX_MAX_F32
9966 ///
9967 /// Force threshold for contact reports.
9968 pub fn PxRigidDynamic_getContactReportThreshold(self_: *const PxRigidDynamic) -> f32;
9969
9970 /// Sets the force threshold for contact reports.
9971 ///
9972 /// See [`getContactReportThreshold`]().
9973 pub fn PxRigidDynamic_setContactReportThreshold_mut(self_: *mut PxRigidDynamic, threshold: f32);
9974
9975 pub fn PxRigidDynamic_getConcreteTypeName(self_: *const PxRigidDynamic) -> *const std::ffi::c_char;
9976
9977 pub fn PxRigidStatic_getConcreteTypeName(self_: *const PxRigidStatic) -> *const std::ffi::c_char;
9978
9979 /// constructor sets to default.
9980 pub fn PxSceneQueryDesc_new() -> PxSceneQueryDesc;
9981
9982 /// (re)sets the structure to the default.
9983 pub fn PxSceneQueryDesc_setToDefault_mut(self_: *mut PxSceneQueryDesc);
9984
9985 /// Returns true if the descriptor is valid.
9986 ///
9987 /// true if the current settings are valid.
9988 pub fn PxSceneQueryDesc_isValid(self_: *const PxSceneQueryDesc) -> bool;
9989
9990 /// Sets the rebuild rate of the dynamic tree pruning structures.
9991 pub fn PxSceneQuerySystemBase_setDynamicTreeRebuildRateHint_mut(self_: *mut PxSceneQuerySystemBase, dynamicTreeRebuildRateHint: u32);
9992
9993 /// Retrieves the rebuild rate of the dynamic tree pruning structures.
9994 ///
9995 /// The rebuild rate of the dynamic tree pruning structures.
9996 pub fn PxSceneQuerySystemBase_getDynamicTreeRebuildRateHint(self_: *const PxSceneQuerySystemBase) -> u32;
9997
9998 /// Forces dynamic trees to be immediately rebuilt.
9999 ///
10000 /// PxScene will call this function with the PX_SCENE_PRUNER_STATIC or PX_SCENE_PRUNER_DYNAMIC value.
10001 pub fn PxSceneQuerySystemBase_forceRebuildDynamicTree_mut(self_: *mut PxSceneQuerySystemBase, prunerIndex: u32);
10002
10003 /// Sets scene query update mode
10004 pub fn PxSceneQuerySystemBase_setUpdateMode_mut(self_: *mut PxSceneQuerySystemBase, updateMode: PxSceneQueryUpdateMode);
10005
10006 /// Gets scene query update mode
10007 ///
10008 /// Current scene query update mode.
10009 pub fn PxSceneQuerySystemBase_getUpdateMode(self_: *const PxSceneQuerySystemBase) -> PxSceneQueryUpdateMode;
10010
10011 /// Retrieves the system's internal scene query timestamp, increased each time a change to the
10012 /// static scene query structure is performed.
10013 ///
10014 /// scene query static timestamp
10015 pub fn PxSceneQuerySystemBase_getStaticTimestamp(self_: *const PxSceneQuerySystemBase) -> u32;
10016
10017 /// Flushes any changes to the scene query representation.
10018 ///
10019 /// This method updates the state of the scene query representation to match changes in the scene state.
10020 ///
10021 /// By default, these changes are buffered until the next query is submitted. Calling this function will not change
10022 /// the results from scene queries, but can be used to ensure that a query will not perform update work in the course of
10023 /// its execution.
10024 ///
10025 /// A thread performing updates will hold a write lock on the query structure, and thus stall other querying threads. In multithread
10026 /// scenarios it can be useful to explicitly schedule the period where this lock may be held for a significant period, so that
10027 /// subsequent queries issued from multiple threads will not block.
10028 pub fn PxSceneQuerySystemBase_flushUpdates_mut(self_: *mut PxSceneQuerySystemBase);
10029
10030 /// Performs a raycast against objects in the scene, returns results in a PxRaycastBuffer object
10031 /// or via a custom user callback implementation inheriting from PxRaycastCallback.
10032 ///
10033 /// Touching hits are not ordered.
10034 ///
10035 /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in user guide article SceneQuery. User can ignore such objects by employing one of the provided filter mechanisms.
10036 ///
10037 /// True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
10038 pub fn PxSceneQuerySystemBase_raycast(self_: *const PxSceneQuerySystemBase, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, hitCall: *mut PxRaycastCallback, hitFlags: PxHitFlags, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, queryFlags: PxGeometryQueryFlags) -> bool;
10039
10040 /// Performs a sweep test against objects in the scene, returns results in a PxSweepBuffer object
10041 /// or via a custom user callback implementation inheriting from PxSweepCallback.
10042 ///
10043 /// Touching hits are not ordered.
10044 ///
10045 /// If a shape from the scene is already overlapping with the query shape in its starting position,
10046 /// the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified.
10047 ///
10048 /// True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
10049 pub fn PxSceneQuerySystemBase_sweep(self_: *const PxSceneQuerySystemBase, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, hitCall: *mut PxSweepCallback, hitFlags: PxHitFlags, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32, queryFlags: PxGeometryQueryFlags) -> bool;
10050
10051 /// Performs an overlap test of a given geometry against objects in the scene, returns results in a PxOverlapBuffer object
10052 /// or via a custom user callback implementation inheriting from PxOverlapCallback.
10053 ///
10054 /// Filtering: returning eBLOCK from user filter for overlap queries will cause a warning (see [`PxQueryHitType`]).
10055 ///
10056 /// True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
10057 ///
10058 /// eBLOCK should not be returned from user filters for overlap(). Doing so will result in undefined behavior, and a warning will be issued.
10059 ///
10060 /// If the PxQueryFlag::eNO_BLOCK flag is set, the eBLOCK will instead be automatically converted to an eTOUCH and the warning suppressed.
10061 pub fn PxSceneQuerySystemBase_overlap(self_: *const PxSceneQuerySystemBase, geometry: *const PxGeometry, pose: *const PxTransform, hitCall: *mut PxOverlapCallback, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, queryFlags: PxGeometryQueryFlags) -> bool;
10062
10063 /// Sets scene query update mode
10064 pub fn PxSceneSQSystem_setSceneQueryUpdateMode_mut(self_: *mut PxSceneSQSystem, updateMode: PxSceneQueryUpdateMode);
10065
10066 /// Gets scene query update mode
10067 ///
10068 /// Current scene query update mode.
10069 pub fn PxSceneSQSystem_getSceneQueryUpdateMode(self_: *const PxSceneSQSystem) -> PxSceneQueryUpdateMode;
10070
10071 /// Retrieves the scene's internal scene query timestamp, increased each time a change to the
10072 /// static scene query structure is performed.
10073 ///
10074 /// scene query static timestamp
10075 pub fn PxSceneSQSystem_getSceneQueryStaticTimestamp(self_: *const PxSceneSQSystem) -> u32;
10076
10077 /// Flushes any changes to the scene query representation.
10078 pub fn PxSceneSQSystem_flushQueryUpdates_mut(self_: *mut PxSceneSQSystem);
10079
10080 /// Forces dynamic trees to be immediately rebuilt.
10081 pub fn PxSceneSQSystem_forceDynamicTreeRebuild_mut(self_: *mut PxSceneSQSystem, rebuildStaticStructure: bool, rebuildDynamicStructure: bool);
10082
10083 /// Return the value of PxSceneQueryDesc::staticStructure that was set when creating the scene with PxPhysics::createScene
10084 pub fn PxSceneSQSystem_getStaticStructure(self_: *const PxSceneSQSystem) -> PxPruningStructureType;
10085
10086 /// Return the value of PxSceneQueryDesc::dynamicStructure that was set when creating the scene with PxPhysics::createScene
10087 pub fn PxSceneSQSystem_getDynamicStructure(self_: *const PxSceneSQSystem) -> PxPruningStructureType;
10088
10089 /// Executes scene queries update tasks.
10090 ///
10091 /// This function will refit dirty shapes within the pruner and will execute a task to build a new AABB tree, which is
10092 /// build on a different thread. The new AABB tree is built based on the dynamic tree rebuild hint rate. Once
10093 /// the new tree is ready it will be commited in next fetchQueries call, which must be called after.
10094 ///
10095 /// This function is equivalent to the following PxSceneQuerySystem calls:
10096 /// Synchronous calls:
10097 /// - PxSceneQuerySystemBase::flushUpdates()
10098 /// - handle0 = PxSceneQuerySystem::prepareSceneQueryBuildStep(PX_SCENE_PRUNER_STATIC)
10099 /// - handle1 = PxSceneQuerySystem::prepareSceneQueryBuildStep(PX_SCENE_PRUNER_DYNAMIC)
10100 /// Asynchronous calls:
10101 /// - PxSceneQuerySystem::sceneQueryBuildStep(handle0);
10102 /// - PxSceneQuerySystem::sceneQueryBuildStep(handle1);
10103 ///
10104 /// This function is part of the PxSceneSQSystem interface because it uses the PxScene task system under the hood. But
10105 /// it calls PxSceneQuerySystem functions, which are independent from this system and could be called in a similar
10106 /// fashion by a separate, possibly user-defined task manager.
10107 ///
10108 /// If PxSceneQueryUpdateMode::eBUILD_DISABLED_COMMIT_DISABLED is used, it is required to update the scene queries
10109 /// using this function.
10110 pub fn PxSceneSQSystem_sceneQueriesUpdate_mut(self_: *mut PxSceneSQSystem, completionTask: *mut PxBaseTask, controlSimulation: bool);
10111
10112 /// This checks to see if the scene queries update has completed.
10113 ///
10114 /// This does not cause the data available for reading to be updated with the results of the scene queries update, it is simply a status check.
10115 /// The bool will allow it to either return immediately or block waiting for the condition to be met so that it can return true
10116 ///
10117 /// True if the results are available.
10118 pub fn PxSceneSQSystem_checkQueries_mut(self_: *mut PxSceneSQSystem, block: bool) -> bool;
10119
10120 /// This method must be called after sceneQueriesUpdate. It will wait for the scene queries update to finish. If the user makes an illegal scene queries update call,
10121 /// the SDK will issue an error message.
10122 ///
10123 /// If a new AABB tree build finished, then during fetchQueries the current tree within the pruning structure is swapped with the new tree.
10124 pub fn PxSceneSQSystem_fetchQueries_mut(self_: *mut PxSceneSQSystem, block: bool) -> bool;
10125
10126 /// Decrements the reference count of the object and releases it if the new reference count is zero.
10127 pub fn PxSceneQuerySystem_release_mut(self_: *mut PxSceneQuerySystem);
10128
10129 /// Acquires a counted reference to this object.
10130 ///
10131 /// This method increases the reference count of the object by 1. Decrement the reference count by calling release()
10132 pub fn PxSceneQuerySystem_acquireReference_mut(self_: *mut PxSceneQuerySystem);
10133
10134 /// Preallocates internal arrays to minimize the amount of reallocations.
10135 ///
10136 /// The system does not prevent more allocations than given numbers. It is legal to not call this function at all,
10137 /// or to add more shapes to the system than the preallocated amounts.
10138 pub fn PxSceneQuerySystem_preallocate_mut(self_: *mut PxSceneQuerySystem, prunerIndex: u32, nbShapes: u32);
10139
10140 /// Frees internal memory that may not be in-use anymore.
10141 ///
10142 /// This is an entry point for reclaiming transient memory allocated at some point by the SQ system,
10143 /// but which wasn't been immediately freed for performance reason. Calling this function might free
10144 /// some memory, but it might also produce a new set of allocations in the next frame.
10145 pub fn PxSceneQuerySystem_flushMemory_mut(self_: *mut PxSceneQuerySystem);
10146
10147 /// Adds a shape to the SQ system.
10148 ///
10149 /// The same function is used to add either a regular shape, or a SQ compound shape.
10150 pub fn PxSceneQuerySystem_addSQShape_mut(self_: *mut PxSceneQuerySystem, actor: *const PxRigidActor, shape: *const PxShape, bounds: *const PxBounds3, transform: *const PxTransform, compoundHandle: *const u32, hasPruningStructure: bool);
10151
10152 /// Removes a shape from the SQ system.
10153 ///
10154 /// The same function is used to remove either a regular shape, or a SQ compound shape.
10155 pub fn PxSceneQuerySystem_removeSQShape_mut(self_: *mut PxSceneQuerySystem, actor: *const PxRigidActor, shape: *const PxShape);
10156
10157 /// Updates a shape in the SQ system.
10158 ///
10159 /// The same function is used to update either a regular shape, or a SQ compound shape.
10160 ///
10161 /// The transforms are eager-evaluated, but the bounds are lazy-evaluated. This means that
10162 /// the updated transform has to be passed to the update function, while the bounds are automatically
10163 /// recomputed by the system whenever needed.
10164 pub fn PxSceneQuerySystem_updateSQShape_mut(self_: *mut PxSceneQuerySystem, actor: *const PxRigidActor, shape: *const PxShape, transform: *const PxTransform);
10165
10166 /// Adds a compound to the SQ system.
10167 ///
10168 /// SQ compound handle
10169 pub fn PxSceneQuerySystem_addSQCompound_mut(self_: *mut PxSceneQuerySystem, actor: *const PxRigidActor, shapes: *mut *const PxShape, bvh: *const PxBVH, transforms: *const PxTransform) -> u32;
10170
10171 /// Removes a compound from the SQ system.
10172 pub fn PxSceneQuerySystem_removeSQCompound_mut(self_: *mut PxSceneQuerySystem, compoundHandle: u32);
10173
10174 /// Updates a compound in the SQ system.
10175 ///
10176 /// The compound structures are immediately updated when the call occurs.
10177 pub fn PxSceneQuerySystem_updateSQCompound_mut(self_: *mut PxSceneQuerySystem, compoundHandle: u32, compoundTransform: *const PxTransform);
10178
10179 /// Shift the data structures' origin by the specified vector.
10180 ///
10181 /// Please refer to the notes of the similar function in PxScene.
10182 pub fn PxSceneQuerySystem_shiftOrigin_mut(self_: *mut PxSceneQuerySystem, shift: *const PxVec3);
10183
10184 /// Merges a pruning structure with the SQ system's internal pruners.
10185 pub fn PxSceneQuerySystem_merge_mut(self_: *mut PxSceneQuerySystem, pruningStructure: *const PxPruningStructure);
10186
10187 /// Shape to SQ-pruner-handle mapping function.
10188 ///
10189 /// This function finds and returns the SQ pruner handle associated with a given (actor/shape) couple
10190 /// that was previously added to the system. This is needed for the sync function.
10191 ///
10192 /// Associated SQ pruner handle.
10193 pub fn PxSceneQuerySystem_getHandle(self_: *const PxSceneQuerySystem, actor: *const PxRigidActor, shape: *const PxShape, prunerIndex: *mut u32) -> u32;
10194
10195 /// Synchronizes the scene-query system with another system that references the same objects.
10196 ///
10197 /// This function is used when the scene-query objects also exist in another system that can also update them. For example the scene-query objects
10198 /// (used for raycast, overlap or sweep queries) might be driven by equivalent objects in an external rigid-body simulation engine. In this case
10199 /// the rigid-body simulation engine computes the new poses and transforms, and passes them to the scene-query system using this function. It is
10200 /// more efficient than calling updateSQShape on each object individually, since updateSQShape would end up recomputing the bounds already available
10201 /// in the rigid-body engine.
10202 pub fn PxSceneQuerySystem_sync_mut(self_: *mut PxSceneQuerySystem, prunerIndex: u32, handles: *const u32, indices: *const u32, bounds: *const PxBounds3, transforms: *const PxTransformPadded, count: u32, ignoredIndices: *const PxBitMap);
10203
10204 /// Finalizes updates made to the SQ system.
10205 ///
10206 /// This function should be called after updates have been made to the SQ system, to fully reflect the changes
10207 /// inside the internal pruners. In particular it should be called:
10208 /// - after calls to updateSQShape
10209 /// - after calls to sync
10210 ///
10211 /// This function:
10212 /// - recomputes bounds of manually updated shapes (i.e. either regular or SQ compound shapes modified by updateSQShape)
10213 /// - updates dynamic pruners (refit operations)
10214 /// - incrementally rebuilds AABB-trees
10215 ///
10216 /// The amount of work performed in this function depends on PxSceneQueryUpdateMode.
10217 pub fn PxSceneQuerySystem_finalizeUpdates_mut(self_: *mut PxSceneQuerySystem);
10218
10219 /// Prepares asynchronous build step.
10220 ///
10221 /// This is directly called (synchronously) by PxSceneSQSystem::sceneQueriesUpdate(). See the comments there.
10222 ///
10223 /// This function is called to let the system execute any necessary synchronous operation before the
10224 /// asynchronous sceneQueryBuildStep() function is called.
10225 ///
10226 /// If there is any work to do for the specific pruner, the function returns a pruner-specific handle that
10227 /// will be passed to the corresponding, asynchronous sceneQueryBuildStep function.
10228 ///
10229 /// A pruner-specific handle that will be sent to sceneQueryBuildStep if there is any work to do, i.e. to execute the corresponding sceneQueryBuildStep() call.
10230 ///
10231 /// Null if there is no work to do, otherwise a pruner-specific handle.
10232 pub fn PxSceneQuerySystem_prepareSceneQueryBuildStep_mut(self_: *mut PxSceneQuerySystem, prunerIndex: u32) -> *mut std::ffi::c_void;
10233
10234 /// Executes asynchronous build step.
10235 ///
10236 /// This is directly called (asynchronously) by PxSceneSQSystem::sceneQueriesUpdate(). See the comments there.
10237 ///
10238 /// This function incrementally builds the internal trees/pruners. It is called asynchronously, i.e. this can be
10239 /// called from different threads for building multiple trees at the same time.
10240 pub fn PxSceneQuerySystem_sceneQueryBuildStep_mut(self_: *mut PxSceneQuerySystem, handle: *mut std::ffi::c_void);
10241
10242 pub fn PxBroadPhaseDesc_new(type_: PxBroadPhaseType) -> PxBroadPhaseDesc;
10243
10244 pub fn PxBroadPhaseDesc_isValid(self_: *const PxBroadPhaseDesc) -> bool;
10245
10246 /// Retrieves the filter group for static objects.
10247 ///
10248 /// Mark static objects with this group when adding them to the broadphase.
10249 /// Overlaps between static objects will not be detected. All static objects
10250 /// should have the same group.
10251 ///
10252 /// Filter group for static objects.
10253 pub fn phys_PxGetBroadPhaseStaticFilterGroup() -> u32;
10254
10255 /// Retrieves a filter group for dynamic objects.
10256 ///
10257 /// Mark dynamic objects with this group when adding them to the broadphase.
10258 /// Each dynamic object must have an ID, and overlaps between dynamic objects that have
10259 /// the same ID will not be detected. This is useful to dismiss overlaps between shapes
10260 /// of the same (compound) actor directly within the broadphase.
10261 ///
10262 /// Filter group for the object.
10263 pub fn phys_PxGetBroadPhaseDynamicFilterGroup(id: u32) -> u32;
10264
10265 /// Retrieves a filter group for kinematic objects.
10266 ///
10267 /// Mark kinematic objects with this group when adding them to the broadphase.
10268 /// Each kinematic object must have an ID, and overlaps between kinematic objects that have
10269 /// the same ID will not be detected.
10270 ///
10271 /// Filter group for the object.
10272 pub fn phys_PxGetBroadPhaseKinematicFilterGroup(id: u32) -> u32;
10273
10274 pub fn PxBroadPhaseUpdateData_new(created: *const u32, nbCreated: u32, updated: *const u32, nbUpdated: u32, removed: *const u32, nbRemoved: u32, bounds: *const PxBounds3, groups: *const u32, distances: *const f32, capacity: u32) -> PxBroadPhaseUpdateData;
10275
10276 pub fn PxBroadPhaseResults_new() -> PxBroadPhaseResults;
10277
10278 /// Returns number of regions currently registered in the broad-phase.
10279 ///
10280 /// Number of regions
10281 pub fn PxBroadPhaseRegions_getNbRegions(self_: *const PxBroadPhaseRegions) -> u32;
10282
10283 /// Gets broad-phase regions.
10284 ///
10285 /// Number of written out regions.
10286 pub fn PxBroadPhaseRegions_getRegions(self_: *const PxBroadPhaseRegions, userBuffer: *mut PxBroadPhaseRegionInfo, bufferSize: u32, startIndex: u32) -> u32;
10287
10288 /// Adds a new broad-phase region.
10289 ///
10290 /// The total number of regions is limited to PxBroadPhaseCaps::mMaxNbRegions. If that number is exceeded, the call is ignored.
10291 ///
10292 /// The newly added region will be automatically populated with already existing objects that touch it, if the
10293 /// 'populateRegion' parameter is set to true. Otherwise the newly added region will be empty, and it will only be
10294 /// populated with objects when those objects are added to the simulation, or updated if they already exist.
10295 ///
10296 /// Using 'populateRegion=true' has a cost, so it is best to avoid it if possible. In particular it is more efficient
10297 /// to create the empty regions first (with populateRegion=false) and then add the objects afterwards (rather than
10298 /// the opposite).
10299 ///
10300 /// Objects automatically move from one region to another during their lifetime. The system keeps tracks of what
10301 /// regions a given object is in. It is legal for an object to be in an arbitrary number of regions. However if an
10302 /// object leaves all regions, or is created outside of all regions, several things happen:
10303 /// - collisions get disabled for this object
10304 /// - the object appears in the getOutOfBoundsObjects() array
10305 ///
10306 /// If an out-of-bounds object, whose collisions are disabled, re-enters a valid broadphase region, then collisions
10307 /// are re-enabled for that object.
10308 ///
10309 /// Handle for newly created region, or 0xffffffff in case of failure.
10310 pub fn PxBroadPhaseRegions_addRegion_mut(self_: *mut PxBroadPhaseRegions, region: *const PxBroadPhaseRegion, populateRegion: bool, bounds: *const PxBounds3, distances: *const f32) -> u32;
10311
10312 /// Removes a broad-phase region.
10313 ///
10314 /// If the region still contains objects, and if those objects do not overlap any region any more, they are not
10315 /// automatically removed from the simulation. Instead, the PxBroadPhaseCallback::onObjectOutOfBounds notification
10316 /// is used for each object. Users are responsible for removing the objects from the simulation if this is the
10317 /// desired behavior.
10318 ///
10319 /// If the handle is invalid, or if a valid handle is removed twice, an error message is sent to the error stream.
10320 ///
10321 /// True if success
10322 pub fn PxBroadPhaseRegions_removeRegion_mut(self_: *mut PxBroadPhaseRegions, handle: u32) -> bool;
10323
10324 pub fn PxBroadPhaseRegions_getNbOutOfBoundsObjects(self_: *const PxBroadPhaseRegions) -> u32;
10325
10326 pub fn PxBroadPhaseRegions_getOutOfBoundsObjects(self_: *const PxBroadPhaseRegions) -> *const u32;
10327
10328 pub fn PxBroadPhase_release_mut(self_: *mut PxBroadPhase);
10329
10330 /// Gets the broadphase type.
10331 ///
10332 /// Broadphase type.
10333 pub fn PxBroadPhase_getType(self_: *const PxBroadPhase) -> PxBroadPhaseType;
10334
10335 /// Gets broad-phase caps.
10336 pub fn PxBroadPhase_getCaps(self_: *const PxBroadPhase, caps: *mut PxBroadPhaseCaps);
10337
10338 /// Retrieves the regions API if applicable.
10339 ///
10340 /// For broadphases that do not use explicit user-defined regions, this call returns NULL.
10341 ///
10342 /// Region API, or NULL.
10343 pub fn PxBroadPhase_getRegions_mut(self_: *mut PxBroadPhase) -> *mut PxBroadPhaseRegions;
10344
10345 /// Retrieves the broadphase allocator.
10346 ///
10347 /// User-provided buffers should ideally be allocated with this allocator, for best performance.
10348 /// This is especially true for the GPU broadphases, whose buffers need to be allocated in CUDA
10349 /// host memory.
10350 ///
10351 /// The broadphase allocator.
10352 pub fn PxBroadPhase_getAllocator_mut(self_: *mut PxBroadPhase) -> *mut PxAllocatorCallback;
10353
10354 /// Retrieves the profiler's context ID.
10355 ///
10356 /// The context ID.
10357 pub fn PxBroadPhase_getContextID(self_: *const PxBroadPhase) -> u64;
10358
10359 /// Sets a scratch buffer
10360 ///
10361 /// Some broadphases might take advantage of a scratch buffer to limit runtime allocations.
10362 ///
10363 /// All broadphases still work without providing a scratch buffer, this is an optional function
10364 /// that can potentially reduce runtime allocations.
10365 pub fn PxBroadPhase_setScratchBlock_mut(self_: *mut PxBroadPhase, scratchBlock: *mut std::ffi::c_void, size: u32);
10366
10367 /// Updates the broadphase and computes the lists of created/deleted pairs.
10368 ///
10369 /// The provided update data describes changes to objects since the last broadphase update.
10370 ///
10371 /// To benefit from potentially multithreaded implementations, it is necessary to provide a continuation
10372 /// task to the function. It is legal to pass NULL there, but the underlying (CPU) implementations will
10373 /// then run single-threaded.
10374 pub fn PxBroadPhase_update_mut(self_: *mut PxBroadPhase, updateData: *const PxBroadPhaseUpdateData, continuation: *mut PxBaseTask);
10375
10376 /// Retrieves the broadphase results after an update.
10377 ///
10378 /// This should be called once after each update call to retrieve the results of the broadphase. The
10379 /// results are incremental, i.e. the system only returns new and lost pairs, not all current pairs.
10380 pub fn PxBroadPhase_fetchResults_mut(self_: *mut PxBroadPhase, results: *mut PxBroadPhaseResults);
10381
10382 /// Helper for single-threaded updates.
10383 ///
10384 /// This short helper function performs a single-theaded update and reports the results in a single call.
10385 pub fn PxBroadPhase_update_mut_1(self_: *mut PxBroadPhase, results: *mut PxBroadPhaseResults, updateData: *const PxBroadPhaseUpdateData);
10386
10387 /// Broadphase factory function.
10388 ///
10389 /// Use this function to create a new standalone broadphase.
10390 ///
10391 /// Newly created broadphase, or NULL
10392 pub fn phys_PxCreateBroadPhase(desc: *const PxBroadPhaseDesc) -> *mut PxBroadPhase;
10393
10394 pub fn PxAABBManager_release_mut(self_: *mut PxAABBManager);
10395
10396 /// Retrieves the underlying broadphase.
10397 ///
10398 /// The managed broadphase.
10399 pub fn PxAABBManager_getBroadPhase_mut(self_: *mut PxAABBManager) -> *mut PxBroadPhase;
10400
10401 /// Retrieves the managed bounds.
10402 ///
10403 /// This is needed as input parameters to functions like PxBroadPhaseRegions::addRegion.
10404 ///
10405 /// The managed object bounds.
10406 pub fn PxAABBManager_getBounds(self_: *const PxAABBManager) -> *const PxBounds3;
10407
10408 /// Retrieves the managed distances.
10409 ///
10410 /// This is needed as input parameters to functions like PxBroadPhaseRegions::addRegion.
10411 ///
10412 /// The managed object distances.
10413 pub fn PxAABBManager_getDistances(self_: *const PxAABBManager) -> *const f32;
10414
10415 /// Retrieves the managed filter groups.
10416 ///
10417 /// The managed object groups.
10418 pub fn PxAABBManager_getGroups(self_: *const PxAABBManager) -> *const u32;
10419
10420 /// Retrieves the managed buffers' capacity.
10421 ///
10422 /// Bounds, distances and groups buffers have the same capacity.
10423 ///
10424 /// The managed buffers' capacity.
10425 pub fn PxAABBManager_getCapacity(self_: *const PxAABBManager) -> u32;
10426
10427 /// Adds an object to the manager.
10428 ///
10429 /// Objects' indices are externally managed, i.e. they must be provided by users (as opposed to handles
10430 /// that could be returned by this manager). The design allows users to identify an object by a single ID,
10431 /// and use the same ID in multiple sub-systems.
10432 pub fn PxAABBManager_addObject_mut(self_: *mut PxAABBManager, index: u32, bounds: *const PxBounds3, group: u32, distance: f32);
10433
10434 /// Removes an object from the manager.
10435 pub fn PxAABBManager_removeObject_mut(self_: *mut PxAABBManager, index: u32);
10436
10437 /// Updates an object in the manager.
10438 ///
10439 /// This call can update an object's bounds, distance, or both.
10440 /// It is not possible to update an object's filter group.
10441 pub fn PxAABBManager_updateObject_mut(self_: *mut PxAABBManager, index: u32, bounds: *const PxBounds3, distance: *const f32);
10442
10443 /// Updates the broadphase and computes the lists of created/deleted pairs.
10444 ///
10445 /// The data necessary for updating the broadphase is internally computed by the AABB manager.
10446 ///
10447 /// To benefit from potentially multithreaded implementations, it is necessary to provide a continuation
10448 /// task to the function. It is legal to pass NULL there, but the underlying (CPU) implementations will
10449 /// then run single-threaded.
10450 pub fn PxAABBManager_update_mut(self_: *mut PxAABBManager, continuation: *mut PxBaseTask);
10451
10452 /// Retrieves the broadphase results after an update.
10453 ///
10454 /// This should be called once after each update call to retrieve the results of the broadphase. The
10455 /// results are incremental, i.e. the system only returns new and lost pairs, not all current pairs.
10456 pub fn PxAABBManager_fetchResults_mut(self_: *mut PxAABBManager, results: *mut PxBroadPhaseResults);
10457
10458 /// Helper for single-threaded updates.
10459 ///
10460 /// This short helper function performs a single-theaded update and reports the results in a single call.
10461 pub fn PxAABBManager_update_mut_1(self_: *mut PxAABBManager, results: *mut PxBroadPhaseResults);
10462
10463 /// AABB manager factory function.
10464 ///
10465 /// Use this function to create a new standalone high-level broadphase.
10466 ///
10467 /// Newly created AABB manager, or NULL
10468 pub fn phys_PxCreateAABBManager(broadphase: *mut PxBroadPhase) -> *mut PxAABBManager;
10469
10470 /// constructor sets to default
10471 pub fn PxSceneLimits_new() -> PxSceneLimits;
10472
10473 /// (re)sets the structure to the default
10474 pub fn PxSceneLimits_setToDefault_mut(self_: *mut PxSceneLimits);
10475
10476 /// Returns true if the descriptor is valid.
10477 ///
10478 /// true if the current settings are valid.
10479 pub fn PxSceneLimits_isValid(self_: *const PxSceneLimits) -> bool;
10480
10481 pub fn PxgDynamicsMemoryConfig_new() -> PxgDynamicsMemoryConfig;
10482
10483 pub fn PxgDynamicsMemoryConfig_isValid(self_: *const PxgDynamicsMemoryConfig) -> bool;
10484
10485 /// constructor sets to default.
10486 pub fn PxSceneDesc_new(scale: *const PxTolerancesScale) -> PxSceneDesc;
10487
10488 /// (re)sets the structure to the default.
10489 pub fn PxSceneDesc_setToDefault_mut(self_: *mut PxSceneDesc, scale: *const PxTolerancesScale);
10490
10491 /// Returns true if the descriptor is valid.
10492 ///
10493 /// true if the current settings are valid.
10494 pub fn PxSceneDesc_isValid(self_: *const PxSceneDesc) -> bool;
10495
10496 pub fn PxSceneDesc_getTolerancesScale(self_: *const PxSceneDesc) -> *const PxTolerancesScale;
10497
10498 /// Get number of broadphase volumes added for the current simulation step.
10499 ///
10500 /// Number of broadphase volumes added.
10501 pub fn PxSimulationStatistics_getNbBroadPhaseAdds(self_: *const PxSimulationStatistics) -> u32;
10502
10503 /// Get number of broadphase volumes removed for the current simulation step.
10504 ///
10505 /// Number of broadphase volumes removed.
10506 pub fn PxSimulationStatistics_getNbBroadPhaseRemoves(self_: *const PxSimulationStatistics) -> u32;
10507
10508 /// Get number of shape collision pairs of a certain type processed for the current simulation step.
10509 ///
10510 /// There is an entry for each geometry pair type.
10511 ///
10512 /// entry[i][j] = entry[j][i], hence, if you want the sum of all pair
10513 /// types, you need to discard the symmetric entries
10514 ///
10515 /// Number of processed pairs of the specified geometry types.
10516 pub fn PxSimulationStatistics_getRbPairStats(self_: *const PxSimulationStatistics, pairType: RbPairStatsType, g0: PxGeometryType, g1: PxGeometryType) -> u32;
10517
10518 pub fn PxSimulationStatistics_new() -> PxSimulationStatistics;
10519
10520 /// Sets the PVD flag. See PxPvdSceneFlag.
10521 pub fn PxPvdSceneClient_setScenePvdFlag_mut(self_: *mut PxPvdSceneClient, flag: PxPvdSceneFlag, value: bool);
10522
10523 /// Sets the PVD flags. See PxPvdSceneFlags.
10524 pub fn PxPvdSceneClient_setScenePvdFlags_mut(self_: *mut PxPvdSceneClient, flags: PxPvdSceneFlags);
10525
10526 /// Retrieves the PVD flags. See PxPvdSceneFlags.
10527 pub fn PxPvdSceneClient_getScenePvdFlags(self_: *const PxPvdSceneClient) -> PxPvdSceneFlags;
10528
10529 /// update camera on PVD application's render window
10530 pub fn PxPvdSceneClient_updateCamera_mut(self_: *mut PxPvdSceneClient, name: *const std::ffi::c_char, origin: *const PxVec3, up: *const PxVec3, target: *const PxVec3);
10531
10532 /// draw points on PVD application's render window
10533 pub fn PxPvdSceneClient_drawPoints_mut(self_: *mut PxPvdSceneClient, points: *const PxDebugPoint, count: u32);
10534
10535 /// draw lines on PVD application's render window
10536 pub fn PxPvdSceneClient_drawLines_mut(self_: *mut PxPvdSceneClient, lines: *const PxDebugLine, count: u32);
10537
10538 /// draw triangles on PVD application's render window
10539 pub fn PxPvdSceneClient_drawTriangles_mut(self_: *mut PxPvdSceneClient, triangles: *const PxDebugTriangle, count: u32);
10540
10541 /// draw text on PVD application's render window
10542 pub fn PxPvdSceneClient_drawText_mut(self_: *mut PxPvdSceneClient, text: *const PxDebugText);
10543
10544 pub fn PxDominanceGroupPair_new(a: u8, b: u8) -> PxDominanceGroupPair;
10545
10546 pub fn PxBroadPhaseCallback_delete(self_: *mut PxBroadPhaseCallback);
10547
10548 /// Out-of-bounds notification.
10549 ///
10550 /// This function is called when an object leaves the broad-phase.
10551 pub fn PxBroadPhaseCallback_onObjectOutOfBounds_mut(self_: *mut PxBroadPhaseCallback, shape: *mut PxShape, actor: *mut PxActor);
10552
10553 /// Out-of-bounds notification.
10554 ///
10555 /// This function is called when an aggregate leaves the broad-phase.
10556 pub fn PxBroadPhaseCallback_onObjectOutOfBounds_mut_1(self_: *mut PxBroadPhaseCallback, aggregate: *mut PxAggregate);
10557
10558 /// Deletes the scene.
10559 ///
10560 /// Removes any actors and constraint shaders from this scene
10561 /// (if the user hasn't already done so).
10562 ///
10563 /// Be sure to not keep a reference to this object after calling release.
10564 /// Avoid release calls while the scene is simulating (in between simulate() and fetchResults() calls).
10565 pub fn PxScene_release_mut(self_: *mut PxScene);
10566
10567 /// Sets a scene flag. You can only set one flag at a time.
10568 ///
10569 /// Not all flags are mutable and changing some will result in an error. Please check [`PxSceneFlag`] to see which flags can be changed.
10570 pub fn PxScene_setFlag_mut(self_: *mut PxScene, flag: PxSceneFlag, value: bool);
10571
10572 /// Get the scene flags.
10573 ///
10574 /// The scene flags. See [`PxSceneFlag`]
10575 pub fn PxScene_getFlags(self_: *const PxScene) -> PxSceneFlags;
10576
10577 /// Set new scene limits.
10578 ///
10579 /// Increase the maximum capacity of various data structures in the scene. The new capacities will be
10580 /// at least as large as required to deal with the objects currently in the scene. Further, these values
10581 /// are for preallocation and do not represent hard limits.
10582 pub fn PxScene_setLimits_mut(self_: *mut PxScene, limits: *const PxSceneLimits);
10583
10584 /// Get current scene limits.
10585 ///
10586 /// Current scene limits.
10587 pub fn PxScene_getLimits(self_: *const PxScene) -> PxSceneLimits;
10588
10589 /// Call this method to retrieve the Physics SDK.
10590 ///
10591 /// The physics SDK this scene is associated with.
10592 pub fn PxScene_getPhysics_mut(self_: *mut PxScene) -> *mut PxPhysics;
10593
10594 /// Retrieves the scene's internal timestamp, increased each time a simulation step is completed.
10595 ///
10596 /// scene timestamp
10597 pub fn PxScene_getTimestamp(self_: *const PxScene) -> u32;
10598
10599 /// Adds an articulation to this scene.
10600 ///
10601 /// If the articulation is already assigned to a scene (see [`PxArticulationReducedCoordinate::getScene`]), the call is ignored and an error is issued.
10602 ///
10603 /// True if success
10604 pub fn PxScene_addArticulation_mut(self_: *mut PxScene, articulation: *mut PxArticulationReducedCoordinate) -> bool;
10605
10606 /// Removes an articulation from this scene.
10607 ///
10608 /// If the articulation is not part of this scene (see [`PxArticulationReducedCoordinate::getScene`]), the call is ignored and an error is issued.
10609 ///
10610 /// If the articulation is in an aggregate it will be removed from the aggregate.
10611 pub fn PxScene_removeArticulation_mut(self_: *mut PxScene, articulation: *mut PxArticulationReducedCoordinate, wakeOnLostTouch: bool);
10612
10613 /// Adds an actor to this scene.
10614 ///
10615 /// If the actor is already assigned to a scene (see [`PxActor::getScene`]), the call is ignored and an error is issued.
10616 ///
10617 /// If the actor has an invalid constraint, in checked builds the call is ignored and an error is issued.
10618 ///
10619 /// You can not add individual articulation links (see [`PxArticulationLink`]) to the scene. Use #addArticulation() instead.
10620 ///
10621 /// If the actor is a PxRigidActor then each assigned PxConstraint object will get added to the scene automatically if
10622 /// it connects to another actor that is part of the scene already.
10623 ///
10624 /// When a BVH is provided the actor shapes are grouped together.
10625 /// The scene query pruning structure inside PhysX SDK will store/update one
10626 /// bound per actor. The scene queries against such an actor will query actor
10627 /// bounds and then make a local space query against the provided BVH, which is in actor's local space.
10628 ///
10629 /// True if success
10630 pub fn PxScene_addActor_mut(self_: *mut PxScene, actor: *mut PxActor, bvh: *const PxBVH) -> bool;
10631
10632 /// Adds actors to this scene. Only supports actors of type PxRigidStatic and PxRigidDynamic.
10633 ///
10634 /// This method only supports actors of type PxRigidStatic and PxRigidDynamic. For other actors, use addActor() instead.
10635 /// For articulation links, use addArticulation().
10636 ///
10637 /// If one of the actors is already assigned to a scene (see [`PxActor::getScene`]), the call is ignored and an error is issued.
10638 ///
10639 /// If an actor in the array contains an invalid constraint, in checked builds the call is ignored and an error is issued.
10640 ///
10641 /// If an actor in the array is a PxRigidActor then each assigned PxConstraint object will get added to the scene automatically if
10642 /// it connects to another actor that is part of the scene already.
10643 ///
10644 /// this method is optimized for high performance.
10645 ///
10646 /// True if success
10647 pub fn PxScene_addActors_mut(self_: *mut PxScene, actors: *const *mut PxActor, nbActors: u32) -> bool;
10648
10649 /// Adds a pruning structure together with its actors to this scene. Only supports actors of type PxRigidStatic and PxRigidDynamic.
10650 ///
10651 /// This method only supports actors of type PxRigidStatic and PxRigidDynamic. For other actors, use addActor() instead.
10652 /// For articulation links, use addArticulation().
10653 ///
10654 /// If an actor in the pruning structure contains an invalid constraint, in checked builds the call is ignored and an error is issued.
10655 ///
10656 /// For all actors in the pruning structure each assigned PxConstraint object will get added to the scene automatically if
10657 /// it connects to another actor that is part of the scene already.
10658 ///
10659 /// This method is optimized for high performance.
10660 ///
10661 /// Merging a PxPruningStructure into an active scene query optimization AABB tree might unbalance the tree. A typical use case for
10662 /// PxPruningStructure is a large world scenario where blocks of closely positioned actors get streamed in. The merge process finds the
10663 /// best node in the active scene query optimization AABB tree and inserts the PxPruningStructure. Therefore using PxPruningStructure
10664 /// for actors scattered throughout the world will result in an unbalanced tree.
10665 ///
10666 /// True if success
10667 pub fn PxScene_addActors_mut_1(self_: *mut PxScene, pruningStructure: *const PxPruningStructure) -> bool;
10668
10669 /// Removes an actor from this scene.
10670 ///
10671 /// If the actor is not part of this scene (see [`PxActor::getScene`]), the call is ignored and an error is issued.
10672 ///
10673 /// You can not remove individual articulation links (see [`PxArticulationLink`]) from the scene. Use #removeArticulation() instead.
10674 ///
10675 /// If the actor is a PxRigidActor then all assigned PxConstraint objects will get removed from the scene automatically.
10676 ///
10677 /// If the actor is in an aggregate it will be removed from the aggregate.
10678 pub fn PxScene_removeActor_mut(self_: *mut PxScene, actor: *mut PxActor, wakeOnLostTouch: bool);
10679
10680 /// Removes actors from this scene. Only supports actors of type PxRigidStatic and PxRigidDynamic.
10681 ///
10682 /// This method only supports actors of type PxRigidStatic and PxRigidDynamic. For other actors, use removeActor() instead.
10683 /// For articulation links, use removeArticulation().
10684 ///
10685 /// If some actor is not part of this scene (see [`PxActor::getScene`]), the actor remove is ignored and an error is issued.
10686 ///
10687 /// You can not remove individual articulation links (see [`PxArticulationLink`]) from the scene. Use #removeArticulation() instead.
10688 ///
10689 /// If the actor is a PxRigidActor then all assigned PxConstraint objects will get removed from the scene automatically.
10690 pub fn PxScene_removeActors_mut(self_: *mut PxScene, actors: *const *mut PxActor, nbActors: u32, wakeOnLostTouch: bool);
10691
10692 /// Adds an aggregate to this scene.
10693 ///
10694 /// If the aggregate is already assigned to a scene (see [`PxAggregate::getScene`]), the call is ignored and an error is issued.
10695 ///
10696 /// If the aggregate contains an actor with an invalid constraint, in checked builds the call is ignored and an error is issued.
10697 ///
10698 /// If the aggregate already contains actors, those actors are added to the scene as well.
10699 ///
10700 /// True if success
10701 pub fn PxScene_addAggregate_mut(self_: *mut PxScene, aggregate: *mut PxAggregate) -> bool;
10702
10703 /// Removes an aggregate from this scene.
10704 ///
10705 /// If the aggregate is not part of this scene (see [`PxAggregate::getScene`]), the call is ignored and an error is issued.
10706 ///
10707 /// If the aggregate contains actors, those actors are removed from the scene as well.
10708 pub fn PxScene_removeAggregate_mut(self_: *mut PxScene, aggregate: *mut PxAggregate, wakeOnLostTouch: bool);
10709
10710 /// Adds objects in the collection to this scene.
10711 ///
10712 /// This function adds the following types of objects to this scene: PxRigidActor (except PxArticulationLink), PxAggregate, PxArticulationReducedCoordinate.
10713 /// This method is typically used after deserializing the collection in order to populate the scene with deserialized objects.
10714 ///
10715 /// If the collection contains an actor with an invalid constraint, in checked builds the call is ignored and an error is issued.
10716 ///
10717 /// True if success
10718 pub fn PxScene_addCollection_mut(self_: *mut PxScene, collection: *const PxCollection) -> bool;
10719
10720 /// Retrieve the number of actors of certain types in the scene. For supported types, see PxActorTypeFlags.
10721 ///
10722 /// the number of actors.
10723 pub fn PxScene_getNbActors(self_: *const PxScene, types: PxActorTypeFlags) -> u32;
10724
10725 /// Retrieve an array of all the actors of certain types in the scene. For supported types, see PxActorTypeFlags.
10726 ///
10727 /// Number of actors written to the buffer.
10728 pub fn PxScene_getActors(self_: *const PxScene, types: PxActorTypeFlags, userBuffer: *mut *mut PxActor, bufferSize: u32, startIndex: u32) -> u32;
10729
10730 /// Queries the PxScene for a list of the PxActors whose transforms have been
10731 /// updated during the previous simulation step. Only includes actors of type PxRigidDynamic and PxArticulationLink.
10732 ///
10733 /// PxSceneFlag::eENABLE_ACTIVE_ACTORS must be set.
10734 ///
10735 /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored and NULL will be returned.
10736 ///
10737 /// A pointer to the list of active PxActors generated during the last call to fetchResults().
10738 pub fn PxScene_getActiveActors_mut(self_: *mut PxScene, nbActorsOut: *mut u32) -> *mut *mut PxActor;
10739
10740 /// Returns the number of articulations in the scene.
10741 ///
10742 /// the number of articulations in this scene.
10743 pub fn PxScene_getNbArticulations(self_: *const PxScene) -> u32;
10744
10745 /// Retrieve all the articulations in the scene.
10746 ///
10747 /// Number of articulations written to the buffer.
10748 pub fn PxScene_getArticulations(self_: *const PxScene, userBuffer: *mut *mut PxArticulationReducedCoordinate, bufferSize: u32, startIndex: u32) -> u32;
10749
10750 /// Returns the number of constraint shaders in the scene.
10751 ///
10752 /// the number of constraint shaders in this scene.
10753 pub fn PxScene_getNbConstraints(self_: *const PxScene) -> u32;
10754
10755 /// Retrieve all the constraint shaders in the scene.
10756 ///
10757 /// Number of constraint shaders written to the buffer.
10758 pub fn PxScene_getConstraints(self_: *const PxScene, userBuffer: *mut *mut PxConstraint, bufferSize: u32, startIndex: u32) -> u32;
10759
10760 /// Returns the number of aggregates in the scene.
10761 ///
10762 /// the number of aggregates in this scene.
10763 pub fn PxScene_getNbAggregates(self_: *const PxScene) -> u32;
10764
10765 /// Retrieve all the aggregates in the scene.
10766 ///
10767 /// Number of aggregates written to the buffer.
10768 pub fn PxScene_getAggregates(self_: *const PxScene, userBuffer: *mut *mut PxAggregate, bufferSize: u32, startIndex: u32) -> u32;
10769
10770 /// Specifies the dominance behavior of contacts between two actors with two certain dominance groups.
10771 ///
10772 /// It is possible to assign each actor to a dominance groups using [`PxActor::setDominanceGroup`]().
10773 ///
10774 /// With dominance groups one can have all contacts created between actors act in one direction only. This is useful, for example, if you
10775 /// want an object to push debris out of its way and be unaffected,while still responding physically to forces and collisions
10776 /// with non-debris objects.
10777 ///
10778 /// Whenever a contact between two actors (a0, a1) needs to be solved, the groups (g0, g1) of both
10779 /// actors are retrieved. Then the PxDominanceGroupPair setting for this group pair is retrieved with getDominanceGroupPair(g0, g1).
10780 ///
10781 /// In the contact, PxDominanceGroupPair::dominance0 becomes the dominance setting for a0, and
10782 /// PxDominanceGroupPair::dominance1 becomes the dominance setting for a1. A dominanceN setting of 1.0f, the default,
10783 /// will permit aN to be pushed or pulled by a(1-N) through the contact. A dominanceN setting of 0.0f, will however
10784 /// prevent aN to be pushed by a(1-N) via the contact. Thus, a PxDominanceGroupPair of (1.0f, 0.0f) makes
10785 /// the interaction one-way.
10786 ///
10787 /// The matrix sampled by getDominanceGroupPair(g1, g2) is initialised by default such that:
10788 ///
10789 /// if g1 == g2, then (1.0f, 1.0f) is returned
10790 /// if g1
10791 /// <
10792 /// g2, then (0.0f, 1.0f) is returned
10793 /// if g1 > g2, then (1.0f, 0.0f) is returned
10794 ///
10795 /// In other words, we permit actors in higher groups to be pushed around by actors in lower groups by default.
10796 ///
10797 /// These settings should cover most applications, and in fact not overriding these settings may likely result in higher performance.
10798 ///
10799 /// It is not possible to make the matrix asymetric, or to change the diagonal. In other words:
10800 ///
10801 /// it is not possible to change (g1, g2) if (g1==g2)
10802 /// if you set
10803 ///
10804 /// (g1, g2) to X, then (g2, g1) will implicitly and automatically be set to ~X, where:
10805 ///
10806 /// ~(1.0f, 1.0f) is (1.0f, 1.0f)
10807 /// ~(0.0f, 1.0f) is (1.0f, 0.0f)
10808 /// ~(1.0f, 0.0f) is (0.0f, 1.0f)
10809 ///
10810 /// These two restrictions are to make sure that contacts between two actors will always evaluate to the same dominance
10811 /// setting, regardless of the order of the actors.
10812 ///
10813 /// Dominance settings are currently specified as floats 0.0f or 1.0f because in the future we may permit arbitrary
10814 /// fractional settings to express 'partly-one-way' interactions.
10815 ///
10816 /// Sleeping:
10817 /// Does
10818 /// NOT
10819 /// wake actors up automatically.
10820 pub fn PxScene_setDominanceGroupPair_mut(self_: *mut PxScene, group1: u8, group2: u8, dominance: *const PxDominanceGroupPair);
10821
10822 /// Samples the dominance matrix.
10823 pub fn PxScene_getDominanceGroupPair(self_: *const PxScene, group1: u8, group2: u8) -> PxDominanceGroupPair;
10824
10825 /// Return the cpu dispatcher that was set in PxSceneDesc::cpuDispatcher when creating the scene with PxPhysics::createScene
10826 pub fn PxScene_getCpuDispatcher(self_: *const PxScene) -> *mut PxCpuDispatcher;
10827
10828 /// Reserves a new client ID.
10829 ///
10830 /// PX_DEFAULT_CLIENT is always available as the default clientID.
10831 /// Additional clients are returned by this function. Clients cannot be released once created.
10832 /// An error is reported when more than a supported number of clients (currently 128) are created.
10833 pub fn PxScene_createClient_mut(self_: *mut PxScene) -> u8;
10834
10835 /// Sets a user notify object which receives special simulation events when they occur.
10836 ///
10837 /// Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
10838 pub fn PxScene_setSimulationEventCallback_mut(self_: *mut PxScene, callback: *mut PxSimulationEventCallback);
10839
10840 /// Retrieves the simulationEventCallback pointer set with setSimulationEventCallback().
10841 ///
10842 /// The current user notify pointer. See [`PxSimulationEventCallback`].
10843 pub fn PxScene_getSimulationEventCallback(self_: *const PxScene) -> *mut PxSimulationEventCallback;
10844
10845 /// Sets a user callback object, which receives callbacks on all contacts generated for specified actors.
10846 ///
10847 /// Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
10848 pub fn PxScene_setContactModifyCallback_mut(self_: *mut PxScene, callback: *mut PxContactModifyCallback);
10849
10850 /// Sets a user callback object, which receives callbacks on all CCD contacts generated for specified actors.
10851 ///
10852 /// Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
10853 pub fn PxScene_setCCDContactModifyCallback_mut(self_: *mut PxScene, callback: *mut PxCCDContactModifyCallback);
10854
10855 /// Retrieves the PxContactModifyCallback pointer set with setContactModifyCallback().
10856 ///
10857 /// The current user contact modify callback pointer. See [`PxContactModifyCallback`].
10858 pub fn PxScene_getContactModifyCallback(self_: *const PxScene) -> *mut PxContactModifyCallback;
10859
10860 /// Retrieves the PxCCDContactModifyCallback pointer set with setContactModifyCallback().
10861 ///
10862 /// The current user contact modify callback pointer. See [`PxContactModifyCallback`].
10863 pub fn PxScene_getCCDContactModifyCallback(self_: *const PxScene) -> *mut PxCCDContactModifyCallback;
10864
10865 /// Sets a broad-phase user callback object.
10866 ///
10867 /// Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
10868 pub fn PxScene_setBroadPhaseCallback_mut(self_: *mut PxScene, callback: *mut PxBroadPhaseCallback);
10869
10870 /// Retrieves the PxBroadPhaseCallback pointer set with setBroadPhaseCallback().
10871 ///
10872 /// The current broad-phase callback pointer. See [`PxBroadPhaseCallback`].
10873 pub fn PxScene_getBroadPhaseCallback(self_: *const PxScene) -> *mut PxBroadPhaseCallback;
10874
10875 /// Sets the shared global filter data which will get passed into the filter shader.
10876 ///
10877 /// It is the user's responsibility to ensure that changing the shared global filter data does not change the filter output value for existing pairs.
10878 /// If the filter output for existing pairs does change nonetheless then such a change will not take effect until the pair gets refiltered.
10879 /// resetFiltering() can be used to explicitly refilter the pairs of specific objects.
10880 ///
10881 /// The provided data will get copied to internal buffers and this copy will be used for filtering calls.
10882 ///
10883 /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored.
10884 pub fn PxScene_setFilterShaderData_mut(self_: *mut PxScene, data: *const std::ffi::c_void, dataSize: u32);
10885
10886 /// Gets the shared global filter data in use for this scene.
10887 ///
10888 /// The reference points to a copy of the original filter data specified in [`PxSceneDesc`].filterShaderData or provided by #setFilterShaderData().
10889 ///
10890 /// Shared filter data for filter shader.
10891 pub fn PxScene_getFilterShaderData(self_: *const PxScene) -> *const std::ffi::c_void;
10892
10893 /// Gets the size of the shared global filter data ([`PxSceneDesc`].filterShaderData)
10894 ///
10895 /// Size of shared filter data [bytes].
10896 pub fn PxScene_getFilterShaderDataSize(self_: *const PxScene) -> u32;
10897
10898 /// Marks the object to reset interactions and re-run collision filters in the next simulation step.
10899 ///
10900 /// This call forces the object to remove all existing collision interactions, to search anew for existing contact
10901 /// pairs and to run the collision filters again for found collision pairs.
10902 ///
10903 /// The operation is supported for PxRigidActor objects only.
10904 ///
10905 /// All persistent state of existing interactions will be lost and can not be retrieved even if the same collison pair
10906 /// is found again in the next step. This will mean, for example, that you will not get notified about persistent contact
10907 /// for such an interaction (see [`PxPairFlag::eNOTIFY_TOUCH_PERSISTS`]), the contact pair will be interpreted as newly found instead.
10908 ///
10909 /// Lost touch contact reports will be sent for every collision pair which includes this shape, if they have
10910 /// been requested through [`PxPairFlag::eNOTIFY_TOUCH_LOST`] or #PxPairFlag::eNOTIFY_THRESHOLD_FORCE_LOST.
10911 ///
10912 /// This is an expensive operation, don't use it if you don't have to.
10913 ///
10914 /// Can be used to retrieve collision pairs that were killed by the collision filters (see [`PxFilterFlag::eKILL`])
10915 ///
10916 /// It is invalid to use this method if the actor has not been added to a scene already.
10917 ///
10918 /// It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
10919 ///
10920 /// Do not use this method while the simulation is running.
10921 ///
10922 /// Sleeping:
10923 /// Does wake up the actor.
10924 ///
10925 /// True if success
10926 pub fn PxScene_resetFiltering_mut(self_: *mut PxScene, actor: *mut PxActor) -> bool;
10927
10928 /// Marks the object to reset interactions and re-run collision filters for specified shapes in the next simulation step.
10929 ///
10930 /// This is a specialization of the resetFiltering(PxActor
10931 /// &
10932 /// actor) method and allows to reset interactions for specific shapes of
10933 /// a PxRigidActor.
10934 ///
10935 /// Do not use this method while the simulation is running.
10936 ///
10937 /// Sleeping:
10938 /// Does wake up the actor.
10939 pub fn PxScene_resetFiltering_mut_1(self_: *mut PxScene, actor: *mut PxRigidActor, shapes: *const *mut PxShape, shapeCount: u32) -> bool;
10940
10941 /// Gets the pair filtering mode for kinematic-kinematic pairs.
10942 ///
10943 /// Filtering mode for kinematic-kinematic pairs.
10944 pub fn PxScene_getKinematicKinematicFilteringMode(self_: *const PxScene) -> PxPairFilteringMode;
10945
10946 /// Gets the pair filtering mode for static-kinematic pairs.
10947 ///
10948 /// Filtering mode for static-kinematic pairs.
10949 pub fn PxScene_getStaticKinematicFilteringMode(self_: *const PxScene) -> PxPairFilteringMode;
10950
10951 /// Advances the simulation by an elapsedTime time.
10952 ///
10953 /// Large elapsedTime values can lead to instabilities. In such cases elapsedTime
10954 /// should be subdivided into smaller time intervals and simulate() should be called
10955 /// multiple times for each interval.
10956 ///
10957 /// Calls to simulate() should pair with calls to fetchResults():
10958 /// Each fetchResults() invocation corresponds to exactly one simulate()
10959 /// invocation; calling simulate() twice without an intervening fetchResults()
10960 /// or fetchResults() twice without an intervening simulate() causes an error
10961 /// condition.
10962 ///
10963 /// scene->simulate();
10964 /// ...do some processing until physics is computed...
10965 /// scene->fetchResults();
10966 /// ...now results of run may be retrieved.
10967 ///
10968 /// True if success
10969 pub fn PxScene_simulate_mut(self_: *mut PxScene, elapsedTime: f32, completionTask: *mut PxBaseTask, scratchMemBlock: *mut std::ffi::c_void, scratchMemBlockSize: u32, controlSimulation: bool) -> bool;
10970
10971 /// Performs dynamics phase of the simulation pipeline.
10972 ///
10973 /// Calls to advance() should follow calls to fetchCollision(). An error message will be issued if this sequence is not followed.
10974 ///
10975 /// True if success
10976 pub fn PxScene_advance_mut(self_: *mut PxScene, completionTask: *mut PxBaseTask) -> bool;
10977
10978 /// Performs collision detection for the scene over elapsedTime
10979 ///
10980 /// Calls to collide() should be the first method called to simulate a frame.
10981 ///
10982 /// True if success
10983 pub fn PxScene_collide_mut(self_: *mut PxScene, elapsedTime: f32, completionTask: *mut PxBaseTask, scratchMemBlock: *mut std::ffi::c_void, scratchMemBlockSize: u32, controlSimulation: bool) -> bool;
10984
10985 /// This checks to see if the simulation run has completed.
10986 ///
10987 /// This does not cause the data available for reading to be updated with the results of the simulation, it is simply a status check.
10988 /// The bool will allow it to either return immediately or block waiting for the condition to be met so that it can return true
10989 ///
10990 /// True if the results are available.
10991 pub fn PxScene_checkResults_mut(self_: *mut PxScene, block: bool) -> bool;
10992
10993 /// This method must be called after collide() and before advance(). It will wait for the collision phase to finish. If the user makes an illegal simulation call, the SDK will issue an error
10994 /// message.
10995 pub fn PxScene_fetchCollision_mut(self_: *mut PxScene, block: bool) -> bool;
10996
10997 /// This is the big brother to checkResults() it basically does the following:
10998 ///
10999 /// True if the results have been fetched.
11000 pub fn PxScene_fetchResults_mut(self_: *mut PxScene, block: bool, errorState: *mut u32) -> bool;
11001
11002 /// This call performs the first section of fetchResults, and returns a pointer to the contact streams output by the simulation. It can be used to process contact pairs in parallel, which is often a limiting factor
11003 /// for fetchResults() performance.
11004 ///
11005 /// After calling this function and processing the contact streams, call fetchResultsFinish(). Note that writes to the simulation are not
11006 /// permitted between the start of fetchResultsStart() and the end of fetchResultsFinish().
11007 ///
11008 /// True if the results have been fetched.
11009 pub fn PxScene_fetchResultsStart_mut(self_: *mut PxScene, contactPairs: *mut *const PxContactPairHeader, nbContactPairs: *mut u32, block: bool) -> bool;
11010
11011 /// This call processes all event callbacks in parallel. It takes a continuation task, which will be executed once all callbacks have been processed.
11012 ///
11013 /// This is a utility function to make it easier to process callbacks in parallel using the PhysX task system. It can only be used in conjunction with
11014 /// fetchResultsStart(...) and fetchResultsFinish(...)
11015 pub fn PxScene_processCallbacks_mut(self_: *mut PxScene, continuation: *mut PxBaseTask);
11016
11017 /// This call performs the second section of fetchResults.
11018 ///
11019 /// It must be called after fetchResultsStart() returns and contact reports have been processed.
11020 ///
11021 /// Note that once fetchResultsFinish() has been called, the contact streams returned in fetchResultsStart() will be invalid.
11022 pub fn PxScene_fetchResultsFinish_mut(self_: *mut PxScene, errorState: *mut u32);
11023
11024 /// This call performs the synchronization of particle system data copies.
11025 pub fn PxScene_fetchResultsParticleSystem_mut(self_: *mut PxScene);
11026
11027 /// Clear internal buffers and free memory.
11028 ///
11029 /// This method can be used to clear buffers and free internal memory without having to destroy the scene. Can be useful if
11030 /// the physics data gets streamed in and a checkpoint with a clean state should be created.
11031 ///
11032 /// It is not allowed to call this method while the simulation is running. The call will fail.
11033 pub fn PxScene_flushSimulation_mut(self_: *mut PxScene, sendPendingReports: bool);
11034
11035 /// Sets a constant gravity for the entire scene.
11036 ///
11037 /// Do not use this method while the simulation is running.
11038 ///
11039 /// Sleeping:
11040 /// Does
11041 /// NOT
11042 /// wake the actor up automatically.
11043 pub fn PxScene_setGravity_mut(self_: *mut PxScene, vec: *const PxVec3);
11044
11045 /// Retrieves the current gravity setting.
11046 ///
11047 /// The current gravity for the scene.
11048 pub fn PxScene_getGravity(self_: *const PxScene) -> PxVec3;
11049
11050 /// Set the bounce threshold velocity. Collision speeds below this threshold will not cause a bounce.
11051 ///
11052 /// Do not use this method while the simulation is running.
11053 pub fn PxScene_setBounceThresholdVelocity_mut(self_: *mut PxScene, t: f32);
11054
11055 /// Return the bounce threshold velocity.
11056 pub fn PxScene_getBounceThresholdVelocity(self_: *const PxScene) -> f32;
11057
11058 /// Sets the maximum number of CCD passes
11059 ///
11060 /// Do not use this method while the simulation is running.
11061 pub fn PxScene_setCCDMaxPasses_mut(self_: *mut PxScene, ccdMaxPasses: u32);
11062
11063 /// Gets the maximum number of CCD passes.
11064 ///
11065 /// The maximum number of CCD passes.
11066 pub fn PxScene_getCCDMaxPasses(self_: *const PxScene) -> u32;
11067
11068 /// Set the maximum CCD separation.
11069 ///
11070 /// Do not use this method while the simulation is running.
11071 pub fn PxScene_setCCDMaxSeparation_mut(self_: *mut PxScene, t: f32);
11072
11073 /// Gets the maximum CCD separation.
11074 ///
11075 /// The maximum CCD separation.
11076 pub fn PxScene_getCCDMaxSeparation(self_: *const PxScene) -> f32;
11077
11078 /// Set the CCD threshold.
11079 ///
11080 /// Do not use this method while the simulation is running.
11081 pub fn PxScene_setCCDThreshold_mut(self_: *mut PxScene, t: f32);
11082
11083 /// Gets the CCD threshold.
11084 ///
11085 /// The CCD threshold.
11086 pub fn PxScene_getCCDThreshold(self_: *const PxScene) -> f32;
11087
11088 /// Set the max bias coefficient.
11089 ///
11090 /// Do not use this method while the simulation is running.
11091 pub fn PxScene_setMaxBiasCoefficient_mut(self_: *mut PxScene, t: f32);
11092
11093 /// Gets the max bias coefficient.
11094 ///
11095 /// The max bias coefficient.
11096 pub fn PxScene_getMaxBiasCoefficient(self_: *const PxScene) -> f32;
11097
11098 /// Set the friction offset threshold.
11099 ///
11100 /// Do not use this method while the simulation is running.
11101 pub fn PxScene_setFrictionOffsetThreshold_mut(self_: *mut PxScene, t: f32);
11102
11103 /// Gets the friction offset threshold.
11104 pub fn PxScene_getFrictionOffsetThreshold(self_: *const PxScene) -> f32;
11105
11106 /// Set the friction correlation distance.
11107 ///
11108 /// Do not use this method while the simulation is running.
11109 pub fn PxScene_setFrictionCorrelationDistance_mut(self_: *mut PxScene, t: f32);
11110
11111 /// Gets the friction correlation distance.
11112 pub fn PxScene_getFrictionCorrelationDistance(self_: *const PxScene) -> f32;
11113
11114 /// Return the friction model.
11115 pub fn PxScene_getFrictionType(self_: *const PxScene) -> PxFrictionType;
11116
11117 /// Return the solver model.
11118 pub fn PxScene_getSolverType(self_: *const PxScene) -> PxSolverType;
11119
11120 /// Function that lets you set debug visualization parameters.
11121 ///
11122 /// Returns false if the value passed is out of range for usage specified by the enum.
11123 ///
11124 /// Do not use this method while the simulation is running.
11125 ///
11126 /// False if the parameter is out of range.
11127 pub fn PxScene_setVisualizationParameter_mut(self_: *mut PxScene, param: PxVisualizationParameter, value: f32) -> bool;
11128
11129 /// Function that lets you query debug visualization parameters.
11130 ///
11131 /// The value of the parameter.
11132 pub fn PxScene_getVisualizationParameter(self_: *const PxScene, paramEnum: PxVisualizationParameter) -> f32;
11133
11134 /// Defines a box in world space to which visualization geometry will be (conservatively) culled. Use a non-empty culling box to enable the feature, and an empty culling box to disable it.
11135 ///
11136 /// Do not use this method while the simulation is running.
11137 pub fn PxScene_setVisualizationCullingBox_mut(self_: *mut PxScene, box_: *const PxBounds3);
11138
11139 /// Retrieves the visualization culling box.
11140 ///
11141 /// the box to which the geometry will be culled.
11142 pub fn PxScene_getVisualizationCullingBox(self_: *const PxScene) -> PxBounds3;
11143
11144 /// Retrieves the render buffer.
11145 ///
11146 /// This will contain the results of any active visualization for this scene.
11147 ///
11148 /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will result in undefined behaviour.
11149 ///
11150 /// The render buffer.
11151 pub fn PxScene_getRenderBuffer_mut(self_: *mut PxScene) -> *const PxRenderBuffer;
11152
11153 /// Call this method to retrieve statistics for the current simulation step.
11154 ///
11155 /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored.
11156 pub fn PxScene_getSimulationStatistics(self_: *const PxScene, stats: *mut PxSimulationStatistics);
11157
11158 /// Returns broad-phase type.
11159 ///
11160 /// Broad-phase type
11161 pub fn PxScene_getBroadPhaseType(self_: *const PxScene) -> PxBroadPhaseType;
11162
11163 /// Gets broad-phase caps.
11164 ///
11165 /// True if success
11166 pub fn PxScene_getBroadPhaseCaps(self_: *const PxScene, caps: *mut PxBroadPhaseCaps) -> bool;
11167
11168 /// Returns number of regions currently registered in the broad-phase.
11169 ///
11170 /// Number of regions
11171 pub fn PxScene_getNbBroadPhaseRegions(self_: *const PxScene) -> u32;
11172
11173 /// Gets broad-phase regions.
11174 ///
11175 /// Number of written out regions
11176 pub fn PxScene_getBroadPhaseRegions(self_: *const PxScene, userBuffer: *mut PxBroadPhaseRegionInfo, bufferSize: u32, startIndex: u32) -> u32;
11177
11178 /// Adds a new broad-phase region.
11179 ///
11180 /// The bounds for the new region must be non-empty, otherwise an error occurs and the call is ignored.
11181 ///
11182 /// Note that by default, objects already existing in the SDK that might touch this region will not be automatically
11183 /// added to the region. In other words the newly created region will be empty, and will only be populated with new
11184 /// objects when they are added to the simulation, or with already existing objects when they are updated.
11185 ///
11186 /// It is nonetheless possible to override this default behavior and let the SDK populate the new region automatically
11187 /// with already existing objects overlapping the incoming region. This has a cost though, and it should only be used
11188 /// when the game can not guarantee that all objects within the new region will be added to the simulation after the
11189 /// region itself.
11190 ///
11191 /// Objects automatically move from one region to another during their lifetime. The system keeps tracks of what
11192 /// regions a given object is in. It is legal for an object to be in an arbitrary number of regions. However if an
11193 /// object leaves all regions, or is created outside of all regions, several things happen:
11194 /// - collisions get disabled for this object
11195 /// - if a PxBroadPhaseCallback object is provided, an "out-of-bounds" event is generated via that callback
11196 /// - if a PxBroadPhaseCallback object is not provided, a warning/error message is sent to the error stream
11197 ///
11198 /// If an object goes out-of-bounds and user deletes it during the same frame, neither the out-of-bounds event nor the
11199 /// error message is generated.
11200 ///
11201 /// Handle for newly created region, or 0xffffffff in case of failure.
11202 pub fn PxScene_addBroadPhaseRegion_mut(self_: *mut PxScene, region: *const PxBroadPhaseRegion, populateRegion: bool) -> u32;
11203
11204 /// Removes a new broad-phase region.
11205 ///
11206 /// If the region still contains objects, and if those objects do not overlap any region any more, they are not
11207 /// automatically removed from the simulation. Instead, the PxBroadPhaseCallback::onObjectOutOfBounds notification
11208 /// is used for each object. Users are responsible for removing the objects from the simulation if this is the
11209 /// desired behavior.
11210 ///
11211 /// If the handle is invalid, or if a valid handle is removed twice, an error message is sent to the error stream.
11212 ///
11213 /// True if success
11214 pub fn PxScene_removeBroadPhaseRegion_mut(self_: *mut PxScene, handle: u32) -> bool;
11215
11216 /// Get the task manager associated with this scene
11217 ///
11218 /// the task manager associated with the scene
11219 pub fn PxScene_getTaskManager(self_: *const PxScene) -> *mut PxTaskManager;
11220
11221 /// Lock the scene for reading from the calling thread.
11222 ///
11223 /// When the PxSceneFlag::eREQUIRE_RW_LOCK flag is enabled lockRead() must be
11224 /// called before any read calls are made on the scene.
11225 ///
11226 /// Multiple threads may read at the same time, no threads may read while a thread is writing.
11227 /// If a call to lockRead() is made while another thread is holding a write lock
11228 /// then the calling thread will be blocked until the writing thread calls unlockWrite().
11229 ///
11230 /// Lock upgrading is *not* supported, that means it is an error to
11231 /// call lockRead() followed by lockWrite().
11232 ///
11233 /// Recursive locking is supported but each lockRead() call must be paired with an unlockRead().
11234 pub fn PxScene_lockRead_mut(self_: *mut PxScene, file: *const std::ffi::c_char, line: u32);
11235
11236 /// Unlock the scene from reading.
11237 ///
11238 /// Each unlockRead() must be paired with a lockRead() from the same thread.
11239 pub fn PxScene_unlockRead_mut(self_: *mut PxScene);
11240
11241 /// Lock the scene for writing from this thread.
11242 ///
11243 /// When the PxSceneFlag::eREQUIRE_RW_LOCK flag is enabled lockWrite() must be
11244 /// called before any write calls are made on the scene.
11245 ///
11246 /// Only one thread may write at a time and no threads may read while a thread is writing.
11247 /// If a call to lockWrite() is made and there are other threads reading then the
11248 /// calling thread will be blocked until the readers complete.
11249 ///
11250 /// Writers have priority. If a thread is blocked waiting to write then subsequent calls to
11251 /// lockRead() from other threads will be blocked until the writer completes.
11252 ///
11253 /// If multiple threads are waiting to write then the thread that is first
11254 /// granted access depends on OS scheduling.
11255 ///
11256 /// Recursive locking is supported but each lockWrite() call must be paired
11257 /// with an unlockWrite().
11258 ///
11259 /// If a thread has already locked the scene for writing then it may call
11260 /// lockRead().
11261 pub fn PxScene_lockWrite_mut(self_: *mut PxScene, file: *const std::ffi::c_char, line: u32);
11262
11263 /// Unlock the scene from writing.
11264 ///
11265 /// Each unlockWrite() must be paired with a lockWrite() from the same thread.
11266 pub fn PxScene_unlockWrite_mut(self_: *mut PxScene);
11267
11268 /// set the cache blocks that can be used during simulate().
11269 ///
11270 /// Each frame the simulation requires memory to store contact, friction, and contact cache data. This memory is used in blocks of 16K.
11271 /// Each frame the blocks used by the previous frame are freed, and may be retrieved by the application using PxScene::flushSimulation()
11272 ///
11273 /// This call will force allocation of cache blocks if the numBlocks parameter is greater than the currently allocated number
11274 /// of blocks, and less than the max16KContactDataBlocks parameter specified at scene creation time.
11275 ///
11276 /// Do not use this method while the simulation is running.
11277 pub fn PxScene_setNbContactDataBlocks_mut(self_: *mut PxScene, numBlocks: u32);
11278
11279 /// get the number of cache blocks currently used by the scene
11280 ///
11281 /// This function may not be called while the scene is simulating
11282 ///
11283 /// the number of cache blocks currently used by the scene
11284 pub fn PxScene_getNbContactDataBlocksUsed(self_: *const PxScene) -> u32;
11285
11286 /// get the maximum number of cache blocks used by the scene
11287 ///
11288 /// This function may not be called while the scene is simulating
11289 ///
11290 /// the maximum number of cache blocks everused by the scene
11291 pub fn PxScene_getMaxNbContactDataBlocksUsed(self_: *const PxScene) -> u32;
11292
11293 /// Return the value of PxSceneDesc::contactReportStreamBufferSize that was set when creating the scene with PxPhysics::createScene
11294 pub fn PxScene_getContactReportStreamBufferSize(self_: *const PxScene) -> u32;
11295
11296 /// Sets the number of actors required to spawn a separate rigid body solver thread.
11297 ///
11298 /// Do not use this method while the simulation is running.
11299 pub fn PxScene_setSolverBatchSize_mut(self_: *mut PxScene, solverBatchSize: u32);
11300
11301 /// Retrieves the number of actors required to spawn a separate rigid body solver thread.
11302 ///
11303 /// Current number of actors required to spawn a separate rigid body solver thread.
11304 pub fn PxScene_getSolverBatchSize(self_: *const PxScene) -> u32;
11305
11306 /// Sets the number of articulations required to spawn a separate rigid body solver thread.
11307 ///
11308 /// Do not use this method while the simulation is running.
11309 pub fn PxScene_setSolverArticulationBatchSize_mut(self_: *mut PxScene, solverBatchSize: u32);
11310
11311 /// Retrieves the number of articulations required to spawn a separate rigid body solver thread.
11312 ///
11313 /// Current number of articulations required to spawn a separate rigid body solver thread.
11314 pub fn PxScene_getSolverArticulationBatchSize(self_: *const PxScene) -> u32;
11315
11316 /// Returns the wake counter reset value.
11317 ///
11318 /// Wake counter reset value
11319 pub fn PxScene_getWakeCounterResetValue(self_: *const PxScene) -> f32;
11320
11321 /// Shift the scene origin by the specified vector.
11322 ///
11323 /// The poses of all objects in the scene and the corresponding data structures will get adjusted to reflect the new origin location
11324 /// (the shift vector will get subtracted from all object positions).
11325 ///
11326 /// It is the user's responsibility to keep track of the summed total origin shift and adjust all input/output to/from PhysX accordingly.
11327 ///
11328 /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored.
11329 ///
11330 /// Make sure to propagate the origin shift to other dependent modules (for example, the character controller module etc.).
11331 ///
11332 /// This is an expensive operation and we recommend to use it only in the case where distance related precision issues may arise in areas far from the origin.
11333 pub fn PxScene_shiftOrigin_mut(self_: *mut PxScene, shift: *const PxVec3);
11334
11335 /// Returns the Pvd client associated with the scene.
11336 ///
11337 /// the client, NULL if no PVD supported.
11338 pub fn PxScene_getScenePvdClient_mut(self_: *mut PxScene) -> *mut PxPvdSceneClient;
11339
11340 /// Copy GPU articulation data from the internal GPU buffer to a user-provided device buffer.
11341 pub fn PxScene_copyArticulationData_mut(self_: *mut PxScene, data: *mut std::ffi::c_void, index: *mut std::ffi::c_void, dataType: PxArticulationGpuDataType, nbCopyArticulations: u32, copyEvent: *mut std::ffi::c_void);
11342
11343 /// Apply GPU articulation data from a user-provided device buffer to the internal GPU buffer.
11344 pub fn PxScene_applyArticulationData_mut(self_: *mut PxScene, data: *mut std::ffi::c_void, index: *mut std::ffi::c_void, dataType: PxArticulationGpuDataType, nbUpdatedArticulations: u32, waitEvent: *mut std::ffi::c_void, signalEvent: *mut std::ffi::c_void);
11345
11346 /// Copy GPU softbody data from the internal GPU buffer to a user-provided device buffer.
11347 pub fn PxScene_copySoftBodyData_mut(self_: *mut PxScene, data: *mut *mut std::ffi::c_void, dataSizes: *mut std::ffi::c_void, softBodyIndices: *mut std::ffi::c_void, flag: PxSoftBodyDataFlag, nbCopySoftBodies: u32, maxSize: u32, copyEvent: *mut std::ffi::c_void);
11348
11349 /// Apply user-provided data to the internal softbody system.
11350 pub fn PxScene_applySoftBodyData_mut(self_: *mut PxScene, data: *mut *mut std::ffi::c_void, dataSizes: *mut std::ffi::c_void, softBodyIndices: *mut std::ffi::c_void, flag: PxSoftBodyDataFlag, nbUpdatedSoftBodies: u32, maxSize: u32, applyEvent: *mut std::ffi::c_void);
11351
11352 /// Copy contact data from the internal GPU buffer to a user-provided device buffer.
11353 ///
11354 /// The contact data contains pointers to internal state and is only valid until the next call to simulate().
11355 pub fn PxScene_copyContactData_mut(self_: *mut PxScene, data: *mut std::ffi::c_void, maxContactPairs: u32, numContactPairs: *mut std::ffi::c_void, copyEvent: *mut std::ffi::c_void);
11356
11357 /// Copy GPU rigid body data from the internal GPU buffer to a user-provided device buffer.
11358 pub fn PxScene_copyBodyData_mut(self_: *mut PxScene, data: *mut PxGpuBodyData, index: *mut PxGpuActorPair, nbCopyActors: u32, copyEvent: *mut std::ffi::c_void);
11359
11360 /// Apply user-provided data to rigid body.
11361 pub fn PxScene_applyActorData_mut(self_: *mut PxScene, data: *mut std::ffi::c_void, index: *mut PxGpuActorPair, flag: PxActorCacheFlag, nbUpdatedActors: u32, waitEvent: *mut std::ffi::c_void, signalEvent: *mut std::ffi::c_void);
11362
11363 /// Compute dense Jacobian matrices for specified articulations on the GPU.
11364 ///
11365 /// The size of Jacobians can vary by articulation, since it depends on the number of links, degrees-of-freedom, and whether the base is fixed.
11366 ///
11367 /// The size is determined using these formulas:
11368 /// nCols = (fixedBase ? 0 : 6) + dofCount
11369 /// nRows = (fixedBase ? 0 : 6) + (linkCount - 1) * 6;
11370 ///
11371 /// The user must ensure that adequate space is provided for each Jacobian matrix.
11372 pub fn PxScene_computeDenseJacobians_mut(self_: *mut PxScene, indices: *const PxIndexDataPair, nbIndices: u32, computeEvent: *mut std::ffi::c_void);
11373
11374 /// Compute the joint-space inertia matrices that maps joint accelerations to joint forces: forces = M * accelerations on the GPU.
11375 ///
11376 /// The size of matrices can vary by articulation, since it depends on the number of links and degrees-of-freedom.
11377 ///
11378 /// The size is determined using this formula:
11379 /// sizeof(float) * dofCount * dofCount
11380 ///
11381 /// The user must ensure that adequate space is provided for each mass matrix.
11382 pub fn PxScene_computeGeneralizedMassMatrices_mut(self_: *mut PxScene, indices: *const PxIndexDataPair, nbIndices: u32, computeEvent: *mut std::ffi::c_void);
11383
11384 /// Computes the joint DOF forces required to counteract gravitational forces for the given articulation pose.
11385 ///
11386 /// The size of the result can vary by articulation, since it depends on the number of links and degrees-of-freedom.
11387 ///
11388 /// The size is determined using this formula:
11389 /// sizeof(float) * dofCount
11390 ///
11391 /// The user must ensure that adequate space is provided for each articulation.
11392 pub fn PxScene_computeGeneralizedGravityForces_mut(self_: *mut PxScene, indices: *const PxIndexDataPair, nbIndices: u32, computeEvent: *mut std::ffi::c_void);
11393
11394 /// Computes the joint DOF forces required to counteract coriolis and centrifugal forces for the given articulation pose.
11395 ///
11396 /// The size of the result can vary by articulation, since it depends on the number of links and degrees-of-freedom.
11397 ///
11398 /// The size is determined using this formula:
11399 /// sizeof(float) * dofCount
11400 ///
11401 /// The user must ensure that adequate space is provided for each articulation.
11402 pub fn PxScene_computeCoriolisAndCentrifugalForces_mut(self_: *mut PxScene, indices: *const PxIndexDataPair, nbIndices: u32, computeEvent: *mut std::ffi::c_void);
11403
11404 pub fn PxScene_getGpuDynamicsConfig(self_: *const PxScene) -> PxgDynamicsMemoryConfig;
11405
11406 /// Apply user-provided data to particle buffers.
11407 ///
11408 /// This function should be used if the particle buffer flags are already on the device. Otherwise, use PxParticleBuffer::raiseFlags()
11409 /// from the CPU.
11410 ///
11411 /// This assumes the data has been changed directly in the PxParticleBuffer.
11412 pub fn PxScene_applyParticleBufferData_mut(self_: *mut PxScene, indices: *const u32, bufferIndexPair: *const PxGpuParticleBufferIndexPair, flags: *const PxParticleBufferFlags, nbUpdatedBuffers: u32, waitEvent: *mut std::ffi::c_void, signalEvent: *mut std::ffi::c_void);
11413
11414 /// Constructor
11415 pub fn PxSceneReadLock_new_alloc(scene: *mut PxScene, file: *const std::ffi::c_char, line: u32) -> *mut PxSceneReadLock;
11416
11417 pub fn PxSceneReadLock_delete(self_: *mut PxSceneReadLock);
11418
11419 /// Constructor
11420 pub fn PxSceneWriteLock_new_alloc(scene: *mut PxScene, file: *const std::ffi::c_char, line: u32) -> *mut PxSceneWriteLock;
11421
11422 pub fn PxSceneWriteLock_delete(self_: *mut PxSceneWriteLock);
11423
11424 pub fn PxContactPairExtraDataItem_new() -> PxContactPairExtraDataItem;
11425
11426 pub fn PxContactPairVelocity_new() -> PxContactPairVelocity;
11427
11428 pub fn PxContactPairPose_new() -> PxContactPairPose;
11429
11430 pub fn PxContactPairIndex_new() -> PxContactPairIndex;
11431
11432 /// Constructor
11433 pub fn PxContactPairExtraDataIterator_new(stream: *const u8, size: u32) -> PxContactPairExtraDataIterator;
11434
11435 /// Advances the iterator to next set of extra data items.
11436 ///
11437 /// The contact pair extra data stream contains sets of items as requested by the corresponding [`PxPairFlag`] flags
11438 /// [`PxPairFlag::ePRE_SOLVER_VELOCITY`], #PxPairFlag::ePOST_SOLVER_VELOCITY, #PxPairFlag::eCONTACT_EVENT_POSE. A set can contain one
11439 /// item of each plus the PxContactPairIndex item. This method parses the stream and points the iterator
11440 /// member variables to the corresponding items of the current set, if they are available. If CCD is not enabled,
11441 /// you should only get one set of items. If CCD with multiple passes is enabled, you might get more than one item
11442 /// set.
11443 ///
11444 /// Even though contact pair extra data is requested per shape pair, you will not get an item set per shape pair
11445 /// but one per actor pair. If, for example, an actor has two shapes and both collide with another actor, then
11446 /// there will only be one item set (since it applies to both shape pairs).
11447 ///
11448 /// True if there was another set of extra data items in the stream, else false.
11449 pub fn PxContactPairExtraDataIterator_nextItemSet_mut(self_: *mut PxContactPairExtraDataIterator) -> bool;
11450
11451 pub fn PxContactPairHeader_new() -> PxContactPairHeader;
11452
11453 pub fn PxContactPair_new() -> PxContactPair;
11454
11455 /// Extracts the contact points from the stream and stores them in a convenient format.
11456 ///
11457 /// Number of contact points written to the buffer.
11458 pub fn PxContactPair_extractContacts(self_: *const PxContactPair, userBuffer: *mut PxContactPairPoint, bufferSize: u32) -> u32;
11459
11460 /// Helper method to clone the contact pair and copy the contact data stream into a user buffer.
11461 ///
11462 /// The contact data stream is only accessible during the contact report callback. This helper function provides copy functionality
11463 /// to buffer the contact stream information such that it can get accessed at a later stage.
11464 pub fn PxContactPair_bufferContacts(self_: *const PxContactPair, newPair: *mut PxContactPair, bufferMemory: *mut u8);
11465
11466 pub fn PxContactPair_getInternalFaceIndices(self_: *const PxContactPair) -> *const u32;
11467
11468 pub fn PxTriggerPair_new() -> PxTriggerPair;
11469
11470 pub fn PxConstraintInfo_new() -> PxConstraintInfo;
11471
11472 pub fn PxConstraintInfo_new_1(c: *mut PxConstraint, extRef: *mut std::ffi::c_void, t: u32) -> PxConstraintInfo;
11473
11474 /// This is called when a breakable constraint breaks.
11475 ///
11476 /// The user should not release the constraint shader inside this call!
11477 ///
11478 /// No event will get reported if the constraint breaks but gets deleted while the time step is still being simulated.
11479 pub fn PxSimulationEventCallback_onConstraintBreak_mut(self_: *mut PxSimulationEventCallback, constraints: *mut PxConstraintInfo, count: u32);
11480
11481 /// This is called with the actors which have just been woken up.
11482 ///
11483 /// Only supported by rigid bodies yet.
11484 ///
11485 /// Only called on actors for which the PxActorFlag eSEND_SLEEP_NOTIFIES has been set.
11486 ///
11487 /// Only the latest sleep state transition happening between fetchResults() of the previous frame and fetchResults() of the current frame
11488 /// will get reported. For example, let us assume actor A is awake, then A->putToSleep() gets called, then later A->wakeUp() gets called.
11489 /// At the next simulate/fetchResults() step only an onWake() event will get triggered because that was the last transition.
11490 ///
11491 /// If an actor gets newly added to a scene with properties such that it is awake and the sleep state does not get changed by
11492 /// the user or simulation, then an onWake() event will get sent at the next simulate/fetchResults() step.
11493 pub fn PxSimulationEventCallback_onWake_mut(self_: *mut PxSimulationEventCallback, actors: *mut *mut PxActor, count: u32);
11494
11495 /// This is called with the actors which have just been put to sleep.
11496 ///
11497 /// Only supported by rigid bodies yet.
11498 ///
11499 /// Only called on actors for which the PxActorFlag eSEND_SLEEP_NOTIFIES has been set.
11500 ///
11501 /// Only the latest sleep state transition happening between fetchResults() of the previous frame and fetchResults() of the current frame
11502 /// will get reported. For example, let us assume actor A is asleep, then A->wakeUp() gets called, then later A->putToSleep() gets called.
11503 /// At the next simulate/fetchResults() step only an onSleep() event will get triggered because that was the last transition (assuming the simulation
11504 /// does not wake the actor up).
11505 ///
11506 /// If an actor gets newly added to a scene with properties such that it is asleep and the sleep state does not get changed by
11507 /// the user or simulation, then an onSleep() event will get sent at the next simulate/fetchResults() step.
11508 pub fn PxSimulationEventCallback_onSleep_mut(self_: *mut PxSimulationEventCallback, actors: *mut *mut PxActor, count: u32);
11509
11510 /// This is called when certain contact events occur.
11511 ///
11512 /// The method will be called for a pair of actors if one of the colliding shape pairs requested contact notification.
11513 /// You request which events are reported using the filter shader/callback mechanism (see [`PxSimulationFilterShader`],
11514 /// [`PxSimulationFilterCallback`], #PxPairFlag).
11515 ///
11516 /// Do not keep references to the passed objects, as they will be
11517 /// invalid after this function returns.
11518 pub fn PxSimulationEventCallback_onContact_mut(self_: *mut PxSimulationEventCallback, pairHeader: *const PxContactPairHeader, pairs: *const PxContactPair, nbPairs: u32);
11519
11520 /// This is called with the current trigger pair events.
11521 ///
11522 /// Shapes which have been marked as triggers using PxShapeFlag::eTRIGGER_SHAPE will send events
11523 /// according to the pair flag specification in the filter shader (see [`PxPairFlag`], #PxSimulationFilterShader).
11524 ///
11525 /// Trigger shapes will no longer send notification events for interactions with other trigger shapes.
11526 pub fn PxSimulationEventCallback_onTrigger_mut(self_: *mut PxSimulationEventCallback, pairs: *mut PxTriggerPair, count: u32);
11527
11528 /// Provides early access to the new pose of moving rigid bodies.
11529 ///
11530 /// When this call occurs, rigid bodies having the [`PxRigidBodyFlag::eENABLE_POSE_INTEGRATION_PREVIEW`]
11531 /// flag set, were moved by the simulation and their new poses can be accessed through the provided buffers.
11532 ///
11533 /// The provided buffers are valid and can be read until the next call to [`PxScene::simulate`]() or #PxScene::collide().
11534 ///
11535 /// This callback gets triggered while the simulation is running. If the provided rigid body references are used to
11536 /// read properties of the object, then the callback has to guarantee no other thread is writing to the same body at the same
11537 /// time.
11538 ///
11539 /// The code in this callback should be lightweight as it can block the simulation, that is, the
11540 /// [`PxScene::fetchResults`]() call.
11541 pub fn PxSimulationEventCallback_onAdvance_mut(self_: *mut PxSimulationEventCallback, bodyBuffer: *const *const PxRigidBody, poseBuffer: *const PxTransform, count: u32);
11542
11543 pub fn PxSimulationEventCallback_delete(self_: *mut PxSimulationEventCallback);
11544
11545 pub fn PxFEMParameters_new() -> PxFEMParameters;
11546
11547 /// Release this object.
11548 pub fn PxPruningStructure_release_mut(self_: *mut PxPruningStructure);
11549
11550 /// Retrieve rigid actors in the pruning structure.
11551 ///
11552 /// You can retrieve the number of rigid actor pointers by calling [`getNbRigidActors`]()
11553 ///
11554 /// Number of rigid actor pointers written to the buffer.
11555 pub fn PxPruningStructure_getRigidActors(self_: *const PxPruningStructure, userBuffer: *mut *mut PxRigidActor, bufferSize: u32, startIndex: u32) -> u32;
11556
11557 /// Returns the number of rigid actors in the pruning structure.
11558 ///
11559 /// You can use [`getRigidActors`]() to retrieve the rigid actor pointers.
11560 ///
11561 /// Number of rigid actors in the pruning structure.
11562 pub fn PxPruningStructure_getNbRigidActors(self_: *const PxPruningStructure) -> u32;
11563
11564 /// Gets the merge data for static actors
11565 ///
11566 /// This is mainly called by the PxSceneQuerySystem::merge() function to merge a PxPruningStructure
11567 /// with the internal data-structures of the scene-query system.
11568 ///
11569 /// Implementation-dependent merge data for static actors.
11570 pub fn PxPruningStructure_getStaticMergeData(self_: *const PxPruningStructure) -> *const std::ffi::c_void;
11571
11572 /// Gets the merge data for dynamic actors
11573 ///
11574 /// This is mainly called by the PxSceneQuerySystem::merge() function to merge a PxPruningStructure
11575 /// with the internal data-structures of the scene-query system.
11576 ///
11577 /// Implementation-dependent merge data for dynamic actors.
11578 pub fn PxPruningStructure_getDynamicMergeData(self_: *const PxPruningStructure) -> *const std::ffi::c_void;
11579
11580 pub fn PxPruningStructure_getConcreteTypeName(self_: *const PxPruningStructure) -> *const std::ffi::c_char;
11581
11582 pub fn PxExtendedVec3_new() -> PxExtendedVec3;
11583
11584 pub fn PxExtendedVec3_new_1(_x: f64, _y: f64, _z: f64) -> PxExtendedVec3;
11585
11586 pub fn PxExtendedVec3_isZero(self_: *const PxExtendedVec3) -> bool;
11587
11588 pub fn PxExtendedVec3_dot(self_: *const PxExtendedVec3, v: *const PxVec3) -> f64;
11589
11590 pub fn PxExtendedVec3_distanceSquared(self_: *const PxExtendedVec3, v: *const PxExtendedVec3) -> f64;
11591
11592 pub fn PxExtendedVec3_magnitudeSquared(self_: *const PxExtendedVec3) -> f64;
11593
11594 pub fn PxExtendedVec3_magnitude(self_: *const PxExtendedVec3) -> f64;
11595
11596 pub fn PxExtendedVec3_normalize_mut(self_: *mut PxExtendedVec3) -> f64;
11597
11598 pub fn PxExtendedVec3_isFinite(self_: *const PxExtendedVec3) -> bool;
11599
11600 pub fn PxExtendedVec3_maximum_mut(self_: *mut PxExtendedVec3, v: *const PxExtendedVec3);
11601
11602 pub fn PxExtendedVec3_minimum_mut(self_: *mut PxExtendedVec3, v: *const PxExtendedVec3);
11603
11604 pub fn PxExtendedVec3_set_mut(self_: *mut PxExtendedVec3, x_: f64, y_: f64, z_: f64);
11605
11606 pub fn PxExtendedVec3_setPlusInfinity_mut(self_: *mut PxExtendedVec3);
11607
11608 pub fn PxExtendedVec3_setMinusInfinity_mut(self_: *mut PxExtendedVec3);
11609
11610 pub fn PxExtendedVec3_cross_mut(self_: *mut PxExtendedVec3, left: *const PxExtendedVec3, right: *const PxVec3);
11611
11612 pub fn PxExtendedVec3_cross_mut_1(self_: *mut PxExtendedVec3, left: *const PxExtendedVec3, right: *const PxExtendedVec3);
11613
11614 pub fn PxExtendedVec3_cross(self_: *const PxExtendedVec3, v: *const PxExtendedVec3) -> PxExtendedVec3;
11615
11616 pub fn PxExtendedVec3_cross_mut_2(self_: *mut PxExtendedVec3, left: *const PxVec3, right: *const PxExtendedVec3);
11617
11618 pub fn phys_toVec3(v: *const PxExtendedVec3) -> PxVec3;
11619
11620 pub fn PxObstacle_getType(self_: *const PxObstacle) -> PxGeometryType;
11621
11622 pub fn PxBoxObstacle_new() -> PxBoxObstacle;
11623
11624 pub fn PxCapsuleObstacle_new() -> PxCapsuleObstacle;
11625
11626 /// Releases the context.
11627 pub fn PxObstacleContext_release_mut(self_: *mut PxObstacleContext);
11628
11629 /// Retrieves the controller manager associated with this context.
11630 ///
11631 /// The associated controller manager
11632 pub fn PxObstacleContext_getControllerManager(self_: *const PxObstacleContext) -> *mut PxControllerManager;
11633
11634 /// Adds an obstacle to the context.
11635 ///
11636 /// Handle for newly-added obstacle
11637 pub fn PxObstacleContext_addObstacle_mut(self_: *mut PxObstacleContext, obstacle: *const PxObstacle) -> u32;
11638
11639 /// Removes an obstacle from the context.
11640 ///
11641 /// True if success
11642 pub fn PxObstacleContext_removeObstacle_mut(self_: *mut PxObstacleContext, handle: u32) -> bool;
11643
11644 /// Updates data for an existing obstacle.
11645 ///
11646 /// True if success
11647 pub fn PxObstacleContext_updateObstacle_mut(self_: *mut PxObstacleContext, handle: u32, obstacle: *const PxObstacle) -> bool;
11648
11649 /// Retrieves number of obstacles in the context.
11650 ///
11651 /// Number of obstacles in the context
11652 pub fn PxObstacleContext_getNbObstacles(self_: *const PxObstacleContext) -> u32;
11653
11654 /// Retrieves desired obstacle.
11655 ///
11656 /// Desired obstacle
11657 pub fn PxObstacleContext_getObstacle(self_: *const PxObstacleContext, i: u32) -> *const PxObstacle;
11658
11659 /// Retrieves desired obstacle by given handle.
11660 ///
11661 /// Desired obstacle
11662 pub fn PxObstacleContext_getObstacleByHandle(self_: *const PxObstacleContext, handle: u32) -> *const PxObstacle;
11663
11664 /// Called when current controller hits a shape.
11665 ///
11666 /// This is called when the CCT moves and hits a shape. This will not be called when a moving shape hits a non-moving CCT.
11667 pub fn PxUserControllerHitReport_onShapeHit_mut(self_: *mut PxUserControllerHitReport, hit: *const PxControllerShapeHit);
11668
11669 /// Called when current controller hits another controller.
11670 pub fn PxUserControllerHitReport_onControllerHit_mut(self_: *mut PxUserControllerHitReport, hit: *const PxControllersHit);
11671
11672 /// Called when current controller hits a user-defined obstacle.
11673 pub fn PxUserControllerHitReport_onObstacleHit_mut(self_: *mut PxUserControllerHitReport, hit: *const PxControllerObstacleHit);
11674
11675 pub fn PxControllerFilterCallback_delete(self_: *mut PxControllerFilterCallback);
11676
11677 /// Filtering method for CCT-vs-CCT.
11678 ///
11679 /// true to keep the pair, false to filter it out
11680 pub fn PxControllerFilterCallback_filter_mut(self_: *mut PxControllerFilterCallback, a: *const PxController, b: *const PxController) -> bool;
11681
11682 pub fn PxControllerFilters_new(filterData: *const PxFilterData, cb: *mut PxQueryFilterCallback, cctFilterCb: *mut PxControllerFilterCallback) -> PxControllerFilters;
11683
11684 /// returns true if the current settings are valid
11685 ///
11686 /// True if the descriptor is valid.
11687 pub fn PxControllerDesc_isValid(self_: *const PxControllerDesc) -> bool;
11688
11689 /// Returns the character controller type
11690 ///
11691 /// The controllers type.
11692 pub fn PxControllerDesc_getType(self_: *const PxControllerDesc) -> PxControllerShapeType;
11693
11694 /// Return the type of controller
11695 pub fn PxController_getType(self_: *const PxController) -> PxControllerShapeType;
11696
11697 /// Releases the controller.
11698 pub fn PxController_release_mut(self_: *mut PxController);
11699
11700 /// Moves the character using a "collide-and-slide" algorithm.
11701 ///
11702 /// Collision flags, collection of ::PxControllerCollisionFlags
11703 pub fn PxController_move_mut(self_: *mut PxController, disp: *const PxVec3, minDist: f32, elapsedTime: f32, filters: *const PxControllerFilters, obstacles: *const PxObstacleContext) -> PxControllerCollisionFlags;
11704
11705 /// Sets controller's position.
11706 ///
11707 /// The position controlled by this function is the center of the collision shape.
11708 ///
11709 /// This is a 'teleport' function, it doesn't check for collisions.
11710 ///
11711 /// The character's position must be such that it does not overlap the static geometry.
11712 ///
11713 /// To move the character under normal conditions use the [`move`]() function.
11714 ///
11715 /// Currently always returns true.
11716 pub fn PxController_setPosition_mut(self_: *mut PxController, position: *const PxExtendedVec3) -> bool;
11717
11718 /// Retrieve the raw position of the controller.
11719 ///
11720 /// The position retrieved by this function is the center of the collision shape. To retrieve the bottom position of the shape,
11721 /// a.k.a. the foot position, use the getFootPosition() function.
11722 ///
11723 /// The position is updated by calls to move(). Calling this method without calling
11724 /// move() will return the last position or the initial position of the controller.
11725 ///
11726 /// The controller's center position
11727 pub fn PxController_getPosition(self_: *const PxController) -> *const PxExtendedVec3;
11728
11729 /// Set controller's foot position.
11730 ///
11731 /// The position controlled by this function is the bottom of the collision shape, a.k.a. the foot position.
11732 ///
11733 /// The foot position takes the contact offset into account
11734 ///
11735 /// This is a 'teleport' function, it doesn't check for collisions.
11736 ///
11737 /// To move the character under normal conditions use the [`move`]() function.
11738 ///
11739 /// Currently always returns true.
11740 pub fn PxController_setFootPosition_mut(self_: *mut PxController, position: *const PxExtendedVec3) -> bool;
11741
11742 /// Retrieve the "foot" position of the controller, i.e. the position of the bottom of the CCT's shape.
11743 ///
11744 /// The foot position takes the contact offset into account
11745 ///
11746 /// The controller's foot position
11747 pub fn PxController_getFootPosition(self_: *const PxController) -> PxExtendedVec3;
11748
11749 /// Get the rigid body actor associated with this controller (see PhysX documentation).
11750 /// The behavior upon manually altering this actor is undefined, you should primarily
11751 /// use it for reading const properties.
11752 ///
11753 /// the actor associated with the controller.
11754 pub fn PxController_getActor(self_: *const PxController) -> *mut PxRigidDynamic;
11755
11756 /// The step height.
11757 pub fn PxController_setStepOffset_mut(self_: *mut PxController, offset: f32);
11758
11759 /// Retrieve the step height.
11760 ///
11761 /// The step offset for the controller.
11762 pub fn PxController_getStepOffset(self_: *const PxController) -> f32;
11763
11764 /// Sets the non-walkable mode for the CCT.
11765 pub fn PxController_setNonWalkableMode_mut(self_: *mut PxController, flag: PxControllerNonWalkableMode);
11766
11767 /// Retrieves the non-walkable mode for the CCT.
11768 ///
11769 /// The current non-walkable mode.
11770 pub fn PxController_getNonWalkableMode(self_: *const PxController) -> PxControllerNonWalkableMode;
11771
11772 /// Retrieve the contact offset.
11773 ///
11774 /// The contact offset for the controller.
11775 pub fn PxController_getContactOffset(self_: *const PxController) -> f32;
11776
11777 /// Sets the contact offset.
11778 pub fn PxController_setContactOffset_mut(self_: *mut PxController, offset: f32);
11779
11780 /// Retrieve the 'up' direction.
11781 ///
11782 /// The up direction for the controller.
11783 pub fn PxController_getUpDirection(self_: *const PxController) -> PxVec3;
11784
11785 /// Sets the 'up' direction.
11786 pub fn PxController_setUpDirection_mut(self_: *mut PxController, up: *const PxVec3);
11787
11788 /// Retrieve the slope limit.
11789 ///
11790 /// The slope limit for the controller.
11791 pub fn PxController_getSlopeLimit(self_: *const PxController) -> f32;
11792
11793 /// Sets the slope limit.
11794 ///
11795 /// This feature can not be enabled at runtime, i.e. if the slope limit is zero when creating the CCT
11796 /// (which disables the feature) then changing the slope limit at runtime will not have any effect, and the call
11797 /// will be ignored.
11798 pub fn PxController_setSlopeLimit_mut(self_: *mut PxController, slopeLimit: f32);
11799
11800 /// Flushes internal geometry cache.
11801 ///
11802 /// The character controller uses caching in order to speed up collision testing. The cache is
11803 /// automatically flushed when a change to static objects is detected in the scene. For example when a
11804 /// static shape is added, updated, or removed from the scene, the cache is automatically invalidated.
11805 ///
11806 /// However there may be situations that cannot be automatically detected, and those require manual
11807 /// invalidation of the cache. Currently the user must call this when the filtering behavior changes (the
11808 /// PxControllerFilters parameter of the PxController::move call). While the controller in principle
11809 /// could detect a change in these parameters, it cannot detect a change in the behavior of the filtering
11810 /// function.
11811 pub fn PxController_invalidateCache_mut(self_: *mut PxController);
11812
11813 /// Retrieve the scene associated with the controller.
11814 ///
11815 /// The physics scene
11816 pub fn PxController_getScene_mut(self_: *mut PxController) -> *mut PxScene;
11817
11818 /// Returns the user data associated with this controller.
11819 ///
11820 /// The user pointer associated with the controller.
11821 pub fn PxController_getUserData(self_: *const PxController) -> *mut std::ffi::c_void;
11822
11823 /// Sets the user data associated with this controller.
11824 pub fn PxController_setUserData_mut(self_: *mut PxController, userData: *mut std::ffi::c_void);
11825
11826 /// Returns information about the controller's internal state.
11827 pub fn PxController_getState(self_: *const PxController, state: *mut PxControllerState);
11828
11829 /// Returns the controller's internal statistics.
11830 pub fn PxController_getStats(self_: *const PxController, stats: *mut PxControllerStats);
11831
11832 /// Resizes the controller.
11833 ///
11834 /// This function attempts to resize the controller to a given size, while making sure the bottom
11835 /// position of the controller remains constant. In other words the function modifies both the
11836 /// height and the (center) position of the controller. This is a helper function that can be used
11837 /// to implement a 'crouch' functionality for example.
11838 pub fn PxController_resize_mut(self_: *mut PxController, height: f32);
11839
11840 /// constructor sets to default.
11841 pub fn PxBoxControllerDesc_new_alloc() -> *mut PxBoxControllerDesc;
11842
11843 pub fn PxBoxControllerDesc_delete(self_: *mut PxBoxControllerDesc);
11844
11845 /// (re)sets the structure to the default.
11846 pub fn PxBoxControllerDesc_setToDefault_mut(self_: *mut PxBoxControllerDesc);
11847
11848 /// returns true if the current settings are valid
11849 ///
11850 /// True if the descriptor is valid.
11851 pub fn PxBoxControllerDesc_isValid(self_: *const PxBoxControllerDesc) -> bool;
11852
11853 /// Gets controller's half height.
11854 ///
11855 /// The half height of the controller.
11856 pub fn PxBoxController_getHalfHeight(self_: *const PxBoxController) -> f32;
11857
11858 /// Gets controller's half side extent.
11859 ///
11860 /// The half side extent of the controller.
11861 pub fn PxBoxController_getHalfSideExtent(self_: *const PxBoxController) -> f32;
11862
11863 /// Gets controller's half forward extent.
11864 ///
11865 /// The half forward extent of the controller.
11866 pub fn PxBoxController_getHalfForwardExtent(self_: *const PxBoxController) -> f32;
11867
11868 /// Sets controller's half height.
11869 ///
11870 /// this doesn't check for collisions.
11871 ///
11872 /// Currently always true.
11873 pub fn PxBoxController_setHalfHeight_mut(self_: *mut PxBoxController, halfHeight: f32) -> bool;
11874
11875 /// Sets controller's half side extent.
11876 ///
11877 /// this doesn't check for collisions.
11878 ///
11879 /// Currently always true.
11880 pub fn PxBoxController_setHalfSideExtent_mut(self_: *mut PxBoxController, halfSideExtent: f32) -> bool;
11881
11882 /// Sets controller's half forward extent.
11883 ///
11884 /// this doesn't check for collisions.
11885 ///
11886 /// Currently always true.
11887 pub fn PxBoxController_setHalfForwardExtent_mut(self_: *mut PxBoxController, halfForwardExtent: f32) -> bool;
11888
11889 /// constructor sets to default.
11890 pub fn PxCapsuleControllerDesc_new_alloc() -> *mut PxCapsuleControllerDesc;
11891
11892 pub fn PxCapsuleControllerDesc_delete(self_: *mut PxCapsuleControllerDesc);
11893
11894 /// (re)sets the structure to the default.
11895 pub fn PxCapsuleControllerDesc_setToDefault_mut(self_: *mut PxCapsuleControllerDesc);
11896
11897 /// returns true if the current settings are valid
11898 ///
11899 /// True if the descriptor is valid.
11900 pub fn PxCapsuleControllerDesc_isValid(self_: *const PxCapsuleControllerDesc) -> bool;
11901
11902 /// Gets controller's radius.
11903 ///
11904 /// The radius of the controller.
11905 pub fn PxCapsuleController_getRadius(self_: *const PxCapsuleController) -> f32;
11906
11907 /// Sets controller's radius.
11908 ///
11909 /// this doesn't check for collisions.
11910 ///
11911 /// Currently always true.
11912 pub fn PxCapsuleController_setRadius_mut(self_: *mut PxCapsuleController, radius: f32) -> bool;
11913
11914 /// Gets controller's height.
11915 ///
11916 /// The height of the capsule controller.
11917 pub fn PxCapsuleController_getHeight(self_: *const PxCapsuleController) -> f32;
11918
11919 /// Resets controller's height.
11920 ///
11921 /// this doesn't check for collisions.
11922 ///
11923 /// Currently always true.
11924 pub fn PxCapsuleController_setHeight_mut(self_: *mut PxCapsuleController, height: f32) -> bool;
11925
11926 /// Gets controller's climbing mode.
11927 ///
11928 /// The capsule controller's climbing mode.
11929 pub fn PxCapsuleController_getClimbingMode(self_: *const PxCapsuleController) -> PxCapsuleClimbingMode;
11930
11931 /// Sets controller's climbing mode.
11932 pub fn PxCapsuleController_setClimbingMode_mut(self_: *mut PxCapsuleController, mode: PxCapsuleClimbingMode) -> bool;
11933
11934 /// Retrieve behavior flags for a shape.
11935 ///
11936 /// When the CCT touches a shape, the CCT's behavior w.r.t. this shape can be customized by users.
11937 /// This function retrieves the desired PxControllerBehaviorFlag flags capturing the desired behavior.
11938 ///
11939 /// See comments about deprecated functions at the start of this class
11940 ///
11941 /// Desired behavior flags for the given shape
11942 pub fn PxControllerBehaviorCallback_getBehaviorFlags_mut(self_: *mut PxControllerBehaviorCallback, shape: *const PxShape, actor: *const PxActor) -> PxControllerBehaviorFlags;
11943
11944 /// Retrieve behavior flags for a controller.
11945 ///
11946 /// When the CCT touches a controller, the CCT's behavior w.r.t. this controller can be customized by users.
11947 /// This function retrieves the desired PxControllerBehaviorFlag flags capturing the desired behavior.
11948 ///
11949 /// The flag PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT is not supported.
11950 ///
11951 /// See comments about deprecated functions at the start of this class
11952 ///
11953 /// Desired behavior flags for the given controller
11954 pub fn PxControllerBehaviorCallback_getBehaviorFlags_mut_1(self_: *mut PxControllerBehaviorCallback, controller: *const PxController) -> PxControllerBehaviorFlags;
11955
11956 /// Retrieve behavior flags for an obstacle.
11957 ///
11958 /// When the CCT touches an obstacle, the CCT's behavior w.r.t. this obstacle can be customized by users.
11959 /// This function retrieves the desired PxControllerBehaviorFlag flags capturing the desired behavior.
11960 ///
11961 /// See comments about deprecated functions at the start of this class
11962 ///
11963 /// Desired behavior flags for the given obstacle
11964 pub fn PxControllerBehaviorCallback_getBehaviorFlags_mut_2(self_: *mut PxControllerBehaviorCallback, obstacle: *const PxObstacle) -> PxControllerBehaviorFlags;
11965
11966 /// Releases the controller manager.
11967 ///
11968 /// This will release all associated controllers and obstacle contexts.
11969 ///
11970 /// This function is required to be called to release foundation usage.
11971 pub fn PxControllerManager_release_mut(self_: *mut PxControllerManager);
11972
11973 /// Returns the scene the manager is adding the controllers to.
11974 ///
11975 /// The associated physics scene.
11976 pub fn PxControllerManager_getScene(self_: *const PxControllerManager) -> *mut PxScene;
11977
11978 /// Returns the number of controllers that are being managed.
11979 ///
11980 /// The number of controllers.
11981 pub fn PxControllerManager_getNbControllers(self_: *const PxControllerManager) -> u32;
11982
11983 /// Retrieve one of the controllers in the manager.
11984 ///
11985 /// The controller with the specified index.
11986 pub fn PxControllerManager_getController_mut(self_: *mut PxControllerManager, index: u32) -> *mut PxController;
11987
11988 /// Creates a new character controller.
11989 ///
11990 /// The new controller
11991 pub fn PxControllerManager_createController_mut(self_: *mut PxControllerManager, desc: *const PxControllerDesc) -> *mut PxController;
11992
11993 /// Releases all the controllers that are being managed.
11994 pub fn PxControllerManager_purgeControllers_mut(self_: *mut PxControllerManager);
11995
11996 /// Retrieves debug data.
11997 ///
11998 /// The render buffer filled with debug-render data
11999 pub fn PxControllerManager_getRenderBuffer_mut(self_: *mut PxControllerManager) -> *mut PxRenderBuffer;
12000
12001 /// Sets debug rendering flags
12002 pub fn PxControllerManager_setDebugRenderingFlags_mut(self_: *mut PxControllerManager, flags: PxControllerDebugRenderFlags);
12003
12004 /// Returns the number of obstacle contexts that are being managed.
12005 ///
12006 /// The number of obstacle contexts.
12007 pub fn PxControllerManager_getNbObstacleContexts(self_: *const PxControllerManager) -> u32;
12008
12009 /// Retrieve one of the obstacle contexts in the manager.
12010 ///
12011 /// The obstacle context with the specified index.
12012 pub fn PxControllerManager_getObstacleContext_mut(self_: *mut PxControllerManager, index: u32) -> *mut PxObstacleContext;
12013
12014 /// Creates an obstacle context.
12015 ///
12016 /// New obstacle context
12017 pub fn PxControllerManager_createObstacleContext_mut(self_: *mut PxControllerManager) -> *mut PxObstacleContext;
12018
12019 /// Computes character-character interactions.
12020 ///
12021 /// This function is an optional helper to properly resolve interactions between characters, in case they overlap (which can happen for gameplay reasons, etc).
12022 ///
12023 /// You should call this once per frame, before your PxController::move() calls. The function will not move the characters directly, but it will
12024 /// compute overlap information for each character that will be used in the next move() call.
12025 ///
12026 /// You need to provide a proper time value here so that interactions are resolved in a way that do not depend on the framerate.
12027 ///
12028 /// If you only have one character in the scene, or if you can guarantee your characters will never overlap, then you do not need to call this function.
12029 ///
12030 /// Releasing the manager will automatically release all the associated obstacle contexts.
12031 pub fn PxControllerManager_computeInteractions_mut(self_: *mut PxControllerManager, elapsedTime: f32, cctFilterCb: *mut PxControllerFilterCallback);
12032
12033 /// Enables or disables runtime tessellation.
12034 ///
12035 /// Large triangles can create accuracy issues in the sweep code, which in turn can lead to characters not sliding smoothly
12036 /// against geometries, or even penetrating them. This feature allows one to reduce those issues by tessellating large
12037 /// triangles at runtime, before performing sweeps against them. The amount of tessellation is controlled by the 'maxEdgeLength' parameter.
12038 /// Any triangle with at least one edge length greater than the maxEdgeLength will get recursively tessellated, until resulting triangles are small enough.
12039 ///
12040 /// This features only applies to triangle meshes, convex meshes, heightfields and boxes.
12041 pub fn PxControllerManager_setTessellation_mut(self_: *mut PxControllerManager, flag: bool, maxEdgeLength: f32);
12042
12043 /// Enables or disables the overlap recovery module.
12044 ///
12045 /// The overlap recovery module can be used to depenetrate CCTs from static objects when an overlap is detected. This can happen
12046 /// in three main cases:
12047 /// - when the CCT is directly spawned or teleported in another object
12048 /// - when the CCT algorithm fails due to limited FPU accuracy
12049 /// - when the "up vector" is modified, making the rotated CCT shape overlap surrounding objects
12050 ///
12051 /// When activated, the CCT module will automatically try to resolve the penetration, and move the CCT to a safe place where it does
12052 /// not overlap other objects anymore. This only concerns static objects, dynamic objects are ignored by the recovery module.
12053 ///
12054 /// When the recovery module is not activated, it is possible for the CCTs to go through static objects. By default, the recovery
12055 /// module is enabled.
12056 ///
12057 /// The recovery module currently works with all geometries except heightfields.
12058 pub fn PxControllerManager_setOverlapRecoveryModule_mut(self_: *mut PxControllerManager, flag: bool);
12059
12060 /// Enables or disables the precise sweeps.
12061 ///
12062 /// Precise sweeps are more accurate, but also potentially slower than regular sweeps.
12063 ///
12064 /// By default, precise sweeps are enabled.
12065 pub fn PxControllerManager_setPreciseSweeps_mut(self_: *mut PxControllerManager, flag: bool);
12066
12067 /// Enables or disables vertical sliding against ceilings.
12068 ///
12069 /// Geometry is seen as "ceilings" when the following condition is met:
12070 ///
12071 /// dot product(contact normal, up direction)
12072 /// <
12073 /// 0.0f
12074 ///
12075 /// This flag controls whether characters should slide vertically along the geometry in that case.
12076 ///
12077 /// By default, sliding is allowed.
12078 pub fn PxControllerManager_setPreventVerticalSlidingAgainstCeiling_mut(self_: *mut PxControllerManager, flag: bool);
12079
12080 /// Shift the origin of the character controllers and obstacle objects by the specified vector.
12081 ///
12082 /// The positions of all character controllers, obstacle objects and the corresponding data structures will get adjusted to reflect the shifted origin location
12083 /// (the shift vector will get subtracted from all character controller and obstacle object positions).
12084 ///
12085 /// It is the user's responsibility to keep track of the summed total origin shift and adjust all input/output to/from PhysXCharacterKinematic accordingly.
12086 ///
12087 /// This call will not automatically shift the PhysX scene and its objects. You need to call PxScene::shiftOrigin() seperately to keep the systems in sync.
12088 pub fn PxControllerManager_shiftOrigin_mut(self_: *mut PxControllerManager, shift: *const PxVec3);
12089
12090 /// Creates the controller manager.
12091 ///
12092 /// The character controller is informed by [`PxDeletionListener::onRelease`]() when actors or shapes are released, and updates its internal
12093 /// caches accordingly. If character controller movement or a call to [`PxControllerManager::shiftOrigin`]() may overlap with actor/shape releases,
12094 /// internal data structures must be guarded against concurrent access.
12095 ///
12096 /// Locking guarantees thread safety in such scenarios.
12097 ///
12098 /// locking may result in significant slowdown for release of actors or shapes.
12099 ///
12100 /// By default, locking is disabled.
12101 pub fn phys_PxCreateControllerManager(scene: *mut PxScene, lockingEnabled: bool) -> *mut PxControllerManager;
12102
12103 pub fn PxDim3_new() -> PxDim3;
12104
12105 /// Constructor
12106 pub fn PxSDFDesc_new() -> PxSDFDesc;
12107
12108 /// Returns true if the descriptor is valid.
12109 ///
12110 /// true if the current settings are valid
12111 pub fn PxSDFDesc_isValid(self_: *const PxSDFDesc) -> bool;
12112
12113 /// constructor sets to default.
12114 pub fn PxConvexMeshDesc_new() -> PxConvexMeshDesc;
12115
12116 /// (re)sets the structure to the default.
12117 pub fn PxConvexMeshDesc_setToDefault_mut(self_: *mut PxConvexMeshDesc);
12118
12119 /// Returns true if the descriptor is valid.
12120 ///
12121 /// True if the current settings are valid
12122 pub fn PxConvexMeshDesc_isValid(self_: *const PxConvexMeshDesc) -> bool;
12123
12124 /// Constructor sets to default.
12125 pub fn PxTriangleMeshDesc_new() -> PxTriangleMeshDesc;
12126
12127 /// (re)sets the structure to the default.
12128 pub fn PxTriangleMeshDesc_setToDefault_mut(self_: *mut PxTriangleMeshDesc);
12129
12130 /// Returns true if the descriptor is valid.
12131 ///
12132 /// true if the current settings are valid
12133 pub fn PxTriangleMeshDesc_isValid(self_: *const PxTriangleMeshDesc) -> bool;
12134
12135 /// Constructor to build an empty tetmesh description
12136 pub fn PxTetrahedronMeshDesc_new() -> PxTetrahedronMeshDesc;
12137
12138 pub fn PxTetrahedronMeshDesc_isValid(self_: *const PxTetrahedronMeshDesc) -> bool;
12139
12140 /// Constructor to build an empty simulation description
12141 pub fn PxSoftBodySimulationDataDesc_new() -> PxSoftBodySimulationDataDesc;
12142
12143 pub fn PxSoftBodySimulationDataDesc_isValid(self_: *const PxSoftBodySimulationDataDesc) -> bool;
12144
12145 /// Desc initialization to default value.
12146 pub fn PxBVH34MidphaseDesc_setToDefault_mut(self_: *mut PxBVH34MidphaseDesc);
12147
12148 /// Returns true if the descriptor is valid.
12149 ///
12150 /// true if the current settings are valid.
12151 pub fn PxBVH34MidphaseDesc_isValid(self_: *const PxBVH34MidphaseDesc) -> bool;
12152
12153 pub fn PxMidphaseDesc_new() -> PxMidphaseDesc;
12154
12155 /// Returns type of midphase mesh structure.
12156 ///
12157 /// PxMeshMidPhase::Enum
12158 pub fn PxMidphaseDesc_getType(self_: *const PxMidphaseDesc) -> PxMeshMidPhase;
12159
12160 /// Initialize the midphase mesh structure descriptor
12161 pub fn PxMidphaseDesc_setToDefault_mut(self_: *mut PxMidphaseDesc, type_: PxMeshMidPhase);
12162
12163 /// Returns true if the descriptor is valid.
12164 ///
12165 /// true if the current settings are valid.
12166 pub fn PxMidphaseDesc_isValid(self_: *const PxMidphaseDesc) -> bool;
12167
12168 pub fn PxBVHDesc_new() -> PxBVHDesc;
12169
12170 /// Initialize the BVH descriptor
12171 pub fn PxBVHDesc_setToDefault_mut(self_: *mut PxBVHDesc);
12172
12173 /// Returns true if the descriptor is valid.
12174 ///
12175 /// true if the current settings are valid.
12176 pub fn PxBVHDesc_isValid(self_: *const PxBVHDesc) -> bool;
12177
12178 pub fn PxCookingParams_new(sc: *const PxTolerancesScale) -> PxCookingParams;
12179
12180 pub fn phys_PxGetStandaloneInsertionCallback() -> *mut PxInsertionCallback;
12181
12182 /// Cooks a bounding volume hierarchy. The results are written to the stream.
12183 ///
12184 /// PxCookBVH() allows a BVH description to be cooked into a binary stream
12185 /// suitable for loading and performing BVH detection at runtime.
12186 ///
12187 /// true on success.
12188 pub fn phys_PxCookBVH(desc: *const PxBVHDesc, stream: *mut PxOutputStream) -> bool;
12189
12190 /// Cooks and creates a bounding volume hierarchy without going through a stream.
12191 ///
12192 /// This method does the same as cookBVH, but the produced BVH is not stored
12193 /// into a stream but is either directly inserted in PxPhysics, or created as a standalone
12194 /// object. Use this method if you are unable to cook offline.
12195 ///
12196 /// PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback()
12197 /// or PxCooking::getStandaloneInsertionCallback().
12198 ///
12199 /// PxBVH pointer on success
12200 pub fn phys_PxCreateBVH(desc: *const PxBVHDesc, insertionCallback: *mut PxInsertionCallback) -> *mut PxBVH;
12201
12202 /// Cooks a heightfield. The results are written to the stream.
12203 ///
12204 /// To create a heightfield object there is an option to precompute some of calculations done while loading the heightfield data.
12205 ///
12206 /// cookHeightField() allows a heightfield description to be cooked into a binary stream
12207 /// suitable for loading and performing collision detection at runtime.
12208 ///
12209 /// true on success
12210 pub fn phys_PxCookHeightField(desc: *const PxHeightFieldDesc, stream: *mut PxOutputStream) -> bool;
12211
12212 /// Cooks and creates a heightfield mesh and inserts it into PxPhysics.
12213 ///
12214 /// PxHeightField pointer on success
12215 pub fn phys_PxCreateHeightField(desc: *const PxHeightFieldDesc, insertionCallback: *mut PxInsertionCallback) -> *mut PxHeightField;
12216
12217 /// Cooks a convex mesh. The results are written to the stream.
12218 ///
12219 /// To create a triangle mesh object it is necessary to first 'cook' the mesh data into
12220 /// a form which allows the SDK to perform efficient collision detection.
12221 ///
12222 /// cookConvexMesh() allows a mesh description to be cooked into a binary stream
12223 /// suitable for loading and performing collision detection at runtime.
12224 ///
12225 /// The number of vertices and the number of convex polygons in a cooked convex mesh is limited to 255.
12226 ///
12227 /// If those limits are exceeded in either the user-provided data or the final cooked mesh, an error is reported.
12228 ///
12229 /// true on success.
12230 pub fn phys_PxCookConvexMesh(params: *const PxCookingParams, desc: *const PxConvexMeshDesc, stream: *mut PxOutputStream, condition: *mut PxConvexMeshCookingResult) -> bool;
12231
12232 /// Cooks and creates a convex mesh without going through a stream.
12233 ///
12234 /// This method does the same as cookConvexMesh, but the produced mesh is not stored
12235 /// into a stream but is either directly inserted in PxPhysics, or created as a standalone
12236 /// object. Use this method if you are unable to cook offline.
12237 ///
12238 /// PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback()
12239 /// or PxCooking::getStandaloneInsertionCallback().
12240 ///
12241 /// PxConvexMesh pointer on success
12242 pub fn phys_PxCreateConvexMesh(params: *const PxCookingParams, desc: *const PxConvexMeshDesc, insertionCallback: *mut PxInsertionCallback, condition: *mut PxConvexMeshCookingResult) -> *mut PxConvexMesh;
12243
12244 /// Verifies if the convex mesh is valid. Prints an error message for each inconsistency found.
12245 ///
12246 /// The convex mesh descriptor must contain an already created convex mesh - the vertices, indices and polygons must be provided.
12247 ///
12248 /// This function should be used if PxConvexFlag::eDISABLE_MESH_VALIDATION is planned to be used in release builds.
12249 ///
12250 /// true if all the validity conditions hold, false otherwise.
12251 pub fn phys_PxValidateConvexMesh(params: *const PxCookingParams, desc: *const PxConvexMeshDesc) -> bool;
12252
12253 /// Computed hull polygons from given vertices and triangles. Polygons are needed for PxConvexMeshDesc rather than triangles.
12254 ///
12255 /// Please note that the resulting polygons may have different number of vertices. Some vertices may be removed.
12256 /// The output vertices, indices and polygons must be used to construct a hull.
12257 ///
12258 /// The provided PxAllocatorCallback does allocate the out array's. It is the user responsibility to deallocated those
12259 /// array's.
12260 ///
12261 /// true on success
12262 pub fn phys_PxComputeHullPolygons(params: *const PxCookingParams, mesh: *const PxSimpleTriangleMesh, inCallback: *mut PxAllocatorCallback, nbVerts: *mut u32, vertices: *mut *mut PxVec3, nbIndices: *mut u32, indices: *mut *mut u32, nbPolygons: *mut u32, hullPolygons: *mut *mut PxHullPolygon) -> bool;
12263
12264 /// Verifies if the triangle mesh is valid. Prints an error message for each inconsistency found.
12265 ///
12266 /// The following conditions are true for a valid triangle mesh:
12267 /// 1. There are no duplicate vertices (within specified vertexWeldTolerance. See PxCookingParams::meshWeldTolerance)
12268 /// 2. There are no large triangles (within specified PxTolerancesScale.)
12269 ///
12270 /// true if all the validity conditions hold, false otherwise.
12271 pub fn phys_PxValidateTriangleMesh(params: *const PxCookingParams, desc: *const PxTriangleMeshDesc) -> bool;
12272
12273 /// Cooks and creates a triangle mesh without going through a stream.
12274 ///
12275 /// This method does the same as cookTriangleMesh, but the produced mesh is not stored
12276 /// into a stream but is either directly inserted in PxPhysics, or created as a standalone
12277 /// object. Use this method if you are unable to cook offline.
12278 ///
12279 /// PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback()
12280 /// or PxCooking::getStandaloneInsertionCallback().
12281 ///
12282 /// PxTriangleMesh pointer on success.
12283 pub fn phys_PxCreateTriangleMesh(params: *const PxCookingParams, desc: *const PxTriangleMeshDesc, insertionCallback: *mut PxInsertionCallback, condition: *mut PxTriangleMeshCookingResult) -> *mut PxTriangleMesh;
12284
12285 /// Cooks a triangle mesh. The results are written to the stream.
12286 ///
12287 /// To create a triangle mesh object it is necessary to first 'cook' the mesh data into
12288 /// a form which allows the SDK to perform efficient collision detection.
12289 ///
12290 /// PxCookTriangleMesh() allows a mesh description to be cooked into a binary stream
12291 /// suitable for loading and performing collision detection at runtime.
12292 ///
12293 /// true on success
12294 pub fn phys_PxCookTriangleMesh(params: *const PxCookingParams, desc: *const PxTriangleMeshDesc, stream: *mut PxOutputStream, condition: *mut PxTriangleMeshCookingResult) -> bool;
12295
12296 pub fn PxDefaultMemoryOutputStream_new_alloc(allocator: *mut PxAllocatorCallback) -> *mut PxDefaultMemoryOutputStream;
12297
12298 pub fn PxDefaultMemoryOutputStream_delete(self_: *mut PxDefaultMemoryOutputStream);
12299
12300 pub fn PxDefaultMemoryOutputStream_write_mut(self_: *mut PxDefaultMemoryOutputStream, src: *const std::ffi::c_void, count: u32) -> u32;
12301
12302 pub fn PxDefaultMemoryOutputStream_getSize(self_: *const PxDefaultMemoryOutputStream) -> u32;
12303
12304 pub fn PxDefaultMemoryOutputStream_getData(self_: *const PxDefaultMemoryOutputStream) -> *mut u8;
12305
12306 pub fn PxDefaultMemoryInputData_new_alloc(data: *mut u8, length: u32) -> *mut PxDefaultMemoryInputData;
12307
12308 pub fn PxDefaultMemoryInputData_read_mut(self_: *mut PxDefaultMemoryInputData, dest: *mut std::ffi::c_void, count: u32) -> u32;
12309
12310 pub fn PxDefaultMemoryInputData_getLength(self_: *const PxDefaultMemoryInputData) -> u32;
12311
12312 pub fn PxDefaultMemoryInputData_seek_mut(self_: *mut PxDefaultMemoryInputData, pos: u32);
12313
12314 pub fn PxDefaultMemoryInputData_tell(self_: *const PxDefaultMemoryInputData) -> u32;
12315
12316 pub fn PxDefaultFileOutputStream_new_alloc(name: *const std::ffi::c_char) -> *mut PxDefaultFileOutputStream;
12317
12318 pub fn PxDefaultFileOutputStream_delete(self_: *mut PxDefaultFileOutputStream);
12319
12320 pub fn PxDefaultFileOutputStream_write_mut(self_: *mut PxDefaultFileOutputStream, src: *const std::ffi::c_void, count: u32) -> u32;
12321
12322 pub fn PxDefaultFileOutputStream_isValid_mut(self_: *mut PxDefaultFileOutputStream) -> bool;
12323
12324 pub fn PxDefaultFileInputData_new_alloc(name: *const std::ffi::c_char) -> *mut PxDefaultFileInputData;
12325
12326 pub fn PxDefaultFileInputData_delete(self_: *mut PxDefaultFileInputData);
12327
12328 pub fn PxDefaultFileInputData_read_mut(self_: *mut PxDefaultFileInputData, dest: *mut std::ffi::c_void, count: u32) -> u32;
12329
12330 pub fn PxDefaultFileInputData_seek_mut(self_: *mut PxDefaultFileInputData, pos: u32);
12331
12332 pub fn PxDefaultFileInputData_tell(self_: *const PxDefaultFileInputData) -> u32;
12333
12334 pub fn PxDefaultFileInputData_getLength(self_: *const PxDefaultFileInputData) -> u32;
12335
12336 pub fn PxDefaultFileInputData_isValid(self_: *const PxDefaultFileInputData) -> bool;
12337
12338 pub fn phys_platformAlignedAlloc(size: usize) -> *mut std::ffi::c_void;
12339
12340 pub fn phys_platformAlignedFree(ptr: *mut std::ffi::c_void);
12341
12342 pub fn PxDefaultAllocator_allocate_mut(self_: *mut PxDefaultAllocator, size: usize, anon_param1: *const std::ffi::c_char, anon_param2: *const std::ffi::c_char, anon_param3: i32) -> *mut std::ffi::c_void;
12343
12344 pub fn PxDefaultAllocator_deallocate_mut(self_: *mut PxDefaultAllocator, ptr: *mut std::ffi::c_void);
12345
12346 pub fn PxDefaultAllocator_delete(self_: *mut PxDefaultAllocator);
12347
12348 /// Set the actors for this joint.
12349 ///
12350 /// An actor may be NULL to indicate the world frame. At most one of the actors may be NULL.
12351 pub fn PxJoint_setActors_mut(self_: *mut PxJoint, actor0: *mut PxRigidActor, actor1: *mut PxRigidActor);
12352
12353 /// Get the actors for this joint.
12354 pub fn PxJoint_getActors(self_: *const PxJoint, actor0: *mut *mut PxRigidActor, actor1: *mut *mut PxRigidActor);
12355
12356 /// Set the joint local pose for an actor.
12357 ///
12358 /// This is the relative pose which locates the joint frame relative to the actor.
12359 pub fn PxJoint_setLocalPose_mut(self_: *mut PxJoint, actor: PxJointActorIndex, localPose: *const PxTransform);
12360
12361 /// get the joint local pose for an actor.
12362 ///
12363 /// return the local pose for this joint
12364 pub fn PxJoint_getLocalPose(self_: *const PxJoint, actor: PxJointActorIndex) -> PxTransform;
12365
12366 /// get the relative pose for this joint
12367 ///
12368 /// This function returns the pose of the joint frame of actor1 relative to actor0
12369 pub fn PxJoint_getRelativeTransform(self_: *const PxJoint) -> PxTransform;
12370
12371 /// get the relative linear velocity of the joint
12372 ///
12373 /// This function returns the linear velocity of the origin of the constraint frame of actor1, relative to the origin of the constraint
12374 /// frame of actor0. The value is returned in the constraint frame of actor0
12375 pub fn PxJoint_getRelativeLinearVelocity(self_: *const PxJoint) -> PxVec3;
12376
12377 /// get the relative angular velocity of the joint
12378 ///
12379 /// This function returns the angular velocity of actor1 relative to actor0. The value is returned in the constraint frame of actor0
12380 pub fn PxJoint_getRelativeAngularVelocity(self_: *const PxJoint) -> PxVec3;
12381
12382 /// set the break force for this joint.
12383 ///
12384 /// if the constraint force or torque on the joint exceeds the specified values, the joint will break,
12385 /// at which point it will not constrain the two actors and the flag PxConstraintFlag::eBROKEN will be set. The
12386 /// force and torque are measured in the joint frame of the first actor
12387 pub fn PxJoint_setBreakForce_mut(self_: *mut PxJoint, force: f32, torque: f32);
12388
12389 /// get the break force for this joint.
12390 pub fn PxJoint_getBreakForce(self_: *const PxJoint, force: *mut f32, torque: *mut f32);
12391
12392 /// set the constraint flags for this joint.
12393 pub fn PxJoint_setConstraintFlags_mut(self_: *mut PxJoint, flags: PxConstraintFlags);
12394
12395 /// set a constraint flags for this joint to a specified value.
12396 pub fn PxJoint_setConstraintFlag_mut(self_: *mut PxJoint, flag: PxConstraintFlag, value: bool);
12397
12398 /// get the constraint flags for this joint.
12399 ///
12400 /// the constraint flags
12401 pub fn PxJoint_getConstraintFlags(self_: *const PxJoint) -> PxConstraintFlags;
12402
12403 /// set the inverse mass scale for actor0.
12404 pub fn PxJoint_setInvMassScale0_mut(self_: *mut PxJoint, invMassScale: f32);
12405
12406 /// get the inverse mass scale for actor0.
12407 ///
12408 /// inverse mass scale for actor0
12409 pub fn PxJoint_getInvMassScale0(self_: *const PxJoint) -> f32;
12410
12411 /// set the inverse inertia scale for actor0.
12412 pub fn PxJoint_setInvInertiaScale0_mut(self_: *mut PxJoint, invInertiaScale: f32);
12413
12414 /// get the inverse inertia scale for actor0.
12415 ///
12416 /// inverse inertia scale for actor0
12417 pub fn PxJoint_getInvInertiaScale0(self_: *const PxJoint) -> f32;
12418
12419 /// set the inverse mass scale for actor1.
12420 pub fn PxJoint_setInvMassScale1_mut(self_: *mut PxJoint, invMassScale: f32);
12421
12422 /// get the inverse mass scale for actor1.
12423 ///
12424 /// inverse mass scale for actor1
12425 pub fn PxJoint_getInvMassScale1(self_: *const PxJoint) -> f32;
12426
12427 /// set the inverse inertia scale for actor1.
12428 pub fn PxJoint_setInvInertiaScale1_mut(self_: *mut PxJoint, invInertiaScale: f32);
12429
12430 /// get the inverse inertia scale for actor1.
12431 ///
12432 /// inverse inertia scale for actor1
12433 pub fn PxJoint_getInvInertiaScale1(self_: *const PxJoint) -> f32;
12434
12435 /// Retrieves the PxConstraint corresponding to this joint.
12436 ///
12437 /// This can be used to determine, among other things, the force applied at the joint.
12438 ///
12439 /// the constraint
12440 pub fn PxJoint_getConstraint(self_: *const PxJoint) -> *mut PxConstraint;
12441
12442 /// Sets a name string for the object that can be retrieved with getName().
12443 ///
12444 /// This is for debugging and is not used by the SDK. The string is not copied by the SDK,
12445 /// only the pointer is stored.
12446 pub fn PxJoint_setName_mut(self_: *mut PxJoint, name: *const std::ffi::c_char);
12447
12448 /// Retrieves the name string set with setName().
12449 ///
12450 /// Name string associated with object.
12451 pub fn PxJoint_getName(self_: *const PxJoint) -> *const std::ffi::c_char;
12452
12453 /// Deletes the joint.
12454 ///
12455 /// This call does not wake up the connected rigid bodies.
12456 pub fn PxJoint_release_mut(self_: *mut PxJoint);
12457
12458 /// Retrieves the scene which this joint belongs to.
12459 ///
12460 /// Owner Scene. NULL if not part of a scene.
12461 pub fn PxJoint_getScene(self_: *const PxJoint) -> *mut PxScene;
12462
12463 /// Put class meta data in stream, used for serialization
12464 pub fn PxJoint_getBinaryMetaData(stream: *mut PxOutputStream);
12465
12466 pub fn PxSpring_new(stiffness_: f32, damping_: f32) -> PxSpring;
12467
12468 /// Helper function to setup a joint's global frame
12469 ///
12470 /// This replaces the following functions from previous SDK versions:
12471 ///
12472 /// void NxJointDesc::setGlobalAnchor(const NxVec3
12473 /// &
12474 /// wsAnchor);
12475 /// void NxJointDesc::setGlobalAxis(const NxVec3
12476 /// &
12477 /// wsAxis);
12478 ///
12479 /// The function sets the joint's localPose using world-space input parameters.
12480 pub fn phys_PxSetJointGlobalFrame(joint: *mut PxJoint, wsAnchor: *const PxVec3, wsAxis: *const PxVec3);
12481
12482 /// Create a distance Joint.
12483 pub fn phys_PxDistanceJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxDistanceJoint;
12484
12485 /// Return the current distance of the joint
12486 pub fn PxDistanceJoint_getDistance(self_: *const PxDistanceJoint) -> f32;
12487
12488 /// Set the allowed minimum distance for the joint.
12489 ///
12490 /// The minimum distance must be no more than the maximum distance
12491 ///
12492 /// Default
12493 /// 0.0f
12494 /// Range
12495 /// [0, PX_MAX_F32)
12496 pub fn PxDistanceJoint_setMinDistance_mut(self_: *mut PxDistanceJoint, distance: f32);
12497
12498 /// Get the allowed minimum distance for the joint.
12499 ///
12500 /// the allowed minimum distance
12501 pub fn PxDistanceJoint_getMinDistance(self_: *const PxDistanceJoint) -> f32;
12502
12503 /// Set the allowed maximum distance for the joint.
12504 ///
12505 /// The maximum distance must be no less than the minimum distance.
12506 ///
12507 /// Default
12508 /// 0.0f
12509 /// Range
12510 /// [0, PX_MAX_F32)
12511 pub fn PxDistanceJoint_setMaxDistance_mut(self_: *mut PxDistanceJoint, distance: f32);
12512
12513 /// Get the allowed maximum distance for the joint.
12514 ///
12515 /// the allowed maximum distance
12516 pub fn PxDistanceJoint_getMaxDistance(self_: *const PxDistanceJoint) -> f32;
12517
12518 /// Set the error tolerance of the joint.
12519 pub fn PxDistanceJoint_setTolerance_mut(self_: *mut PxDistanceJoint, tolerance: f32);
12520
12521 /// Get the error tolerance of the joint.
12522 ///
12523 /// the distance beyond the joint's [min, max] range before the joint becomes active.
12524 ///
12525 /// Default
12526 /// 0.25f * PxTolerancesScale::length
12527 /// Range
12528 /// (0, PX_MAX_F32)
12529 ///
12530 /// This value should be used to ensure that if the minimum distance is zero and the
12531 /// spring function is in use, the rest length of the spring is non-zero.
12532 pub fn PxDistanceJoint_getTolerance(self_: *const PxDistanceJoint) -> f32;
12533
12534 /// Set the strength of the joint spring.
12535 ///
12536 /// The spring is used if enabled, and the distance exceeds the range [min-error, max+error].
12537 ///
12538 /// Default
12539 /// 0.0f
12540 /// Range
12541 /// [0, PX_MAX_F32)
12542 pub fn PxDistanceJoint_setStiffness_mut(self_: *mut PxDistanceJoint, stiffness: f32);
12543
12544 /// Get the strength of the joint spring.
12545 ///
12546 /// stiffness the spring strength of the joint
12547 pub fn PxDistanceJoint_getStiffness(self_: *const PxDistanceJoint) -> f32;
12548
12549 /// Set the damping of the joint spring.
12550 ///
12551 /// The spring is used if enabled, and the distance exceeds the range [min-error, max+error].
12552 ///
12553 /// Default
12554 /// 0.0f
12555 /// Range
12556 /// [0, PX_MAX_F32)
12557 pub fn PxDistanceJoint_setDamping_mut(self_: *mut PxDistanceJoint, damping: f32);
12558
12559 /// Get the damping of the joint spring.
12560 ///
12561 /// the degree of damping of the joint spring of the joint
12562 pub fn PxDistanceJoint_getDamping(self_: *const PxDistanceJoint) -> f32;
12563
12564 /// Set the contact distance for the min
12565 /// &
12566 /// max distance limits.
12567 ///
12568 /// This is similar to the PxJointLimitParameters::contactDistance parameter for regular limits.
12569 ///
12570 /// The two most common values are 0 and infinite. Infinite means the internal constraints are
12571 /// always created, resulting in the best simulation quality but slower performance. Zero means
12572 /// the internal constraints are only created when the limits are violated, resulting in best
12573 /// performance but worse simulation quality.
12574 ///
12575 /// Default
12576 /// 0.0f
12577 /// Range
12578 /// [0, PX_MAX_F32)
12579 pub fn PxDistanceJoint_setContactDistance_mut(self_: *mut PxDistanceJoint, contactDistance: f32);
12580
12581 /// Get the contact distance.
12582 ///
12583 /// the contact distance
12584 pub fn PxDistanceJoint_getContactDistance(self_: *const PxDistanceJoint) -> f32;
12585
12586 /// Set the flags specific to the Distance Joint.
12587 ///
12588 /// Default
12589 /// PxDistanceJointFlag::eMAX_DISTANCE_ENABLED
12590 pub fn PxDistanceJoint_setDistanceJointFlags_mut(self_: *mut PxDistanceJoint, flags: PxDistanceJointFlags);
12591
12592 /// Set a single flag specific to a Distance Joint to true or false.
12593 pub fn PxDistanceJoint_setDistanceJointFlag_mut(self_: *mut PxDistanceJoint, flag: PxDistanceJointFlag, value: bool);
12594
12595 /// Get the flags specific to the Distance Joint.
12596 ///
12597 /// the joint flags
12598 pub fn PxDistanceJoint_getDistanceJointFlags(self_: *const PxDistanceJoint) -> PxDistanceJointFlags;
12599
12600 /// Returns string name of PxDistanceJoint, used for serialization
12601 pub fn PxDistanceJoint_getConcreteTypeName(self_: *const PxDistanceJoint) -> *const std::ffi::c_char;
12602
12603 /// Create a distance Joint.
12604 pub fn phys_PxContactJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxContactJoint;
12605
12606 pub fn PxJacobianRow_new() -> PxJacobianRow;
12607
12608 pub fn PxJacobianRow_new_1(lin0: *const PxVec3, lin1: *const PxVec3, ang0: *const PxVec3, ang1: *const PxVec3) -> PxJacobianRow;
12609
12610 /// Set the current contact of the joint
12611 pub fn PxContactJoint_setContact_mut(self_: *mut PxContactJoint, contact: *const PxVec3);
12612
12613 /// Set the current contact normal of the joint
12614 pub fn PxContactJoint_setContactNormal_mut(self_: *mut PxContactJoint, contactNormal: *const PxVec3);
12615
12616 /// Set the current penetration of the joint
12617 pub fn PxContactJoint_setPenetration_mut(self_: *mut PxContactJoint, penetration: f32);
12618
12619 /// Return the current contact of the joint
12620 pub fn PxContactJoint_getContact(self_: *const PxContactJoint) -> PxVec3;
12621
12622 /// Return the current contact normal of the joint
12623 pub fn PxContactJoint_getContactNormal(self_: *const PxContactJoint) -> PxVec3;
12624
12625 /// Return the current penetration value of the joint
12626 pub fn PxContactJoint_getPenetration(self_: *const PxContactJoint) -> f32;
12627
12628 pub fn PxContactJoint_getRestitution(self_: *const PxContactJoint) -> f32;
12629
12630 pub fn PxContactJoint_setRestitution_mut(self_: *mut PxContactJoint, restitution: f32);
12631
12632 pub fn PxContactJoint_getBounceThreshold(self_: *const PxContactJoint) -> f32;
12633
12634 pub fn PxContactJoint_setBounceThreshold_mut(self_: *mut PxContactJoint, bounceThreshold: f32);
12635
12636 /// Returns string name of PxContactJoint, used for serialization
12637 pub fn PxContactJoint_getConcreteTypeName(self_: *const PxContactJoint) -> *const std::ffi::c_char;
12638
12639 pub fn PxContactJoint_computeJacobians(self_: *const PxContactJoint, jacobian: *mut PxJacobianRow);
12640
12641 pub fn PxContactJoint_getNbJacobianRows(self_: *const PxContactJoint) -> u32;
12642
12643 /// Create a fixed joint.
12644 pub fn phys_PxFixedJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxFixedJoint;
12645
12646 /// Returns string name of PxFixedJoint, used for serialization
12647 pub fn PxFixedJoint_getConcreteTypeName(self_: *const PxFixedJoint) -> *const std::ffi::c_char;
12648
12649 pub fn PxJointLimitParameters_new_alloc() -> *mut PxJointLimitParameters;
12650
12651 /// Returns true if the current settings are valid.
12652 ///
12653 /// true if the current settings are valid
12654 pub fn PxJointLimitParameters_isValid(self_: *const PxJointLimitParameters) -> bool;
12655
12656 pub fn PxJointLimitParameters_isSoft(self_: *const PxJointLimitParameters) -> bool;
12657
12658 /// construct a linear hard limit
12659 pub fn PxJointLinearLimit_new(scale: *const PxTolerancesScale, extent: f32, contactDist_deprecated: f32) -> PxJointLinearLimit;
12660
12661 /// construct a linear soft limit
12662 pub fn PxJointLinearLimit_new_1(extent: f32, spring: *const PxSpring) -> PxJointLinearLimit;
12663
12664 /// Returns true if the limit is valid
12665 ///
12666 /// true if the current settings are valid
12667 pub fn PxJointLinearLimit_isValid(self_: *const PxJointLinearLimit) -> bool;
12668
12669 pub fn PxJointLinearLimit_delete(self_: *mut PxJointLinearLimit);
12670
12671 /// Construct a linear hard limit pair. The lower distance value must be less than the upper distance value.
12672 pub fn PxJointLinearLimitPair_new(scale: *const PxTolerancesScale, lowerLimit: f32, upperLimit: f32, contactDist_deprecated: f32) -> PxJointLinearLimitPair;
12673
12674 /// construct a linear soft limit pair
12675 pub fn PxJointLinearLimitPair_new_1(lowerLimit: f32, upperLimit: f32, spring: *const PxSpring) -> PxJointLinearLimitPair;
12676
12677 /// Returns true if the limit is valid.
12678 ///
12679 /// true if the current settings are valid
12680 pub fn PxJointLinearLimitPair_isValid(self_: *const PxJointLinearLimitPair) -> bool;
12681
12682 pub fn PxJointLinearLimitPair_delete(self_: *mut PxJointLinearLimitPair);
12683
12684 /// construct an angular hard limit pair.
12685 ///
12686 /// The lower value must be less than the upper value.
12687 pub fn PxJointAngularLimitPair_new(lowerLimit: f32, upperLimit: f32, contactDist_deprecated: f32) -> PxJointAngularLimitPair;
12688
12689 /// construct an angular soft limit pair.
12690 ///
12691 /// The lower value must be less than the upper value.
12692 pub fn PxJointAngularLimitPair_new_1(lowerLimit: f32, upperLimit: f32, spring: *const PxSpring) -> PxJointAngularLimitPair;
12693
12694 /// Returns true if the limit is valid.
12695 ///
12696 /// true if the current settings are valid
12697 pub fn PxJointAngularLimitPair_isValid(self_: *const PxJointAngularLimitPair) -> bool;
12698
12699 pub fn PxJointAngularLimitPair_delete(self_: *mut PxJointAngularLimitPair);
12700
12701 /// Construct a cone hard limit.
12702 pub fn PxJointLimitCone_new(yLimitAngle: f32, zLimitAngle: f32, contactDist_deprecated: f32) -> PxJointLimitCone;
12703
12704 /// Construct a cone soft limit.
12705 pub fn PxJointLimitCone_new_1(yLimitAngle: f32, zLimitAngle: f32, spring: *const PxSpring) -> PxJointLimitCone;
12706
12707 /// Returns true if the limit is valid.
12708 ///
12709 /// true if the current settings are valid
12710 pub fn PxJointLimitCone_isValid(self_: *const PxJointLimitCone) -> bool;
12711
12712 pub fn PxJointLimitCone_delete(self_: *mut PxJointLimitCone);
12713
12714 /// Construct a pyramid hard limit.
12715 pub fn PxJointLimitPyramid_new(yLimitAngleMin: f32, yLimitAngleMax: f32, zLimitAngleMin: f32, zLimitAngleMax: f32, contactDist_deprecated: f32) -> PxJointLimitPyramid;
12716
12717 /// Construct a pyramid soft limit.
12718 pub fn PxJointLimitPyramid_new_1(yLimitAngleMin: f32, yLimitAngleMax: f32, zLimitAngleMin: f32, zLimitAngleMax: f32, spring: *const PxSpring) -> PxJointLimitPyramid;
12719
12720 /// Returns true if the limit is valid.
12721 ///
12722 /// true if the current settings are valid
12723 pub fn PxJointLimitPyramid_isValid(self_: *const PxJointLimitPyramid) -> bool;
12724
12725 pub fn PxJointLimitPyramid_delete(self_: *mut PxJointLimitPyramid);
12726
12727 /// Create a prismatic joint.
12728 pub fn phys_PxPrismaticJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxPrismaticJoint;
12729
12730 /// returns the displacement of the joint along its axis.
12731 pub fn PxPrismaticJoint_getPosition(self_: *const PxPrismaticJoint) -> f32;
12732
12733 /// returns the velocity of the joint along its axis
12734 pub fn PxPrismaticJoint_getVelocity(self_: *const PxPrismaticJoint) -> f32;
12735
12736 /// sets the joint limit parameters.
12737 ///
12738 /// The limit range is [-PX_MAX_F32, PX_MAX_F32], but note that the width of the limit (upper-lower) must also be
12739 /// a valid float.
12740 pub fn PxPrismaticJoint_setLimit_mut(self_: *mut PxPrismaticJoint, anon_param0: *const PxJointLinearLimitPair);
12741
12742 /// gets the joint limit parameters.
12743 pub fn PxPrismaticJoint_getLimit(self_: *const PxPrismaticJoint) -> PxJointLinearLimitPair;
12744
12745 /// Set the flags specific to the Prismatic Joint.
12746 ///
12747 /// Default
12748 /// PxPrismaticJointFlags(0)
12749 pub fn PxPrismaticJoint_setPrismaticJointFlags_mut(self_: *mut PxPrismaticJoint, flags: PxPrismaticJointFlags);
12750
12751 /// Set a single flag specific to a Prismatic Joint to true or false.
12752 pub fn PxPrismaticJoint_setPrismaticJointFlag_mut(self_: *mut PxPrismaticJoint, flag: PxPrismaticJointFlag, value: bool);
12753
12754 /// Get the flags specific to the Prismatic Joint.
12755 ///
12756 /// the joint flags
12757 pub fn PxPrismaticJoint_getPrismaticJointFlags(self_: *const PxPrismaticJoint) -> PxPrismaticJointFlags;
12758
12759 /// Returns string name of PxPrismaticJoint, used for serialization
12760 pub fn PxPrismaticJoint_getConcreteTypeName(self_: *const PxPrismaticJoint) -> *const std::ffi::c_char;
12761
12762 /// Create a revolute joint.
12763 pub fn phys_PxRevoluteJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxRevoluteJoint;
12764
12765 /// return the angle of the joint, in the range (-2*Pi, 2*Pi]
12766 pub fn PxRevoluteJoint_getAngle(self_: *const PxRevoluteJoint) -> f32;
12767
12768 /// return the velocity of the joint
12769 pub fn PxRevoluteJoint_getVelocity(self_: *const PxRevoluteJoint) -> f32;
12770
12771 /// set the joint limit parameters.
12772 ///
12773 /// The limit is activated using the flag PxRevoluteJointFlag::eLIMIT_ENABLED
12774 ///
12775 /// The limit angle range is (-2*Pi, 2*Pi).
12776 pub fn PxRevoluteJoint_setLimit_mut(self_: *mut PxRevoluteJoint, limits: *const PxJointAngularLimitPair);
12777
12778 /// get the joint limit parameters.
12779 ///
12780 /// the joint limit parameters
12781 pub fn PxRevoluteJoint_getLimit(self_: *const PxRevoluteJoint) -> PxJointAngularLimitPair;
12782
12783 /// set the target velocity for the drive model.
12784 ///
12785 /// The motor will only be able to reach this velocity if the maxForce is sufficiently large.
12786 /// If the joint is spinning faster than this velocity, the motor will actually try to brake
12787 /// (see PxRevoluteJointFlag::eDRIVE_FREESPIN.)
12788 ///
12789 /// The sign of this variable determines the rotation direction, with positive values going
12790 /// the same way as positive joint angles. Setting a very large target velocity may cause
12791 /// undesirable results.
12792 ///
12793 /// Range:
12794 /// (-PX_MAX_F32, PX_MAX_F32)
12795 /// Default:
12796 /// 0.0
12797 pub fn PxRevoluteJoint_setDriveVelocity_mut(self_: *mut PxRevoluteJoint, velocity: f32, autowake: bool);
12798
12799 /// gets the target velocity for the drive model.
12800 ///
12801 /// the drive target velocity
12802 pub fn PxRevoluteJoint_getDriveVelocity(self_: *const PxRevoluteJoint) -> f32;
12803
12804 /// sets the maximum torque the drive can exert.
12805 ///
12806 /// The value set here may be used either as an impulse limit or a force limit, depending on the flag PxConstraintFlag::eDRIVE_LIMITS_ARE_FORCES
12807 ///
12808 /// Range:
12809 /// [0, PX_MAX_F32)
12810 /// Default:
12811 /// PX_MAX_F32
12812 pub fn PxRevoluteJoint_setDriveForceLimit_mut(self_: *mut PxRevoluteJoint, limit: f32);
12813
12814 /// gets the maximum torque the drive can exert.
12815 ///
12816 /// the torque limit
12817 pub fn PxRevoluteJoint_getDriveForceLimit(self_: *const PxRevoluteJoint) -> f32;
12818
12819 /// sets the gear ratio for the drive.
12820 ///
12821 /// When setting up the drive constraint, the velocity of the first actor is scaled by this value, and its response to drive torque is scaled down.
12822 /// So if the drive target velocity is zero, the second actor will be driven to the velocity of the first scaled by the gear ratio
12823 ///
12824 /// Range:
12825 /// [0, PX_MAX_F32)
12826 /// Default:
12827 /// 1.0
12828 pub fn PxRevoluteJoint_setDriveGearRatio_mut(self_: *mut PxRevoluteJoint, ratio: f32);
12829
12830 /// gets the gear ratio.
12831 ///
12832 /// the drive gear ratio
12833 pub fn PxRevoluteJoint_getDriveGearRatio(self_: *const PxRevoluteJoint) -> f32;
12834
12835 /// sets the flags specific to the Revolute Joint.
12836 ///
12837 /// Default
12838 /// PxRevoluteJointFlags(0)
12839 pub fn PxRevoluteJoint_setRevoluteJointFlags_mut(self_: *mut PxRevoluteJoint, flags: PxRevoluteJointFlags);
12840
12841 /// sets a single flag specific to a Revolute Joint.
12842 pub fn PxRevoluteJoint_setRevoluteJointFlag_mut(self_: *mut PxRevoluteJoint, flag: PxRevoluteJointFlag, value: bool);
12843
12844 /// gets the flags specific to the Revolute Joint.
12845 ///
12846 /// the joint flags
12847 pub fn PxRevoluteJoint_getRevoluteJointFlags(self_: *const PxRevoluteJoint) -> PxRevoluteJointFlags;
12848
12849 /// Returns string name of PxRevoluteJoint, used for serialization
12850 pub fn PxRevoluteJoint_getConcreteTypeName(self_: *const PxRevoluteJoint) -> *const std::ffi::c_char;
12851
12852 /// Create a spherical joint.
12853 pub fn phys_PxSphericalJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxSphericalJoint;
12854
12855 /// Set the limit cone.
12856 ///
12857 /// If enabled, the limit cone will constrain the angular movement of the joint to lie
12858 /// within an elliptical cone.
12859 ///
12860 /// the limit cone
12861 pub fn PxSphericalJoint_getLimitCone(self_: *const PxSphericalJoint) -> PxJointLimitCone;
12862
12863 /// Get the limit cone.
12864 pub fn PxSphericalJoint_setLimitCone_mut(self_: *mut PxSphericalJoint, limit: *const PxJointLimitCone);
12865
12866 /// get the swing angle of the joint from the Y axis
12867 pub fn PxSphericalJoint_getSwingYAngle(self_: *const PxSphericalJoint) -> f32;
12868
12869 /// get the swing angle of the joint from the Z axis
12870 pub fn PxSphericalJoint_getSwingZAngle(self_: *const PxSphericalJoint) -> f32;
12871
12872 /// Set the flags specific to the Spherical Joint.
12873 ///
12874 /// Default
12875 /// PxSphericalJointFlags(0)
12876 pub fn PxSphericalJoint_setSphericalJointFlags_mut(self_: *mut PxSphericalJoint, flags: PxSphericalJointFlags);
12877
12878 /// Set a single flag specific to a Spherical Joint to true or false.
12879 pub fn PxSphericalJoint_setSphericalJointFlag_mut(self_: *mut PxSphericalJoint, flag: PxSphericalJointFlag, value: bool);
12880
12881 /// Get the flags specific to the Spherical Joint.
12882 ///
12883 /// the joint flags
12884 pub fn PxSphericalJoint_getSphericalJointFlags(self_: *const PxSphericalJoint) -> PxSphericalJointFlags;
12885
12886 /// Returns string name of PxSphericalJoint, used for serialization
12887 pub fn PxSphericalJoint_getConcreteTypeName(self_: *const PxSphericalJoint) -> *const std::ffi::c_char;
12888
12889 /// Create a D6 joint.
12890 pub fn phys_PxD6JointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxD6Joint;
12891
12892 /// default constructor for PxD6JointDrive.
12893 pub fn PxD6JointDrive_new() -> PxD6JointDrive;
12894
12895 /// constructor a PxD6JointDrive.
12896 pub fn PxD6JointDrive_new_1(driveStiffness: f32, driveDamping: f32, driveForceLimit: f32, isAcceleration: bool) -> PxD6JointDrive;
12897
12898 /// returns true if the drive is valid
12899 pub fn PxD6JointDrive_isValid(self_: *const PxD6JointDrive) -> bool;
12900
12901 /// Set the motion type around the specified axis.
12902 ///
12903 /// Each axis may independently specify that the degree of freedom is locked (blocking relative movement
12904 /// along or around this axis), limited by the corresponding limit, or free.
12905 ///
12906 /// Default:
12907 /// all degrees of freedom are locked
12908 pub fn PxD6Joint_setMotion_mut(self_: *mut PxD6Joint, axis: PxD6Axis, type_: PxD6Motion);
12909
12910 /// Get the motion type around the specified axis.
12911 ///
12912 /// the motion type around the specified axis
12913 pub fn PxD6Joint_getMotion(self_: *const PxD6Joint, axis: PxD6Axis) -> PxD6Motion;
12914
12915 /// get the twist angle of the joint, in the range (-2*Pi, 2*Pi]
12916 pub fn PxD6Joint_getTwistAngle(self_: *const PxD6Joint) -> f32;
12917
12918 /// get the swing angle of the joint from the Y axis
12919 pub fn PxD6Joint_getSwingYAngle(self_: *const PxD6Joint) -> f32;
12920
12921 /// get the swing angle of the joint from the Z axis
12922 pub fn PxD6Joint_getSwingZAngle(self_: *const PxD6Joint) -> f32;
12923
12924 /// Set the distance limit for the joint.
12925 ///
12926 /// A single limit constraints all linear limited degrees of freedom, forming a linear, circular
12927 /// or spherical constraint on motion depending on the number of limited degrees. This is similar
12928 /// to a distance limit.
12929 pub fn PxD6Joint_setDistanceLimit_mut(self_: *mut PxD6Joint, limit: *const PxJointLinearLimit);
12930
12931 /// Get the distance limit for the joint.
12932 ///
12933 /// the distance limit structure
12934 pub fn PxD6Joint_getDistanceLimit(self_: *const PxD6Joint) -> PxJointLinearLimit;
12935
12936 /// Set the linear limit for a given linear axis.
12937 ///
12938 /// This function extends the previous setDistanceLimit call with the following features:
12939 /// - there can be a different limit for each linear axis
12940 /// - each limit is defined by two values, i.e. it can now be asymmetric
12941 ///
12942 /// This can be used to create prismatic joints similar to PxPrismaticJoint, or point-in-quad joints,
12943 /// or point-in-box joints.
12944 pub fn PxD6Joint_setLinearLimit_mut(self_: *mut PxD6Joint, axis: PxD6Axis, limit: *const PxJointLinearLimitPair);
12945
12946 /// Get the linear limit for a given linear axis.
12947 ///
12948 /// the linear limit pair structure from desired axis
12949 pub fn PxD6Joint_getLinearLimit(self_: *const PxD6Joint, axis: PxD6Axis) -> PxJointLinearLimitPair;
12950
12951 /// Set the twist limit for the joint.
12952 ///
12953 /// The twist limit controls the range of motion around the twist axis.
12954 ///
12955 /// The limit angle range is (-2*Pi, 2*Pi).
12956 pub fn PxD6Joint_setTwistLimit_mut(self_: *mut PxD6Joint, limit: *const PxJointAngularLimitPair);
12957
12958 /// Get the twist limit for the joint.
12959 ///
12960 /// the twist limit structure
12961 pub fn PxD6Joint_getTwistLimit(self_: *const PxD6Joint) -> PxJointAngularLimitPair;
12962
12963 /// Set the swing cone limit for the joint.
12964 ///
12965 /// The cone limit is used if either or both swing axes are limited. The extents are
12966 /// symmetrical and measured in the frame of the parent. If only one swing degree of freedom
12967 /// is limited, the corresponding value from the cone limit defines the limit range.
12968 pub fn PxD6Joint_setSwingLimit_mut(self_: *mut PxD6Joint, limit: *const PxJointLimitCone);
12969
12970 /// Get the cone limit for the joint.
12971 ///
12972 /// the swing limit structure
12973 pub fn PxD6Joint_getSwingLimit(self_: *const PxD6Joint) -> PxJointLimitCone;
12974
12975 /// Set a pyramidal swing limit for the joint.
12976 ///
12977 /// The pyramid limits will only be used in the following cases:
12978 /// - both swing Y and Z are limited. The limit shape is then a pyramid.
12979 /// - Y is limited and Z is locked, or vice versa. The limit shape is an asymmetric angular section, similar to
12980 /// what is supported for the twist axis.
12981 /// The remaining cases (Y limited and Z is free, or vice versa) are not supported.
12982 pub fn PxD6Joint_setPyramidSwingLimit_mut(self_: *mut PxD6Joint, limit: *const PxJointLimitPyramid);
12983
12984 /// Get the pyramidal swing limit for the joint.
12985 ///
12986 /// the swing limit structure
12987 pub fn PxD6Joint_getPyramidSwingLimit(self_: *const PxD6Joint) -> PxJointLimitPyramid;
12988
12989 /// Set the drive parameters for the specified drive type.
12990 ///
12991 /// Default
12992 /// The default drive spring and damping values are zero, the force limit is zero, and no flags are set.
12993 pub fn PxD6Joint_setDrive_mut(self_: *mut PxD6Joint, index: PxD6Drive, drive: *const PxD6JointDrive);
12994
12995 /// Get the drive parameters for the specified drive type.
12996 pub fn PxD6Joint_getDrive(self_: *const PxD6Joint, index: PxD6Drive) -> PxD6JointDrive;
12997
12998 /// Set the drive goal pose
12999 ///
13000 /// The goal is relative to the constraint frame of actor[0]
13001 ///
13002 /// Default
13003 /// the identity transform
13004 pub fn PxD6Joint_setDrivePosition_mut(self_: *mut PxD6Joint, pose: *const PxTransform, autowake: bool);
13005
13006 /// Get the drive goal pose.
13007 pub fn PxD6Joint_getDrivePosition(self_: *const PxD6Joint) -> PxTransform;
13008
13009 /// Set the target goal velocity for drive.
13010 ///
13011 /// The velocity is measured in the constraint frame of actor[0]
13012 pub fn PxD6Joint_setDriveVelocity_mut(self_: *mut PxD6Joint, linear: *const PxVec3, angular: *const PxVec3, autowake: bool);
13013
13014 /// Get the target goal velocity for joint drive.
13015 pub fn PxD6Joint_getDriveVelocity(self_: *const PxD6Joint, linear: *mut PxVec3, angular: *mut PxVec3);
13016
13017 /// Set the linear tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION
13018 /// is set for the joint.
13019 ///
13020 /// If the joint separates by more than this distance along its locked degrees of freedom, the solver
13021 /// will move the bodies to close the distance.
13022 ///
13023 /// Setting a very small tolerance may result in simulation jitter or other artifacts.
13024 ///
13025 /// Sometimes it is not possible to project (for example when the joints form a cycle).
13026 ///
13027 /// Range:
13028 /// [0, PX_MAX_F32)
13029 /// Default:
13030 /// 1e10f
13031 pub fn PxD6Joint_setProjectionLinearTolerance_mut(self_: *mut PxD6Joint, tolerance: f32);
13032
13033 /// Get the linear tolerance threshold for projection.
13034 ///
13035 /// the linear tolerance threshold
13036 pub fn PxD6Joint_getProjectionLinearTolerance(self_: *const PxD6Joint) -> f32;
13037
13038 /// Set the angular tolerance threshold for projection. Projection is enabled if
13039 /// PxConstraintFlag::ePROJECTION is set for the joint.
13040 ///
13041 /// If the joint deviates by more than this angle around its locked angular degrees of freedom,
13042 /// the solver will move the bodies to close the angle.
13043 ///
13044 /// Setting a very small tolerance may result in simulation jitter or other artifacts.
13045 ///
13046 /// Sometimes it is not possible to project (for example when the joints form a cycle).
13047 ///
13048 /// Range:
13049 /// [0,Pi]
13050 /// Default:
13051 /// Pi
13052 ///
13053 /// Angular projection is implemented only for the case of two or three locked angular degrees of freedom.
13054 pub fn PxD6Joint_setProjectionAngularTolerance_mut(self_: *mut PxD6Joint, tolerance: f32);
13055
13056 /// Get the angular tolerance threshold for projection.
13057 ///
13058 /// tolerance the angular tolerance threshold in radians
13059 pub fn PxD6Joint_getProjectionAngularTolerance(self_: *const PxD6Joint) -> f32;
13060
13061 /// Returns string name of PxD6Joint, used for serialization
13062 pub fn PxD6Joint_getConcreteTypeName(self_: *const PxD6Joint) -> *const std::ffi::c_char;
13063
13064 /// Create a gear Joint.
13065 pub fn phys_PxGearJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxGearJoint;
13066
13067 /// Set the hinge/revolute joints connected by the gear joint.
13068 ///
13069 /// The passed joints can be either PxRevoluteJoint, PxD6Joint or PxArticulationJointReducedCoordinate.
13070 /// The joints must define degrees of freedom around the twist axis. They cannot be null.
13071 ///
13072 /// Note that these joints are only used to compute the positional error correction term,
13073 /// used to adjust potential drift between jointed actors. The gear joint can run without
13074 /// calling this function, but in that case some visible overlap may develop over time between
13075 /// the teeth of the gear meshes.
13076 ///
13077 /// Calling this function resets the internal positional error correction term.
13078 ///
13079 /// true if success
13080 pub fn PxGearJoint_setHinges_mut(self_: *mut PxGearJoint, hinge0: *const PxBase, hinge1: *const PxBase) -> bool;
13081
13082 /// Set the desired gear ratio.
13083 ///
13084 /// For two gears with n0 and n1 teeth respectively, the gear ratio is n0/n1.
13085 ///
13086 /// You may need to use a negative gear ratio if the joint frames of involved actors are not oriented in the same direction.
13087 ///
13088 /// Calling this function resets the internal positional error correction term.
13089 pub fn PxGearJoint_setGearRatio_mut(self_: *mut PxGearJoint, ratio: f32);
13090
13091 /// Get the gear ratio.
13092 ///
13093 /// Current ratio
13094 pub fn PxGearJoint_getGearRatio(self_: *const PxGearJoint) -> f32;
13095
13096 pub fn PxGearJoint_getConcreteTypeName(self_: *const PxGearJoint) -> *const std::ffi::c_char;
13097
13098 /// Create a rack
13099 /// &
13100 /// pinion Joint.
13101 pub fn phys_PxRackAndPinionJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxRackAndPinionJoint;
13102
13103 /// Set the hinge
13104 /// &
13105 /// prismatic joints connected by the rack
13106 /// &
13107 /// pinion joint.
13108 ///
13109 /// The passed hinge joint can be either PxRevoluteJoint, PxD6Joint or PxArticulationJointReducedCoordinate. It cannot be null.
13110 /// The passed prismatic joint can be either PxPrismaticJoint or PxD6Joint. It cannot be null.
13111 ///
13112 /// Note that these joints are only used to compute the positional error correction term,
13113 /// used to adjust potential drift between jointed actors. The rack
13114 /// &
13115 /// pinion joint can run without
13116 /// calling this function, but in that case some visible overlap may develop over time between
13117 /// the teeth of the rack
13118 /// &
13119 /// pinion meshes.
13120 ///
13121 /// Calling this function resets the internal positional error correction term.
13122 ///
13123 /// true if success
13124 pub fn PxRackAndPinionJoint_setJoints_mut(self_: *mut PxRackAndPinionJoint, hinge: *const PxBase, prismatic: *const PxBase) -> bool;
13125
13126 /// Set the desired ratio directly.
13127 ///
13128 /// You may need to use a negative gear ratio if the joint frames of involved actors are not oriented in the same direction.
13129 ///
13130 /// Calling this function resets the internal positional error correction term.
13131 pub fn PxRackAndPinionJoint_setRatio_mut(self_: *mut PxRackAndPinionJoint, ratio: f32);
13132
13133 /// Get the ratio.
13134 ///
13135 /// Current ratio
13136 pub fn PxRackAndPinionJoint_getRatio(self_: *const PxRackAndPinionJoint) -> f32;
13137
13138 /// Set the desired ratio indirectly.
13139 ///
13140 /// This is a simple helper function that computes the ratio from passed data:
13141 ///
13142 /// ratio = (PI*2*nbRackTeeth)/(rackLength*nbPinionTeeth)
13143 ///
13144 /// Calling this function resets the internal positional error correction term.
13145 ///
13146 /// true if success
13147 pub fn PxRackAndPinionJoint_setData_mut(self_: *mut PxRackAndPinionJoint, nbRackTeeth: u32, nbPinionTeeth: u32, rackLength: f32) -> bool;
13148
13149 pub fn PxRackAndPinionJoint_getConcreteTypeName(self_: *const PxRackAndPinionJoint) -> *const std::ffi::c_char;
13150
13151 pub fn PxGroupsMask_new_alloc() -> *mut PxGroupsMask;
13152
13153 pub fn PxGroupsMask_delete(self_: *mut PxGroupsMask);
13154
13155 /// Implementation of a simple filter shader that emulates PhysX 2.8.x filtering
13156 ///
13157 /// This shader provides the following logic:
13158 ///
13159 /// If one of the two filter objects is a trigger, the pair is acccepted and [`PxPairFlag::eTRIGGER_DEFAULT`] will be used for trigger reports
13160 ///
13161 /// Else, if the filter mask logic (see further below) discards the pair it will be suppressed ([`PxFilterFlag::eSUPPRESS`])
13162 ///
13163 /// Else, the pair gets accepted and collision response gets enabled ([`PxPairFlag::eCONTACT_DEFAULT`])
13164 ///
13165 /// Filter mask logic:
13166 /// Given the two [`PxFilterData`] structures fd0 and fd1 of two collision objects, the pair passes the filter if the following
13167 /// conditions are met:
13168 ///
13169 /// 1) Collision groups of the pair are enabled
13170 /// 2) Collision filtering equation is satisfied
13171 pub fn phys_PxDefaultSimulationFilterShader(attributes0: u32, filterData0: PxFilterData, attributes1: u32, filterData1: PxFilterData, pairFlags: *mut PxPairFlags, constantBlock: *const std::ffi::c_void, constantBlockSize: u32) -> PxFilterFlags;
13172
13173 /// Determines if collision detection is performed between a pair of groups
13174 ///
13175 /// Collision group is an integer between 0 and 31.
13176 ///
13177 /// True if the groups could collide
13178 pub fn phys_PxGetGroupCollisionFlag(group1: u16, group2: u16) -> bool;
13179
13180 /// Specifies if collision should be performed by a pair of groups
13181 ///
13182 /// Collision group is an integer between 0 and 31.
13183 pub fn phys_PxSetGroupCollisionFlag(group1: u16, group2: u16, enable: bool);
13184
13185 /// Retrieves the value set with PxSetGroup()
13186 ///
13187 /// Collision group is an integer between 0 and 31.
13188 ///
13189 /// The collision group this actor belongs to
13190 pub fn phys_PxGetGroup(actor: *const PxActor) -> u16;
13191
13192 /// Sets which collision group this actor is part of
13193 ///
13194 /// Collision group is an integer between 0 and 31.
13195 pub fn phys_PxSetGroup(actor: *mut PxActor, collisionGroup: u16);
13196
13197 /// Retrieves filtering operation. See comments for PxGroupsMask
13198 pub fn phys_PxGetFilterOps(op0: *mut PxFilterOp, op1: *mut PxFilterOp, op2: *mut PxFilterOp);
13199
13200 /// Setups filtering operations. See comments for PxGroupsMask
13201 pub fn phys_PxSetFilterOps(op0: *const PxFilterOp, op1: *const PxFilterOp, op2: *const PxFilterOp);
13202
13203 /// Retrieves filtering's boolean value. See comments for PxGroupsMask
13204 ///
13205 /// flag Boolean value for filter.
13206 pub fn phys_PxGetFilterBool() -> bool;
13207
13208 /// Setups filtering's boolean value. See comments for PxGroupsMask
13209 pub fn phys_PxSetFilterBool(enable: bool);
13210
13211 /// Gets filtering constant K0 and K1. See comments for PxGroupsMask
13212 pub fn phys_PxGetFilterConstants(c0: *mut PxGroupsMask, c1: *mut PxGroupsMask);
13213
13214 /// Setups filtering's K0 and K1 value. See comments for PxGroupsMask
13215 pub fn phys_PxSetFilterConstants(c0: *const PxGroupsMask, c1: *const PxGroupsMask);
13216
13217 /// Gets 64-bit mask used for collision filtering. See comments for PxGroupsMask
13218 ///
13219 /// The group mask for the actor.
13220 pub fn phys_PxGetGroupsMask(actor: *const PxActor) -> PxGroupsMask;
13221
13222 /// Sets 64-bit mask used for collision filtering. See comments for PxGroupsMask
13223 pub fn phys_PxSetGroupsMask(actor: *mut PxActor, mask: *const PxGroupsMask);
13224
13225 pub fn PxDefaultErrorCallback_new_alloc() -> *mut PxDefaultErrorCallback;
13226
13227 pub fn PxDefaultErrorCallback_delete(self_: *mut PxDefaultErrorCallback);
13228
13229 pub fn PxDefaultErrorCallback_reportError_mut(self_: *mut PxDefaultErrorCallback, code: PxErrorCode, message: *const std::ffi::c_char, file: *const std::ffi::c_char, line: i32);
13230
13231 /// Creates a new shape with default properties and a list of materials and adds it to the list of shapes of this actor.
13232 ///
13233 /// This is equivalent to the following
13234 ///
13235 /// ```cpp
13236 /// // reference count is 1
13237 /// PxShape* shape(...) = PxGetPhysics().createShape(...);
13238 /// // increments reference count
13239 /// actor->attachShape(shape);
13240 /// // releases user reference, leaving reference count at 1
13241 /// shape->release();
13242 /// ```
13243 ///
13244 /// As a consequence, detachShape() will result in the release of the last reference, and the shape will be deleted.
13245 ///
13246 /// The default shape flags to be set are: eVISUALIZATION, eSIMULATION_SHAPE, eSCENE_QUERY_SHAPE (see [`PxShapeFlag`]).
13247 /// Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are not supported for
13248 /// non-kinematic PxRigidDynamic instances.
13249 ///
13250 /// Creating compounds with a very large number of shapes may adversely affect performance and stability.
13251 ///
13252 /// Sleeping:
13253 /// Does
13254 /// NOT
13255 /// wake the actor up automatically.
13256 ///
13257 /// The newly created shape.
13258 pub fn PxRigidActorExt_createExclusiveShape(actor: *mut PxRigidActor, geometry: *const PxGeometry, materials: *const *mut PxMaterial, materialCount: u16, shapeFlags: PxShapeFlags) -> *mut PxShape;
13259
13260 /// Creates a new shape with default properties and a single material adds it to the list of shapes of this actor.
13261 ///
13262 /// This is equivalent to the following
13263 ///
13264 /// ```cpp
13265 /// // reference count is 1
13266 /// PxShape* shape(...) = PxGetPhysics().createShape(...);
13267 /// // increments reference count
13268 /// actor->attachShape(shape);
13269 /// // releases user reference, leaving reference count at 1
13270 /// shape->release();
13271 /// ```
13272 ///
13273 /// As a consequence, detachShape() will result in the release of the last reference, and the shape will be deleted.
13274 ///
13275 /// The default shape flags to be set are: eVISUALIZATION, eSIMULATION_SHAPE, eSCENE_QUERY_SHAPE (see [`PxShapeFlag`]).
13276 /// Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are not supported for
13277 /// non-kinematic PxRigidDynamic instances.
13278 ///
13279 /// Creating compounds with a very large number of shapes may adversely affect performance and stability.
13280 ///
13281 /// Sleeping:
13282 /// Does
13283 /// NOT
13284 /// wake the actor up automatically.
13285 ///
13286 /// The newly created shape.
13287 pub fn PxRigidActorExt_createExclusiveShape_1(actor: *mut PxRigidActor, geometry: *const PxGeometry, material: *const PxMaterial, shapeFlags: PxShapeFlags) -> *mut PxShape;
13288
13289 /// Gets a list of bounds based on shapes in rigid actor. This list can be used to cook/create
13290 /// bounding volume hierarchy though PxCooking API.
13291 pub fn PxRigidActorExt_getRigidActorShapeLocalBoundsList(actor: *const PxRigidActor, numBounds: *mut u32) -> *mut PxBounds3;
13292
13293 /// Convenience function to create a PxBVH object from a PxRigidActor.
13294 ///
13295 /// The computed PxBVH can then be used in PxScene::addActor() or PxAggregate::addActor().
13296 /// After adding the actor
13297 /// &
13298 /// BVH to the scene/aggregate, release the PxBVH object by calling PxBVH::release().
13299 ///
13300 /// The PxBVH for this actor.
13301 pub fn PxRigidActorExt_createBVHFromActor(physics: *mut PxPhysics, actor: *const PxRigidActor) -> *mut PxBVH;
13302
13303 /// Default constructor.
13304 pub fn PxMassProperties_new() -> PxMassProperties;
13305
13306 /// Construct from individual elements.
13307 pub fn PxMassProperties_new_1(m: f32, inertiaT: *const PxMat33, com: *const PxVec3) -> PxMassProperties;
13308
13309 /// Compute mass properties based on a provided geometry structure.
13310 ///
13311 /// This constructor assumes the geometry has a density of 1. Mass and inertia tensor scale linearly with density.
13312 pub fn PxMassProperties_new_2(geometry: *const PxGeometry) -> PxMassProperties;
13313
13314 /// Translate the center of mass by a given vector and adjust the inertia tensor accordingly.
13315 pub fn PxMassProperties_translate_mut(self_: *mut PxMassProperties, t: *const PxVec3);
13316
13317 /// Get the entries of the diagonalized inertia tensor and the corresponding reference rotation.
13318 ///
13319 /// The entries of the diagonalized inertia tensor.
13320 pub fn PxMassProperties_getMassSpaceInertia(inertia: *const PxMat33, massFrame: *mut PxQuat) -> PxVec3;
13321
13322 /// Translate an inertia tensor using the parallel axis theorem
13323 ///
13324 /// The translated inertia tensor.
13325 pub fn PxMassProperties_translateInertia(inertia: *const PxMat33, mass: f32, t: *const PxVec3) -> PxMat33;
13326
13327 /// Rotate an inertia tensor around the center of mass
13328 ///
13329 /// The rotated inertia tensor.
13330 pub fn PxMassProperties_rotateInertia(inertia: *const PxMat33, q: *const PxQuat) -> PxMat33;
13331
13332 /// Non-uniform scaling of the inertia tensor
13333 ///
13334 /// The scaled inertia tensor.
13335 pub fn PxMassProperties_scaleInertia(inertia: *const PxMat33, scaleRotation: *const PxQuat, scale: *const PxVec3) -> PxMat33;
13336
13337 /// Sum up individual mass properties.
13338 ///
13339 /// The summed up mass properties.
13340 pub fn PxMassProperties_sum(props: *const PxMassProperties, transforms: *const PxTransform, count: u32) -> PxMassProperties;
13341
13342 /// Computation of mass properties for a rigid body actor
13343 ///
13344 /// To simulate a dynamic rigid actor, the SDK needs a mass and an inertia tensor.
13345 ///
13346 /// This method offers functionality to compute the necessary mass and inertia properties based on the shapes declared in
13347 /// the PxRigidBody descriptor and some additionally specified parameters. For each shape, the shape geometry,
13348 /// the shape positioning within the actor and the specified shape density are used to compute the body's mass and
13349 /// inertia properties.
13350 ///
13351 /// Shapes without PxShapeFlag::eSIMULATION_SHAPE set are ignored unless includeNonSimShapes is true.
13352 /// Shapes with plane, triangle mesh or heightfield geometry and PxShapeFlag::eSIMULATION_SHAPE set are not allowed for PxRigidBody collision.
13353 ///
13354 /// This method will set the mass, center of mass, and inertia tensor
13355 ///
13356 /// if no collision shapes are found, the inertia tensor is set to (1,1,1) and the mass to 1
13357 ///
13358 /// if massLocalPose is non-NULL, the rigid body's center of mass parameter will be set
13359 /// to the user provided value (massLocalPose) and the inertia tensor will be resolved at that point.
13360 ///
13361 /// If all shapes of the actor have the same density then the overloaded method updateMassAndInertia() with a single density parameter can be used instead.
13362 ///
13363 /// Boolean. True on success else false.
13364 pub fn PxRigidBodyExt_updateMassAndInertia(body: *mut PxRigidBody, shapeDensities: *const f32, shapeDensityCount: u32, massLocalPose: *const PxVec3, includeNonSimShapes: bool) -> bool;
13365
13366 /// Computation of mass properties for a rigid body actor
13367 ///
13368 /// See previous method for details.
13369 ///
13370 /// Boolean. True on success else false.
13371 pub fn PxRigidBodyExt_updateMassAndInertia_1(body: *mut PxRigidBody, density: f32, massLocalPose: *const PxVec3, includeNonSimShapes: bool) -> bool;
13372
13373 /// Computation of mass properties for a rigid body actor
13374 ///
13375 /// This method sets the mass, inertia and center of mass of a rigid body. The mass is set to the sum of all user-supplied
13376 /// shape mass values, and the inertia and center of mass are computed according to the rigid body's shapes and the per shape mass input values.
13377 ///
13378 /// If no collision shapes are found, the inertia tensor is set to (1,1,1)
13379 ///
13380 /// If a single mass value should be used for the actor as a whole then the overloaded method setMassAndUpdateInertia() with a single mass parameter can be used instead.
13381 ///
13382 /// Boolean. True on success else false.
13383 pub fn PxRigidBodyExt_setMassAndUpdateInertia(body: *mut PxRigidBody, shapeMasses: *const f32, shapeMassCount: u32, massLocalPose: *const PxVec3, includeNonSimShapes: bool) -> bool;
13384
13385 /// Computation of mass properties for a rigid body actor
13386 ///
13387 /// This method sets the mass, inertia and center of mass of a rigid body. The mass is set to the user-supplied
13388 /// value, and the inertia and center of mass are computed according to the rigid body's shapes and the input mass.
13389 ///
13390 /// If no collision shapes are found, the inertia tensor is set to (1,1,1)
13391 ///
13392 /// Boolean. True on success else false.
13393 pub fn PxRigidBodyExt_setMassAndUpdateInertia_1(body: *mut PxRigidBody, mass: f32, massLocalPose: *const PxVec3, includeNonSimShapes: bool) -> bool;
13394
13395 /// Compute the mass, inertia tensor and center of mass from a list of shapes.
13396 ///
13397 /// The mass properties from the combined shapes.
13398 pub fn PxRigidBodyExt_computeMassPropertiesFromShapes(shapes: *const *const PxShape, shapeCount: u32) -> PxMassProperties;
13399
13400 /// Applies a force (or impulse) defined in the global coordinate frame, acting at a particular
13401 /// point in global coordinates, to the actor.
13402 ///
13403 /// Note that if the force does not act along the center of mass of the actor, this
13404 /// will also add the corresponding torque. Because forces are reset at the end of every timestep,
13405 /// you can maintain a total external force on an object by calling this once every frame.
13406 ///
13407 /// if this call is used to apply a force or impulse to an articulation link, only the link is updated, not the entire
13408 /// articulation
13409 ///
13410 /// ::PxForceMode determines if the force is to be conventional or impulsive. Only eFORCE and eIMPULSE are supported, as the
13411 /// force required to produce a given velocity change or acceleration is underdetermined given only the desired change at a
13412 /// given point.
13413 ///
13414 /// Sleeping:
13415 /// This call wakes the actor if it is sleeping and the wakeup parameter is true (default).
13416 pub fn PxRigidBodyExt_addForceAtPos(body: *mut PxRigidBody, force: *const PxVec3, pos: *const PxVec3, mode: PxForceMode, wakeup: bool);
13417
13418 /// Applies a force (or impulse) defined in the global coordinate frame, acting at a particular
13419 /// point in local coordinates, to the actor.
13420 ///
13421 /// Note that if the force does not act along the center of mass of the actor, this
13422 /// will also add the corresponding torque. Because forces are reset at the end of every timestep, you can maintain a
13423 /// total external force on an object by calling this once every frame.
13424 ///
13425 /// if this call is used to apply a force or impulse to an articulation link, only the link is updated, not the entire
13426 /// articulation
13427 ///
13428 /// ::PxForceMode determines if the force is to be conventional or impulsive. Only eFORCE and eIMPULSE are supported, as the
13429 /// force required to produce a given velocity change or acceleration is underdetermined given only the desired change at a
13430 /// given point.
13431 ///
13432 /// Sleeping:
13433 /// This call wakes the actor if it is sleeping and the wakeup parameter is true (default).
13434 pub fn PxRigidBodyExt_addForceAtLocalPos(body: *mut PxRigidBody, force: *const PxVec3, pos: *const PxVec3, mode: PxForceMode, wakeup: bool);
13435
13436 /// Applies a force (or impulse) defined in the actor local coordinate frame, acting at a
13437 /// particular point in global coordinates, to the actor.
13438 ///
13439 /// Note that if the force does not act along the center of mass of the actor, this
13440 /// will also add the corresponding torque. Because forces are reset at the end of every timestep, you can maintain a
13441 /// total external force on an object by calling this once every frame.
13442 ///
13443 /// if this call is used to apply a force or impulse to an articulation link, only the link is updated, not the entire
13444 /// articulation
13445 ///
13446 /// ::PxForceMode determines if the force is to be conventional or impulsive. Only eFORCE and eIMPULSE are supported, as the
13447 /// force required to produce a given velocity change or acceleration is underdetermined given only the desired change at a
13448 /// given point.
13449 ///
13450 /// Sleeping:
13451 /// This call wakes the actor if it is sleeping and the wakeup parameter is true (default).
13452 pub fn PxRigidBodyExt_addLocalForceAtPos(body: *mut PxRigidBody, force: *const PxVec3, pos: *const PxVec3, mode: PxForceMode, wakeup: bool);
13453
13454 /// Applies a force (or impulse) defined in the actor local coordinate frame, acting at a
13455 /// particular point in local coordinates, to the actor.
13456 ///
13457 /// Note that if the force does not act along the center of mass of the actor, this
13458 /// will also add the corresponding torque. Because forces are reset at the end of every timestep, you can maintain a
13459 /// total external force on an object by calling this once every frame.
13460 ///
13461 /// if this call is used to apply a force or impulse to an articulation link, only the link is updated, not the entire
13462 /// articulation
13463 ///
13464 /// ::PxForceMode determines if the force is to be conventional or impulsive. Only eFORCE and eIMPULSE are supported, as the
13465 /// force required to produce a given velocity change or acceleration is underdetermined given only the desired change at a
13466 /// given point.
13467 ///
13468 /// Sleeping:
13469 /// This call wakes the actor if it is sleeping and the wakeup parameter is true (default).
13470 pub fn PxRigidBodyExt_addLocalForceAtLocalPos(body: *mut PxRigidBody, force: *const PxVec3, pos: *const PxVec3, mode: PxForceMode, wakeup: bool);
13471
13472 /// Computes the velocity of a point given in world coordinates if it were attached to the
13473 /// specified body and moving with it.
13474 ///
13475 /// The velocity of point in the global frame.
13476 pub fn PxRigidBodyExt_getVelocityAtPos(body: *const PxRigidBody, pos: *const PxVec3) -> PxVec3;
13477
13478 /// Computes the velocity of a point given in local coordinates if it were attached to the
13479 /// specified body and moving with it.
13480 ///
13481 /// The velocity of point in the local frame.
13482 pub fn PxRigidBodyExt_getLocalVelocityAtLocalPos(body: *const PxRigidBody, pos: *const PxVec3) -> PxVec3;
13483
13484 /// Computes the velocity of a point (offset from the origin of the body) given in world coordinates if it were attached to the
13485 /// specified body and moving with it.
13486 ///
13487 /// The velocity of point (offset from the origin of the body) in the global frame.
13488 pub fn PxRigidBodyExt_getVelocityAtOffset(body: *const PxRigidBody, pos: *const PxVec3) -> PxVec3;
13489
13490 /// Compute the change to linear and angular velocity that would occur if an impulsive force and torque were to be applied to a specified rigid body.
13491 ///
13492 /// The rigid body is left unaffected unless a subsequent independent call is executed that actually applies the computed changes to velocity and angular velocity.
13493 ///
13494 /// if this call is used to determine the velocity delta for an articulation link, only the mass properties of the link are taken into account.
13495 pub fn PxRigidBodyExt_computeVelocityDeltaFromImpulse(body: *const PxRigidBody, impulsiveForce: *const PxVec3, impulsiveTorque: *const PxVec3, deltaLinearVelocity: *mut PxVec3, deltaAngularVelocity: *mut PxVec3);
13496
13497 /// Computes the linear and angular velocity change vectors for a given impulse at a world space position taking a mass and inertia scale into account
13498 ///
13499 /// This function is useful for extracting the respective linear and angular velocity changes from a contact or joint when the mass/inertia ratios have been adjusted.
13500 ///
13501 /// if this call is used to determine the velocity delta for an articulation link, only the mass properties of the link are taken into account.
13502 pub fn PxRigidBodyExt_computeVelocityDeltaFromImpulse_1(body: *const PxRigidBody, globalPose: *const PxTransform, point: *const PxVec3, impulse: *const PxVec3, invMassScale: f32, invInertiaScale: f32, deltaLinearVelocity: *mut PxVec3, deltaAngularVelocity: *mut PxVec3);
13503
13504 /// Computes the linear and angular impulse vectors for a given impulse at a world space position taking a mass and inertia scale into account
13505 ///
13506 /// This function is useful for extracting the respective linear and angular impulses from a contact or joint when the mass/inertia ratios have been adjusted.
13507 pub fn PxRigidBodyExt_computeLinearAngularImpulse(body: *const PxRigidBody, globalPose: *const PxTransform, point: *const PxVec3, impulse: *const PxVec3, invMassScale: f32, invInertiaScale: f32, linearImpulse: *mut PxVec3, angularImpulse: *mut PxVec3);
13508
13509 /// Performs a linear sweep through space with the body's geometry objects.
13510 ///
13511 /// Supported geometries are: box, sphere, capsule, convex. Other geometry types will be ignored.
13512 ///
13513 /// If eTOUCH is returned from the filter callback, it will trigger an error and the hit will be discarded.
13514 ///
13515 /// The function sweeps all shapes attached to a given rigid body through space and reports the nearest
13516 /// object in the scene which intersects any of of the shapes swept paths.
13517 /// Information about the closest intersection is written to a [`PxSweepHit`] structure.
13518 ///
13519 /// True if a blocking hit was found.
13520 pub fn PxRigidBodyExt_linearSweepSingle(body: *mut PxRigidBody, scene: *mut PxScene, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, closestHit: *mut PxSweepHit, shapeIndex: *mut u32, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> bool;
13521
13522 /// Performs a linear sweep through space with the body's geometry objects, returning all overlaps.
13523 ///
13524 /// Supported geometries are: box, sphere, capsule, convex. Other geometry types will be ignored.
13525 ///
13526 /// This function sweeps all shapes attached to a given rigid body through space and reports all
13527 /// objects in the scene that intersect any of the shapes' swept paths until there are no more objects to report
13528 /// or a blocking hit is encountered.
13529 ///
13530 /// the number of touching hits. If overflow is set to true, the results are incomplete. In case of overflow there are also no guarantees that all touching hits returned are closer than the blocking hit.
13531 pub fn PxRigidBodyExt_linearSweepMultiple(body: *mut PxRigidBody, scene: *mut PxScene, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, touchHitBuffer: *mut PxSweepHit, touchHitShapeIndices: *mut u32, touchHitBufferSize: u32, block: *mut PxSweepHit, blockingShapeIndex: *mut i32, overflow: *mut bool, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> u32;
13532
13533 /// Retrieves the world space pose of the shape.
13534 ///
13535 /// Global pose of shape.
13536 pub fn PxShapeExt_getGlobalPose(shape: *const PxShape, actor: *const PxRigidActor) -> PxTransform;
13537
13538 /// Raycast test against the shape.
13539 ///
13540 /// Number of hits between the ray and the shape
13541 pub fn PxShapeExt_raycast(shape: *const PxShape, actor: *const PxRigidActor, rayOrigin: *const PxVec3, rayDir: *const PxVec3, maxDist: f32, hitFlags: PxHitFlags, maxHits: u32, rayHits: *mut PxRaycastHit) -> u32;
13542
13543 /// Test overlap between the shape and a geometry object
13544 ///
13545 /// True if the shape overlaps the geometry object
13546 pub fn PxShapeExt_overlap(shape: *const PxShape, actor: *const PxRigidActor, otherGeom: *const PxGeometry, otherGeomPose: *const PxTransform) -> bool;
13547
13548 /// Sweep a geometry object against the shape.
13549 ///
13550 /// Currently only box, sphere, capsule and convex mesh shapes are supported, i.e. the swept geometry object must be one of those types.
13551 ///
13552 /// True if the swept geometry object hits the shape
13553 pub fn PxShapeExt_sweep(shape: *const PxShape, actor: *const PxRigidActor, unitDir: *const PxVec3, distance: f32, otherGeom: *const PxGeometry, otherGeomPose: *const PxTransform, sweepHit: *mut PxSweepHit, hitFlags: PxHitFlags) -> bool;
13554
13555 /// Retrieves the axis aligned bounding box enclosing the shape.
13556 ///
13557 /// The shape's bounding box.
13558 pub fn PxShapeExt_getWorldBounds(shape: *const PxShape, actor: *const PxRigidActor, inflation: f32) -> PxBounds3;
13559
13560 pub fn PxMeshOverlapUtil_new_alloc() -> *mut PxMeshOverlapUtil;
13561
13562 pub fn PxMeshOverlapUtil_delete(self_: *mut PxMeshOverlapUtil);
13563
13564 /// Find the mesh triangles which touch the specified geometry object.
13565 ///
13566 /// Number of overlaps found. Triangle indices can then be accessed through the [`getResults`]() function.
13567 pub fn PxMeshOverlapUtil_findOverlap_mut(self_: *mut PxMeshOverlapUtil, geom: *const PxGeometry, geomPose: *const PxTransform, meshGeom: *const PxTriangleMeshGeometry, meshPose: *const PxTransform) -> u32;
13568
13569 /// Find the height field triangles which touch the specified geometry object.
13570 ///
13571 /// Number of overlaps found. Triangle indices can then be accessed through the [`getResults`]() function.
13572 pub fn PxMeshOverlapUtil_findOverlap_mut_1(self_: *mut PxMeshOverlapUtil, geom: *const PxGeometry, geomPose: *const PxTransform, hfGeom: *const PxHeightFieldGeometry, hfPose: *const PxTransform) -> u32;
13573
13574 /// Retrieves array of triangle indices after a findOverlap call.
13575 ///
13576 /// Indices of touched triangles
13577 pub fn PxMeshOverlapUtil_getResults(self_: *const PxMeshOverlapUtil) -> *const u32;
13578
13579 /// Retrieves number of triangle indices after a findOverlap call.
13580 ///
13581 /// Number of touched triangles
13582 pub fn PxMeshOverlapUtil_getNbResults(self_: *const PxMeshOverlapUtil) -> u32;
13583
13584 /// Computes an approximate minimum translational distance (MTD) between a geometry object and a mesh.
13585 ///
13586 /// This iterative function computes an approximate vector that can be used to depenetrate a geom object
13587 /// from a triangle mesh. Returned depenetration vector should be applied to 'geom', to get out of the mesh.
13588 ///
13589 /// The function works best when the amount of overlap between the geom object and the mesh is small. If the
13590 /// geom object's center goes inside the mesh, backface culling usually kicks in, no overlap is detected,
13591 /// and the function does not compute an MTD vector.
13592 ///
13593 /// The function early exits if no overlap is detected after a depenetration attempt. This means that if
13594 /// maxIter = N, the code will attempt at most N iterations but it might exit earlier if depenetration has
13595 /// been successful. Usually N = 4 gives good results.
13596 ///
13597 /// True if the MTD has successfully been computed, i.e. if objects do overlap.
13598 pub fn phys_PxComputeTriangleMeshPenetration(direction: *mut PxVec3, depth: *mut f32, geom: *const PxGeometry, geomPose: *const PxTransform, meshGeom: *const PxTriangleMeshGeometry, meshPose: *const PxTransform, maxIter: u32, usedIter: *mut u32) -> bool;
13599
13600 /// Computes an approximate minimum translational distance (MTD) between a geometry object and a heightfield.
13601 ///
13602 /// This iterative function computes an approximate vector that can be used to depenetrate a geom object
13603 /// from a heightfield. Returned depenetration vector should be applied to 'geom', to get out of the heightfield.
13604 ///
13605 /// The function works best when the amount of overlap between the geom object and the mesh is small. If the
13606 /// geom object's center goes inside the heightfield, backface culling usually kicks in, no overlap is detected,
13607 /// and the function does not compute an MTD vector.
13608 ///
13609 /// The function early exits if no overlap is detected after a depenetration attempt. This means that if
13610 /// maxIter = N, the code will attempt at most N iterations but it might exit earlier if depenetration has
13611 /// been successful. Usually N = 4 gives good results.
13612 ///
13613 /// True if the MTD has successfully been computed, i.e. if objects do overlap.
13614 pub fn phys_PxComputeHeightFieldPenetration(direction: *mut PxVec3, depth: *mut f32, geom: *const PxGeometry, geomPose: *const PxTransform, heightFieldGeom: *const PxHeightFieldGeometry, heightFieldPose: *const PxTransform, maxIter: u32, usedIter: *mut u32) -> bool;
13615
13616 pub fn PxXmlMiscParameter_new() -> PxXmlMiscParameter;
13617
13618 pub fn PxXmlMiscParameter_new_1(inUpVector: *mut PxVec3, inScale: PxTolerancesScale) -> PxXmlMiscParameter;
13619
13620 /// Returns whether the collection is serializable with the externalReferences collection.
13621 ///
13622 /// Some definitions to explain whether a collection can be serialized or not:
13623 ///
13624 /// For definitions of
13625 /// requires
13626 /// and
13627 /// complete
13628 /// see [`PxSerialization::complete`]
13629 ///
13630 /// A serializable object is
13631 /// subordinate
13632 /// if it cannot be serialized on its own
13633 /// The following objects are subordinate:
13634 /// - articulation links
13635 /// - articulation joints
13636 /// - joints
13637 ///
13638 /// A collection C can be serialized with external references collection D iff
13639 /// - C is complete relative to D (no dangling references)
13640 /// - Every object in D required by an object in C has a valid ID (no unnamed references)
13641 /// - Every subordinate object in C is required by another object in C (no orphans)
13642 ///
13643 /// Whether the collection is serializable
13644 pub fn PxSerialization_isSerializable(collection: *mut PxCollection, sr: *mut PxSerializationRegistry, externalReferences: *const PxCollection) -> bool;
13645
13646 /// Adds to a collection all objects such that it can be successfully serialized.
13647 ///
13648 /// A collection C is complete relative to an other collection D if every object required by C is either in C or D.
13649 /// This function adds objects to a collection, such that it becomes complete with respect to the exceptFor collection.
13650 /// Completeness is needed for serialization. See [`PxSerialization::serializeCollectionToBinary`],
13651 /// [`PxSerialization::serializeCollectionToXml`].
13652 ///
13653 /// Sdk objects require other sdk object according to the following rules:
13654 /// - joints require their actors and constraint
13655 /// - rigid actors require their shapes
13656 /// - shapes require their material(s) and mesh (triangle mesh, convex mesh or height field), if any
13657 /// - articulations require their links and joints
13658 /// - aggregates require their actors
13659 ///
13660 /// If followJoints is specified another rule is added:
13661 /// - actors require their joints
13662 ///
13663 /// Specifying followJoints will make whole jointed actor chains being added to the collection. Following chains
13664 /// is interrupted whenever a object in exceptFor is encountered.
13665 pub fn PxSerialization_complete(collection: *mut PxCollection, sr: *mut PxSerializationRegistry, exceptFor: *const PxCollection, followJoints: bool);
13666
13667 /// Creates PxSerialObjectId values for unnamed objects in a collection.
13668 ///
13669 /// Creates PxSerialObjectId names for unnamed objects in a collection starting at a base value and incrementing,
13670 /// skipping values that are already assigned to objects in the collection.
13671 pub fn PxSerialization_createSerialObjectIds(collection: *mut PxCollection, base: u64);
13672
13673 /// Creates a PxCollection from XML data.
13674 ///
13675 /// a pointer to a PxCollection if successful or NULL if it failed.
13676 pub fn PxSerialization_createCollectionFromXml(inputData: *mut PxInputData, cooking: *mut PxCooking, sr: *mut PxSerializationRegistry, externalRefs: *const PxCollection, stringTable: *mut PxStringTable, outArgs: *mut PxXmlMiscParameter) -> *mut PxCollection;
13677
13678 /// Deserializes a PxCollection from memory.
13679 ///
13680 /// Creates a collection from memory. If the collection has external dependencies another collection
13681 /// can be provided to resolve these.
13682 ///
13683 /// The memory block provided has to be 128 bytes aligned and contain a contiguous serialized collection as written
13684 /// by PxSerialization::serializeCollectionToBinary. The contained binary data needs to be compatible with the current binary format version
13685 /// which is defined by "PX_PHYSICS_VERSION_MAJOR.PX_PHYSICS_VERSION_MINOR.PX_PHYSICS_VERSION_BUGFIX-PX_BINARY_SERIAL_VERSION".
13686 /// For a list of compatible sdk releases refer to the documentation of PX_BINARY_SERIAL_VERSION.
13687 pub fn PxSerialization_createCollectionFromBinary(memBlock: *mut std::ffi::c_void, sr: *mut PxSerializationRegistry, externalRefs: *const PxCollection) -> *mut PxCollection;
13688
13689 /// Serializes a physics collection to an XML output stream.
13690 ///
13691 /// The collection to be serialized needs to be complete
13692 ///
13693 /// Serialization of objects in a scene that is simultaneously being simulated is not supported and leads to undefined behavior.
13694 ///
13695 /// true if the collection is successfully serialized.
13696 pub fn PxSerialization_serializeCollectionToXml(outputStream: *mut PxOutputStream, collection: *mut PxCollection, sr: *mut PxSerializationRegistry, cooking: *mut PxCooking, externalRefs: *const PxCollection, inArgs: *mut PxXmlMiscParameter) -> bool;
13697
13698 /// Serializes a collection to a binary stream.
13699 ///
13700 /// Serializes a collection to a stream. In order to resolve external dependencies the externalReferences collection has to be provided.
13701 /// Optionally names of objects that where set for example with [`PxActor::setName`] are serialized along with the objects.
13702 ///
13703 /// The collection can be successfully serialized if isSerializable(collection) returns true. See [`isSerializable`].
13704 ///
13705 /// The implementation of the output stream needs to fulfill the requirements on the memory block input taken by
13706 /// PxSerialization::createCollectionFromBinary.
13707 ///
13708 /// Serialization of objects in a scene that is simultaneously being simulated is not supported and leads to undefined behavior.
13709 ///
13710 /// Whether serialization was successful
13711 pub fn PxSerialization_serializeCollectionToBinary(outputStream: *mut PxOutputStream, collection: *mut PxCollection, sr: *mut PxSerializationRegistry, externalRefs: *const PxCollection, exportNames: bool) -> bool;
13712
13713 /// Creates an application managed registry for serialization.
13714 ///
13715 /// PxSerializationRegistry instance.
13716 pub fn PxSerialization_createSerializationRegistry(physics: *mut PxPhysics) -> *mut PxSerializationRegistry;
13717
13718 /// Deletes the dispatcher.
13719 ///
13720 /// Do not keep a reference to the deleted instance.
13721 pub fn PxDefaultCpuDispatcher_release_mut(self_: *mut PxDefaultCpuDispatcher);
13722
13723 /// Enables profiling at task level.
13724 ///
13725 /// By default enabled only in profiling builds.
13726 pub fn PxDefaultCpuDispatcher_setRunProfiled_mut(self_: *mut PxDefaultCpuDispatcher, runProfiled: bool);
13727
13728 /// Checks if profiling is enabled at task level.
13729 ///
13730 /// True if tasks should be profiled.
13731 pub fn PxDefaultCpuDispatcher_getRunProfiled(self_: *const PxDefaultCpuDispatcher) -> bool;
13732
13733 /// Create default dispatcher, extensions SDK needs to be initialized first.
13734 ///
13735 /// numThreads may be zero in which case no worker thread are initialized and
13736 /// simulation tasks will be executed on the thread that calls PxScene::simulate()
13737 ///
13738 /// yieldProcessorCount must be greater than zero if eYIELD_PROCESSOR is the chosen mode and equal to zero for all other modes.
13739 ///
13740 /// eYIELD_THREAD and eYIELD_PROCESSOR modes will use compute resources even if the simulation is not running.
13741 /// It is left to users to keep threads inactive, if so desired, when no simulation is running.
13742 pub fn phys_PxDefaultCpuDispatcherCreate(numThreads: u32, affinityMasks: *mut u32, mode: PxDefaultCpuDispatcherWaitForWorkMode, yieldProcessorCount: u32) -> *mut PxDefaultCpuDispatcher;
13743
13744 /// Builds smooth vertex normals over a mesh.
13745 ///
13746 /// - "smooth" because smoothing groups are not supported here
13747 /// - takes angles into account for correct cube normals computation
13748 ///
13749 /// To use 32bit indices pass a pointer in dFaces and set wFaces to zero. Alternatively pass a pointer to
13750 /// wFaces and set dFaces to zero.
13751 ///
13752 /// True on success.
13753 pub fn phys_PxBuildSmoothNormals(nbTris: u32, nbVerts: u32, verts: *const PxVec3, dFaces: *const u32, wFaces: *const u16, normals: *mut PxVec3, flip: bool) -> bool;
13754
13755 /// simple method to create a PxRigidDynamic actor with a single PxShape.
13756 ///
13757 /// a new dynamic actor with the PxRigidBodyFlag, or NULL if it could
13758 /// not be constructed
13759 pub fn phys_PxCreateDynamic(sdk: *mut PxPhysics, transform: *const PxTransform, geometry: *const PxGeometry, material: *mut PxMaterial, density: f32, shapeOffset: *const PxTransform) -> *mut PxRigidDynamic;
13760
13761 /// simple method to create a PxRigidDynamic actor with a single PxShape.
13762 ///
13763 /// a new dynamic actor with the PxRigidBodyFlag, or NULL if it could
13764 /// not be constructed
13765 pub fn phys_PxCreateDynamic_1(sdk: *mut PxPhysics, transform: *const PxTransform, shape: *mut PxShape, density: f32) -> *mut PxRigidDynamic;
13766
13767 /// simple method to create a kinematic PxRigidDynamic actor with a single PxShape.
13768 ///
13769 /// unlike PxCreateDynamic, the geometry is not restricted to box, capsule, sphere or convex. However,
13770 /// kinematics of other geometry types may not participate in simulation collision and may be used only for
13771 /// triggers or scene queries of moving objects under animation control. In this case the density parameter
13772 /// will be ignored and the created shape will be set up as a scene query only shape (see [`PxShapeFlag::eSCENE_QUERY_SHAPE`])
13773 ///
13774 /// a new dynamic actor with the PxRigidBodyFlag::eKINEMATIC set, or NULL if it could
13775 /// not be constructed
13776 pub fn phys_PxCreateKinematic(sdk: *mut PxPhysics, transform: *const PxTransform, geometry: *const PxGeometry, material: *mut PxMaterial, density: f32, shapeOffset: *const PxTransform) -> *mut PxRigidDynamic;
13777
13778 /// simple method to create a kinematic PxRigidDynamic actor with a single PxShape.
13779 ///
13780 /// unlike PxCreateDynamic, the geometry is not restricted to box, capsule, sphere or convex. However,
13781 /// kinematics of other geometry types may not participate in simulation collision and may be used only for
13782 /// triggers or scene queries of moving objects under animation control. In this case the density parameter
13783 /// will be ignored and the created shape will be set up as a scene query only shape (see [`PxShapeFlag::eSCENE_QUERY_SHAPE`])
13784 ///
13785 /// a new dynamic actor with the PxRigidBodyFlag::eKINEMATIC set, or NULL if it could
13786 /// not be constructed
13787 pub fn phys_PxCreateKinematic_1(sdk: *mut PxPhysics, transform: *const PxTransform, shape: *mut PxShape, density: f32) -> *mut PxRigidDynamic;
13788
13789 /// simple method to create a PxRigidStatic actor with a single PxShape.
13790 ///
13791 /// a new static actor, or NULL if it could not be constructed
13792 pub fn phys_PxCreateStatic(sdk: *mut PxPhysics, transform: *const PxTransform, geometry: *const PxGeometry, material: *mut PxMaterial, shapeOffset: *const PxTransform) -> *mut PxRigidStatic;
13793
13794 /// simple method to create a PxRigidStatic actor with a single PxShape.
13795 ///
13796 /// a new static actor, or NULL if it could not be constructed
13797 pub fn phys_PxCreateStatic_1(sdk: *mut PxPhysics, transform: *const PxTransform, shape: *mut PxShape) -> *mut PxRigidStatic;
13798
13799 /// create a shape by copying attributes from another shape
13800 ///
13801 /// The function clones a PxShape. The following properties are copied:
13802 /// - geometry
13803 /// - flags
13804 /// - materials
13805 /// - actor-local pose
13806 /// - contact offset
13807 /// - rest offset
13808 /// - simulation filter data
13809 /// - query filter data
13810 /// - torsional patch radius
13811 /// - minimum torsional patch radius
13812 ///
13813 /// The following are not copied and retain their default values:
13814 /// - name
13815 /// - user data
13816 ///
13817 /// the newly-created rigid static
13818 pub fn phys_PxCloneShape(physicsSDK: *mut PxPhysics, shape: *const PxShape, isExclusive: bool) -> *mut PxShape;
13819
13820 /// create a static body by copying attributes from another rigid actor
13821 ///
13822 /// The function clones a PxRigidDynamic or PxRigidStatic as a PxRigidStatic. A uniform scale is applied. The following properties are copied:
13823 /// - shapes
13824 /// - actor flags
13825 /// - owner client and client behavior bits
13826 /// - dominance group
13827 ///
13828 /// The following are not copied and retain their default values:
13829 /// - name
13830 /// - joints or observers
13831 /// - aggregate or scene membership
13832 /// - user data
13833 ///
13834 /// Transforms are not copied with bit-exact accuracy.
13835 ///
13836 /// the newly-created rigid static
13837 pub fn phys_PxCloneStatic(physicsSDK: *mut PxPhysics, transform: *const PxTransform, actor: *const PxRigidActor) -> *mut PxRigidStatic;
13838
13839 /// create a dynamic body by copying attributes from an existing body
13840 ///
13841 /// The following properties are copied:
13842 /// - shapes
13843 /// - actor flags, rigidDynamic flags and rigidDynamic lock flags
13844 /// - mass, moment of inertia, and center of mass frame
13845 /// - linear and angular velocity
13846 /// - linear and angular damping
13847 /// - maximum linear velocity
13848 /// - maximum angular velocity
13849 /// - position and velocity solver iterations
13850 /// - maximum depenetration velocity
13851 /// - sleep threshold
13852 /// - contact report threshold
13853 /// - dominance group
13854 /// - owner client and client behavior bits
13855 /// - name pointer
13856 /// - kinematic target
13857 ///
13858 /// The following are not copied and retain their default values:
13859 /// - name
13860 /// - joints or observers
13861 /// - aggregate or scene membership
13862 /// - sleep timer
13863 /// - user data
13864 ///
13865 /// Transforms are not copied with bit-exact accuracy.
13866 ///
13867 /// the newly-created rigid static
13868 pub fn phys_PxCloneDynamic(physicsSDK: *mut PxPhysics, transform: *const PxTransform, body: *const PxRigidDynamic) -> *mut PxRigidDynamic;
13869
13870 /// create a plane actor. The plane equation is n.x + d = 0
13871 ///
13872 /// a new static actor, or NULL if it could not be constructed
13873 pub fn phys_PxCreatePlane(sdk: *mut PxPhysics, plane: *const PxPlane, material: *mut PxMaterial) -> *mut PxRigidStatic;
13874
13875 /// scale a rigid actor by a uniform scale
13876 ///
13877 /// The geometry and relative positions of the actor are multiplied by the given scale value. If the actor is a rigid body or an
13878 /// articulation link and the scaleMassProps value is true, the mass properties are scaled assuming the density is constant: the
13879 /// center of mass is linearly scaled, the mass is multiplied by the cube of the scale, and the inertia tensor by the fifth power of the scale.
13880 pub fn phys_PxScaleRigidActor(actor: *mut PxRigidActor, scale: f32, scaleMassProps: bool);
13881
13882 pub fn PxStringTableExt_createStringTable(inAllocator: *mut PxAllocatorCallback) -> *mut PxStringTable;
13883
13884 /// Creates regions for PxSceneDesc, from a global box.
13885 ///
13886 /// This helper simply subdivides the given global box into a 2D grid of smaller boxes. Each one of those smaller boxes
13887 /// is a region of interest for the broadphase. There are nbSubdiv*nbSubdiv regions in the 2D grid. The function does not
13888 /// subdivide along the given up axis.
13889 ///
13890 /// This is the simplest setup one can use with PxBroadPhaseType::eMBP. A more sophisticated setup would try to cover
13891 /// the game world with a non-uniform set of regions (i.e. not just a grid).
13892 ///
13893 /// number of regions written out to the 'regions' array
13894 pub fn PxBroadPhaseExt_createRegionsFromWorldBounds(regions: *mut PxBounds3, globalBounds: *const PxBounds3, nbSubdiv: u32, upAxis: u32) -> u32;
13895
13896 /// Raycast returning any blocking hit, not necessarily the closest.
13897 ///
13898 /// Returns whether any rigid actor is hit along the ray.
13899 ///
13900 /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
13901 ///
13902 /// True if a blocking hit was found.
13903 pub fn PxSceneQueryExt_raycastAny(scene: *const PxScene, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, hit: *mut PxQueryHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache) -> bool;
13904
13905 /// Raycast returning a single result.
13906 ///
13907 /// Returns the first rigid actor that is hit along the ray. Data for a blocking hit will be returned as specified by the outputFlags field. Touching hits will be ignored.
13908 ///
13909 /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
13910 ///
13911 /// True if a blocking hit was found.
13912 pub fn PxSceneQueryExt_raycastSingle(scene: *const PxScene, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, hit: *mut PxRaycastHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache) -> bool;
13913
13914 /// Raycast returning multiple results.
13915 ///
13916 /// Find all rigid actors that get hit along the ray. Each result contains data as specified by the outputFlags field.
13917 ///
13918 /// Touching hits are not ordered.
13919 ///
13920 /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
13921 ///
13922 /// Number of hits in the buffer, or -1 if the buffer overflowed.
13923 pub fn PxSceneQueryExt_raycastMultiple(scene: *const PxScene, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, hitBuffer: *mut PxRaycastHit, hitBufferSize: u32, blockingHit: *mut bool, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache) -> i32;
13924
13925 /// Sweep returning any blocking hit, not necessarily the closest.
13926 ///
13927 /// Returns whether any rigid actor is hit along the sweep path.
13928 ///
13929 /// If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
13930 ///
13931 /// True if a blocking hit was found.
13932 pub fn PxSceneQueryExt_sweepAny(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, queryFlags: PxHitFlags, hit: *mut PxQueryHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> bool;
13933
13934 /// Sweep returning a single result.
13935 ///
13936 /// Returns the first rigid actor that is hit along the ray. Data for a blocking hit will be returned as specified by the outputFlags field. Touching hits will be ignored.
13937 ///
13938 /// If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
13939 ///
13940 /// True if a blocking hit was found.
13941 pub fn PxSceneQueryExt_sweepSingle(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, hit: *mut PxSweepHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> bool;
13942
13943 /// Sweep returning multiple results.
13944 ///
13945 /// Find all rigid actors that get hit along the sweep. Each result contains data as specified by the outputFlags field.
13946 ///
13947 /// Touching hits are not ordered.
13948 ///
13949 /// If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
13950 ///
13951 /// Number of hits in the buffer, or -1 if the buffer overflowed.
13952 pub fn PxSceneQueryExt_sweepMultiple(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, hitBuffer: *mut PxSweepHit, hitBufferSize: u32, blockingHit: *mut bool, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> i32;
13953
13954 /// Test overlap between a geometry and objects in the scene.
13955 ///
13956 /// Filtering: Overlap tests do not distinguish between touching and blocking hit types. Both get written to the hit buffer.
13957 ///
13958 /// PxHitFlag::eMESH_MULTIPLE and PxHitFlag::eMESH_BOTH_SIDES have no effect in this case
13959 ///
13960 /// Number of hits in the buffer, or -1 if the buffer overflowed.
13961 pub fn PxSceneQueryExt_overlapMultiple(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, hitBuffer: *mut PxOverlapHit, hitBufferSize: u32, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback) -> i32;
13962
13963 /// Test returning, for a given geometry, any overlapping object in the scene.
13964 ///
13965 /// Filtering: Overlap tests do not distinguish between touching and blocking hit types. Both trigger a hit.
13966 ///
13967 /// PxHitFlag::eMESH_MULTIPLE and PxHitFlag::eMESH_BOTH_SIDES have no effect in this case
13968 ///
13969 /// True if an overlap was found.
13970 pub fn PxSceneQueryExt_overlapAny(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, hit: *mut PxOverlapHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback) -> bool;
13971
13972 pub fn PxBatchQueryExt_release_mut(self_: *mut PxBatchQueryExt);
13973
13974 /// Performs a raycast against objects in the scene.
13975 ///
13976 /// Touching hits are not ordered.
13977 ///
13978 /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
13979 ///
13980 /// This query call writes to a list associated with the query object and is NOT thread safe (for performance reasons there is no lock
13981 /// and overlapping writes from different threads may result in undefined behavior).
13982 ///
13983 /// Returns a PxRaycastBuffer pointer that will store the result of the query after execute() is completed.
13984 /// This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
13985 pub fn PxBatchQueryExt_raycast_mut(self_: *mut PxBatchQueryExt, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, maxNbTouches: u16, hitFlags: PxHitFlags, filterData: *const PxQueryFilterData, cache: *const PxQueryCache) -> *mut PxRaycastBuffer;
13986
13987 /// Performs a sweep test against objects in the scene.
13988 ///
13989 /// Touching hits are not ordered.
13990 ///
13991 /// If a shape from the scene is already overlapping with the query shape in its starting position,
13992 /// the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified.
13993 ///
13994 /// This query call writes to a list associated with the query object and is NOT thread safe (for performance reasons there is no lock
13995 /// and overlapping writes from different threads may result in undefined behavior).
13996 ///
13997 /// Returns a PxSweepBuffer pointer that will store the result of the query after execute() is completed.
13998 /// This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
13999 pub fn PxBatchQueryExt_sweep_mut(self_: *mut PxBatchQueryExt, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, maxNbTouches: u16, hitFlags: PxHitFlags, filterData: *const PxQueryFilterData, cache: *const PxQueryCache, inflation: f32) -> *mut PxSweepBuffer;
14000
14001 /// Performs an overlap test of a given geometry against objects in the scene.
14002 ///
14003 /// Filtering: returning eBLOCK from user filter for overlap queries will cause a warning (see [`PxQueryHitType`]).
14004 ///
14005 /// eBLOCK should not be returned from user filters for overlap(). Doing so will result in undefined behavior, and a warning will be issued.
14006 ///
14007 /// If the PxQueryFlag::eNO_BLOCK flag is set, the eBLOCK will instead be automatically converted to an eTOUCH and the warning suppressed.
14008 ///
14009 /// This query call writes to a list associated with the query object and is NOT thread safe (for performance reasons there is no lock
14010 /// and overlapping writes from different threads may result in undefined behavior).
14011 ///
14012 /// Returns a PxOverlapBuffer pointer that will store the result of the query after execute() is completed.
14013 /// This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
14014 pub fn PxBatchQueryExt_overlap_mut(self_: *mut PxBatchQueryExt, geometry: *const PxGeometry, pose: *const PxTransform, maxNbTouches: u16, filterData: *const PxQueryFilterData, cache: *const PxQueryCache) -> *mut PxOverlapBuffer;
14015
14016 pub fn PxBatchQueryExt_execute_mut(self_: *mut PxBatchQueryExt);
14017
14018 /// Create a PxBatchQueryExt without the need for pre-allocated result or touch buffers.
14019 ///
14020 /// Returns a PxBatchQueryExt instance. A NULL pointer will be returned if the subsequent allocations fail or if any of the arguments are illegal.
14021 /// In the event that a NULL pointer is returned a corresponding error will be issued to the error stream.
14022 pub fn phys_PxCreateBatchQueryExt(scene: *const PxScene, queryFilterCallback: *mut PxQueryFilterCallback, maxNbRaycasts: u32, maxNbRaycastTouches: u32, maxNbSweeps: u32, maxNbSweepTouches: u32, maxNbOverlaps: u32, maxNbOverlapTouches: u32) -> *mut PxBatchQueryExt;
14023
14024 /// Create a PxBatchQueryExt with user-supplied result and touch buffers.
14025 ///
14026 /// Returns a PxBatchQueryExt instance. A NULL pointer will be returned if the subsequent allocations fail or if any of the arguments are illegal.
14027 /// In the event that a NULL pointer is returned a corresponding error will be issued to the error stream.
14028 pub fn phys_PxCreateBatchQueryExt_1(scene: *const PxScene, queryFilterCallback: *mut PxQueryFilterCallback, raycastBuffers: *mut PxRaycastBuffer, maxNbRaycasts: u32, raycastTouches: *mut PxRaycastHit, maxNbRaycastTouches: u32, sweepBuffers: *mut PxSweepBuffer, maxNbSweeps: u32, sweepTouches: *mut PxSweepHit, maxNbSweepTouches: u32, overlapBuffers: *mut PxOverlapBuffer, maxNbOverlaps: u32, overlapTouches: *mut PxOverlapHit, maxNbOverlapTouches: u32) -> *mut PxBatchQueryExt;
14029
14030 /// Creates an external scene query system.
14031 ///
14032 /// An external SQ system is the part of a PxScene that deals with scene queries (SQ). This is usually taken care of
14033 /// by an internal implementation inside PxScene, but it is also possible to re-route all SQ calls to an external
14034 /// implementation, potentially opening the door to some customizations in behavior and features for advanced users.
14035 ///
14036 /// The following external SQ system is an example of how an implementation would look like. It re-uses much of the
14037 /// same code as the internal version, but it could be re-implemented in a completely different way to match users'
14038 /// specific needs.
14039 ///
14040 /// An external SQ system instance
14041 pub fn phys_PxCreateExternalSceneQuerySystem(desc: *const PxSceneQueryDesc, contextID: u64) -> *mut PxSceneQuerySystem;
14042
14043 /// Adds a pruner to the system.
14044 ///
14045 /// The internal PhysX scene-query system uses two regular pruners (one for static shapes, one for dynamic shapes) and an optional
14046 /// compound pruner. Our custom scene query system supports an arbitrary number of regular pruners.
14047 ///
14048 /// This can be useful to reduce the load on each pruner, in particular during updates, when internal trees are rebuilt in the
14049 /// background. On the other hand this implementation simply iterates over all created pruners to perform queries, so their cost
14050 /// might increase if a large number of pruners is used.
14051 ///
14052 /// In any case this serves as an example of how the PxSceneQuerySystem API can be used to customize scene queries.
14053 ///
14054 /// A pruner index
14055 pub fn PxCustomSceneQuerySystem_addPruner_mut(self_: *mut PxCustomSceneQuerySystem, primaryType: PxPruningStructureType, secondaryType: PxDynamicTreeSecondaryPruner, preallocated: u32) -> u32;
14056
14057 /// Start custom build-steps for all pruners
14058 ///
14059 /// This function is used in combination with customBuildstep() and finishCustomBuildstep() to let users take control
14060 /// of the pruners' build-step
14061 /// &
14062 /// commit calls - basically the pruners' update functions. These functions should be used
14063 /// with the PxSceneQueryUpdateMode::eBUILD_DISABLED_COMMIT_DISABLED update mode, otherwise the build-steps will happen
14064 /// automatically in fetchResults. For N pruners it can be more efficient to use these custom build-step functions to
14065 /// perform the updates in parallel:
14066 ///
14067 /// - call startCustomBuildstep() first (one synchronous call)
14068 /// - for each pruner, call customBuildstep() (asynchronous calls from multiple threads)
14069 /// - once it is done, call finishCustomBuildstep() to finish the update (synchronous call)
14070 ///
14071 /// The multi-threaded update is more efficient here than what it is in PxScene, because the "flushShapes()" call is
14072 /// also multi-threaded (while it is not in PxScene).
14073 ///
14074 /// Note that users are responsible for locks here, and these calls should not overlap with other SQ calls. In particular
14075 /// one should not add new objects to the SQ system or perform queries while these calls are happening.
14076 ///
14077 /// The number of pruners in the system.
14078 pub fn PxCustomSceneQuerySystem_startCustomBuildstep_mut(self_: *mut PxCustomSceneQuerySystem) -> u32;
14079
14080 /// Perform a custom build-step for a given pruner.
14081 pub fn PxCustomSceneQuerySystem_customBuildstep_mut(self_: *mut PxCustomSceneQuerySystem, index: u32);
14082
14083 /// Finish custom build-steps
14084 ///
14085 /// Call this function once after all the customBuildstep() calls are done.
14086 pub fn PxCustomSceneQuerySystem_finishCustomBuildstep_mut(self_: *mut PxCustomSceneQuerySystem);
14087
14088 pub fn PxCustomSceneQuerySystemAdapter_delete(self_: *mut PxCustomSceneQuerySystemAdapter);
14089
14090 /// Gets a pruner index for an actor/shape.
14091 ///
14092 /// This user-defined function tells the system in which pruner a given actor/shape should go.
14093 ///
14094 /// The returned index must be valid, i.e. it must have been previously returned to users by PxCustomSceneQuerySystem::addPruner.
14095 ///
14096 /// A pruner index for this actor/shape.
14097 pub fn PxCustomSceneQuerySystemAdapter_getPrunerIndex(self_: *const PxCustomSceneQuerySystemAdapter, actor: *const PxRigidActor, shape: *const PxShape) -> u32;
14098
14099 /// Pruner filtering callback.
14100 ///
14101 /// This will be called for each query to validate whether it should process a given pruner.
14102 ///
14103 /// True to process the pruner, false to skip it entirely
14104 pub fn PxCustomSceneQuerySystemAdapter_processPruner(self_: *const PxCustomSceneQuerySystemAdapter, prunerIndex: u32, context: *const PxQueryThreadContext, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback) -> bool;
14105
14106 /// Creates a custom scene query system.
14107 ///
14108 /// This is similar to PxCreateExternalSceneQuerySystem, except this function creates a PxCustomSceneQuerySystem object.
14109 /// It can be plugged to PxScene the same way, via PxSceneDesc::sceneQuerySystem.
14110 ///
14111 /// A custom SQ system instance
14112 pub fn phys_PxCreateCustomSceneQuerySystem(sceneQueryUpdateMode: PxSceneQueryUpdateMode, contextID: u64, adapter: *const PxCustomSceneQuerySystemAdapter, usesTreeOfPruners: bool) -> *mut PxCustomSceneQuerySystem;
14113
14114 /// Computes closest polygon of the convex hull geometry for a given impact point
14115 /// and impact direction. When doing sweeps against a scene, one might want to delay
14116 /// the rather expensive computation of the hit face index for convexes until it is clear
14117 /// the information is really needed and then use this method to get the corresponding
14118 /// face index.
14119 ///
14120 /// Closest face index of the convex geometry.
14121 pub fn phys_PxFindFaceIndex(convexGeom: *const PxConvexMeshGeometry, geomPose: *const PxTransform, impactPos: *const PxVec3, unitDir: *const PxVec3) -> u32;
14122
14123 /// Sets the sampling radius
14124 ///
14125 /// Returns true if the sampling was successful and false if there was a problem. Usually an internal overflow is the problem for very big meshes or very small sampling radii.
14126 pub fn PxPoissonSampler_setSamplingRadius_mut(self_: *mut PxPoissonSampler, samplingRadius: f32) -> bool;
14127
14128 /// Adds new Poisson Samples inside the sphere specified
14129 pub fn PxPoissonSampler_addSamplesInSphere_mut(self_: *mut PxPoissonSampler, sphereCenter: *const PxVec3, sphereRadius: f32, createVolumeSamples: bool);
14130
14131 /// Adds new Poisson Samples inside the box specified
14132 pub fn PxPoissonSampler_addSamplesInBox_mut(self_: *mut PxPoissonSampler, axisAlignedBox: *const PxBounds3, boxOrientation: *const PxQuat, createVolumeSamples: bool);
14133
14134 pub fn PxPoissonSampler_delete(self_: *mut PxPoissonSampler);
14135
14136 /// Creates a shape sampler
14137 ///
14138 /// Returns the sampler
14139 pub fn phys_PxCreateShapeSampler(geometry: *const PxGeometry, transform: *const PxTransform, worldBounds: *const PxBounds3, initialSamplingRadius: f32, numSampleAttemptsAroundPoint: i32) -> *mut PxPoissonSampler;
14140
14141 /// Checks whether a point is inside the triangle mesh
14142 ///
14143 /// Returns true if the point is inside the triangle mesh
14144 pub fn PxTriangleMeshPoissonSampler_isPointInTriangleMesh_mut(self_: *mut PxTriangleMeshPoissonSampler, p: *const PxVec3) -> bool;
14145
14146 pub fn PxTriangleMeshPoissonSampler_delete(self_: *mut PxTriangleMeshPoissonSampler);
14147
14148 /// Creates a triangle mesh sampler
14149 ///
14150 /// Returns the sampler
14151 pub fn phys_PxCreateTriangleMeshSampler(triangles: *const u32, numTriangles: u32, vertices: *const PxVec3, numVertices: u32, initialSamplingRadius: f32, numSampleAttemptsAroundPoint: i32) -> *mut PxTriangleMeshPoissonSampler;
14152
14153 /// Returns the index of the tetrahedron that contains a point
14154 ///
14155 /// The index of the tetrahedon containing the point, -1 if not tetrahedron contains the opoint
14156 pub fn PxTetrahedronMeshExt_findTetrahedronContainingPoint(mesh: *const PxTetrahedronMesh, point: *const PxVec3, bary: *mut PxVec4, tolerance: f32) -> i32;
14157
14158 /// Returns the index of the tetrahedron closest to a point
14159 ///
14160 /// The index of the tetrahedon closest to the point
14161 pub fn PxTetrahedronMeshExt_findTetrahedronClosestToPoint(mesh: *const PxTetrahedronMesh, point: *const PxVec3, bary: *mut PxVec4) -> i32;
14162
14163 /// Initialize the PhysXExtensions library.
14164 ///
14165 /// This should be called before calling any functions or methods in extensions which may require allocation.
14166 ///
14167 /// This function does not need to be called before creating a PxDefaultAllocator object.
14168 pub fn phys_PxInitExtensions(physics: *mut PxPhysics, pvd: *mut PxPvd) -> bool;
14169
14170 /// Shut down the PhysXExtensions library.
14171 ///
14172 /// This function should be called to cleanly shut down the PhysXExtensions library before application exit.
14173 ///
14174 /// This function is required to be called to release foundation usage.
14175 pub fn phys_PxCloseExtensions();
14176
14177 pub fn PxRepXObject_new(inTypeName: *const std::ffi::c_char, inSerializable: *const std::ffi::c_void, inId: u64) -> PxRepXObject;
14178
14179 pub fn PxRepXObject_isValid(self_: *const PxRepXObject) -> bool;
14180
14181 pub fn PxRepXInstantiationArgs_new(inPhysics: *mut PxPhysics, inCooking: *mut PxCooking, inStringTable: *mut PxStringTable) -> PxRepXInstantiationArgs;
14182
14183 /// The type this Serializer is meant to operate on.
14184 pub fn PxRepXSerializer_getTypeName_mut(self_: *mut PxRepXSerializer) -> *const std::ffi::c_char;
14185
14186 /// Convert from a RepX object to a key-value pair hierarchy
14187 pub fn PxRepXSerializer_objectToFile_mut(self_: *mut PxRepXSerializer, inLiveObject: *const PxRepXObject, inCollection: *mut PxCollection, inWriter: *mut XmlWriter, inTempBuffer: *mut MemoryBuffer, inArgs: *mut PxRepXInstantiationArgs);
14188
14189 /// Convert from a descriptor to a live object. Must be an object of this Serializer type.
14190 ///
14191 /// The new live object. It can be an invalid object if the instantiation cannot take place.
14192 pub fn PxRepXSerializer_fileToObject_mut(self_: *mut PxRepXSerializer, inReader: *mut XmlReader, inAllocator: *mut XmlMemoryAllocator, inArgs: *mut PxRepXInstantiationArgs, inCollection: *mut PxCollection) -> PxRepXObject;
14193
14194 /// Connects the SDK to the PhysX Visual Debugger application.
14195 pub fn PxPvd_connect_mut(self_: *mut PxPvd, transport: *mut PxPvdTransport, flags: PxPvdInstrumentationFlags) -> bool;
14196
14197 /// Disconnects the SDK from the PhysX Visual Debugger application.
14198 /// If we are still connected, this will kill the entire debugger connection.
14199 pub fn PxPvd_disconnect_mut(self_: *mut PxPvd);
14200
14201 /// Return if connection to PVD is created.
14202 pub fn PxPvd_isConnected_mut(self_: *mut PxPvd, useCachedStatus: bool) -> bool;
14203
14204 /// returns the PVD data transport
14205 /// returns NULL if no transport is present.
14206 pub fn PxPvd_getTransport_mut(self_: *mut PxPvd) -> *mut PxPvdTransport;
14207
14208 /// Retrieves the PVD flags. See PxPvdInstrumentationFlags.
14209 pub fn PxPvd_getInstrumentationFlags_mut(self_: *mut PxPvd) -> PxPvdInstrumentationFlags;
14210
14211 /// Releases the pvd instance.
14212 pub fn PxPvd_release_mut(self_: *mut PxPvd);
14213
14214 /// Create a pvd instance.
14215 pub fn phys_PxCreatePvd(foundation: *mut PxFoundation) -> *mut PxPvd;
14216
14217 /// Connects to the Visual Debugger application.
14218 /// return True if success
14219 pub fn PxPvdTransport_connect_mut(self_: *mut PxPvdTransport) -> bool;
14220
14221 /// Disconnects from the Visual Debugger application.
14222 /// If we are still connected, this will kill the entire debugger connection.
14223 pub fn PxPvdTransport_disconnect_mut(self_: *mut PxPvdTransport);
14224
14225 /// Return if connection to PVD is created.
14226 pub fn PxPvdTransport_isConnected_mut(self_: *mut PxPvdTransport) -> bool;
14227
14228 /// write bytes to the other endpoint of the connection. should lock before witre. If an error occurs
14229 /// this connection will assume to be dead.
14230 pub fn PxPvdTransport_write_mut(self_: *mut PxPvdTransport, inBytes: *const u8, inLength: u32) -> bool;
14231
14232 pub fn PxPvdTransport_lock_mut(self_: *mut PxPvdTransport) -> *mut PxPvdTransport;
14233
14234 pub fn PxPvdTransport_unlock_mut(self_: *mut PxPvdTransport);
14235
14236 /// send any data and block until we know it is at least on the wire.
14237 pub fn PxPvdTransport_flush_mut(self_: *mut PxPvdTransport);
14238
14239 /// Return size of written data.
14240 pub fn PxPvdTransport_getWrittenDataSize_mut(self_: *mut PxPvdTransport) -> u64;
14241
14242 pub fn PxPvdTransport_release_mut(self_: *mut PxPvdTransport);
14243
14244 /// Create a default socket transport.
14245 pub fn phys_PxDefaultPvdSocketTransportCreate(host: *const std::ffi::c_char, port: i32, timeoutInMilliseconds: u32) -> *mut PxPvdTransport;
14246
14247 /// Create a default file transport.
14248 pub fn phys_PxDefaultPvdFileTransportCreate(name: *const std::ffi::c_char) -> *mut PxPvdTransport;
14249
14250}