Skip to main content

boxddd_sys/
bindings_pregenerated.rs

1// AUTOGENERATED: pregenerated Box3D bindings for docs.rs/offline builds
2// To refresh, run tools/update_box3d_and_bindings.py generate --mode default
3
4/* automatically generated by rust-bindgen 0.72.1 */
5
6pub const B3_DEFAULT_CATEGORY_BITS: u64 = u64::MAX;
7pub const B3_DEFAULT_MASK_BITS: u64 = u64::MAX;
8
9#[repr(C)]
10#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
11pub struct __BindgenBitfieldUnit<Storage> {
12    storage: Storage,
13}
14impl<Storage> __BindgenBitfieldUnit<Storage> {
15    #[inline]
16    pub const fn new(storage: Storage) -> Self {
17        Self { storage }
18    }
19}
20impl<Storage> __BindgenBitfieldUnit<Storage>
21where
22    Storage: AsRef<[u8]> + AsMut<[u8]>,
23{
24    #[inline]
25    fn extract_bit(byte: u8, index: usize) -> bool {
26        let bit_index = if cfg!(target_endian = "big") {
27            7 - (index % 8)
28        } else {
29            index % 8
30        };
31        let mask = 1 << bit_index;
32        byte & mask == mask
33    }
34    #[inline]
35    pub fn get_bit(&self, index: usize) -> bool {
36        debug_assert!(index / 8 < self.storage.as_ref().len());
37        let byte_index = index / 8;
38        let byte = self.storage.as_ref()[byte_index];
39        Self::extract_bit(byte, index)
40    }
41    #[inline]
42    pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
43        debug_assert!(index / 8 < core::mem::size_of::<Storage>());
44        let byte_index = index / 8;
45        let byte = unsafe {
46            *(core::ptr::addr_of!((*this).storage) as *const u8)
47                .offset(byte_index as isize)
48        };
49        Self::extract_bit(byte, index)
50    }
51    #[inline]
52    fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
53        let bit_index = if cfg!(target_endian = "big") {
54            7 - (index % 8)
55        } else {
56            index % 8
57        };
58        let mask = 1 << bit_index;
59        if val { byte | mask } else { byte & !mask }
60    }
61    #[inline]
62    pub fn set_bit(&mut self, index: usize, val: bool) {
63        debug_assert!(index / 8 < self.storage.as_ref().len());
64        let byte_index = index / 8;
65        let byte = &mut self.storage.as_mut()[byte_index];
66        *byte = Self::change_bit(*byte, index, val);
67    }
68    #[inline]
69    pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
70        debug_assert!(index / 8 < core::mem::size_of::<Storage>());
71        let byte_index = index / 8;
72        let byte = unsafe {
73            (core::ptr::addr_of_mut!((*this).storage) as *mut u8)
74                .offset(byte_index as isize)
75        };
76        unsafe { *byte = Self::change_bit(*byte, index, val) };
77    }
78    #[inline]
79    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
80        debug_assert!(bit_width <= 64);
81        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
82        debug_assert!(
83            (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),
84        );
85        let mut val = 0;
86        for i in 0..(bit_width as usize) {
87            if self.get_bit(i + bit_offset) {
88                let index = if cfg!(target_endian = "big") {
89                    bit_width as usize - 1 - i
90                } else {
91                    i
92                };
93                val |= 1 << index;
94            }
95        }
96        val
97    }
98    #[inline]
99    pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
100        debug_assert!(bit_width <= 64);
101        debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
102        debug_assert!(
103            (bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>(),
104        );
105        let mut val = 0;
106        for i in 0..(bit_width as usize) {
107            if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
108                let index = if cfg!(target_endian = "big") {
109                    bit_width as usize - 1 - i
110                } else {
111                    i
112                };
113                val |= 1 << index;
114            }
115        }
116        val
117    }
118    #[inline]
119    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
120        debug_assert!(bit_width <= 64);
121        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
122        debug_assert!(
123            (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),
124        );
125        for i in 0..(bit_width as usize) {
126            let mask = 1 << i;
127            let val_bit_is_set = val & mask == mask;
128            let index = if cfg!(target_endian = "big") {
129                bit_width as usize - 1 - i
130            } else {
131                i
132            };
133            self.set_bit(index + bit_offset, val_bit_is_set);
134        }
135    }
136    #[inline]
137    pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
138        debug_assert!(bit_width <= 64);
139        debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
140        debug_assert!(
141            (bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>(),
142        );
143        for i in 0..(bit_width as usize) {
144            let mask = 1 << i;
145            let val_bit_is_set = val & mask == mask;
146            let index = if cfg!(target_endian = "big") {
147                bit_width as usize - 1 - i
148            } else {
149                i
150            };
151            unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
152        }
153    }
154}
155pub const B3_ENABLE_VALIDATION: u32 = 0;
156pub const B3_NULL_INDEX: i32 = -1;
157pub const B3_HASH_INIT: u32 = 5381;
158pub const B3_PI: f64 = 3.14159265359;
159pub const B3_DEG_TO_RAD: f64 = 0.01745329251;
160pub const B3_RAD_TO_DEG: f64 = 57.2957795131;
161pub const B3_MIN_SCALE: f64 = 0.01;
162pub const B3_MAX_WORKERS: u32 = 32;
163pub const B3_MAX_TASKS: u32 = 256;
164pub const B3_GRAPH_COLOR_COUNT: u32 = 24;
165pub const B3_CONTACT_MANIFOLD_COUNT_BUCKETS: u32 = 8;
166pub const B3_MIN_FRICTION_WEIGHT: f64 = 0.0000000001;
167pub const B3_MAX_WORLDS: u32 = 128;
168pub const B3_MAX_ROTATION: f64 = 0.7853981633975;
169pub const B3_CONTACT_RECYCLE_ANGULAR_DISTANCE: f64 = 0.99240388;
170pub const B3_AABB_MARGIN_FRACTION: f64 = 0.125;
171pub const B3_TIME_TO_SLEEP: f64 = 0.5;
172pub const B3_MAX_MANIFOLD_POINTS: u32 = 4;
173pub const B3_MAX_SHAPE_CAST_POINTS: u32 = 64;
174pub const B3_GYROSCOPIC_ITERATIONS: u32 = 1;
175pub const B3_MAX_HULL_VERTICES: u32 = 128;
176pub const B3_MAX_HULL_FACES: u32 = 128;
177pub const B3_MAX_HULL_EDGES: u32 = 128;
178pub const B3_PARALLEL_EDGE_TOL: f64 = 0.005;
179pub const B3_SHAPE_POWER: u32 = 22;
180pub const B3_CHILD_POWER: u32 = 20;
181pub const B3_MAX_SHAPES: u32 = 4194304;
182pub const B3_MAX_CHILD_SHAPES: u32 = 1048576;
183pub const B3_RESTITUTION_ITERATIONS: u32 = 1;
184pub const B3_DYNAMIC_TREE_VERSION: i64 = -7787375179321898166;
185pub const B3_HULL_VERSION: i64 = -2715301031560262655;
186pub const B3_MESH_VERSION: i64 = -6066037853393090451;
187pub const B3_HEIGHT_FIELD_HOLE: u32 = 255;
188pub const B3_HEIGHT_FIELD_VERSION: i64 = -8423759003537458044;
189pub const B3_COMPOUND_VERSION: u64 = 6012353156626885901;
190pub const B3_MAX_COMPOUND_MESH_MATERIALS: u32 = 4;
191/** Prototype for user allocation function.
192	@param size the allocation size in bytes
193	@param alignment the required alignment, guaranteed to be a power of 2*/
194pub type b3AllocFcn = ::std::option::Option<
195    unsafe extern "C" fn(size: i32, alignment: i32) -> *mut ::std::os::raw::c_void,
196>;
197/** Prototype for user free function.
198	@param mem the memory previously allocated through `b3AllocFcn`*/
199pub type b3FreeFcn = ::std::option::Option<
200    unsafe extern "C" fn(mem: *mut ::std::os::raw::c_void),
201>;
202/// Prototype for the user assert callback. Return 0 to skip the debugger break.
203pub type b3AssertFcn = ::std::option::Option<
204    unsafe extern "C" fn(
205        condition: *const ::std::os::raw::c_char,
206        fileName: *const ::std::os::raw::c_char,
207        lineNumber: ::std::os::raw::c_int,
208    ) -> ::std::os::raw::c_int,
209>;
210/// Prototype for user log callback. Used to log warnings.
211pub type b3LogFcn = ::std::option::Option<
212    unsafe extern "C" fn(message: *const ::std::os::raw::c_char),
213>;
214unsafe extern "C" {
215    /** This allows the user to override the allocation functions. These should be
216	set during application startup.*/
217    pub fn b3SetAllocator(allocFcn: b3AllocFcn, freeFcn: b3FreeFcn);
218}
219unsafe extern "C" {
220    /// Total bytes allocated by Box3D
221    pub fn b3GetByteCount() -> ::std::os::raw::c_int;
222}
223unsafe extern "C" {
224    /** Override the default assert callback.
225	@param assertFcn a non-null assert callback*/
226    pub fn b3SetAssertFcn(assertFcn: b3AssertFcn);
227}
228unsafe extern "C" {
229    /// Internal assertion handler. Allows for host intervention.
230    pub fn b3InternalAssert(
231        condition: *const ::std::os::raw::c_char,
232        fileName: *const ::std::os::raw::c_char,
233        lineNumber: ::std::os::raw::c_int,
234    ) -> ::std::os::raw::c_int;
235}
236unsafe extern "C" {
237    /// Override the default logging callback.
238    pub fn b3SetLogFcn(logFcn: b3LogFcn);
239}
240#[doc = " Version numbering scheme.\n See https://semver.org/"]
241#[repr(C)]
242#[derive(Debug, Copy, Clone)]
243pub struct b3Version {
244    /// Significant changes
245    pub major: ::std::os::raw::c_int,
246    /// Incremental changes
247    pub minor: ::std::os::raw::c_int,
248    /// Bug fixes
249    pub revision: ::std::os::raw::c_int,
250}
251unsafe extern "C" {
252    /// Get the current version of Box3D
253    pub fn b3GetVersion() -> b3Version;
254}
255unsafe extern "C" {
256    /// @return true if the library was built with BOX3D_DOUBLE_PRECISION (large world mode)
257    pub fn b3IsDoublePrecision() -> bool;
258}
259unsafe extern "C" {
260    /// Get the absolute number of system ticks. The value is platform specific.
261    pub fn b3GetTicks() -> u64;
262}
263unsafe extern "C" {
264    /// Get the milliseconds passed from an initial tick value.
265    pub fn b3GetMilliseconds(ticks: u64) -> f32;
266}
267unsafe extern "C" {
268    /// Get the milliseconds passed from an initial tick value.
269    pub fn b3GetMillisecondsAndReset(ticks: *mut u64) -> f32;
270}
271unsafe extern "C" {
272    /// Yield to be used in a busy loop.
273    pub fn b3Yield();
274}
275unsafe extern "C" {
276    /// Sleep the current thread for a number of milliseconds.
277    pub fn b3Sleep(milliseconds: ::std::os::raw::c_int);
278}
279unsafe extern "C" {
280    pub fn b3Hash(hash: u32, data: *const u8, count: ::std::os::raw::c_int) -> u32;
281}
282/// A 2D vector.
283#[repr(C)]
284#[derive(Debug, Copy, Clone)]
285pub struct b3Vec2 {
286    pub x: f32,
287    pub y: f32,
288}
289/// A 3D vector.
290#[repr(C)]
291#[derive(Debug, Copy, Clone)]
292pub struct b3Vec3 {
293    pub x: f32,
294    pub y: f32,
295    pub z: f32,
296}
297/** Cosine and sine pair.
298 This uses a custom implementation designed for cross-platform determinism.*/
299#[repr(C)]
300#[derive(Debug, Copy, Clone)]
301pub struct b3CosSin {
302    /// cosine and sine
303    pub cosine: f32,
304    pub sine: f32,
305}
306/// A quaternion.
307#[repr(C)]
308#[derive(Debug, Copy, Clone)]
309pub struct b3Quat {
310    pub v: b3Vec3,
311    pub s: f32,
312}
313/// A rigid transform.
314#[repr(C)]
315#[derive(Debug, Copy, Clone)]
316pub struct b3Transform {
317    pub p: b3Vec3,
318    pub q: b3Quat,
319}
320/// In single precision mode these types are the same.
321pub type b3Pos = b3Vec3;
322/// In single precision mode these types are the same.
323pub type b3WorldTransform = b3Transform;
324/// A 3x3 matrix.
325#[repr(C)]
326#[derive(Debug, Copy, Clone)]
327pub struct b3Matrix3 {
328    pub cx: b3Vec3,
329    pub cy: b3Vec3,
330    pub cz: b3Vec3,
331}
332/// Axis aligned bounding box.
333#[repr(C)]
334#[derive(Debug, Copy, Clone)]
335pub struct b3AABB {
336    pub lowerBound: b3Vec3,
337    pub upperBound: b3Vec3,
338}
339/** A plane.
340 separation = dot(normal, point) - offset*/
341#[repr(C)]
342#[derive(Debug, Copy, Clone)]
343pub struct b3Plane {
344    pub normal: b3Vec3,
345    pub offset: f32,
346}
347unsafe extern "C" {
348    /** Compute an approximate arctangent in the range [-pi, pi]
349 This is hand coded for cross-platform determinism. The atan2f
350 function in the standard library is not cross-platform deterministic.
351	Accurate to around 0.0023 degrees.*/
352    pub fn b3Atan2(y: f32, x: f32) -> f32;
353}
354unsafe extern "C" {
355    /** Compute the cosine and sine of an angle in radians. Implemented
356 for cross-platform determinism.*/
357    pub fn b3ComputeCosSin(radians: f32) -> b3CosSin;
358}
359unsafe extern "C" {
360    /// Extract a quaternion from a rotation matrix.
361    pub fn b3MakeQuatFromMatrix(m: *const b3Matrix3) -> b3Quat;
362}
363unsafe extern "C" {
364    /// Find a quaternion that rotates one vector to another.
365    pub fn b3ComputeQuatBetweenUnitVectors(v1: b3Vec3, v2: b3Vec3) -> b3Quat;
366}
367unsafe extern "C" {
368    /** Get the inertia tensor of an offset point.
369 https://en.wikipedia.org/wiki/Parallel_axis_theorem*/
370    pub fn b3Steiner(mass: f32, origin: b3Vec3) -> b3Matrix3;
371}
372/// The closest points between to segments or infinite lines.
373#[repr(C)]
374#[derive(Debug, Copy, Clone)]
375pub struct b3SegmentDistanceResult {
376    pub point1: b3Vec3,
377    pub fraction1: f32,
378    pub point2: b3Vec3,
379    pub fraction2: f32,
380}
381unsafe extern "C" {
382    /// Compute the closest point on the segment a-b to the target q.
383    pub fn b3PointToSegmentDistance(a: b3Vec3, b: b3Vec3, q: b3Vec3) -> b3Vec3;
384}
385unsafe extern "C" {
386    /// Compute the closest points on two infinite lines.
387    pub fn b3LineDistance(
388        p1: b3Vec3,
389        d1: b3Vec3,
390        p2: b3Vec3,
391        d2: b3Vec3,
392    ) -> b3SegmentDistanceResult;
393}
394unsafe extern "C" {
395    /// Compute the closest points on two line segments.
396    pub fn b3SegmentDistance(
397        p1: b3Vec3,
398        q1: b3Vec3,
399        p2: b3Vec3,
400        q2: b3Vec3,
401    ) -> b3SegmentDistanceResult;
402}
403unsafe extern "C" {
404    /// Is this a valid number? Not NaN or infinity.
405    pub fn b3IsValidFloat(a: f32) -> bool;
406}
407unsafe extern "C" {
408    /// Is this a valid vector? Not NaN or infinity.
409    pub fn b3IsValidVec3(a: b3Vec3) -> bool;
410}
411unsafe extern "C" {
412    /// Is this a valid quaternion? Not NaN or infinity. Is normalized.
413    pub fn b3IsValidQuat(q: b3Quat) -> bool;
414}
415unsafe extern "C" {
416    /// Is this a valid transform? Not NaN or infinity. Is normalized.
417    pub fn b3IsValidTransform(a: b3Transform) -> bool;
418}
419unsafe extern "C" {
420    /// Is this a valid matrix? Not NaN or infinity.
421    pub fn b3IsValidMatrix3(a: b3Matrix3) -> bool;
422}
423unsafe extern "C" {
424    /// Is this a valid bounding box? Not Nan or infinity. Upper bound greater than or equal to lower bound.
425    pub fn b3IsValidAABB(a: b3AABB) -> bool;
426}
427unsafe extern "C" {
428    /// Is this AABB reasonably close to the origin? See B3_HUGE.
429    pub fn b3IsBoundedAABB(a: b3AABB) -> bool;
430}
431unsafe extern "C" {
432    /// Is this AABB valid and reasonable?
433    pub fn b3IsSaneAABB(a: b3AABB) -> bool;
434}
435unsafe extern "C" {
436    /// Is this a valid plane? Normal is a unit vector. Not Nan or infinity.
437    pub fn b3IsValidPlane(a: b3Plane) -> bool;
438}
439unsafe extern "C" {
440    /// Is this a valid world position? Not NaN or infinity.
441    pub fn b3IsValidPosition(p: b3Pos) -> bool;
442}
443unsafe extern "C" {
444    /// Is this a valid world transform? Not NaN or infinity. Rotation is normalized.
445    pub fn b3IsValidWorldTransform(t: b3WorldTransform) -> bool;
446}
447unsafe extern "C" {
448    /** Box3D bases all length units on meters, but you may need different units for your game.
449 You can set this value to use different units. This should be done at application startup
450 and only modified once. Default value is 1.
451 @warning This must be modified before any calls to Box3D*/
452    pub fn b3SetLengthUnitsPerMeter(lengthUnits: f32);
453}
454unsafe extern "C" {
455    /// Get the current length units per meter.
456    pub fn b3GetLengthUnitsPerMeter() -> f32;
457}
458unsafe extern "C" {
459    /// Set the threshold for logging stalls.
460    pub fn b3SetStallThreshold(seconds: f32);
461}
462unsafe extern "C" {
463    /// Get the threshold for logging stalls.
464    pub fn b3GetStallThreshold() -> f32;
465}
466/// World id references a world instance. This should be treated as an opaque handle.
467#[repr(C)]
468#[derive(Debug, Copy, Clone)]
469pub struct b3WorldId {
470    pub index1: u16,
471    pub generation: u16,
472}
473/// Body id references a body instance. This should be treated as an opaque handle.
474#[repr(C)]
475#[derive(Debug, Copy, Clone)]
476pub struct b3BodyId {
477    pub index1: i32,
478    pub world0: u16,
479    pub generation: u16,
480}
481/// Shape id references a shape instance. This should be treated as an opaque handle.
482#[repr(C)]
483#[derive(Debug, Copy, Clone)]
484pub struct b3ShapeId {
485    pub index1: i32,
486    pub world0: u16,
487    pub generation: u16,
488}
489/// Joint id references a joint instance. This should be treated as an opaque handle.
490#[repr(C)]
491#[derive(Debug, Copy, Clone)]
492pub struct b3JointId {
493    pub index1: i32,
494    pub world0: u16,
495    pub generation: u16,
496}
497/// Contact id references a contact instance. This should be treated as an opaque handle.
498#[repr(C)]
499#[derive(Debug, Copy, Clone)]
500pub struct b3ContactId {
501    pub index1: i32,
502    pub world0: u16,
503    pub padding: i16,
504    pub generation: u32,
505}
506/** Task interface
507 This is the prototype for a Box3D task. Your task system is expected to run this callback on a worker thread,
508 exactly once per enqueue, passing back the same taskContext pointer supplied to b3EnqueueTaskCallback.
509 @ingroup world*/
510pub type b3TaskCallback = ::std::option::Option<
511    unsafe extern "C" fn(taskContext: *mut ::std::os::raw::c_void),
512>;
513/** These functions can be provided to Box3D to invoke a task system.
514 Returns a pointer to the user's task object. May be nullptr. A nullptr indicates to Box3D that the work was executed
515 serially within the callback and there is no need to call b3FinishTaskCallback. Otherwise the returned
516 value must be non-null will be passed to b3FinishTaskCallback as the userTask.
517 @param task the Box3D task to be called by the scheduler
518 @param taskContext the Box3D context object that the scheduler must pass to the task
519 @param userContext the scheduler context object that is opaque to Box3D
520 @param taskName the Box3D task name that the scheduler can use for diagnostics
521 @ingroup world*/
522pub type b3EnqueueTaskCallback = ::std::option::Option<
523    unsafe extern "C" fn(
524        task: b3TaskCallback,
525        taskContext: *mut ::std::os::raw::c_void,
526        userContext: *mut ::std::os::raw::c_void,
527        taskName: *const ::std::os::raw::c_char,
528    ) -> *mut ::std::os::raw::c_void,
529>;
530/** Finishes a user task object that wraps a Box3D task. This must block until the task has completed.
531 The step blocks here on the tasks it spawned, so b3World_Step holds its stack across every
532 fork/join. Drive it from a thread you can dedicate to the step, or from a fiber this callback can
533 park to free the underlying thread. In a job system that cannot park a job's stack, do not call
534 b3World_Step from inside a job: a job that blocks on its own sub-jobs without yielding its thread
535 can deadlock. The in-tree scheduler instead runs other pending tasks on the waiting thread.
536 @ingroup world*/
537pub type b3FinishTaskCallback = ::std::option::Option<
538    unsafe extern "C" fn(
539        userTask: *mut ::std::os::raw::c_void,
540        userContext: *mut ::std::os::raw::c_void,
541    ),
542>;
543/** The user needs to be able to create debug draw shapes for multi-pass rendering to work efficiently.
544 These user shapes are created and destroyed via callback so they can be bound to shape lifetime and scaling updates.
545 @ingroup debug_draw*/
546pub type b3CreateDebugShapeCallback = ::std::option::Option<
547    unsafe extern "C" fn(
548        debugShape: *const b3DebugShape,
549        userContext: *mut ::std::os::raw::c_void,
550    ) -> *mut ::std::os::raw::c_void,
551>;
552pub type b3DestroyDebugShapeCallback = ::std::option::Option<
553    unsafe extern "C" fn(
554        userShape: *mut ::std::os::raw::c_void,
555        userContext: *mut ::std::os::raw::c_void,
556    ),
557>;
558/** Optional friction mixing callback. This intentionally provides no context objects because this is called
559 from a worker thread.
560 @warning This function should not attempt to modify Box3D state or user application state.
561 @ingroup world*/
562pub type b3FrictionCallback = ::std::option::Option<
563    unsafe extern "C" fn(
564        frictionA: f32,
565        userMaterialIdA: u64,
566        frictionB: f32,
567        userMaterialIdB: u64,
568    ) -> f32,
569>;
570/** Optional restitution mixing callback. This intentionally provides no context objects because this is called
571 from a worker thread.
572 @warning This function should not attempt to modify Box3D state or user application state.
573 @ingroup world*/
574pub type b3RestitutionCallback = ::std::option::Option<
575    unsafe extern "C" fn(
576        restitutionA: f32,
577        userMaterialIdA: u64,
578        restitutionB: f32,
579        userMaterialIdB: u64,
580    ) -> f32,
581>;
582/** Prototype for a contact filter callback.
583 This is called when a contact pair is considered for collision. This allows you to
584 perform custom logic to prevent collision between shapes. This is only called if
585 one of the two shapes has custom filtering enabled. @see b3ShapeDef.
586 Notes:
587 - this function must be thread-safe
588 - this is only called if one of the two shapes has enabled custom filtering
589 - this is called only for awake dynamic bodies
590 Return false if you want to disable the collision
591 @warning Do not attempt to modify the world inside this callback
592 @ingroup world*/
593pub type b3CustomFilterFcn = ::std::option::Option<
594    unsafe extern "C" fn(
595        shapeIdA: b3ShapeId,
596        shapeIdB: b3ShapeId,
597        context: *mut ::std::os::raw::c_void,
598    ) -> bool,
599>;
600/** Prototype for a pre-solve callback.
601 This is called after a contact is updated. This allows you to inspect a
602 collision before it goes to the solver.
603 Notes:
604 - this function must be thread-safe
605 - this is only called if the shape has enabled pre-solve events
606 - this may be called for awake dynamic bodies and sensors
607 - this is not called for sensors
608 Return false if you want to disable the contact this step
609 This has limited information because it is used during CCD which does not have the
610 full contact manifold.
611 @warning Do not attempt to modify the world inside this callback
612 @ingroup world*/
613pub type b3PreSolveFcn = ::std::option::Option<
614    unsafe extern "C" fn(
615        shapeIdA: b3ShapeId,
616        shapeIdB: b3ShapeId,
617        point: b3Pos,
618        normal: b3Vec3,
619        context: *mut ::std::os::raw::c_void,
620    ) -> bool,
621>;
622/** Prototype callback for overlap queries.
623 Called for each shape found in the query.
624 @see b3World_OverlapAABB
625 @return false to terminate the query.
626 @ingroup world*/
627pub type b3OverlapResultFcn = ::std::option::Option<
628    unsafe extern "C" fn(
629        shapeId: b3ShapeId,
630        context: *mut ::std::os::raw::c_void,
631    ) -> bool,
632>;
633/** Prototype callback for ray casts.
634 Called for each shape found in the query. You control how the ray cast
635 proceeds by returning a float:
636 return -1: ignore this shape and continue
637 return 0: terminate the ray cast
638 return fraction: clip the ray to this point
639 return 1: don't clip the ray and continue
640 @param shapeId the shape hit by the ray
641 @param point the point of initial intersection
642 @param normal the normal vector at the point of intersection
643 @param fraction the fraction along the ray at the point of intersection
644 @param userMaterialId the shape or triangle surface type
645 @param triangleIndex the triangle index for mesh or height field shapes or -1 for other shape types
646 @param childIndex the child shape index for compound shapes
647 @param context the user context
648 @return -1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue
649 @see b3World_CastRay
650 @ingroup world*/
651pub type b3CastResultFcn = ::std::option::Option<
652    unsafe extern "C" fn(
653        shapeId: b3ShapeId,
654        point: b3Pos,
655        normal: b3Vec3,
656        fraction: f32,
657        userMaterialId: u64,
658        triangleIndex: ::std::os::raw::c_int,
659        childIndex: ::std::os::raw::c_int,
660        context: *mut ::std::os::raw::c_void,
661    ) -> f32,
662>;
663/** Optional world capacities that can be use to avoid run-time allocations
664 @ingroup world*/
665#[repr(C)]
666#[derive(Debug, Copy, Clone)]
667pub struct b3Capacity {
668    /// Number of expected static shapes.
669    pub staticShapeCount: ::std::os::raw::c_int,
670    /// Number of expected dynamic and kinematic shapes.
671    pub dynamicShapeCount: ::std::os::raw::c_int,
672    /// Number of expected static bodies.
673    pub staticBodyCount: ::std::os::raw::c_int,
674    /// Number of expected dynamic and kinematic bodies.
675    pub dynamicBodyCount: ::std::os::raw::c_int,
676    /// Number of expected contacts.
677    pub contactCount: ::std::os::raw::c_int,
678}
679/** World definition used to create a simulation world. Must be initialized using b3DefaultWorldDef.
680 @ingroup world*/
681#[repr(C)]
682#[derive(Debug, Copy, Clone)]
683pub struct b3WorldDef {
684    /// Gravity vector. Box3D has no up-vector defined.
685    pub gravity: b3Vec3,
686    /** Restitution speed threshold, usually in m/s. Collisions above this
687 speed have restitution applied (will bounce).*/
688    pub restitutionThreshold: f32,
689    /** Hit event speed threshold, usually in m/s. Collisions above this
690 speed can generate hit events if the shape also enables hit events.*/
691    pub hitEventThreshold: f32,
692    /// Contact stiffness. Cycles per second. Increasing this increases the speed of overlap recovery, but can introduce jitter.
693    pub contactHertz: f32,
694    /** Contact bounciness. Non-dimensional. You can speed up overlap recovery by decreasing this with
695 the trade-off that overlap resolution becomes more energetic.*/
696    pub contactDampingRatio: f32,
697    /** This parameter controls how fast overlap is resolved and usually has units of meters per second. This only
698 puts a cap on the resolution speed. The resolution speed is increased by increasing the hertz and/or
699 decreasing the damping ratio.*/
700    pub contactSpeed: f32,
701    /// Maximum linear speed. Usually meters per second.
702    pub maximumLinearSpeed: f32,
703    /// Optional mixing callback for friction. The default uses sqrt(frictionA * frictionB).
704    pub frictionCallback: b3FrictionCallback,
705    /// Optional mixing callback for restitution. The default uses max(restitutionA, restitutionB).
706    pub restitutionCallback: b3RestitutionCallback,
707    /// Can bodies go to sleep to improve performance
708    pub enableSleep: bool,
709    /// Enable continuous collision
710    pub enableContinuous: bool,
711    /** Number of workers to use with the provided task system. Box3D performs best when using only
712 performance cores and accessing a single L2 cache. Efficiency cores and hyper-threading provide
713 little benefit and may even harm performance.
714 This is clamped to the range [1, B3_MAX_WORKERS]. Using a value above 1 will turn on multithreading.
715 If task callbacks are provided then Box3D will use the user provided task system. Otherwise Box3D
716 will create threads and use an internal scheduler.*/
717    pub workerCount: u32,
718    /// function to spawn task
719    pub enqueueTask: b3EnqueueTaskCallback,
720    /// function to finish a task
721    pub finishTask: b3FinishTaskCallback,
722    /// User context that is provided to enqueueTask and finishTask
723    pub userTaskContext: *mut ::std::os::raw::c_void,
724    /// User data associated with a world
725    pub userData: *mut ::std::os::raw::c_void,
726    /** Used to create debug draw shapes. This is called when a shape is
727 first drawn using b3DebugDraw.*/
728    pub createDebugShape: b3CreateDebugShapeCallback,
729    /// Used to destroy debug draw shapes. This is called when a shape is modified or destroyed.
730    pub destroyDebugShape: b3DestroyDebugShapeCallback,
731    /// This is passed to the debug shape callbacks to provide a user context.
732    pub userDebugShapeContext: *mut ::std::os::raw::c_void,
733    /// Optional initial capacities
734    pub capacity: b3Capacity,
735    /// Used internally to detect a valid definition. DO NOT SET.
736    pub internalValue: ::std::os::raw::c_int,
737}
738unsafe extern "C" {
739    /** Use this to initialize your world definition
740 @ingroup world*/
741    pub fn b3DefaultWorldDef() -> b3WorldDef;
742}
743/// zero mass, zero velocity, may be manually moved
744pub const b3BodyType_b3_staticBody: b3BodyType = 0;
745/// zero mass, velocity set by user, moved by solver
746pub const b3BodyType_b3_kinematicBody: b3BodyType = 1;
747/// positive mass, velocity determined by forces, moved by solver
748pub const b3BodyType_b3_dynamicBody: b3BodyType = 2;
749/// number of body types
750pub const b3BodyType_b3_bodyTypeCount: b3BodyType = 3;
751/** The body simulation type.
752 Each body is one of these three types. The type determines how the body behaves in the simulation.
753 @ingroup body*/
754pub type b3BodyType = ::std::os::raw::c_uint;
755/** Motion locks to restrict the body movement
756 @ingroup body*/
757#[repr(C)]
758#[derive(Debug, Copy, Clone)]
759pub struct b3MotionLocks {
760    /// Prevent translation along the x-axis
761    pub linearX: bool,
762    /// Prevent translation along the y-axis
763    pub linearY: bool,
764    /// Prevent translation along the z-axis
765    pub linearZ: bool,
766    /// Prevent rotation around the x-axis
767    pub angularX: bool,
768    /// Prevent rotation around the y-axis
769    pub angularY: bool,
770    /// Prevent rotation around the z-axis
771    pub angularZ: bool,
772}
773/** A body definition holds all the data needed to construct a rigid body.
774 You can safely re-use body definitions. Shapes are added to a body after construction.
775 Body definitions are temporary objects used to bundle creation parameters.
776 Must be initialized using b3DefaultBodyDef().
777 @ingroup body*/
778#[repr(C)]
779#[derive(Debug, Copy, Clone)]
780pub struct b3BodyDef {
781    /// The body type: static, kinematic, or dynamic.
782    pub type_: b3BodyType,
783    /** The initial world position of the body. Bodies should be created with the desired position.
784 @note Creating bodies at the origin and then moving them nearly doubles the cost of body creation, especially
785 if the body is moved after shapes have been added.*/
786    pub position: b3Pos,
787    /// The initial world rotation of the body.
788    pub rotation: b3Quat,
789    /// The initial linear velocity of the body's origin. Usually in meters per second.
790    pub linearVelocity: b3Vec3,
791    /// The initial angular velocity of the body. Radians per second.
792    pub angularVelocity: b3Vec3,
793    /** Linear damping is used to reduce the linear velocity. The damping parameter
794 can be larger than 1 but the damping effect becomes sensitive to the
795 time step when the damping parameter is large.
796 Generally linear damping is undesirable because it makes objects move slowly
797 as if they are floating.*/
798    pub linearDamping: f32,
799    /** Angular damping is used to reduce the angular velocity. The damping parameter
800 can be larger than 1.0f but the damping effect becomes sensitive to the
801 time step when the damping parameter is large.
802 Angular damping can be used to slow down rotating bodies.*/
803    pub angularDamping: f32,
804    /// Scale the gravity applied to this body. Non-dimensional.
805    pub gravityScale: f32,
806    /// Sleep speed threshold, default is 0.05 meters per second
807    pub sleepThreshold: f32,
808    /// Optional body name for debugging.
809    pub name: *const ::std::os::raw::c_char,
810    /// Use this to store application specific body data.
811    pub userData: *mut ::std::os::raw::c_void,
812    /// Motions locks to restrict linear and angular movement
813    pub motionLocks: b3MotionLocks,
814    /// Set this flag to false if this body should never fall asleep.
815    pub enableSleep: bool,
816    /// Is this body initially awake or sleeping?
817    pub isAwake: bool,
818    /** Treat this body as a high speed object that performs continuous collision detection
819 against dynamic and kinematic bodies, but not other bullet bodies.
820 @warning Bullets should be used sparingly. They are not a solution for general dynamic-versus-dynamic
821 continuous collision. They do not guarantee accurate collision if both bodies are fast moving because
822 the bullet does a continuous check after all non-bullet bodies have moved. You could get unlucky and have
823 the bullet body end a time step very close to a non-bullet body and the non-bullet body then moves over
824 the bullet body. In continuous collision, initial overlap is ignored to avoid freezing bodies in place.
825 I do not recommend using them for game projectiles if precise collision timing is needed. Instead consider
826 using a ray or shape cast. You can use a marching ray or shape cast for projectile that moves over time.
827 If you want a fast moving projectile to collide with a fast moving target, you need to consider the relative
828 movement in your ray or shape cast. This is out of the scope of Box3D.
829 So what are good use cases for bullets? Pinball games or games with dynamic containers that hold other objects.
830 It should be a use case where it doesn't break the game if there is a collision missed, but having them
831 captured improves the quality of the game.*/
832    pub isBullet: bool,
833    /// Used to disable a body. A disabled body does not move or collide.
834    pub isEnabled: bool,
835    /** This allows this body to bypass rotational speed limits. Should only be used
836 for circular objects, like wheels.*/
837    pub allowFastRotation: bool,
838    /** Enable contact recycling. True by default. Leaving this enabled improves performance
839 but may lead to ghost collision that should be avoided on characters.*/
840    pub enableContactRecycling: bool,
841    /// Used internally to detect a valid definition. DO NOT SET.
842    pub internalValue: ::std::os::raw::c_int,
843}
844unsafe extern "C" {
845    /** Use this to initialize your body definition
846 @ingroup body*/
847    pub fn b3DefaultBodyDef() -> b3BodyDef;
848}
849/** This is used to filter collision on shapes. It affects shape-vs-shape collision
850 and shape-versus-query collision (such as b3World_CastRay).
851 @ingroup shape*/
852#[repr(C)]
853#[derive(Debug, Copy, Clone)]
854pub struct b3Filter {
855    /** The collision category bits. Normally you would just set one bit. The category bits should
856 represent your application object types. For example:
857 @code{.cpp}
858 enum MyCategories
859 {
860    Static  = 0x00000001,
861    Dynamic = 0x00000002,
862    Debris  = 0x00000004,
863    Player  = 0x00000008,
864    // etc
865 };
866 @endcode*/
867    pub categoryBits: u64,
868    /** The collision mask bits. This states the categories that this
869 shape would accept for collision.
870 For example, you may want your player to only collide with static objects
871 and other players.
872 @code{.c}
873 maskBits = Static | Player;
874 @endcode*/
875    pub maskBits: u64,
876    /** Collision groups allow a certain group of objects to never collide (negative)
877 or always collide (positive). A group index of zero has no effect. Non-zero group filtering
878 always wins against the mask bits.
879 For example, you may want ragdolls to collide with other ragdolls but you don't want
880 ragdoll self-collision. In this case you would give each ragdoll a unique negative group index
881 and apply that group index to all shapes on the ragdoll.*/
882    pub groupIndex: ::std::os::raw::c_int,
883}
884unsafe extern "C" {
885    /** Use this to initialize your filter
886 @ingroup shape*/
887    pub fn b3DefaultFilter() -> b3Filter;
888}
889/** Material properties supported per triangle on meshes and height fields
890 @ingroup shape*/
891#[repr(C)]
892#[derive(Debug, Copy, Clone)]
893pub struct b3SurfaceMaterial {
894    /// The Coulomb (dry) friction coefficient, usually in the range [0,1].
895    pub friction: f32,
896    /** The coefficient of restitution (bounce) usually in the range [0,1].
897 https://en.wikipedia.org/wiki/Coefficient_of_restitution*/
898    pub restitution: f32,
899    /// The rolling resistance usually in the range [0,1]. This is only used for spheres and capsules.
900    pub rollingResistance: f32,
901    /** The tangent velocity for conveyor belts. This is local to the shape and will be projected
902 onto the contact surface.*/
903    pub tangentVelocity: b3Vec3,
904    /** User material identifier. This is passed with query results and to friction and restitution
905 combining functions. It is not used internally.*/
906    pub userMaterialId: u64,
907    /** Custom debug draw color. Ignored if 0. The low 24 bits are RGB. The high byte may
908 carry a b3DebugMaterial preset, see b3MakeDebugColor.
909 @see b3HexColor*/
910    pub customColor: u32,
911    /// Explicit padding. Must be zero.
912    pub padding: u32,
913}
914unsafe extern "C" {
915    /** Use this to initialize your surface material
916 @ingroup shape*/
917    pub fn b3DefaultSurfaceMaterial() -> b3SurfaceMaterial;
918}
919/// A capsule is an extruded sphere
920pub const b3ShapeType_b3_capsuleShape: b3ShapeType = 0;
921/// A baked compound shape composed of spheres, capsules, hulls, and meshes
922pub const b3ShapeType_b3_compoundShape: b3ShapeType = 1;
923/// A height field useful for terrain
924pub const b3ShapeType_b3_heightShape: b3ShapeType = 2;
925/// A convex hull
926pub const b3ShapeType_b3_hullShape: b3ShapeType = 3;
927/// A triangle soup
928pub const b3ShapeType_b3_meshShape: b3ShapeType = 4;
929/// A sphere with an offset
930pub const b3ShapeType_b3_sphereShape: b3ShapeType = 5;
931/// The number of shape types
932pub const b3ShapeType_b3_shapeTypeCount: b3ShapeType = 6;
933/** Shape type
934 @ingroup shape*/
935pub type b3ShapeType = ::std::os::raw::c_uint;
936/** Used to create a shape
937 @ingroup shape*/
938#[repr(C)]
939#[derive(Debug, Copy, Clone)]
940pub struct b3ShapeDef {
941    /// Optional shape name for debugging
942    pub name: *const ::std::os::raw::c_char,
943    /// Use this to store application specific shape data.
944    pub userData: *mut ::std::os::raw::c_void,
945    /// Surface material used on mesh shapes per triangle. Ignored for convex shapes. Ignored for compound shapes.
946    pub materials: *mut b3SurfaceMaterial,
947    /// Surface material count.
948    pub materialCount: ::std::os::raw::c_int,
949    /// The base surface material. Ignored for compound shapes.
950    pub baseMaterial: b3SurfaceMaterial,
951    /// The density, usually in kg/m^3.
952    pub density: f32,
953    /// Explosion scale for b3World_Explode. non-dimensional
954    pub explosionScale: f32,
955    /// Contact filtering data.
956    pub filter: b3Filter,
957    /// Enable custom filtering. Only one of the two shapes needs to enable custom filtering. See b3WorldDef.
958    pub enableCustomFiltering: bool,
959    /** A sensor shape generates overlap events but never generates a collision response.
960 Sensors do not have continuous collision. Instead, use a ray or shape cast for those scenarios.
961 Sensors still contribute to the body mass if they have non-zero density.
962 @note Sensor events are disabled by default.
963 @see enableSensorEvents*/
964    pub isSensor: bool,
965    /// Enable sensor events for this shape. This applies to sensors and non-sensors. False by default, even for sensors.
966    pub enableSensorEvents: bool,
967    /// Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default.
968    pub enableContactEvents: bool,
969    /// Enable hit events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default.
970    pub enableHitEvents: bool,
971    /** Enable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive
972	and must be carefully handled due to multithreading. Ignored for sensors.*/
973    pub enablePreSolveEvents: bool,
974    /** When shapes are created they will scan the environment for collision the next time step. This can significantly slow down
975 static body creation when there are many static shapes.
976 This is flag is ignored for dynamic and kinematic shapes which always invoke contact creation.*/
977    pub invokeContactCreation: bool,
978    /** Should the body update the mass properties when this shape is created. Default is true.
979 Warning: if this is false, you MUST call b3Body_ApplyMassFromShapes or b3Body_SetMassData before simulating the world.*/
980    pub updateBodyMass: bool,
981    /** Enable speculative collision. Leave this true unless you care about reducing ghost collision
982 more than continuous collision under rotation.
983 Experimental: this can only disable speculative contact between hulls and triangles (meshes and height fields).*/
984    pub enableSpeculativeContact: bool,
985    /// Used internally to detect a valid definition. DO NOT SET.
986    pub internalValue: ::std::os::raw::c_int,
987}
988unsafe extern "C" {
989    /** Use this to initialize your shape definition
990 @ingroup shape*/
991    pub fn b3DefaultShapeDef() -> b3ShapeDef;
992}
993/**! @cond
994 Profiling data. Times are in milliseconds.
995 @ingroup world*/
996#[repr(C)]
997#[derive(Debug, Copy, Clone)]
998pub struct b3Profile {
999    pub step: f32,
1000    pub pairs: f32,
1001    pub collide: f32,
1002    pub solve: f32,
1003    pub solverSetup: f32,
1004    pub constraints: f32,
1005    pub prepareConstraints: f32,
1006    pub integrateVelocities: f32,
1007    pub warmStart: f32,
1008    pub solveImpulses: f32,
1009    pub integratePositions: f32,
1010    pub relaxImpulses: f32,
1011    pub applyRestitution: f32,
1012    pub storeImpulses: f32,
1013    pub splitIslands: f32,
1014    pub transforms: f32,
1015    pub sensorHits: f32,
1016    pub jointEvents: f32,
1017    pub hitEvents: f32,
1018    pub refit: f32,
1019    pub bullets: f32,
1020    pub sleepIslands: f32,
1021    pub sensors: f32,
1022}
1023/** Counters that give details of the simulation size.
1024 @ingroup world*/
1025#[repr(C)]
1026#[derive(Debug, Copy, Clone)]
1027pub struct b3Counters {
1028    pub bodyCount: ::std::os::raw::c_int,
1029    pub shapeCount: ::std::os::raw::c_int,
1030    pub contactCount: ::std::os::raw::c_int,
1031    pub jointCount: ::std::os::raw::c_int,
1032    pub islandCount: ::std::os::raw::c_int,
1033    pub stackUsed: ::std::os::raw::c_int,
1034    pub arenaCapacity: ::std::os::raw::c_int,
1035    pub staticTreeHeight: ::std::os::raw::c_int,
1036    pub treeHeight: ::std::os::raw::c_int,
1037    pub satCallCount: ::std::os::raw::c_int,
1038    pub satCacheHitCount: ::std::os::raw::c_int,
1039    pub byteCount: ::std::os::raw::c_int,
1040    pub taskCount: ::std::os::raw::c_int,
1041    pub colorCounts: [::std::os::raw::c_int; 24usize],
1042    pub manifoldCounts: [::std::os::raw::c_int; 8usize],
1043    /** Number of contacts touched by the collide pass
1044 graph contacts + awake-set non-touching*/
1045    pub awakeContactCount: ::std::os::raw::c_int,
1046    /// Number of contacts recycled in the most recent step.
1047    pub recycledContactCount: ::std::os::raw::c_int,
1048    /// Maximum number of time of impact iterations
1049    pub distanceIterations: ::std::os::raw::c_int,
1050    pub pushBackIterations: ::std::os::raw::c_int,
1051    pub rootIterations: ::std::os::raw::c_int,
1052}
1053pub const b3JointType_b3_parallelJoint: b3JointType = 0;
1054pub const b3JointType_b3_distanceJoint: b3JointType = 1;
1055pub const b3JointType_b3_filterJoint: b3JointType = 2;
1056pub const b3JointType_b3_motorJoint: b3JointType = 3;
1057pub const b3JointType_b3_prismaticJoint: b3JointType = 4;
1058pub const b3JointType_b3_revoluteJoint: b3JointType = 5;
1059pub const b3JointType_b3_sphericalJoint: b3JointType = 6;
1060pub const b3JointType_b3_weldJoint: b3JointType = 7;
1061pub const b3JointType_b3_wheelJoint: b3JointType = 8;
1062/** Joint type enumeration. This is useful because all joint types use b3JointId and sometimes you
1063 want to get the type of a joint.
1064 @ingroup joint*/
1065pub type b3JointType = ::std::os::raw::c_uint;
1066/** Base joint definition used by all joint types. The local frames are measured from the
1067 body's origin rather than the center of mass because:
1068 1. You might not know where the center of mass will be.
1069 2. If you add/remove shapes from a body and recompute the mass, the joints will be broken.
1070 @ingroup joint*/
1071#[repr(C)]
1072#[derive(Debug, Copy, Clone)]
1073pub struct b3JointDef {
1074    /// User data pointer
1075    pub userData: *mut ::std::os::raw::c_void,
1076    /// The first attached body
1077    pub bodyIdA: b3BodyId,
1078    /// The second attached body
1079    pub bodyIdB: b3BodyId,
1080    /// The first local joint frame
1081    pub localFrameA: b3Transform,
1082    /// The second local joint frame
1083    pub localFrameB: b3Transform,
1084    /// Force threshold for joint events
1085    pub forceThreshold: f32,
1086    /// Torque threshold for joint events
1087    pub torqueThreshold: f32,
1088    /// Constraint hertz (advanced feature)
1089    pub constraintHertz: f32,
1090    /// Constraint damping ratio (advanced feature)
1091    pub constraintDampingRatio: f32,
1092    /// Debug draw scale
1093    pub drawScale: f32,
1094    /// Set this flag to true if the attached bodies should collide
1095    pub collideConnected: bool,
1096    /// Used internally to detect a valid definition. DO NOT SET.
1097    pub internalValue: ::std::os::raw::c_int,
1098}
1099/** Distance joint definition.
1100 Connects a point on body A with a point on body B by a segment.
1101 Useful for ropes and springs.
1102 @ingroup distance_joint*/
1103#[repr(C)]
1104#[derive(Debug, Copy, Clone)]
1105pub struct b3DistanceJointDef {
1106    /// Base joint definition
1107    pub base: b3JointDef,
1108    /// The rest length of this joint. Clamped to a stable minimum value.
1109    pub length: f32,
1110    /** Enable the distance constraint to behave like a spring. If false
1111 then the distance joint will be rigid, overriding the limit and motor.*/
1112    pub enableSpring: bool,
1113    /// The lower spring force controls how much tension it can sustain
1114    pub lowerSpringForce: f32,
1115    /// The upper spring force controls how much compression it can sustain
1116    pub upperSpringForce: f32,
1117    /// The spring linear stiffness Hertz, cycles per second
1118    pub hertz: f32,
1119    /// The spring linear damping ratio, non-dimensional
1120    pub dampingRatio: f32,
1121    /// Enable/disable the joint limit
1122    pub enableLimit: bool,
1123    /// Minimum length. Clamped to a stable minimum value.
1124    pub minLength: f32,
1125    /// Maximum length. Must be greater than or equal to the minimum length.
1126    pub maxLength: f32,
1127    /// Enable/disable the joint motor
1128    pub enableMotor: bool,
1129    /// The maximum motor force, usually in newtons
1130    pub maxMotorForce: f32,
1131    /// The desired motor speed, usually in meters per second
1132    pub motorSpeed: f32,
1133}
1134unsafe extern "C" {
1135    /** Use this to initialize your joint definition
1136 @ingroup distance_joint*/
1137    pub fn b3DefaultDistanceJointDef() -> b3DistanceJointDef;
1138}
1139/** A motor joint is used to control the relative position and velocity between two bodies.
1140 @ingroup motor_joint*/
1141#[repr(C)]
1142#[derive(Debug, Copy, Clone)]
1143pub struct b3MotorJointDef {
1144    /// Base joint definition
1145    pub base: b3JointDef,
1146    /// The desired linear velocity
1147    pub linearVelocity: b3Vec3,
1148    /// The maximum motor force in newtons
1149    pub maxVelocityForce: f32,
1150    /// The desired angular velocity
1151    pub angularVelocity: b3Vec3,
1152    /// The maximum motor torque in newton-meters
1153    pub maxVelocityTorque: f32,
1154    /// Linear spring hertz for position control
1155    pub linearHertz: f32,
1156    /// Linear spring damping ratio
1157    pub linearDampingRatio: f32,
1158    /// Maximum spring force in newtons
1159    pub maxSpringForce: f32,
1160    /// Angular spring hertz for position control
1161    pub angularHertz: f32,
1162    /// Angular spring damping ratio
1163    pub angularDampingRatio: f32,
1164    /// Maximum spring torque in newton-meters
1165    pub maxSpringTorque: f32,
1166}
1167unsafe extern "C" {
1168    /** Use this to initialize your joint definition
1169 @ingroup motor_joint*/
1170    pub fn b3DefaultMotorJointDef() -> b3MotorJointDef;
1171}
1172/** A filter joint is used to disable collision between two specific bodies.
1173 @ingroup filter_joint*/
1174#[repr(C)]
1175#[derive(Debug, Copy, Clone)]
1176pub struct b3FilterJointDef {
1177    /// Base joint definition
1178    pub base: b3JointDef,
1179}
1180unsafe extern "C" {
1181    /** Use this to initialize your joint definition
1182 @ingroup filter_joint*/
1183    pub fn b3DefaultFilterJointDef() -> b3FilterJointDef;
1184}
1185/** Parallel joint definition. Constrains the angle between axis z in body A and axis z in body B
1186 using a spring. Useful to keep a body upright.
1187 @ingroup parallel_joint*/
1188#[repr(C)]
1189#[derive(Debug, Copy, Clone)]
1190pub struct b3ParallelJointDef {
1191    /// Base joint definition
1192    pub base: b3JointDef,
1193    /// The spring stiffness Hertz, cycles per second
1194    pub hertz: f32,
1195    /// The spring damping ratio, non-dimensional
1196    pub dampingRatio: f32,
1197    /// The maximum spring torque, typically in newton-meters.
1198    pub maxTorque: f32,
1199}
1200unsafe extern "C" {
1201    /** Use this to initialize your joint definition
1202 @ingroup parallel_joint*/
1203    pub fn b3DefaultParallelJointDef() -> b3ParallelJointDef;
1204}
1205/** Prismatic joint definition. Body B may slide along the x-axis in local frame A.
1206 Body B cannot rotate relative to body A. The joint translation is zero when the
1207 local frame origins coincide in world space.
1208 @ingroup prismatic_joint*/
1209#[repr(C)]
1210#[derive(Debug, Copy, Clone)]
1211pub struct b3PrismaticJointDef {
1212    /// Base joint definition
1213    pub base: b3JointDef,
1214    /// Enable a linear spring along the prismatic joint axis
1215    pub enableSpring: bool,
1216    /// The spring stiffness Hertz, cycles per second
1217    pub hertz: f32,
1218    /// The spring damping ratio, non-dimensional
1219    pub dampingRatio: f32,
1220    /** The target translation for the joint in meters. The spring-damper will drive
1221 to this translation.*/
1222    pub targetTranslation: f32,
1223    /// Enable/disable the joint limit
1224    pub enableLimit: bool,
1225    /// The lower translation limit
1226    pub lowerTranslation: f32,
1227    /// The upper translation limit
1228    pub upperTranslation: f32,
1229    /// Enable/disable the joint motor
1230    pub enableMotor: bool,
1231    /// The maximum motor force, typically in newtons
1232    pub maxMotorForce: f32,
1233    /// The desired motor speed, typically in meters per second
1234    pub motorSpeed: f32,
1235}
1236unsafe extern "C" {
1237    /** Use this to initialize your joint definition
1238 @ingroup prismatic_joint*/
1239    pub fn b3DefaultPrismaticJointDef() -> b3PrismaticJointDef;
1240}
1241/** Revolute joint definition. A point on body B is fixed to a point on body A.
1242 Allows relative rotation about the z-axis.
1243 @ingroup revolute_joint*/
1244#[repr(C)]
1245#[derive(Debug, Copy, Clone)]
1246pub struct b3RevoluteJointDef {
1247    /// Base joint definition.
1248    pub base: b3JointDef,
1249    /** The bodyB angle minus bodyA angle in the reference state (radians).
1250 This defines the zero angle for the joint limit.*/
1251    pub targetAngle: f32,
1252    /// Enable a rotational spring on the revolute hinge axis.
1253    pub enableSpring: bool,
1254    /// The spring stiffness Hertz, cycles per second.
1255    pub hertz: f32,
1256    /// The spring damping ratio, non-dimensional.
1257    pub dampingRatio: f32,
1258    /// A flag to enable joint limits.
1259    pub enableLimit: bool,
1260    /// The lower angle for the joint limit in radians. Minimum of -0.99*pi radians.
1261    pub lowerAngle: f32,
1262    /// The upper angle for the joint limit in radians. Maximum of 0.99*pi radians.
1263    pub upperAngle: f32,
1264    /// A flag to enable the joint motor.
1265    pub enableMotor: bool,
1266    /// The maximum motor torque, typically in newton-meters.
1267    pub maxMotorTorque: f32,
1268    /// The desired motor speed in radians per second.
1269    pub motorSpeed: f32,
1270}
1271unsafe extern "C" {
1272    /** Use this to initialize your joint definition.
1273 @ingroup revolute_joint*/
1274    pub fn b3DefaultRevoluteJointDef() -> b3RevoluteJointDef;
1275}
1276/** Spherical joint definition. A point on body B is fixed to a point on body A.
1277 Allows rotation about the shared point.
1278 @ingroup spherical_joint*/
1279#[repr(C)]
1280#[derive(Debug, Copy, Clone)]
1281pub struct b3SphericalJointDef {
1282    /// Base joint definition
1283    pub base: b3JointDef,
1284    /// Enable a rotational spring that attempts to align the two joint frames.
1285    pub enableSpring: bool,
1286    /** The spring stiffness Hertz, cycles per second. This may be clamped internally
1287 according to the time step to maintain stability. Non-negative number.*/
1288    pub hertz: f32,
1289    /// The spring damping ratio, non-dimensional. Non-negative number.
1290    pub dampingRatio: f32,
1291    /// Target spring rotation, joint frame B relative to joint frame A.
1292    pub targetRotation: b3Quat,
1293    /// A flag to enable the cone limit. The cone is centered on the frameA z-axis.
1294    pub enableConeLimit: bool,
1295    /// The angle for the cone limit in radians. Valid range is [0, pi]
1296    pub coneAngle: f32,
1297    /// A flag to enable the twist limit. The twist is centered on the frameB z-axis.
1298    pub enableTwistLimit: bool,
1299    /// The angle for the lower twist limit in radians. Minimum of -0.99*pi radians.
1300    pub lowerTwistAngle: f32,
1301    /// The angle for the upper twist limit in radians. Maximum of 0.99*pi radians.
1302    pub upperTwistAngle: f32,
1303    /// A flag to enable the joint motor
1304    pub enableMotor: bool,
1305    /// The maximum motor torque, typically in newton-meters. Non-negative number.
1306    pub maxMotorTorque: f32,
1307    /// The desired motor angular velocity in radians per second.
1308    pub motorVelocity: b3Vec3,
1309}
1310unsafe extern "C" {
1311    /** Use this to initialize your joint definition.
1312 @ingroup spherical_joint*/
1313    pub fn b3DefaultSphericalJointDef() -> b3SphericalJointDef;
1314}
1315/** Weld joint definition
1316 Connects two bodies together rigidly. This constraint provides springs to mimic
1317 soft-body simulation.
1318 @note The approximate solver in Box3D cannot hold many bodies together rigidly
1319 @ingroup weld_joint*/
1320#[repr(C)]
1321#[derive(Debug, Copy, Clone)]
1322pub struct b3WeldJointDef {
1323    /// Base joint definition
1324    pub base: b3JointDef,
1325    /// Linear stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness.
1326    pub linearHertz: f32,
1327    /// Angular stiffness as Hertz (cycles per second). Use zero for maximum stiffness.
1328    pub angularHertz: f32,
1329    /// Linear damping ratio, non-dimensional. Use 1 for critical damping.
1330    pub linearDampingRatio: f32,
1331    /// Linear damping ratio, non-dimensional. Use 1 for critical damping.
1332    pub angularDampingRatio: f32,
1333}
1334unsafe extern "C" {
1335    /** Use this to initialize your joint definition
1336 @ingroup weld_joint*/
1337    pub fn b3DefaultWeldJointDef() -> b3WeldJointDef;
1338}
1339/** Wheel joint definition
1340 Body A is the chassis and body B is the wheel.
1341 The wheel rotates around the local z-axis in frame B.
1342 The wheel translates along the local x-axis in frame A.
1343 The wheel can optionally steer along the x-axis in frame A.
1344 @ingroup wheel_joint*/
1345#[repr(C)]
1346#[derive(Debug, Copy, Clone)]
1347pub struct b3WheelJointDef {
1348    /// Base joint definition
1349    pub base: b3JointDef,
1350    /// Enable a linear spring along the local axis
1351    pub enableSuspensionSpring: bool,
1352    /// Spring stiffness in Hertz
1353    pub suspensionHertz: f32,
1354    /// Spring damping ratio, non-dimensional
1355    pub suspensionDampingRatio: f32,
1356    /// Enable/disable the joint linear limit
1357    pub enableSuspensionLimit: bool,
1358    /// The lower suspension translation limit
1359    pub lowerSuspensionLimit: f32,
1360    /// The upper translation limit
1361    pub upperSuspensionLimit: f32,
1362    /// Enable/disable the joint rotational motor
1363    pub enableSpinMotor: bool,
1364    /// The maximum motor torque, typically in newton-meters
1365    pub maxSpinTorque: f32,
1366    /// The desired motor speed in radians per second
1367    pub spinSpeed: f32,
1368    /// Enable steering, otherwise the steering is fixed forward
1369    pub enableSteering: bool,
1370    /// Steering stiffness in Hertz
1371    pub steeringHertz: f32,
1372    /// Spring damping ratio, non-dimensional
1373    pub steeringDampingRatio: f32,
1374    /// The target steering angle in radians
1375    pub targetSteeringAngle: f32,
1376    /// The maximum steering torque in N*m
1377    pub maxSteeringTorque: f32,
1378    /// Enable/disable the steering angular limit
1379    pub enableSteeringLimit: bool,
1380    /// The lower steering angle in radians
1381    pub lowerSteeringLimit: f32,
1382    /// The upper steering angle in radians
1383    pub upperSteeringLimit: f32,
1384}
1385unsafe extern "C" {
1386    /** Use this to initialize your joint definition
1387 @ingroup wheel_joint*/
1388    pub fn b3DefaultWheelJointDef() -> b3WheelJointDef;
1389}
1390/** The explosion definition is used to configure options for explosions. Explosions
1391 consider shape geometry when computing the impulse.
1392 @ingroup world*/
1393#[repr(C)]
1394#[derive(Debug, Copy, Clone)]
1395pub struct b3ExplosionDef {
1396    /// Mask bits to filter shapes
1397    pub maskBits: u64,
1398    /// The center of the explosion in world space
1399    pub position: b3Pos,
1400    /// The radius of the explosion
1401    pub radius: f32,
1402    /// The falloff distance beyond the radius. Impulse is reduced to zero at this distance.
1403    pub falloff: f32,
1404    /** Impulse per unit area. This applies an impulse according to the shape area that
1405 is facing the explosion. Explosions only apply to spheres, capsules, and hulls. This
1406 may be negative for implosions.*/
1407    pub impulsePerArea: f32,
1408}
1409unsafe extern "C" {
1410    /** Use this to initialize your explosion definition
1411 @ingroup world*/
1412    pub fn b3DefaultExplosionDef() -> b3ExplosionDef;
1413}
1414/// A begin-touch event is generated when a shape starts to overlap a sensor shape.
1415#[repr(C)]
1416#[derive(Debug, Copy, Clone)]
1417pub struct b3SensorBeginTouchEvent {
1418    /// The id of the sensor shape
1419    pub sensorShapeId: b3ShapeId,
1420    /// The id of the shape that began touching the sensor shape
1421    pub visitorShapeId: b3ShapeId,
1422}
1423/** An end touch event is generated when a shape stops overlapping a sensor shape.
1424	These include things like setting the transform, destroying a body or shape, or changing
1425	a filter. You will also get an end event if the sensor or visitor are destroyed.
1426	Therefore you should always confirm the shape id is valid using b3Shape_IsValid.*/
1427#[repr(C)]
1428#[derive(Debug, Copy, Clone)]
1429pub struct b3SensorEndTouchEvent {
1430    /** The id of the sensor shape
1431	@warning this shape may have been destroyed
1432	@see b3Shape_IsValid*/
1433    pub sensorShapeId: b3ShapeId,
1434    /** The id of the shape that stopped touching the sensor shape
1435	@warning this shape may have been destroyed
1436	@see b3Shape_IsValid*/
1437    pub visitorShapeId: b3ShapeId,
1438}
1439/** Sensor events are buffered in the world and are available
1440	as begin/end overlap event arrays after the time step is complete.
1441	Note: these may become invalid if bodies and/or shapes are destroyed*/
1442#[repr(C)]
1443#[derive(Debug, Copy, Clone)]
1444pub struct b3SensorEvents {
1445    /// Array of sensor begin touch events
1446    pub beginEvents: *mut b3SensorBeginTouchEvent,
1447    /// Array of sensor end touch events
1448    pub endEvents: *mut b3SensorEndTouchEvent,
1449    /// The number of begin touch events
1450    pub beginCount: ::std::os::raw::c_int,
1451    /// The number of end touch events
1452    pub endCount: ::std::os::raw::c_int,
1453}
1454/// A begin-touch event is generated when two shapes begin touching.
1455#[repr(C)]
1456#[derive(Debug, Copy, Clone)]
1457pub struct b3ContactBeginTouchEvent {
1458    /// Id of the first shape
1459    pub shapeIdA: b3ShapeId,
1460    /// Id of the second shape
1461    pub shapeIdB: b3ShapeId,
1462    /** The transient contact id. This contact may be destroyed automatically when the world is modified or simulated.
1463 Use b3Contact_IsValid before using this id.*/
1464    pub contactId: b3ContactId,
1465}
1466/** An end touch event is generated when two shapes stop touching.
1467	You will get an end event if you do anything that destroys contacts previous to the last
1468	world step. These include things like setting the transform, destroying a body
1469	or shape, or changing a filter or body type.*/
1470#[repr(C)]
1471#[derive(Debug, Copy, Clone)]
1472pub struct b3ContactEndTouchEvent {
1473    /** Id of the first shape
1474	@warning this shape may have been destroyed
1475	@see b3Shape_IsValid*/
1476    pub shapeIdA: b3ShapeId,
1477    /** Id of the first shape
1478	@warning this shape may have been destroyed
1479	@see b3Shape_IsValid*/
1480    pub shapeIdB: b3ShapeId,
1481    /** Id of the contact.
1482	@warning this contact may have been destroyed
1483	@see b3Contact_IsValid*/
1484    pub contactId: b3ContactId,
1485}
1486/** A hit touch event is generated when two shapes collide with a speed faster than the hit speed threshold.
1487 This may be reported for speculative contacts that have a confirmed impulse.*/
1488#[repr(C)]
1489#[derive(Debug, Copy, Clone)]
1490pub struct b3ContactHitEvent {
1491    /// Id of the first shape
1492    pub shapeIdA: b3ShapeId,
1493    /// Id of the second shape
1494    pub shapeIdB: b3ShapeId,
1495    /** Id of the contact.
1496	@warning this contact may have been destroyed
1497	@see b3Contact_IsValid*/
1498    pub contactId: b3ContactId,
1499    /** Point where the shapes hit at the beginning of the time step.
1500 This is a mid-point between the two surfaces. It could be at speculative
1501 point where the two shapes were not touching at the beginning of the time step.*/
1502    pub point: b3Pos,
1503    /// Normal vector pointing from shape A to shape B
1504    pub normal: b3Vec3,
1505    /// The speed the shapes are approaching. Always positive. Typically in meters per second.
1506    pub approachSpeed: f32,
1507    /// User material on shape A
1508    pub userMaterialIdA: u64,
1509    /// User material on shape B
1510    pub userMaterialIdB: u64,
1511}
1512/** Contact events are buffered in the world and are available
1513	as event arrays after the time step is complete.
1514	Note: these may become invalid if bodies and/or shapes are destroyed*/
1515#[repr(C)]
1516#[derive(Debug, Copy, Clone)]
1517pub struct b3ContactEvents {
1518    /// Array of begin touch events
1519    pub beginEvents: *mut b3ContactBeginTouchEvent,
1520    /// Array of end touch events
1521    pub endEvents: *mut b3ContactEndTouchEvent,
1522    /// Array of hit events
1523    pub hitEvents: *mut b3ContactHitEvent,
1524    /// Number of begin touch events
1525    pub beginCount: ::std::os::raw::c_int,
1526    /// Number of end touch events
1527    pub endCount: ::std::os::raw::c_int,
1528    /// Number of hit events
1529    pub hitCount: ::std::os::raw::c_int,
1530}
1531/** Body move events triggered when a body moves.
1532 Triggered when a body moves due to simulation. Not reported for bodies moved by the user.
1533 This also has a flag to indicate that the body went to sleep so the application can also
1534 sleep that actor/entity/object associated with the body.
1535 On the other hand if the flag does not indicate the body went to sleep then the application
1536 can treat the actor/entity/object associated with the body as awake.
1537 This is an efficient way for an application to update game object transforms rather than
1538 calling functions such as b3Body_GetTransform() because this data is delivered as a contiguous array
1539 and it is only populated with bodies that have moved.
1540 @note If sleeping is disabled all dynamic and kinematic bodies will trigger move events.*/
1541#[repr(C)]
1542#[derive(Debug, Copy, Clone)]
1543pub struct b3BodyMoveEvent {
1544    /// The body user data.
1545    pub userData: *mut ::std::os::raw::c_void,
1546    /// The body transform.
1547    pub transform: b3WorldTransform,
1548    /// The body id.
1549    pub bodyId: b3BodyId,
1550    /// Did the body fall asleep this time step?
1551    pub fellAsleep: bool,
1552}
1553/** Body events are buffered in the world and are available
1554	as event arrays after the time step is complete.
1555	Note: this data becomes invalid if bodies are destroyed*/
1556#[repr(C)]
1557#[derive(Debug, Copy, Clone)]
1558pub struct b3BodyEvents {
1559    /// Array of move events
1560    pub moveEvents: *mut b3BodyMoveEvent,
1561    /// Number of move events
1562    pub moveCount: ::std::os::raw::c_int,
1563}
1564/** Joint events report joints that are awake and have a force and/or torque exceeding the threshold
1565 The observed forces and torques are not returned for efficiency reasons.*/
1566#[repr(C)]
1567#[derive(Debug, Copy, Clone)]
1568pub struct b3JointEvent {
1569    /// The joint id
1570    pub jointId: b3JointId,
1571    /// The user data from the joint for convenience
1572    pub userData: *mut ::std::os::raw::c_void,
1573}
1574/** Joint events are buffered in the world and are available
1575 as event arrays after the time step is complete.
1576 Note: this data becomes invalid if joints are destroyed*/
1577#[repr(C)]
1578#[derive(Debug, Copy, Clone)]
1579pub struct b3JointEvents {
1580    /// Array of events
1581    pub jointEvents: *mut b3JointEvent,
1582    /// Number of events
1583    pub count: ::std::os::raw::c_int,
1584}
1585/** The contact data for two shapes. By convention the manifold normal points
1586 from shape A to shape B.
1587 @see b3Shape_GetContactData() and b3Body_GetContactData()*/
1588#[repr(C)]
1589#[derive(Debug, Copy, Clone)]
1590pub struct b3ContactData {
1591    /** The contact id. You may hold onto this to track a contact across time steps.
1592 This id may become orphaned. Use b3Contact_IsValid before using it for other functions.*/
1593    pub contactId: b3ContactId,
1594    /// The first shape id.
1595    pub shapeIdA: b3ShapeId,
1596    /// The second shape id.
1597    pub shapeIdB: b3ShapeId,
1598    /** The contact manifold. This points to internal data and may become invalid. Do not store
1599 this pointer.*/
1600    pub manifolds: *const b3Manifold,
1601    /// The number of contact manifolds. For mesh and height-field collision there can be multiple manifolds.
1602    pub manifoldCount: ::std::os::raw::c_int,
1603}
1604/** The query filter is used to filter collisions between queries and shapes. For example,
1605 you may want a ray-cast representing a projectile to hit players and the static environment
1606 but not debris.*/
1607#[repr(C)]
1608#[derive(Debug, Copy, Clone)]
1609pub struct b3QueryFilter {
1610    /// The collision category bits of this query. Normally you would just set one bit.
1611    pub categoryBits: u64,
1612    /** The collision mask bits. This states the shape categories that this
1613 query would accept for collision.*/
1614    pub maskBits: u64,
1615    /** Optional id combined with @ref name to identify this query in a recording, e.g. an entity id.
1616 Need not be unique on its own. 0 with a null name means untagged. Ignored when not recording.*/
1617    pub id: u64,
1618    /** Optional label combined with @ref id to identify this query, e.g. "bullet". Need not be unique
1619 on its own. The recorder hashes (id, name) into one stable key the viewer tracks the query by,
1620 so the same id and name pair identifies the same query across frames. NULL means none. Ignored
1621 when not recording.*/
1622    pub name: *const ::std::os::raw::c_char,
1623}
1624unsafe extern "C" {
1625    /// Use this to initialize your query filter
1626    pub fn b3DefaultQueryFilter() -> b3QueryFilter;
1627}
1628/// Low level ray cast input data.
1629#[repr(C)]
1630#[derive(Debug, Copy, Clone)]
1631pub struct b3RayCastInput {
1632    /// Start point of the ray cast.
1633    pub origin: b3Vec3,
1634    /** Translation of the ray cast.
1635 end = start + translation.*/
1636    pub translation: b3Vec3,
1637    /// The maximum fraction of the translation to consider, typically 1
1638    pub maxFraction: f32,
1639}
1640/// Result from b3World_RayCastClosest.
1641#[repr(C)]
1642#[derive(Debug, Copy, Clone)]
1643pub struct b3RayResult {
1644    /// The shape hit.
1645    pub shapeId: b3ShapeId,
1646    /// The world point of the hit.
1647    pub point: b3Pos,
1648    /// The world normal of the shape surface at the hit point.
1649    pub normal: b3Vec3,
1650    /** The user material id at the hit point. This can be per triangle
1651 if the shape is a mesh, height-field, or compound with child mesh.*/
1652    pub userMaterialId: u64,
1653    /// The fraction of the input ray.
1654    pub fraction: f32,
1655    /** The triangle index if the shape is a mesh, height-field, or compound with
1656 child mesh.*/
1657    pub triangleIndex: ::std::os::raw::c_int,
1658    /// The child index if the shape is a compound.
1659    pub childIndex: ::std::os::raw::c_int,
1660    /// The number of BVH nodes visited. Diagnostic.
1661    pub nodeVisits: ::std::os::raw::c_int,
1662    /// The number of BVH leaves visited. Diagnostic.
1663    pub leafVisits: ::std::os::raw::c_int,
1664    /// Did the ray hit? If false, all other data is invalid.
1665    pub hit: bool,
1666}
1667/// A shape proxy is used by the GJK algorithm. It can represent a convex shape.
1668#[repr(C)]
1669#[derive(Debug, Copy, Clone)]
1670pub struct b3ShapeProxy {
1671    /// The point cloud.
1672    pub points: *const b3Vec3,
1673    /// The number of points. Do not exceed B3_MAX_SHAPE_CAST_POINTS.
1674    pub count: ::std::os::raw::c_int,
1675    /// The external radius of the point cloud.
1676    pub radius: f32,
1677}
1678/** Low level shape cast input in generic form. This allows casting an arbitrary point
1679 cloud wrap with a radius. For example, a sphere is a single point with a non-zero radius.
1680 A capsule is two points with a non-zero radius. A box is four points with a zero radius.*/
1681#[repr(C)]
1682#[derive(Debug, Copy, Clone)]
1683pub struct b3ShapeCastInput {
1684    /// A generic query shape.
1685    pub proxy: b3ShapeProxy,
1686    /// The translation of the shape cast.
1687    pub translation: b3Vec3,
1688    /// The maximum fraction of the translation to consider, typically 1.
1689    pub maxFraction: f32,
1690    /// Allow shape cast to encroach when initially touching. This only works if the radius is greater than zero.
1691    pub canEncroach: bool,
1692}
1693/** Input for sweeping an AABB through a dynamic tree. The box is in the tree's world float frame.
1694 The caller folds the cast shape radius and any world origin into the box, so the tree traversal
1695 stays a conservative box sweep and the precise narrow phase happens per shape in the callback.*/
1696#[repr(C)]
1697#[derive(Debug, Copy, Clone)]
1698pub struct b3BoxCastInput {
1699    /// The AABB to cast, in the tree's frame.
1700    pub box_: b3AABB,
1701    /// The sweep translation.
1702    pub translation: b3Vec3,
1703    /// The maximum fraction of the translation to consider, typically 1.
1704    pub maxFraction: f32,
1705}
1706/// Low level ray cast or shape-cast output data.
1707#[repr(C)]
1708#[derive(Debug, Copy, Clone)]
1709pub struct b3CastOutput {
1710    /// The surface normal at the hit point.
1711    pub normal: b3Vec3,
1712    /// The surface hit point.
1713    pub point: b3Vec3,
1714    /// The fraction of the input translation at collision.
1715    pub fraction: f32,
1716    /// The number of iterations used.
1717    pub iterations: ::std::os::raw::c_int,
1718    /// The index of the mesh or height field triangle hit.
1719    pub triangleIndex: ::std::os::raw::c_int,
1720    /// The index of the compound child shape.
1721    pub childIndex: ::std::os::raw::c_int,
1722    /// The material index. May be -1 for null.
1723    pub materialIndex: ::std::os::raw::c_int,
1724    /// Did the cast hit?
1725    pub hit: bool,
1726}
1727/// Same type in single precision.
1728pub type b3WorldCastOutput = b3CastOutput;
1729/// Body cast result for ray and shape casts.
1730#[repr(C)]
1731#[derive(Debug, Copy, Clone)]
1732pub struct b3BodyCastResult {
1733    /// The shape hit.
1734    pub shapeId: b3ShapeId,
1735    /// The world point on the shape surface.
1736    pub point: b3Pos,
1737    /// The world normal vector on the shape surface.
1738    pub normal: b3Vec3,
1739    /** The fraction along the ray hit.
1740 hit point = origin + fraction * translation*/
1741    pub fraction: f32,
1742    /// The triangle index if the shape is a mesh or height-field.
1743    pub triangleIndex: ::std::os::raw::c_int,
1744    /** The user material id at the hit point. This can be per triangle
1745 if the shape is a mesh, height-field, or compound with child mesh.*/
1746    pub userMaterialId: u64,
1747    /// The number of iterations used. Diagnostic.
1748    pub iterations: ::std::os::raw::c_int,
1749    /// Did the cast hit? If false, all other fields are invalid.
1750    pub hit: bool,
1751}
1752/** Used to warm start the GJK simplex. If you call this function multiple times with nearby
1753 transforms this might improve performance. Otherwise you can zero initialize this.
1754 The distance cache must be initialized to zero on the first call.
1755 Users should generally just zero initialize this structure for each call.*/
1756#[repr(C)]
1757#[derive(Debug, Copy, Clone)]
1758pub struct b3SimplexCache {
1759    /// Value use to compare length, area, volume of two simplexes.
1760    pub metric: f32,
1761    /// The number of stored simplex points
1762    pub count: u16,
1763    /// The cached simplex indices on shape A
1764    pub indexA: [u8; 4usize],
1765    /// The cached simplex indices on shape B
1766    pub indexB: [u8; 4usize],
1767}
1768/// Input parameters for b3ShapeCast
1769#[repr(C)]
1770#[derive(Debug, Copy, Clone)]
1771pub struct b3ShapeCastPairInput {
1772    ///< The proxy for shape A
1773    pub proxyA: b3ShapeProxy,
1774    ///< The proxy for shape B
1775    pub proxyB: b3ShapeProxy,
1776    ///< Transform of shape B in shape A's frame, the relative pose B in A
1777    pub transform: b3Transform,
1778    ///< The translation of shape B, in A's frame
1779    pub translationB: b3Vec3,
1780    ///< The fraction of the translation to consider, typically 1
1781    pub maxFraction: f32,
1782    ///< Allows shapes with a radius to move slightly closer if already touching
1783    pub canEncroach: bool,
1784}
1785/// Input for b3ShapeDistance
1786#[repr(C)]
1787#[derive(Debug, Copy, Clone)]
1788pub struct b3DistanceInput {
1789    /// The proxy for shape A
1790    pub proxyA: b3ShapeProxy,
1791    /// The proxy for shape B
1792    pub proxyB: b3ShapeProxy,
1793    /** Transform of shape B in shape A's frame, the relative pose B in A
1794 (b3InvMulWorldTransforms( worldA, worldB )). The query is origin independent and runs in frame A.*/
1795    pub transform: b3Transform,
1796    /// Should the proxy radius be considered?
1797    pub useRadii: bool,
1798}
1799/// Output for b3ShapeDistance
1800#[repr(C)]
1801#[derive(Debug, Copy, Clone)]
1802pub struct b3DistanceOutput {
1803    ///< Closest point on shapeA, in shape A's frame
1804    pub pointA: b3Vec3,
1805    ///< Closest point on shapeB, in shape A's frame
1806    pub pointB: b3Vec3,
1807    ///< A to B normal in shape A's frame. Invalid if distance is zero.
1808    pub normal: b3Vec3,
1809    ///< The final distance, zero if overlapped
1810    pub distance: f32,
1811    ///< Number of GJK iterations used
1812    pub iterations: ::std::os::raw::c_int,
1813    ///< The number of simplexes stored in the simplex array
1814    pub simplexCount: ::std::os::raw::c_int,
1815}
1816/// Simplex vertex for debugging the GJK algorithm
1817#[repr(C)]
1818#[derive(Debug, Copy, Clone)]
1819pub struct b3SimplexVertex {
1820    ///< support point in proxyA
1821    pub wA: b3Vec3,
1822    ///< support point in proxyB
1823    pub wB: b3Vec3,
1824    ///< wB - wA
1825    pub w: b3Vec3,
1826    ///< barycentric coordinates
1827    pub a: f32,
1828    ///< wA index
1829    pub indexA: ::std::os::raw::c_int,
1830    ///< wB index
1831    pub indexB: ::std::os::raw::c_int,
1832}
1833/// Simplex from the GJK algorithm
1834#[repr(C)]
1835#[derive(Debug, Copy, Clone)]
1836pub struct b3Simplex {
1837    ///< vertices
1838    pub vertices: [b3SimplexVertex; 4usize],
1839    ///< number of valid vertices
1840    pub count: ::std::os::raw::c_int,
1841}
1842/** This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin,
1843 which may not coincide with the center of mass. However, to support dynamics we must interpolate the center of mass
1844 position.*/
1845#[repr(C)]
1846#[derive(Debug, Copy, Clone)]
1847pub struct b3Sweep {
1848    ///< Local center of mass position
1849    pub localCenter: b3Vec3,
1850    ///< Starting center of mass world position
1851    pub c1: b3Vec3,
1852    ///< Ending center of mass world position
1853    pub c2: b3Vec3,
1854    ///< Starting world rotation
1855    pub q1: b3Quat,
1856    ///< Ending world rotation
1857    pub q2: b3Quat,
1858}
1859/// Time of impact input
1860#[repr(C)]
1861#[derive(Debug, Copy, Clone)]
1862pub struct b3TOIInput {
1863    ///< The proxy for shape A
1864    pub proxyA: b3ShapeProxy,
1865    ///< The proxy for shape B
1866    pub proxyB: b3ShapeProxy,
1867    ///< The movement of shape A
1868    pub sweepA: b3Sweep,
1869    ///< The movement of shape B
1870    pub sweepB: b3Sweep,
1871    ///< Defines the sweep interval [0, tMax]
1872    pub maxFraction: f32,
1873}
1874pub const b3TOIState_b3_toiStateUnknown: b3TOIState = 0;
1875pub const b3TOIState_b3_toiStateFailed: b3TOIState = 1;
1876pub const b3TOIState_b3_toiStateOverlapped: b3TOIState = 2;
1877pub const b3TOIState_b3_toiStateHit: b3TOIState = 3;
1878pub const b3TOIState_b3_toiStateSeparated: b3TOIState = 4;
1879/// Describes the TOI output
1880pub type b3TOIState = ::std::os::raw::c_uint;
1881/// Time of impact output
1882#[repr(C)]
1883#[derive(Debug, Copy, Clone)]
1884pub struct b3TOIOutput {
1885    /// The type of result
1886    pub state: b3TOIState,
1887    /// The hit point
1888    pub point: b3Vec3,
1889    /// The hit normal
1890    pub normal: b3Vec3,
1891    /// The sweep time of the collision
1892    pub fraction: f32,
1893    /// The final distance
1894    pub distance: f32,
1895    /// Number of outer iterations
1896    pub distanceIterations: ::std::os::raw::c_int,
1897    /// Total number of push back iterations
1898    pub pushBackIterations: ::std::os::raw::c_int,
1899    /// Total number of root iterations
1900    pub rootIterations: ::std::os::raw::c_int,
1901    /** Indicates that the time of impact detected initial
1902 overlap and used a fallback sphere as a last ditch effort
1903 to prevent tunneling.*/
1904    pub usedFallback: bool,
1905}
1906pub const b3TreeNodeFlags_b3_allocatedNode: b3TreeNodeFlags = 1;
1907pub const b3TreeNodeFlags_b3_enlargedNode: b3TreeNodeFlags = 2;
1908pub const b3TreeNodeFlags_b3_leafNode: b3TreeNodeFlags = 4;
1909/// Flags for tree nodes. For internal usage.
1910pub type b3TreeNodeFlags = ::std::os::raw::c_uint;
1911/// Tree node child indices. For internal usage.
1912#[repr(C)]
1913#[derive(Debug, Copy, Clone)]
1914pub struct b3TreeNodeChildren {
1915    ///< child node index 1
1916    pub child1: ::std::os::raw::c_int,
1917    ///< child node index 2
1918    pub child2: ::std::os::raw::c_int,
1919}
1920/** A node in the dynamic tree. This is private data placed here for performance reasons.
1921 todo test padding to 64 bytes to avoid straddling cache lines*/
1922#[repr(C)]
1923#[derive(Copy, Clone)]
1924pub struct b3TreeNode {
1925    /// The node bounding box
1926    pub aabb: b3AABB,
1927    /// Category bits for collision filtering
1928    pub categoryBits: u64,
1929    pub __bindgen_anon_1: b3TreeNode__bindgen_ty_1,
1930    pub __bindgen_anon_2: b3TreeNode__bindgen_ty_2,
1931    /// Height of the node. Leaves have a height of 0.
1932    pub height: u16,
1933    /// @see b3TreeNodeFlags
1934    pub flags: u16,
1935}
1936#[repr(C)]
1937#[derive(Copy, Clone)]
1938pub union b3TreeNode__bindgen_ty_1 {
1939    /// Children (internal node)
1940    pub children: b3TreeNodeChildren,
1941    /// User data (leaf node)
1942    pub userData: u64,
1943}
1944#[repr(C)]
1945#[derive(Copy, Clone)]
1946pub union b3TreeNode__bindgen_ty_2 {
1947    /// The node parent index (allocated node)
1948    pub parent: ::std::os::raw::c_int,
1949    /// The node freelist next index (free node)
1950    pub next: ::std::os::raw::c_int,
1951}
1952/** The dynamic tree structure. This should be considered private data.
1953 It is placed here for performance reasons.*/
1954#[repr(C)]
1955#[derive(Debug, Copy, Clone)]
1956pub struct b3DynamicTree {
1957    /** The dynamic tree version. Always the first field. Useful
1958 if the tree is serialized.*/
1959    pub version: u64,
1960    /// The tree nodes
1961    pub nodes: *mut b3TreeNode,
1962    /// The root index
1963    pub root: ::std::os::raw::c_int,
1964    /// The number of nodes
1965    pub nodeCount: ::std::os::raw::c_int,
1966    /// The allocated node space
1967    pub nodeCapacity: ::std::os::raw::c_int,
1968    /// Number of proxies created
1969    pub proxyCount: ::std::os::raw::c_int,
1970    /// Node free list
1971    pub freeList: ::std::os::raw::c_int,
1972    /// Leaf indices for rebuild
1973    pub leafIndices: *mut ::std::os::raw::c_int,
1974    /// Leaf bounding boxes for rebuild
1975    pub leafBoxes: *mut b3AABB,
1976    /// Leaf bounding box centers for rebuild
1977    pub leafCenters: *mut b3Vec3,
1978    /// Bins for sorting during rebuild
1979    pub binIndices: *mut ::std::os::raw::c_int,
1980    /// Allocated space for rebuilding
1981    pub rebuildCapacity: ::std::os::raw::c_int,
1982}
1983/// These are performance results returned by dynamic tree queries.
1984#[repr(C)]
1985#[derive(Debug, Copy, Clone)]
1986pub struct b3TreeStats {
1987    /// Number of internal nodes visited during the query
1988    pub nodeVisits: ::std::os::raw::c_int,
1989    /// Number of leaf nodes visited during the query
1990    pub leafVisits: ::std::os::raw::c_int,
1991}
1992/** This function receives proxies found in the AABB query.
1993 @return true if the query should continue*/
1994pub type b3TreeQueryCallbackFcn = ::std::option::Option<
1995    unsafe extern "C" fn(
1996        proxyId: ::std::os::raw::c_int,
1997        userData: u64,
1998        context: *mut ::std::os::raw::c_void,
1999    ) -> bool,
2000>;
2001/** This function receives the minimum distance squared so far and proxy to check in the closest query.
2002 @return minimum distance squared to user objects in the proxy*/
2003pub type b3TreeQueryClosestCallbackFcn = ::std::option::Option<
2004    unsafe extern "C" fn(
2005        distanceSqrMin: f32,
2006        proxyId: ::std::os::raw::c_int,
2007        userData: u64,
2008        context: *mut ::std::os::raw::c_void,
2009    ) -> f32,
2010>;
2011/** This function receives clipped AABB cast input for a proxy. The function returns the new cast
2012 fraction.
2013 - return a value of 0 to terminate the cast
2014 - return a value less than input->maxFraction to clip the cast
2015 - return a value of input->maxFraction to continue the cast without clipping*/
2016pub type b3TreeBoxCastCallbackFcn = ::std::option::Option<
2017    unsafe extern "C" fn(
2018        input: *const b3BoxCastInput,
2019        proxyId: ::std::os::raw::c_int,
2020        userData: u64,
2021        context: *mut ::std::os::raw::c_void,
2022    ) -> f32,
2023>;
2024/** This function receives clipped ray cast input for a proxy. The function
2025 returns the new ray fraction.
2026 - return a value of 0 to terminate the ray cast
2027 - return a value less than input->maxFraction to clip the ray
2028 - return a value of input->maxFraction to continue the ray cast without clipping*/
2029pub type b3TreeRayCastCallbackFcn = ::std::option::Option<
2030    unsafe extern "C" fn(
2031        input: *const b3RayCastInput,
2032        proxyId: ::std::os::raw::c_int,
2033        userData: u64,
2034        context: *mut ::std::os::raw::c_void,
2035    ) -> f32,
2036>;
2037/// The plane between a character mover and a shape
2038#[repr(C)]
2039#[derive(Debug, Copy, Clone)]
2040pub struct b3PlaneResult {
2041    /// Outward pointing plane.
2042    pub plane: b3Plane,
2043    /// Closest point on the shape. May not be unique.
2044    pub point: b3Vec3,
2045}
2046/** These are collision planes that can be fed to b3SolvePlanes. Normally
2047 this is assembled by the user from plane results in b3PlaneResult.*/
2048#[repr(C)]
2049#[derive(Debug, Copy, Clone)]
2050pub struct b3CollisionPlane {
2051    /// The collision plane between the mover and some shape.
2052    pub plane: b3Plane,
2053    /** Setting this to FLT_MAX makes the plane as rigid as possible. Lower values can
2054 make the plane collision soft. Usually in meters.*/
2055    pub pushLimit: f32,
2056    /// The push on the mover determined by b3SolvePlanes. Usually in meters.
2057    pub push: f32,
2058    /// Indicates if b3ClipVector should clip against this plane. Should be false for soft collision.
2059    pub clipVelocity: bool,
2060}
2061/// Result returned by b3SolvePlanes.
2062#[repr(C)]
2063#[derive(Debug, Copy, Clone)]
2064pub struct b3PlaneSolverResult {
2065    /// The final relative translation.
2066    pub delta: b3Vec3,
2067    /// The number of iterations used by the plane solver. For diagnostics.
2068    pub iterationCount: ::std::os::raw::c_int,
2069}
2070/// Body plane result for movers.
2071#[repr(C)]
2072#[derive(Debug, Copy, Clone)]
2073pub struct b3BodyPlaneResult {
2074    /// The shape id on the body.
2075    pub shapeId: b3ShapeId,
2076    /// The plane result.
2077    pub result: b3PlaneResult,
2078}
2079/** Used to collect collision planes for character movers.
2080 Return true to continue gathering planes.*/
2081pub type b3PlaneResultFcn = ::std::option::Option<
2082    unsafe extern "C" fn(
2083        shapeId: b3ShapeId,
2084        plane: *const b3PlaneResult,
2085        planeCount: ::std::os::raw::c_int,
2086        context: *mut ::std::os::raw::c_void,
2087    ) -> bool,
2088>;
2089/** Used to filter shapes for shape casting character movers.
2090 Return true to accept the collision*/
2091pub type b3MoverFilterFcn = ::std::option::Option<
2092    unsafe extern "C" fn(
2093        shapeId: b3ShapeId,
2094        context: *mut ::std::os::raw::c_void,
2095    ) -> bool,
2096>;
2097/// This holds the mass data computed for a shape.
2098#[repr(C)]
2099#[derive(Debug, Copy, Clone)]
2100pub struct b3MassData {
2101    /// The shape mass
2102    pub mass: f32,
2103    /// The local center of mass position.
2104    pub center: b3Vec3,
2105    /// The inertia tensor about the shape center of mass.
2106    pub inertia: b3Matrix3,
2107}
2108/// A solid sphere
2109#[repr(C)]
2110#[derive(Debug, Copy, Clone)]
2111pub struct b3Sphere {
2112    /// The local center
2113    pub center: b3Vec3,
2114    /// The radius
2115    pub radius: f32,
2116}
2117/** A solid capsule can be viewed as two hemispheres connected
2118 by a rectangle.*/
2119#[repr(C)]
2120#[derive(Debug, Copy, Clone)]
2121pub struct b3Capsule {
2122    /// Local center of the first hemisphere
2123    pub center1: b3Vec3,
2124    /// Local center of the second hemisphere
2125    pub center2: b3Vec3,
2126    /// The radius of the hemispheres
2127    pub radius: f32,
2128}
2129/// A hull vertex. Identified by a half-edge with this vertex as its tail.
2130#[repr(C)]
2131#[derive(Debug, Copy, Clone)]
2132pub struct b3HullVertex {
2133    /** A half-edge that has this vertex as the origin
2134 Can be used along with edge twins and winding order
2135 to traverse all the edges connected to this vertex.*/
2136    pub edge: u8,
2137}
2138/// Half-edge for hull data structure
2139#[repr(C)]
2140#[derive(Debug, Copy, Clone)]
2141pub struct b3HullHalfEdge {
2142    /// Next edge index CCW
2143    pub next: u8,
2144    /// Twin edge index
2145    pub twin: u8,
2146    /// index of origin vertex and point
2147    pub origin: u8,
2148    /// Face to the left of this edge
2149    pub face: u8,
2150}
2151/** A hull face. Hulls use a half-edge data structure, so a face
2152 can be determined from a single half-edge index.*/
2153#[repr(C)]
2154#[derive(Debug, Copy, Clone)]
2155pub struct b3HullFace {
2156    /// An arbitrary half-edge on this face
2157    pub edge: u8,
2158}
2159/** A convex hull.
2160 @note This data structure has data hanging off the end and cannot be directly copied.*/
2161#[repr(C)]
2162#[derive(Debug, Copy, Clone)]
2163pub struct b3HullData {
2164    /// Version must be first and match B3_HULL_VERSION
2165    pub version: u64,
2166    /// The total number of bytes for this hull.
2167    pub byteCount: ::std::os::raw::c_int,
2168    /// Hash of this hull (this field is zero when the hash is computed).
2169    pub hash: u32,
2170    /// Axis-aligned box in local space.
2171    pub aabb: b3AABB,
2172    /// Surface area, typically in squared meters.
2173    pub surfaceArea: f32,
2174    /// Volume, typically in m^3.
2175    pub volume: f32,
2176    /// The radius of the largest sphere at the center.
2177    pub innerRadius: f32,
2178    /// The local centroid
2179    pub center: b3Vec3,
2180    /// The inertia tensor about the centroid.
2181    pub centralInertia: b3Matrix3,
2182    /// The vertex count.
2183    pub vertexCount: ::std::os::raw::c_int,
2184    /// Offset of the vertex array in bytes from the struct address.
2185    pub vertexOffset: ::std::os::raw::c_int,
2186    /// Offset of the point array in bytes from the struct address.
2187    pub pointOffset: ::std::os::raw::c_int,
2188    /// This is the half-edge count (double the edge count)
2189    pub edgeCount: ::std::os::raw::c_int,
2190    /// Offset of the edge array in bytes from the struct address.
2191    pub edgeOffset: ::std::os::raw::c_int,
2192    /// The face count. Hulls faces are convex polygons.
2193    pub faceCount: ::std::os::raw::c_int,
2194    /// Offset of the face plane array in bytes from the struct address.
2195    pub planeOffset: ::std::os::raw::c_int,
2196    /// Offset of the face array in bytes from the struct address.
2197    pub faceOffset: ::std::os::raw::c_int,
2198    /// Offset of structure of array (SOA) vertices
2199    pub soaVertexOffset: ::std::os::raw::c_int,
2200    /// Offset of structure of array (SOA) unit normal vectors
2201    pub soaNormalOffset: ::std::os::raw::c_int,
2202    /** Explicit padding. Hull identity is a content hash and memcmp over raw bytes,
2203 so there must be no unnamed padding for struct copies to scramble.*/
2204    pub padding: ::std::os::raw::c_int,
2205}
2206/// Efficient box hull
2207#[repr(C)]
2208#[derive(Debug, Copy, Clone)]
2209pub struct b3BoxHull {
2210    /// The embedded hull. So the offsets index into the arrays that follow.
2211    pub base: b3HullData,
2212    ///< Box vertices.
2213    pub boxVertices: [b3HullVertex; 8usize],
2214    ///< Box points.
2215    pub boxPoints: [b3Vec3; 8usize],
2216    ///< Box half-edges.
2217    pub boxEdges: [b3HullHalfEdge; 24usize],
2218    ///< Box face planes.
2219    pub boxPlanes: [b3Plane; 6usize],
2220    ///< Box faces.
2221    pub boxFaces: [b3HullFace; 6usize],
2222    ///< Explicit padding, see b3HullData::padding.
2223    pub padding: [u8; 10usize],
2224    ///< vertex x
2225    pub vx: [f32; 8usize],
2226    ///< vertex y
2227    pub vy: [f32; 8usize],
2228    ///< vertex z
2229    pub vz: [f32; 8usize],
2230    ///< normal x, padded to multiple of 4
2231    pub nx: [f32; 8usize],
2232    ///< normal y, padded to multiple of 4
2233    pub ny: [f32; 8usize],
2234    ///< normal z, padded to multiple of 4
2235    pub nz: [f32; 8usize],
2236}
2237/// This is used to create a re-usable collision mesh.
2238#[repr(C)]
2239#[derive(Debug, Copy, Clone)]
2240pub struct b3MeshDef {
2241    /// Triangle vertices
2242    pub vertices: *mut b3Vec3,
2243    /// Triangle vertex indices. 3 for each triangle. CCW winding.
2244    pub indices: *mut i32,
2245    /** Triangle material index. 1 per triangle. Indexes into b3ShapeDef::materials.
2246 This allows different run-time material data to be associated with different
2247 instances of this mesh.*/
2248    pub materialIndices: *mut u8,
2249    /// Tolerance for vertex welding in length units.
2250    pub weldTolerance: f32,
2251    /// The vertex count. Must be 3 or more.
2252    pub vertexCount: ::std::os::raw::c_int,
2253    /// The triangle count. Must be 1 or more.
2254    pub triangleCount: ::std::os::raw::c_int,
2255    /// Optionally weld nearby vertices.
2256    pub weldVertices: bool,
2257    /** Use the median split instead of SAH to speed up mesh creation. Good
2258 for meshes that are structured like a grid.*/
2259    pub useMedianSplit: bool,
2260    /// Compute triangle adjacency information using shared edges
2261    pub identifyEdges: bool,
2262}
2263pub const b3MeshEdgeFlags_b3_concaveEdge1: b3MeshEdgeFlags = 1;
2264pub const b3MeshEdgeFlags_b3_concaveEdge2: b3MeshEdgeFlags = 2;
2265pub const b3MeshEdgeFlags_b3_concaveEdge3: b3MeshEdgeFlags = 4;
2266pub const b3MeshEdgeFlags_b3_inverseConcaveEdge1: b3MeshEdgeFlags = 16;
2267pub const b3MeshEdgeFlags_b3_inverseConcaveEdge2: b3MeshEdgeFlags = 32;
2268pub const b3MeshEdgeFlags_b3_inverseConcaveEdge3: b3MeshEdgeFlags = 64;
2269pub const b3MeshEdgeFlags_b3_allConcaveEdges: b3MeshEdgeFlags = 7;
2270pub const b3MeshEdgeFlags_b3_flatEdge1: b3MeshEdgeFlags = 17;
2271pub const b3MeshEdgeFlags_b3_flatEdge2: b3MeshEdgeFlags = 34;
2272pub const b3MeshEdgeFlags_b3_flatEdge3: b3MeshEdgeFlags = 68;
2273pub const b3MeshEdgeFlags_b3_allFlatEdges: b3MeshEdgeFlags = 119;
2274/// Triangle mesh edge flags.
2275pub type b3MeshEdgeFlags = ::std::os::raw::c_uint;
2276/// A mesh triangle.
2277#[repr(C)]
2278#[derive(Debug, Copy, Clone)]
2279pub struct b3MeshTriangle {
2280    ///< Index of vertex 1.
2281    pub index1: i32,
2282    ///< Index of vertex 2.
2283    pub index2: i32,
2284    ///< Index of vertex 3.
2285    pub index3: i32,
2286}
2287/// A mesh BVH node.
2288#[repr(C)]
2289#[derive(Copy, Clone)]
2290pub struct b3MeshNode {
2291    /// The lower bound of the node AABB. Strategic placement for SIMD.
2292    pub lowerBound: b3Vec3,
2293    pub data: b3MeshNode__bindgen_ty_1,
2294    /// The upper bound of the node AABB.  Strategic placement for SIMD.
2295    pub upperBound: b3Vec3,
2296    /// The index of the leaf triangles.
2297    pub triangleOffset: u32,
2298}
2299/// Anonymous union.
2300#[repr(C)]
2301#[derive(Copy, Clone)]
2302pub union b3MeshNode__bindgen_ty_1 {
2303    pub asNode: b3MeshNode__bindgen_ty_1__bindgen_ty_1,
2304    pub asLeaf: b3MeshNode__bindgen_ty_1__bindgen_ty_2,
2305}
2306/// Internal node
2307#[repr(C)]
2308#[derive(Debug, Copy, Clone)]
2309pub struct b3MeshNode__bindgen_ty_1__bindgen_ty_1 {
2310    pub _bitfield_align_1: [u32; 0],
2311    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
2312}
2313impl b3MeshNode__bindgen_ty_1__bindgen_ty_1 {
2314    #[inline]
2315    pub fn axis(&self) -> u32 {
2316        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
2317    }
2318    #[inline]
2319    pub fn set_axis(&mut self, val: u32) {
2320        unsafe {
2321            let val: u32 = ::std::mem::transmute(val);
2322            self._bitfield_1.set(0usize, 2u8, val as u64)
2323        }
2324    }
2325    #[inline]
2326    pub unsafe fn axis_raw(this: *const Self) -> u32 {
2327        unsafe {
2328            ::std::mem::transmute(
2329                <__BindgenBitfieldUnit<
2330                    [u8; 4usize],
2331                >>::raw_get(::std::ptr::addr_of!((*this)._bitfield_1), 0usize, 2u8)
2332                    as u32,
2333            )
2334        }
2335    }
2336    #[inline]
2337    pub unsafe fn set_axis_raw(this: *mut Self, val: u32) {
2338        unsafe {
2339            let val: u32 = ::std::mem::transmute(val);
2340            <__BindgenBitfieldUnit<
2341                [u8; 4usize],
2342            >>::raw_set(
2343                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2344                0usize,
2345                2u8,
2346                val as u64,
2347            )
2348        }
2349    }
2350    #[inline]
2351    pub fn childOffset(&self) -> u32 {
2352        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) }
2353    }
2354    #[inline]
2355    pub fn set_childOffset(&mut self, val: u32) {
2356        unsafe {
2357            let val: u32 = ::std::mem::transmute(val);
2358            self._bitfield_1.set(2usize, 30u8, val as u64)
2359        }
2360    }
2361    #[inline]
2362    pub unsafe fn childOffset_raw(this: *const Self) -> u32 {
2363        unsafe {
2364            ::std::mem::transmute(
2365                <__BindgenBitfieldUnit<
2366                    [u8; 4usize],
2367                >>::raw_get(::std::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8)
2368                    as u32,
2369            )
2370        }
2371    }
2372    #[inline]
2373    pub unsafe fn set_childOffset_raw(this: *mut Self, val: u32) {
2374        unsafe {
2375            let val: u32 = ::std::mem::transmute(val);
2376            <__BindgenBitfieldUnit<
2377                [u8; 4usize],
2378            >>::raw_set(
2379                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2380                2usize,
2381                30u8,
2382                val as u64,
2383            )
2384        }
2385    }
2386    #[inline]
2387    pub fn new_bitfield_1(
2388        axis: u32,
2389        childOffset: u32,
2390    ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
2391        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
2392        __bindgen_bitfield_unit
2393            .set(
2394                0usize,
2395                2u8,
2396                {
2397                    let axis: u32 = unsafe { ::std::mem::transmute(axis) };
2398                    axis as u64
2399                },
2400            );
2401        __bindgen_bitfield_unit
2402            .set(
2403                2usize,
2404                30u8,
2405                {
2406                    let childOffset: u32 = unsafe { ::std::mem::transmute(childOffset) };
2407                    childOffset as u64
2408                },
2409            );
2410        __bindgen_bitfield_unit
2411    }
2412}
2413/// Leaf node
2414#[repr(C)]
2415#[derive(Debug, Copy, Clone)]
2416pub struct b3MeshNode__bindgen_ty_1__bindgen_ty_2 {
2417    pub _bitfield_align_1: [u32; 0],
2418    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
2419}
2420impl b3MeshNode__bindgen_ty_1__bindgen_ty_2 {
2421    #[inline]
2422    pub fn type_(&self) -> u32 {
2423        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
2424    }
2425    #[inline]
2426    pub fn set_type(&mut self, val: u32) {
2427        unsafe {
2428            let val: u32 = ::std::mem::transmute(val);
2429            self._bitfield_1.set(0usize, 2u8, val as u64)
2430        }
2431    }
2432    #[inline]
2433    pub unsafe fn type__raw(this: *const Self) -> u32 {
2434        unsafe {
2435            ::std::mem::transmute(
2436                <__BindgenBitfieldUnit<
2437                    [u8; 4usize],
2438                >>::raw_get(::std::ptr::addr_of!((*this)._bitfield_1), 0usize, 2u8)
2439                    as u32,
2440            )
2441        }
2442    }
2443    #[inline]
2444    pub unsafe fn set_type_raw(this: *mut Self, val: u32) {
2445        unsafe {
2446            let val: u32 = ::std::mem::transmute(val);
2447            <__BindgenBitfieldUnit<
2448                [u8; 4usize],
2449            >>::raw_set(
2450                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2451                0usize,
2452                2u8,
2453                val as u64,
2454            )
2455        }
2456    }
2457    #[inline]
2458    pub fn triangleCount(&self) -> u32 {
2459        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) }
2460    }
2461    #[inline]
2462    pub fn set_triangleCount(&mut self, val: u32) {
2463        unsafe {
2464            let val: u32 = ::std::mem::transmute(val);
2465            self._bitfield_1.set(2usize, 30u8, val as u64)
2466        }
2467    }
2468    #[inline]
2469    pub unsafe fn triangleCount_raw(this: *const Self) -> u32 {
2470        unsafe {
2471            ::std::mem::transmute(
2472                <__BindgenBitfieldUnit<
2473                    [u8; 4usize],
2474                >>::raw_get(::std::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8)
2475                    as u32,
2476            )
2477        }
2478    }
2479    #[inline]
2480    pub unsafe fn set_triangleCount_raw(this: *mut Self, val: u32) {
2481        unsafe {
2482            let val: u32 = ::std::mem::transmute(val);
2483            <__BindgenBitfieldUnit<
2484                [u8; 4usize],
2485            >>::raw_set(
2486                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2487                2usize,
2488                30u8,
2489                val as u64,
2490            )
2491        }
2492    }
2493    #[inline]
2494    pub fn new_bitfield_1(
2495        type_: u32,
2496        triangleCount: u32,
2497    ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
2498        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
2499        __bindgen_bitfield_unit
2500            .set(
2501                0usize,
2502                2u8,
2503                {
2504                    let type_: u32 = unsafe { ::std::mem::transmute(type_) };
2505                    type_ as u64
2506                },
2507            );
2508        __bindgen_bitfield_unit
2509            .set(
2510                2usize,
2511                30u8,
2512                {
2513                    let triangleCount: u32 = unsafe {
2514                        ::std::mem::transmute(triangleCount)
2515                    };
2516                    triangleCount as u64
2517                },
2518            );
2519        __bindgen_bitfield_unit
2520    }
2521}
2522/** This is a sorted triangle collision bounding volume hierarchy.
2523 @note This struct has data hanging off the end and cannot be directly copied.*/
2524#[repr(C)]
2525#[derive(Debug, Copy, Clone)]
2526pub struct b3MeshData {
2527    /// Version must be first.
2528    pub version: u64,
2529    /// The total number of bytes for this mesh.
2530    pub byteCount: ::std::os::raw::c_int,
2531    /// Hash of this mesh (this field is zero when the hash is computed)
2532    pub hash: u32,
2533    /// Local axis-aligned box.
2534    pub bounds: b3AABB,
2535    /// Combined surface area of all triangles. Single-sided.
2536    pub surfaceArea: f32,
2537    /// The height of the bounding volume hierarchy.
2538    pub treeHeight: ::std::os::raw::c_int,
2539    /// The number of degenerate triangles. Diagnostic.
2540    pub degenerateCount: ::std::os::raw::c_int,
2541    /// Offset of the node array in bytes from the struct address.
2542    pub nodeOffset: ::std::os::raw::c_int,
2543    /// The number of BVH nodes.
2544    pub nodeCount: ::std::os::raw::c_int,
2545    /// Offset of the vertex array in bytes from the struct address.
2546    pub vertexOffset: ::std::os::raw::c_int,
2547    /// The number of vertices.
2548    pub vertexCount: ::std::os::raw::c_int,
2549    /// Offset of the triangle array in bytes from the struct address.
2550    pub triangleOffset: ::std::os::raw::c_int,
2551    /// The number of triangles.
2552    pub triangleCount: ::std::os::raw::c_int,
2553    /// Offset of the material array in bytes from the struct address.
2554    pub materialOffset: ::std::os::raw::c_int,
2555    /// The number of materials.
2556    pub materialCount: ::std::os::raw::c_int,
2557    /// Offset of the triangle flag array in bytes from the struct address.
2558    pub flagsOffset: ::std::os::raw::c_int,
2559}
2560/// This allows mesh data to be re-used with different scales.
2561#[repr(C)]
2562#[derive(Debug, Copy, Clone)]
2563pub struct b3Mesh {
2564    /// Immutable pointer to the mesh data.
2565    pub data: *const b3MeshData,
2566    /** This scale may be non-uniform and have negative components. However,
2567 no component may be very small in magnitude.*/
2568    pub scale: b3Vec3,
2569}
2570/// Data used to create a height field
2571#[repr(C)]
2572#[derive(Debug, Copy, Clone)]
2573pub struct b3HeightFieldDef {
2574    /** Grid point heights
2575 count = countX * countZ*/
2576    pub heights: *mut f32,
2577    /** Grid cell material
2578 A value of 0xFF is reserved for holes
2579 count = (countX - 1) * (countZ - 1)*/
2580    pub materialIndices: *mut u8,
2581    /// The height field scale. All components must be positive values.
2582    pub scale: b3Vec3,
2583    /// The number of grid lines along the x-axis.
2584    pub countX: ::std::os::raw::c_int,
2585    /// The number of grid lines along the z-axis.
2586    pub countZ: ::std::os::raw::c_int,
2587    /** Global minimum and maximum heights used for quantization. This is important
2588 if you want height fields to be placed next to each other and line up exactly.
2589 In that case, both height fields should use the same minimum and maximum heights.
2590 All height values are clamped to this range.
2591 These values are in unscaled space.*/
2592    pub globalMinimumHeight: f32,
2593    /// The maximum.
2594    pub globalMaximumHeight: f32,
2595    /// Use clock-wise winding. This effectively inverts the height-field along the y-axis.
2596    pub clockwiseWinding: bool,
2597}
2598/** A height field with compressed storage.
2599 @note This data structure has data hanging off the end and cannot be directly copied.*/
2600#[repr(C)]
2601#[derive(Debug, Copy, Clone)]
2602pub struct b3HeightFieldData {
2603    /// Version must be first and match B3_HEIGHT_FIELD_VERSION
2604    pub version: u64,
2605    /// The total number of bytes for this height field.
2606    pub byteCount: ::std::os::raw::c_int,
2607    /// Hash of this height field (this field is zero when the hash is computed).
2608    pub hash: u32,
2609    /// The local axis-aligned bounding box.
2610    pub aabb: b3AABB,
2611    /// The minimum y value.
2612    pub minHeight: f32,
2613    /// The maximum y value
2614    pub maxHeight: f32,
2615    /// The quantization scale.
2616    pub heightScale: f32,
2617    /// The overall scale.
2618    pub scale: b3Vec3,
2619    /// The number of grid columns along the local x-axis.
2620    pub columnCount: ::std::os::raw::c_int,
2621    /// The number of grid rows along the local z-axis.
2622    pub rowCount: ::std::os::raw::c_int,
2623    /** Offset of the compressed height array in bytes from the struct address.
2624 uint16_t, one per grid point.*/
2625    pub heightsOffset: ::std::os::raw::c_int,
2626    /** Offset of the material index array in bytes from the struct address.
2627 uint8_t, one per cell.*/
2628    pub materialOffset: ::std::os::raw::c_int,
2629    /** Offset of the flag array in bytes from the struct address.
2630 uint8_t, one per triangle.*/
2631    pub flagsOffset: ::std::os::raw::c_int,
2632    /// Triangle winding.
2633    pub clockwise: bool,
2634    /** Explicit padding. Identity is a content hash over raw bytes, so there must
2635 be no unnamed padding for struct copies to scramble.*/
2636    pub padding: [u8; 3usize],
2637}
2638/// Definition for a capsule in a compound shape.
2639#[repr(C)]
2640#[derive(Debug, Copy, Clone)]
2641pub struct b3CompoundCapsuleDef {
2642    /// Local capsule.
2643    pub capsule: b3Capsule,
2644    /// Material properties.
2645    pub material: b3SurfaceMaterial,
2646}
2647/// Definition for a convex hull in a compound shape.
2648#[repr(C)]
2649#[derive(Debug, Copy, Clone)]
2650pub struct b3CompoundHullDef {
2651    /// Shared hull.
2652    pub hull: *const b3HullData,
2653    /// Transform of the shared hull into compound local space.
2654    pub transform: b3Transform,
2655    /// Material properties.
2656    pub material: b3SurfaceMaterial,
2657}
2658/// Definition for a triangle mesh in a compound shape.
2659#[repr(C)]
2660#[derive(Debug, Copy, Clone)]
2661pub struct b3CompoundMeshDef {
2662    /// Shared mesh.
2663    pub meshData: *const b3MeshData,
2664    /// Transform of the shared mesh into compound local space.
2665    pub transform: b3Transform,
2666    /// Local space non-uniform mesh scale. May have negative components.
2667    pub scale: b3Vec3,
2668    /** Material properties.
2669 This array must line up with the material indices on the triangles.*/
2670    pub materials: *const b3SurfaceMaterial,
2671    /// Number of materials.
2672    pub materialCount: ::std::os::raw::c_int,
2673}
2674/// Definition for a sphere in a compound shape.
2675#[repr(C)]
2676#[derive(Debug, Copy, Clone)]
2677pub struct b3CompoundSphereDef {
2678    /// Local sphere.
2679    pub sphere: b3Sphere,
2680    /// Material properties.
2681    pub material: b3SurfaceMaterial,
2682}
2683/** Definition for creating a compound shape. All this data is fully cloned
2684 into the run-time compound shape.*/
2685#[repr(C)]
2686#[derive(Debug, Copy, Clone)]
2687pub struct b3CompoundDef {
2688    /// Capsule instances.
2689    pub capsules: *mut b3CompoundCapsuleDef,
2690    /// Number of capsules.
2691    pub capsuleCount: ::std::os::raw::c_int,
2692    /// Hulls instances.
2693    pub hulls: *mut b3CompoundHullDef,
2694    /// Number of hull instances.
2695    pub hullCount: ::std::os::raw::c_int,
2696    /// Mesh instances.
2697    pub meshes: *mut b3CompoundMeshDef,
2698    /// Number of mesh instances.
2699    pub meshCount: ::std::os::raw::c_int,
2700    /// Sphere instances.
2701    pub spheres: *mut b3CompoundSphereDef,
2702    /// Number of spheres.
2703    pub sphereCount: ::std::os::raw::c_int,
2704}
2705/** The data for a baked compound shape. This is a potentially large yet highly optimized
2706 data structure. It can contain thousands of child shapes, yet at runtime it populates
2707 into the world as a single shape in the runtime broad-phase.
2708 This data structure has data living off the end and must be accessed using offsets.
2709 Accessors are provided for user relevant data.
2710 Note: you don't need to use this to create runtime compounds. For runtime compounds you can
2711 add multiple shapes to a body using the regular shape creation functions.*/
2712#[repr(C)]
2713#[derive(Debug, Copy, Clone)]
2714pub struct b3CompoundData {
2715    /// The compound version is always first.
2716    pub version: u64,
2717    /// The total number of bytes for this compound.
2718    pub byteCount: ::std::os::raw::c_int,
2719    /// Offset of the tree node array in bytes from the struct address.
2720    pub nodeOffset: ::std::os::raw::c_int,
2721    /// Immutable dynamic tree. The tree node pointer must be fixed up using the node offset
2722    pub tree: b3DynamicTree,
2723    /// Offset of the material array in bytes from the struct address.
2724    pub materialOffset: ::std::os::raw::c_int,
2725    /// The number of materials.
2726    pub materialCount: ::std::os::raw::c_int,
2727    /// Offset of the capsule array in bytes from the struct address.
2728    pub capsuleOffset: ::std::os::raw::c_int,
2729    /// The number of capsules.
2730    pub capsuleCount: ::std::os::raw::c_int,
2731    /// Offset of the hull instance array in bytes from the struct address.
2732    pub hullOffset: ::std::os::raw::c_int,
2733    /// The number of hull instances.
2734    pub hullCount: ::std::os::raw::c_int,
2735    /// The number of unique hulls. Diagnostic.
2736    pub sharedHullCount: ::std::os::raw::c_int,
2737    /// Offset of the mesh instance array in bytes from the struct address.
2738    pub meshOffset: ::std::os::raw::c_int,
2739    /// The number of mesh instances.
2740    pub meshCount: ::std::os::raw::c_int,
2741    /// The number of unique meshes. Diagnostic.
2742    pub sharedMeshCount: ::std::os::raw::c_int,
2743    /// Offset of the sphere array in bytes from the struct address.
2744    pub sphereOffset: ::std::os::raw::c_int,
2745    /// The number of spheres.
2746    pub sphereCount: ::std::os::raw::c_int,
2747}
2748/// A capsule that lives in a compound.
2749#[repr(C)]
2750#[derive(Debug, Copy, Clone)]
2751pub struct b3CompoundCapsule {
2752    /// Local capsule.
2753    pub capsule: b3Capsule,
2754    /// Index to a shared material.
2755    pub materialIndex: ::std::os::raw::c_int,
2756}
2757/// A hull that lives in a compound.
2758#[repr(C)]
2759#[derive(Debug, Copy, Clone)]
2760pub struct b3CompoundHull {
2761    /// Pointer to the unique shared hull.
2762    pub hull: *const b3HullData,
2763    /// The transform of this hull instance.
2764    pub transform: b3Transform,
2765    /// Index to a shared material.
2766    pub materialIndex: ::std::os::raw::c_int,
2767}
2768/// A mesh with non-uniform scale that lives in a compound.
2769#[repr(C)]
2770#[derive(Debug, Copy, Clone)]
2771pub struct b3CompoundMesh {
2772    /// Pointer to the unique shared mesh.
2773    pub meshData: *const b3MeshData,
2774    /// The transform of this mesh instance.
2775    pub transform: b3Transform,
2776    /// Non-uniform scale of this mesh instance.
2777    pub scale: b3Vec3,
2778    /** This is used to access the surface material from b3GetCompoundMaterials.
2779 Requires an extra level of indirection. The triangle material index
2780 is clamped to B3_MAX_COMPOUND_MESH_MATERIALS.
2781 materialIndex = materialIndices[triangle->materialIndex]*/
2782    pub materialIndices: [::std::os::raw::c_int; 4usize],
2783}
2784/// A sphere that lives in a compound.
2785#[repr(C)]
2786#[derive(Debug, Copy, Clone)]
2787pub struct b3CompoundSphere {
2788    /// Local sphere.
2789    pub sphere: b3Sphere,
2790    /// Index to a shared material.
2791    pub materialIndex: ::std::os::raw::c_int,
2792}
2793/// Child shape of a compound
2794#[repr(C)]
2795#[derive(Copy, Clone)]
2796pub struct b3ChildShape {
2797    pub __bindgen_anon_1: b3ChildShape__bindgen_ty_1,
2798    /// Transform of the shape into compound local space.
2799    pub transform: b3Transform,
2800    /** Material indices. Index 0 is used for convex shapes.
2801 todo limit to 64K?*/
2802    pub materialIndices: [::std::os::raw::c_int; 4usize],
2803    /// The shape type (union tag).
2804    pub type_: b3ShapeType,
2805}
2806/// Tagged union.
2807#[repr(C)]
2808#[derive(Copy, Clone)]
2809pub union b3ChildShape__bindgen_ty_1 {
2810    ///< Capsule.
2811    pub capsule: b3Capsule,
2812    ///< Hull.
2813    pub hull: *const b3HullData,
2814    ///< Mesh.
2815    pub mesh: b3Mesh,
2816    ///< Sphere.
2817    pub sphere: b3Sphere,
2818}
2819/// Callback for compound overlap queries.
2820pub type b3CompoundQueryFcn = ::std::option::Option<
2821    unsafe extern "C" fn(
2822        compound: *const b3CompoundData,
2823        childIndex: ::std::os::raw::c_int,
2824        context: *mut ::std::os::raw::c_void,
2825    ) -> bool,
2826>;
2827/** A manifold point is a contact point belonging to a contact manifold.
2828 It holds details related to the geometry and dynamics of the contact points.
2829 Box3D uses speculative collision so some contact points may be separated.
2830 You may use the maxNormalImpulse to determine if there was an interaction during
2831 the time step.*/
2832#[repr(C)]
2833#[derive(Debug, Copy, Clone)]
2834pub struct b3ManifoldPoint {
2835    /// Location of the contact point relative to the bodyA center of mass in world space.
2836    pub anchorA: b3Vec3,
2837    /// Location of the contact point relative to the bodyB center of mass in world space.
2838    pub anchorB: b3Vec3,
2839    /// The separation of the contact point, negative if penetrating
2840    pub separation: f32,
2841    /// Cached separation used for contact recycling
2842    pub baseSeparation: f32,
2843    /** The impulse along the manifold normal vector. Since Box3D uses sub-stepping, this is
2844 result from the final sub-step.*/
2845    pub normalImpulse: f32,
2846    /** The total normal impulse applied during sub-stepping. This is important
2847 to identify speculative contact points that had an interaction in the time step.*/
2848    pub totalNormalImpulse: f32,
2849    /** Relative normal velocity pre-solve. Used for hit events. If the normal impulse is
2850 zero then there was no hit. Negative means shapes are approaching.*/
2851    pub normalVelocity: f32,
2852    /** Local point for matching
2853 Uniquely identifies a contact point between two shapes*/
2854    pub featureId: u32,
2855    /// Triangle index if one of the shapes is a mesh or height field
2856    pub triangleIndex: ::std::os::raw::c_int,
2857    /// Did this contact point exist in the previous step?
2858    pub persisted: bool,
2859}
2860/** A contact manifold describes the contact points between colliding shapes.
2861 @note Box3D uses speculative collision so some contact points may be separated.*/
2862#[repr(C)]
2863#[derive(Debug, Copy, Clone)]
2864pub struct b3Manifold {
2865    /// The manifold points. There may be 1 to 4 valid points.
2866    pub points: [b3ManifoldPoint; 4usize],
2867    /// The unit normal vector in world space, points from shape A to shape B
2868    pub normal: b3Vec3,
2869    /// Central friction angular impulse (applied about the normal)
2870    pub twistImpulse: f32,
2871    /// Central friction linear impulse
2872    pub frictionImpulse: b3Vec3,
2873    /// Rolling resistance angular impulse
2874    pub rollingImpulse: b3Vec3,
2875    /// The number of contact points, will be 0 to 4
2876    pub pointCount: ::std::os::raw::c_int,
2877}
2878pub const b3SeparatingFeature_b3_invalidAxis: b3SeparatingFeature = 0;
2879pub const b3SeparatingFeature_b3_backsideAxis: b3SeparatingFeature = 1;
2880pub const b3SeparatingFeature_b3_faceAxisA: b3SeparatingFeature = 2;
2881pub const b3SeparatingFeature_b3_faceAxisB: b3SeparatingFeature = 3;
2882pub const b3SeparatingFeature_b3_edgePairAxis: b3SeparatingFeature = 4;
2883pub const b3SeparatingFeature_b3_closestPointsAxis: b3SeparatingFeature = 5;
2884/// These are for testing
2885pub const b3SeparatingFeature_b3_manualFaceAxisA: b3SeparatingFeature = 6;
2886/// These are for testing
2887pub const b3SeparatingFeature_b3_manualFaceAxisB: b3SeparatingFeature = 7;
2888/// These are for testing
2889pub const b3SeparatingFeature_b3_manualEdgePairAxis: b3SeparatingFeature = 8;
2890/// Cached separating axis feature.
2891pub type b3SeparatingFeature = ::std::os::raw::c_uint;
2892pub const b3TriangleFeature_b3_featureNone: b3TriangleFeature = 0;
2893pub const b3TriangleFeature_b3_featureTriangleFace: b3TriangleFeature = 1;
2894pub const b3TriangleFeature_b3_featureHullFace: b3TriangleFeature = 2;
2895/// v1-v2
2896pub const b3TriangleFeature_b3_featureEdge1: b3TriangleFeature = 3;
2897/// v2-v3
2898pub const b3TriangleFeature_b3_featureEdge2: b3TriangleFeature = 4;
2899/// v3-v1
2900pub const b3TriangleFeature_b3_featureEdge3: b3TriangleFeature = 5;
2901/// v3-v1
2902pub const b3TriangleFeature_b3_featureVertex1: b3TriangleFeature = 6;
2903/// v3-v1
2904pub const b3TriangleFeature_b3_featureVertex2: b3TriangleFeature = 7;
2905/// v3-v1
2906pub const b3TriangleFeature_b3_featureVertex3: b3TriangleFeature = 8;
2907/// Cached triangle feature.
2908pub type b3TriangleFeature = ::std::os::raw::c_uint;
2909/// Separating axis test cache. Provides temporal acceleration of collision routines.
2910#[repr(C)]
2911#[derive(Debug, Copy, Clone)]
2912pub struct b3SATCache {
2913    /// The separation when the cache is populated. Negative for overlap.
2914    pub separation: f32,
2915    /// b3SeparatingFeature.
2916    pub type_: u8,
2917    /// Index of the feature on shape A.
2918    pub indexA: u8,
2919    /// Index of the feature on shape B.
2920    pub indexB: u8,
2921    /// Was the cache re-used?
2922    pub hit: u8,
2923}
2924/** Contact points are always the result of two edges intersecting.
2925 It can be two edges of the same shape, which is just a shape vertex.
2926 Or a contact point can be the result of two edges crossing from different shapes.
2927 This is designed to support hull versus hull, but it is adapted to work
2928 with all shape types. The feature pair is used to identify contact points
2929 for temporal coherence and warm starting.*/
2930#[repr(C)]
2931#[derive(Debug, Copy, Clone)]
2932pub struct b3FeaturePair {
2933    /// Incoming type (either edge on shape A or shape B)
2934    pub owner1: u8,
2935    /// Incoming edge index (into associated shape array)
2936    pub index1: u8,
2937    /// Outgoing type (either edge on shape A or shape B)
2938    pub owner2: u8,
2939    /// Outgoing edge index (into associated shape array)
2940    pub index2: u8,
2941}
2942/// A local manifold point and normal in frame A.
2943#[repr(C)]
2944#[derive(Debug, Copy, Clone)]
2945pub struct b3LocalManifoldPoint {
2946    /// Local point in frame A.
2947    pub point: b3Vec3,
2948    /// The contact point separation. Negative for overlap.
2949    pub separation: f32,
2950    /// The feature pair for this point.
2951    pub pair: b3FeaturePair,
2952    /// The triangle index when collide with a mesh or height-field.
2953    pub triangleIndex: ::std::os::raw::c_int,
2954}
2955/// A local manifold with no dynamic information. Used by b3Collide functions.
2956#[repr(C)]
2957#[derive(Debug, Copy, Clone)]
2958pub struct b3LocalManifold {
2959    /// Local normal in frame A.
2960    pub normal: b3Vec3,
2961    /// The triangle normal.
2962    pub triangleNormal: b3Vec3,
2963    /// The manifold points. From a point buffer.
2964    pub points: *mut b3LocalManifoldPoint,
2965    /// The number of manifold points. Only bounded by the buffer capacity.
2966    pub pointCount: ::std::os::raw::c_int,
2967    /// The index of the triangle.
2968    pub triangleIndex: ::std::os::raw::c_int,
2969    ///< Vertex 1 index.
2970    pub i1: ::std::os::raw::c_int,
2971    ///< Vertex 2 index.
2972    pub i2: ::std::os::raw::c_int,
2973    ///< Vertex 3 index.
2974    pub i3: ::std::os::raw::c_int,
2975    /// The squared distance of a sphere from a triangle. For ghost collision reduction.
2976    pub squaredDistance: f32,
2977    /// The triangle feature involved.
2978    pub feature: b3TriangleFeature,
2979    /// b3MeshEdgeFlags.
2980    pub triangleFlags: ::std::os::raw::c_int,
2981}
2982pub const b3HexColor_b3_colorAliceBlue: b3HexColor = 15792383;
2983pub const b3HexColor_b3_colorAntiqueWhite: b3HexColor = 16444375;
2984pub const b3HexColor_b3_colorAqua: b3HexColor = 65535;
2985pub const b3HexColor_b3_colorAquamarine: b3HexColor = 8388564;
2986pub const b3HexColor_b3_colorAzure: b3HexColor = 15794175;
2987pub const b3HexColor_b3_colorBeige: b3HexColor = 16119260;
2988pub const b3HexColor_b3_colorBisque: b3HexColor = 16770244;
2989pub const b3HexColor_b3_colorBlack: b3HexColor = 0;
2990pub const b3HexColor_b3_colorBlanchedAlmond: b3HexColor = 16772045;
2991pub const b3HexColor_b3_colorBlue: b3HexColor = 255;
2992pub const b3HexColor_b3_colorBlueViolet: b3HexColor = 9055202;
2993pub const b3HexColor_b3_colorBrown: b3HexColor = 10824234;
2994pub const b3HexColor_b3_colorBurlywood: b3HexColor = 14596231;
2995pub const b3HexColor_b3_colorCadetBlue: b3HexColor = 6266528;
2996pub const b3HexColor_b3_colorChartreuse: b3HexColor = 8388352;
2997pub const b3HexColor_b3_colorChocolate: b3HexColor = 13789470;
2998pub const b3HexColor_b3_colorCoral: b3HexColor = 16744272;
2999pub const b3HexColor_b3_colorCornflowerBlue: b3HexColor = 6591981;
3000pub const b3HexColor_b3_colorCornsilk: b3HexColor = 16775388;
3001pub const b3HexColor_b3_colorCrimson: b3HexColor = 14423100;
3002pub const b3HexColor_b3_colorCyan: b3HexColor = 65535;
3003pub const b3HexColor_b3_colorDarkBlue: b3HexColor = 139;
3004pub const b3HexColor_b3_colorDarkCyan: b3HexColor = 35723;
3005pub const b3HexColor_b3_colorDarkGoldenRod: b3HexColor = 12092939;
3006pub const b3HexColor_b3_colorDarkGray: b3HexColor = 11119017;
3007pub const b3HexColor_b3_colorDarkGreen: b3HexColor = 25600;
3008pub const b3HexColor_b3_colorDarkKhaki: b3HexColor = 12433259;
3009pub const b3HexColor_b3_colorDarkMagenta: b3HexColor = 9109643;
3010pub const b3HexColor_b3_colorDarkOliveGreen: b3HexColor = 5597999;
3011pub const b3HexColor_b3_colorDarkOrange: b3HexColor = 16747520;
3012pub const b3HexColor_b3_colorDarkOrchid: b3HexColor = 10040012;
3013pub const b3HexColor_b3_colorDarkRed: b3HexColor = 9109504;
3014pub const b3HexColor_b3_colorDarkSalmon: b3HexColor = 15308410;
3015pub const b3HexColor_b3_colorDarkSeaGreen: b3HexColor = 9419919;
3016pub const b3HexColor_b3_colorDarkSlateBlue: b3HexColor = 4734347;
3017pub const b3HexColor_b3_colorDarkSlateGray: b3HexColor = 3100495;
3018pub const b3HexColor_b3_colorDarkTurquoise: b3HexColor = 52945;
3019pub const b3HexColor_b3_colorDarkViolet: b3HexColor = 9699539;
3020pub const b3HexColor_b3_colorDeepPink: b3HexColor = 16716947;
3021pub const b3HexColor_b3_colorDeepSkyBlue: b3HexColor = 49151;
3022pub const b3HexColor_b3_colorDimGray: b3HexColor = 6908265;
3023pub const b3HexColor_b3_colorDodgerBlue: b3HexColor = 2003199;
3024pub const b3HexColor_b3_colorFireBrick: b3HexColor = 11674146;
3025pub const b3HexColor_b3_colorFloralWhite: b3HexColor = 16775920;
3026pub const b3HexColor_b3_colorForestGreen: b3HexColor = 2263842;
3027pub const b3HexColor_b3_colorFuchsia: b3HexColor = 16711935;
3028pub const b3HexColor_b3_colorGainsboro: b3HexColor = 14474460;
3029pub const b3HexColor_b3_colorGhostWhite: b3HexColor = 16316671;
3030pub const b3HexColor_b3_colorGold: b3HexColor = 16766720;
3031pub const b3HexColor_b3_colorGoldenRod: b3HexColor = 14329120;
3032pub const b3HexColor_b3_colorGray: b3HexColor = 8421504;
3033pub const b3HexColor_b3_colorGreen: b3HexColor = 32768;
3034pub const b3HexColor_b3_colorGreenYellow: b3HexColor = 11403055;
3035pub const b3HexColor_b3_colorHoneyDew: b3HexColor = 15794160;
3036pub const b3HexColor_b3_colorHotPink: b3HexColor = 16738740;
3037pub const b3HexColor_b3_colorIndianRed: b3HexColor = 13458524;
3038pub const b3HexColor_b3_colorIndigo: b3HexColor = 4915330;
3039pub const b3HexColor_b3_colorIvory: b3HexColor = 16777200;
3040pub const b3HexColor_b3_colorKhaki: b3HexColor = 15787660;
3041pub const b3HexColor_b3_colorLavender: b3HexColor = 15132410;
3042pub const b3HexColor_b3_colorLavenderBlush: b3HexColor = 16773365;
3043pub const b3HexColor_b3_colorLawnGreen: b3HexColor = 8190976;
3044pub const b3HexColor_b3_colorLemonChiffon: b3HexColor = 16775885;
3045pub const b3HexColor_b3_colorLightBlue: b3HexColor = 11393254;
3046pub const b3HexColor_b3_colorLightCoral: b3HexColor = 15761536;
3047pub const b3HexColor_b3_colorLightCyan: b3HexColor = 14745599;
3048pub const b3HexColor_b3_colorLightGoldenRodYellow: b3HexColor = 16448210;
3049pub const b3HexColor_b3_colorLightGray: b3HexColor = 13882323;
3050pub const b3HexColor_b3_colorLightGreen: b3HexColor = 9498256;
3051pub const b3HexColor_b3_colorLightPink: b3HexColor = 16758465;
3052pub const b3HexColor_b3_colorLightSalmon: b3HexColor = 16752762;
3053pub const b3HexColor_b3_colorLightSeaGreen: b3HexColor = 2142890;
3054pub const b3HexColor_b3_colorLightSkyBlue: b3HexColor = 8900346;
3055pub const b3HexColor_b3_colorLightSlateGray: b3HexColor = 7833753;
3056pub const b3HexColor_b3_colorLightSteelBlue: b3HexColor = 11584734;
3057pub const b3HexColor_b3_colorLightYellow: b3HexColor = 16777184;
3058pub const b3HexColor_b3_colorLime: b3HexColor = 65280;
3059pub const b3HexColor_b3_colorLimeGreen: b3HexColor = 3329330;
3060pub const b3HexColor_b3_colorLinen: b3HexColor = 16445670;
3061pub const b3HexColor_b3_colorMagenta: b3HexColor = 16711935;
3062pub const b3HexColor_b3_colorMaroon: b3HexColor = 8388608;
3063pub const b3HexColor_b3_colorMediumAquaMarine: b3HexColor = 6737322;
3064pub const b3HexColor_b3_colorMediumBlue: b3HexColor = 205;
3065pub const b3HexColor_b3_colorMediumOrchid: b3HexColor = 12211667;
3066pub const b3HexColor_b3_colorMediumPurple: b3HexColor = 9662683;
3067pub const b3HexColor_b3_colorMediumSeaGreen: b3HexColor = 3978097;
3068pub const b3HexColor_b3_colorMediumSlateBlue: b3HexColor = 8087790;
3069pub const b3HexColor_b3_colorMediumSpringGreen: b3HexColor = 64154;
3070pub const b3HexColor_b3_colorMediumTurquoise: b3HexColor = 4772300;
3071pub const b3HexColor_b3_colorMediumVioletRed: b3HexColor = 13047173;
3072pub const b3HexColor_b3_colorMidnightBlue: b3HexColor = 1644912;
3073pub const b3HexColor_b3_colorMintCream: b3HexColor = 16121850;
3074pub const b3HexColor_b3_colorMistyRose: b3HexColor = 16770273;
3075pub const b3HexColor_b3_colorMoccasin: b3HexColor = 16770229;
3076pub const b3HexColor_b3_colorNavajoWhite: b3HexColor = 16768685;
3077pub const b3HexColor_b3_colorNavy: b3HexColor = 128;
3078pub const b3HexColor_b3_colorOldLace: b3HexColor = 16643558;
3079pub const b3HexColor_b3_colorOlive: b3HexColor = 8421376;
3080pub const b3HexColor_b3_colorOliveDrab: b3HexColor = 7048739;
3081pub const b3HexColor_b3_colorOrange: b3HexColor = 16753920;
3082pub const b3HexColor_b3_colorOrangeRed: b3HexColor = 16729344;
3083pub const b3HexColor_b3_colorOrchid: b3HexColor = 14315734;
3084pub const b3HexColor_b3_colorPaleGoldenRod: b3HexColor = 15657130;
3085pub const b3HexColor_b3_colorPaleGreen: b3HexColor = 10025880;
3086pub const b3HexColor_b3_colorPaleTurquoise: b3HexColor = 11529966;
3087pub const b3HexColor_b3_colorPaleVioletRed: b3HexColor = 14381203;
3088pub const b3HexColor_b3_colorPapayaWhip: b3HexColor = 16773077;
3089pub const b3HexColor_b3_colorPeachPuff: b3HexColor = 16767673;
3090pub const b3HexColor_b3_colorPeru: b3HexColor = 13468991;
3091pub const b3HexColor_b3_colorPink: b3HexColor = 16761035;
3092pub const b3HexColor_b3_colorPlum: b3HexColor = 14524637;
3093pub const b3HexColor_b3_colorPowderBlue: b3HexColor = 11591910;
3094pub const b3HexColor_b3_colorPurple: b3HexColor = 8388736;
3095pub const b3HexColor_b3_colorRebeccaPurple: b3HexColor = 6697881;
3096pub const b3HexColor_b3_colorRed: b3HexColor = 16711680;
3097pub const b3HexColor_b3_colorRosyBrown: b3HexColor = 12357519;
3098pub const b3HexColor_b3_colorRoyalBlue: b3HexColor = 4286945;
3099pub const b3HexColor_b3_colorSaddleBrown: b3HexColor = 9127187;
3100pub const b3HexColor_b3_colorSalmon: b3HexColor = 16416882;
3101pub const b3HexColor_b3_colorSandyBrown: b3HexColor = 16032864;
3102pub const b3HexColor_b3_colorSeaGreen: b3HexColor = 3050327;
3103pub const b3HexColor_b3_colorSeaShell: b3HexColor = 16774638;
3104pub const b3HexColor_b3_colorSienna: b3HexColor = 10506797;
3105pub const b3HexColor_b3_colorSilver: b3HexColor = 12632256;
3106pub const b3HexColor_b3_colorSkyBlue: b3HexColor = 8900331;
3107pub const b3HexColor_b3_colorSlateBlue: b3HexColor = 6970061;
3108pub const b3HexColor_b3_colorSlateGray: b3HexColor = 7372944;
3109pub const b3HexColor_b3_colorSnow: b3HexColor = 16775930;
3110pub const b3HexColor_b3_colorSpringGreen: b3HexColor = 65407;
3111pub const b3HexColor_b3_colorSteelBlue: b3HexColor = 4620980;
3112pub const b3HexColor_b3_colorTan: b3HexColor = 13808780;
3113pub const b3HexColor_b3_colorTeal: b3HexColor = 32896;
3114pub const b3HexColor_b3_colorThistle: b3HexColor = 14204888;
3115pub const b3HexColor_b3_colorTomato: b3HexColor = 16737095;
3116pub const b3HexColor_b3_colorTurquoise: b3HexColor = 4251856;
3117pub const b3HexColor_b3_colorViolet: b3HexColor = 15631086;
3118pub const b3HexColor_b3_colorWheat: b3HexColor = 16113331;
3119pub const b3HexColor_b3_colorWhite: b3HexColor = 16777215;
3120pub const b3HexColor_b3_colorWhiteSmoke: b3HexColor = 16119285;
3121pub const b3HexColor_b3_colorYellow: b3HexColor = 16776960;
3122pub const b3HexColor_b3_colorYellowGreen: b3HexColor = 10145074;
3123pub const b3HexColor_b3_colorBox2DRed: b3HexColor = 14430514;
3124pub const b3HexColor_b3_colorBox2DBlue: b3HexColor = 3190463;
3125pub const b3HexColor_b3_colorBox2DGreen: b3HexColor = 9226532;
3126pub const b3HexColor_b3_colorBox2DYellow: b3HexColor = 16772748;
3127/** These colors are used for debug draw and mostly match the named SVG colors.
3128 See https://www.rapidtables.com/web/color/index.html
3129 https://johndecember.com/html/spec/colorsvg.html
3130 https://upload.wikimedia.org/wikipedia/commons/2/2b/SVG_Recognized_color_keyword_names.svg*/
3131pub type b3HexColor = ::std::os::raw::c_uint;
3132pub const b3DebugMaterial_b3_debugMaterialDefault: b3DebugMaterial = 0;
3133pub const b3DebugMaterial_b3_debugMaterialMatte: b3DebugMaterial = 1;
3134pub const b3DebugMaterial_b3_debugMaterialSoft: b3DebugMaterial = 2;
3135pub const b3DebugMaterial_b3_debugMaterialDead: b3DebugMaterial = 3;
3136pub const b3DebugMaterial_b3_debugMaterialGlossy: b3DebugMaterial = 4;
3137pub const b3DebugMaterial_b3_debugMaterialMetallic: b3DebugMaterial = 5;
3138/** Debug draw material preset. Optionally packed into the unused high byte of a
3139 b3HexColor (or b3SurfaceMaterial::customColor) to drive the renderer's PBR
3140 roughness and metalness. The low 24 bits stay RGB, so a plain 0xRRGGBB color
3141 reads as b3_debugMaterialDefault and keeps the renderer's per-body-type look.*/
3142pub type b3DebugMaterial = ::std::os::raw::c_uint;
3143unsafe extern "C" {
3144    /** Get the visualization color assigned to a constraint graph color slot. The last index
3145 (B3_GRAPH_COLOR_COUNT - 1) is the overflow color.*/
3146    pub fn b3GetGraphColor(index: ::std::os::raw::c_int) -> b3HexColor;
3147}
3148/** This is sent to the user for debug shape creation. The user should know the type in case they have
3149 custom sphere or capsule rendering.*/
3150#[repr(C)]
3151#[derive(Copy, Clone)]
3152pub struct b3DebugShape {
3153    /// Shape id.
3154    pub shapeId: b3ShapeId,
3155    /// Shape type.
3156    pub type_: b3ShapeType,
3157    pub __bindgen_anon_1: b3DebugShape__bindgen_ty_1,
3158}
3159/// Tagged union.
3160#[repr(C)]
3161#[derive(Copy, Clone)]
3162pub union b3DebugShape__bindgen_ty_1 {
3163    ///< Capsule shape.
3164    pub capsule: *const b3Capsule,
3165    ///< Compound shape.
3166    pub compound: *const b3CompoundData,
3167    ///< Height-field shape.
3168    pub heightField: *const b3HeightFieldData,
3169    ///< Convex hull shape.
3170    pub hull: *const b3HullData,
3171    ///< Mesh shape with scale.
3172    pub mesh: *const b3Mesh,
3173    ///< Sphere shape.
3174    pub sphere: *const b3Sphere,
3175}
3176/** This struct is passed to b3World_Draw to draw a debug view of the simulation world.
3177 Callbacks receive world coordinates. In large world mode the translation is double precision so
3178 it stays accurate far from the origin. Shift into your own camera frame inside the callbacks.*/
3179#[repr(C)]
3180#[derive(Debug, Copy, Clone)]
3181pub struct b3DebugDraw {
3182    /** Draws a user shape. The userShape pointer is owned by the application and is known to Box3D as
3183 an opaque pointer returned from b3CreateDebugShapeCallback. When this is called the drawn shape has
3184 passed a culling test against drawingBounds below.*/
3185    pub DrawShapeFcn: ::std::option::Option<
3186        unsafe extern "C" fn(
3187            userShape: *mut ::std::os::raw::c_void,
3188            transform: b3WorldTransform,
3189            color: b3HexColor,
3190            context: *mut ::std::os::raw::c_void,
3191        ),
3192    >,
3193    /// Draw a line segment.
3194    pub DrawSegmentFcn: ::std::option::Option<
3195        unsafe extern "C" fn(
3196            p1: b3Pos,
3197            p2: b3Pos,
3198            color: b3HexColor,
3199            context: *mut ::std::os::raw::c_void,
3200        ),
3201    >,
3202    /// Draw a transform. Choose your own length scale.
3203    pub DrawTransformFcn: ::std::option::Option<
3204        unsafe extern "C" fn(
3205            transform: b3WorldTransform,
3206            context: *mut ::std::os::raw::c_void,
3207        ),
3208    >,
3209    /// Draw a point.
3210    pub DrawPointFcn: ::std::option::Option<
3211        unsafe extern "C" fn(
3212            p: b3Pos,
3213            size: f32,
3214            color: b3HexColor,
3215            context: *mut ::std::os::raw::c_void,
3216        ),
3217    >,
3218    /// Draw a sphere.
3219    pub DrawSphereFcn: ::std::option::Option<
3220        unsafe extern "C" fn(
3221            p: b3Pos,
3222            radius: f32,
3223            color: b3HexColor,
3224            alpha: f32,
3225            context: *mut ::std::os::raw::c_void,
3226        ),
3227    >,
3228    /// Draw a capsule.
3229    pub DrawCapsuleFcn: ::std::option::Option<
3230        unsafe extern "C" fn(
3231            p1: b3Pos,
3232            p2: b3Pos,
3233            radius: f32,
3234            color: b3HexColor,
3235            alpha: f32,
3236            context: *mut ::std::os::raw::c_void,
3237        ),
3238    >,
3239    /// Draw a bounding box.
3240    pub DrawBoundsFcn: ::std::option::Option<
3241        unsafe extern "C" fn(
3242            aabb: b3AABB,
3243            color: b3HexColor,
3244            context: *mut ::std::os::raw::c_void,
3245        ),
3246    >,
3247    /// Draw an oriented box.
3248    pub DrawBoxFcn: ::std::option::Option<
3249        unsafe extern "C" fn(
3250            extents: b3Vec3,
3251            transform: b3WorldTransform,
3252            color: b3HexColor,
3253            context: *mut ::std::os::raw::c_void,
3254        ),
3255    >,
3256    /// Draw a string in world space
3257    pub DrawStringFcn: ::std::option::Option<
3258        unsafe extern "C" fn(
3259            p: b3Pos,
3260            s: *const ::std::os::raw::c_char,
3261            color: b3HexColor,
3262            context: *mut ::std::os::raw::c_void,
3263        ),
3264    >,
3265    /// World bounds to use for debug draw
3266    pub drawingBounds: b3AABB,
3267    /// Scale to use when drawing forces
3268    pub forceScale: f32,
3269    /// Global scaling for joint drawing
3270    pub jointScale: f32,
3271    /// Option to draw shapes
3272    pub drawShapes: bool,
3273    /// Option to draw joints
3274    pub drawJoints: bool,
3275    /// Option to draw additional information for joints
3276    pub drawJointExtras: bool,
3277    /// Option to draw the bounding boxes for shapes
3278    pub drawBounds: bool,
3279    /// Option to draw the mass and center of mass of dynamic bodies
3280    pub drawMass: bool,
3281    /// Option to draw the sleep information for dynamic and kinematic bodies
3282    pub drawSleep: bool,
3283    /// Option to draw body names
3284    pub drawBodyNames: bool,
3285    /// Option to draw contact points
3286    pub drawContacts: bool,
3287    /// Draw contact anchor A or B
3288    pub drawAnchorA: bool,
3289    /// Option to visualize the graph coloring used for contacts and joints
3290    pub drawGraphColors: bool,
3291    /// Option to draw contact features
3292    pub drawContactFeatures: bool,
3293    /// Option to draw contact normals
3294    pub drawContactNormals: bool,
3295    /// Option to draw contact normal forces
3296    pub drawContactForces: bool,
3297    /// Option to draw islands as bounding boxes
3298    pub drawIslands: bool,
3299    /// User context that is passed as an argument to drawing callback functions
3300    pub context: *mut ::std::os::raw::c_void,
3301}
3302unsafe extern "C" {
3303    /// Create a debug draw struct with default values.
3304    pub fn b3DefaultDebugDraw() -> b3DebugDraw;
3305}
3306unsafe extern "C" {
3307    /// Constructing the tree initializes the node pool.
3308    pub fn b3DynamicTree_Create(proxyCapacity: ::std::os::raw::c_int) -> b3DynamicTree;
3309}
3310unsafe extern "C" {
3311    /// Destroy the tree, freeing the node pool.
3312    pub fn b3DynamicTree_Destroy(tree: *mut b3DynamicTree);
3313}
3314unsafe extern "C" {
3315    /// Create a proxy. Provide an AABB and a userData value.
3316    pub fn b3DynamicTree_CreateProxy(
3317        tree: *mut b3DynamicTree,
3318        aabb: b3AABB,
3319        categoryBits: u64,
3320        userData: u64,
3321    ) -> ::std::os::raw::c_int;
3322}
3323unsafe extern "C" {
3324    /// Destroy a proxy. This asserts if the id is invalid.
3325    pub fn b3DynamicTree_DestroyProxy(
3326        tree: *mut b3DynamicTree,
3327        proxyId: ::std::os::raw::c_int,
3328    );
3329}
3330unsafe extern "C" {
3331    /// Move a proxy to a new AABB by removing and reinserting into the tree.
3332    pub fn b3DynamicTree_MoveProxy(
3333        tree: *mut b3DynamicTree,
3334        proxyId: ::std::os::raw::c_int,
3335        aabb: b3AABB,
3336    );
3337}
3338unsafe extern "C" {
3339    /// Enlarge a proxy and enlarge ancestors as necessary.
3340    pub fn b3DynamicTree_EnlargeProxy(
3341        tree: *mut b3DynamicTree,
3342        proxyId: ::std::os::raw::c_int,
3343        aabb: b3AABB,
3344    );
3345}
3346unsafe extern "C" {
3347    /// Modify the category bits on a proxy. This is an expensive operation.
3348    pub fn b3DynamicTree_SetCategoryBits(
3349        tree: *mut b3DynamicTree,
3350        proxyId: ::std::os::raw::c_int,
3351        categoryBits: u64,
3352    );
3353}
3354unsafe extern "C" {
3355    /// Get the category bits on a proxy.
3356    pub fn b3DynamicTree_GetCategoryBits(
3357        tree: *mut b3DynamicTree,
3358        proxyId: ::std::os::raw::c_int,
3359    ) -> u64;
3360}
3361unsafe extern "C" {
3362    /** Query an AABB for overlapping proxies. The callback function is called for each proxy that overlaps the supplied AABB.
3363	@return performance data*/
3364    pub fn b3DynamicTree_Query(
3365        tree: *const b3DynamicTree,
3366        aabb: b3AABB,
3367        maskBits: u64,
3368        requireAllBits: bool,
3369        callback: b3TreeQueryCallbackFcn,
3370        context: *mut ::std::os::raw::c_void,
3371    ) -> b3TreeStats;
3372}
3373unsafe extern "C" {
3374    /** Query an AABB for the closest object. The callback function is called for each proxy that might be closest to the supplied
3375 point.
3376 @param tree the dynamic tree to query
3377 @param point the query point
3378 @param maskBits nodes are skipped if the bit-wise AND with the node category bits is zero
3379 @param requireAllBits nodes are skipped if the bit-wise AND with the node category bits does not equal the maskBits
3380 @param callback a user provided instance of b3TreeQueryClosestCallbackFcn
3381 @param context a user context object that is provided to the callback
3382 @param minDistanceSqr the initial and final minimum squared distance. Provide a small initial to restrict the search and
3383 improve performance. If the value is large this query has performance that scales linearly with the number of proxies and
3384 would be slower than a brute force search.
3385	@return performance data*/
3386    pub fn b3DynamicTree_QueryClosest(
3387        tree: *const b3DynamicTree,
3388        point: b3Vec3,
3389        maskBits: u64,
3390        requireAllBits: bool,
3391        callback: b3TreeQueryClosestCallbackFcn,
3392        context: *mut ::std::os::raw::c_void,
3393        minDistanceSqr: *mut f32,
3394    ) -> b3TreeStats;
3395}
3396unsafe extern "C" {
3397    /** Ray cast against the proxies in the tree. This relies on the callback
3398 to perform an exact ray cast in the case where the proxy contains a shape.
3399 The callback also performs any collision filtering. This has performance
3400 roughly equal to k * log(n), where k is the number of collisions and n is the
3401 number of proxies in the tree.
3402 Bit-wise filtering using mask bits can greatly improve performance in some scenarios.
3403	However, this filtering may be approximate, so the user should still apply filtering to results.
3404 @param tree the dynamic tree to ray cast
3405 @param input the ray cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1)
3406 @param maskBits bit mask test: `bool accept = (maskBits & node->categoryBits) != 0;`
3407 @param requireAllBits modifies bit mask test: `bool accept = (maskBits & node->categoryBits) == maskBits;`
3408 @param callback a callback function that is called for each proxy that is hit by the ray
3409 @param context user context that is passed to the callback
3410	@return performance data*/
3411    pub fn b3DynamicTree_RayCast(
3412        tree: *const b3DynamicTree,
3413        input: *const b3RayCastInput,
3414        maskBits: u64,
3415        requireAllBits: bool,
3416        callback: b3TreeRayCastCallbackFcn,
3417        context: *mut ::std::os::raw::c_void,
3418    ) -> b3TreeStats;
3419}
3420unsafe extern "C" {
3421    /** Sweep an AABB through the tree. The box is in the tree's world float frame and the callback
3422 re-differences each shape at full precision against the query origin. Used by the large world
3423 spatial queries so the tree traversal stays float while the narrow phase stays precise.*/
3424    pub fn b3DynamicTree_BoxCast(
3425        tree: *const b3DynamicTree,
3426        input: *const b3BoxCastInput,
3427        maskBits: u64,
3428        requireAllBits: bool,
3429        callback: b3TreeBoxCastCallbackFcn,
3430        context: *mut ::std::os::raw::c_void,
3431    ) -> b3TreeStats;
3432}
3433unsafe extern "C" {
3434    /// Get the height of the binary tree.
3435    pub fn b3DynamicTree_GetHeight(tree: *const b3DynamicTree) -> ::std::os::raw::c_int;
3436}
3437unsafe extern "C" {
3438    /// Get the ratio of the sum of the node areas to the root area.
3439    pub fn b3DynamicTree_GetAreaRatio(tree: *const b3DynamicTree) -> f32;
3440}
3441unsafe extern "C" {
3442    /// Get the bounding box that contains the entire tree
3443    pub fn b3DynamicTree_GetRootBounds(tree: *const b3DynamicTree) -> b3AABB;
3444}
3445unsafe extern "C" {
3446    /// Get the number of proxies created
3447    pub fn b3DynamicTree_GetProxyCount(
3448        tree: *const b3DynamicTree,
3449    ) -> ::std::os::raw::c_int;
3450}
3451unsafe extern "C" {
3452    /// Rebuild the tree while retaining subtrees that haven't changed. Returns the number of boxes sorted.
3453    pub fn b3DynamicTree_Rebuild(
3454        tree: *mut b3DynamicTree,
3455        fullBuild: bool,
3456    ) -> ::std::os::raw::c_int;
3457}
3458unsafe extern "C" {
3459    /// Get the number of bytes used by this tree
3460    pub fn b3DynamicTree_GetByteCount(
3461        tree: *const b3DynamicTree,
3462    ) -> ::std::os::raw::c_int;
3463}
3464unsafe extern "C" {
3465    /// Validate this tree. For testing.
3466    pub fn b3DynamicTree_Validate(tree: *const b3DynamicTree);
3467}
3468unsafe extern "C" {
3469    /// Validate this tree has no enlarged AABBs. For testing.
3470    pub fn b3DynamicTree_ValidateNoEnlarged(tree: *const b3DynamicTree);
3471}
3472unsafe extern "C" {
3473    /// Save this tree to a file for debugging
3474    pub fn b3DynamicTree_Save(
3475        tree: *const b3DynamicTree,
3476        fileName: *const ::std::os::raw::c_char,
3477    );
3478}
3479unsafe extern "C" {
3480    /// Load a file for debugging
3481    pub fn b3DynamicTree_Load(
3482        fileName: *const ::std::os::raw::c_char,
3483        scale: f32,
3484    ) -> b3DynamicTree;
3485}
3486unsafe extern "C" {
3487    /// Create a tessellated cylinder as a hull.
3488    pub fn b3CreateCylinder(
3489        height: f32,
3490        radius: f32,
3491        yOffset: f32,
3492        sides: ::std::os::raw::c_int,
3493    ) -> *mut b3HullData;
3494}
3495unsafe extern "C" {
3496    /// Create a tessellated cone as a hull.
3497    pub fn b3CreateCone(
3498        height: f32,
3499        radius1: f32,
3500        radius2: f32,
3501        slices: ::std::os::raw::c_int,
3502    ) -> *mut b3HullData;
3503}
3504unsafe extern "C" {
3505    /// Create a rock shaped hull.
3506    pub fn b3CreateRock(radius: f32) -> *mut b3HullData;
3507}
3508unsafe extern "C" {
3509    /// Create a generic convex hull.
3510    pub fn b3CreateHull(
3511        points: *const b3Vec3,
3512        pointCount: ::std::os::raw::c_int,
3513        maxVertexCount: ::std::os::raw::c_int,
3514    ) -> *mut b3HullData;
3515}
3516unsafe extern "C" {
3517    /// Deep clone a hull.
3518    pub fn b3CloneHull(hull: *const b3HullData) -> *mut b3HullData;
3519}
3520unsafe extern "C" {
3521    /// Clone and transform a hull. Supports non-uniform and mirroring scale.
3522    pub fn b3CloneAndTransformHull(
3523        original: *const b3HullData,
3524        transform: b3Transform,
3525        scale: b3Vec3,
3526    ) -> *mut b3HullData;
3527}
3528unsafe extern "C" {
3529    /// Destroy a hull.
3530    pub fn b3DestroyHull(hull: *mut b3HullData);
3531}
3532unsafe extern "C" {
3533    /// Make a cube as a hull. Do not call b3DestroyHull on this.
3534    pub fn b3MakeCubeHull(halfWidth: f32) -> b3BoxHull;
3535}
3536unsafe extern "C" {
3537    /// Make a box as a hull. Do not call b3DestroyHull on this.
3538    pub fn b3MakeBoxHull(hx: f32, hy: f32, hz: f32) -> b3BoxHull;
3539}
3540unsafe extern "C" {
3541    /// Make an offset box as a hull. Do not call b3DestroyHull on this.
3542    pub fn b3MakeOffsetBoxHull(hx: f32, hy: f32, hz: f32, offset: b3Vec3) -> b3BoxHull;
3543}
3544unsafe extern "C" {
3545    /** Make a transformed box as a hull. Do not call b3DestroyHull on this.
3546 @param hx, hy, hz positive half widths
3547 @param transform local transform of box*/
3548    pub fn b3MakeTransformedBoxHull(
3549        hx: f32,
3550        hy: f32,
3551        hz: f32,
3552        transform: b3Transform,
3553    ) -> b3BoxHull;
3554}
3555unsafe extern "C" {
3556    /** This makes a transformed box hull with post scaling. This is useful for boxes that are scaled in
3557 a level editor. Such scaling can have reflection and shear. In the case of shear the result
3558 may be approximate. If you need to support shear consider using b3CreateHull.
3559 Do not call b3DestroyHull on this.
3560 @param halfWidths positive half widths
3561 @param transform local transform of box
3562 @param postScale scale applied after the transform, may be negative*/
3563    pub fn b3MakeScaledBoxHull(
3564        halfWidths: b3Vec3,
3565        transform: b3Transform,
3566        postScale: b3Vec3,
3567    ) -> b3BoxHull;
3568}
3569unsafe extern "C" {
3570    /** This takes a box with a transform and post scale and converts it into a box with the post scale
3571 resolved with new half-widths and transform. This accepts non-uniform and negative scale.
3572 This is approximate if there is shear.
3573 @param halfWidths [in/out] the box half widths
3574 @param transform [in/out] the box transform with rotation and translation
3575 @param postScale the post scale being applied to the box after the transform
3576 @param minHalfWidth the minimum half width after scale is applied*/
3577    pub fn b3ScaleBox(
3578        halfWidths: *mut b3Vec3,
3579        transform: *mut b3Transform,
3580        postScale: b3Vec3,
3581        minHalfWidth: f32,
3582    );
3583}
3584unsafe extern "C" {
3585    /** Create a grid mesh along the x and z axes.
3586 @param xCount the number of rows in the x direction
3587 @param zCount the number of rows in the z direction
3588 @param cellWidth the width of each cell
3589 @param materialCount the number of materials to generate
3590 @param identifyEdges compute adjacency information*/
3591    pub fn b3CreateGridMesh(
3592        xCount: ::std::os::raw::c_int,
3593        zCount: ::std::os::raw::c_int,
3594        cellWidth: f32,
3595        materialCount: ::std::os::raw::c_int,
3596        identifyEdges: bool,
3597    ) -> *mut b3MeshData;
3598}
3599unsafe extern "C" {
3600    /// Create a wave mesh along the x and z axes.
3601    pub fn b3CreateWaveMesh(
3602        xCount: ::std::os::raw::c_int,
3603        zCount: ::std::os::raw::c_int,
3604        cellWidth: f32,
3605        amplitude: f32,
3606        rowFrequency: f32,
3607        columnFrequency: f32,
3608    ) -> *mut b3MeshData;
3609}
3610unsafe extern "C" {
3611    /// Create a torus mesh.
3612    pub fn b3CreateTorusMesh(
3613        radialResolution: ::std::os::raw::c_int,
3614        tubularResolution: ::std::os::raw::c_int,
3615        radius: f32,
3616        thickness: f32,
3617    ) -> *mut b3MeshData;
3618}
3619unsafe extern "C" {
3620    /// Create a box mesh.
3621    pub fn b3CreateBoxMesh(
3622        center: b3Vec3,
3623        extent: b3Vec3,
3624        identifyEdges: bool,
3625    ) -> *mut b3MeshData;
3626}
3627unsafe extern "C" {
3628    /// Create a hollow box mesh.
3629    pub fn b3CreateHollowBoxMesh(center: b3Vec3, extent: b3Vec3) -> *mut b3MeshData;
3630}
3631unsafe extern "C" {
3632    /// Create a platform mesh. A truncated pyramid.
3633    pub fn b3CreatePlatformMesh(
3634        center: b3Vec3,
3635        height: f32,
3636        topWidth: f32,
3637        bottomWidth: f32,
3638    ) -> *mut b3MeshData;
3639}
3640unsafe extern "C" {
3641    /// Create a generic mesh.
3642    pub fn b3CreateMesh(
3643        def: *const b3MeshDef,
3644        degenerateTriangleIndices: *mut ::std::os::raw::c_int,
3645        degenerateCapacity: ::std::os::raw::c_int,
3646    ) -> *mut b3MeshData;
3647}
3648unsafe extern "C" {
3649    /// Destroy a mesh.
3650    pub fn b3DestroyMesh(mesh: *mut b3MeshData);
3651}
3652unsafe extern "C" {
3653    /// Get the height of the mesh BVH.
3654    pub fn b3GetHeight(mesh: *const b3MeshData) -> ::std::os::raw::c_int;
3655}
3656unsafe extern "C" {
3657    /// Create a generic height field.
3658    pub fn b3CreateHeightField(data: *const b3HeightFieldDef) -> *mut b3HeightFieldData;
3659}
3660unsafe extern "C" {
3661    /// Create a grid as a height field.
3662    pub fn b3CreateGrid(
3663        rowCount: ::std::os::raw::c_int,
3664        columnCount: ::std::os::raw::c_int,
3665        scale: b3Vec3,
3666        makeHoles: bool,
3667    ) -> *mut b3HeightFieldData;
3668}
3669unsafe extern "C" {
3670    /// Create a wave grid as a height field.
3671    pub fn b3CreateWave(
3672        rowCount: ::std::os::raw::c_int,
3673        columnCount: ::std::os::raw::c_int,
3674        scale: b3Vec3,
3675        rowFrequency: f32,
3676        columnFrequency: f32,
3677        makeHoles: bool,
3678    ) -> *mut b3HeightFieldData;
3679}
3680unsafe extern "C" {
3681    /// Destroy a height field.
3682    pub fn b3DestroyHeightField(heightField: *mut b3HeightFieldData);
3683}
3684unsafe extern "C" {
3685    /// Save input height data to a file
3686    pub fn b3DumpHeightData(
3687        data: *const b3HeightFieldDef,
3688        fileName: *const ::std::os::raw::c_char,
3689    );
3690}
3691unsafe extern "C" {
3692    /// Create a height field by loading a previously saved height data
3693    pub fn b3LoadHeightField(
3694        fileName: *const ::std::os::raw::c_char,
3695    ) -> *mut b3HeightFieldData;
3696}
3697unsafe extern "C" {
3698    /// Get a child shape of a compound.
3699    pub fn b3GetCompoundChild(
3700        compound: *const b3CompoundData,
3701        childIndex: ::std::os::raw::c_int,
3702    ) -> b3ChildShape;
3703}
3704unsafe extern "C" {
3705    /// Query a compound shape for children that overlap an AABB.
3706    pub fn b3QueryCompound(
3707        compound: *const b3CompoundData,
3708        aabb: b3AABB,
3709        fcn: b3CompoundQueryFcn,
3710        context: *mut ::std::os::raw::c_void,
3711    );
3712}
3713unsafe extern "C" {
3714    /// Access a child capsule by index.
3715    pub fn b3GetCompoundCapsule(
3716        compound: *const b3CompoundData,
3717        index: ::std::os::raw::c_int,
3718    ) -> b3CompoundCapsule;
3719}
3720unsafe extern "C" {
3721    /// Access a child hull by index.
3722    pub fn b3GetCompoundHull(
3723        compound: *const b3CompoundData,
3724        index: ::std::os::raw::c_int,
3725    ) -> b3CompoundHull;
3726}
3727unsafe extern "C" {
3728    /// Access a child mesh by index.
3729    pub fn b3GetCompoundMesh(
3730        compound: *const b3CompoundData,
3731        index: ::std::os::raw::c_int,
3732    ) -> b3CompoundMesh;
3733}
3734unsafe extern "C" {
3735    /// Access a child sphere by index.
3736    pub fn b3GetCompoundSphere(
3737        compound: *const b3CompoundData,
3738        index: ::std::os::raw::c_int,
3739    ) -> b3CompoundSphere;
3740}
3741unsafe extern "C" {
3742    /// Access the compound material array.
3743    pub fn b3GetCompoundMaterials(
3744        compound: *const b3CompoundData,
3745    ) -> *const b3SurfaceMaterial;
3746}
3747unsafe extern "C" {
3748    /// Create a compound shape. All input data in the definition is cloned into the resulting compound.
3749    pub fn b3CreateCompound(def: *const b3CompoundDef) -> *mut b3CompoundData;
3750}
3751unsafe extern "C" {
3752    /// Destroy a compound shape.
3753    pub fn b3DestroyCompound(compound: *mut b3CompoundData);
3754}
3755unsafe extern "C" {
3756    /** Cast the provided compound data to bytes, setting the internal pointers to null.
3757 Use this before serializing the compound bytes.*/
3758    pub fn b3ConvertCompoundToBytes(compound: *mut b3CompoundData) -> *mut u8;
3759}
3760unsafe extern "C" {
3761    /** Cast the provided bytes to compound data, setting up internal pointers.
3762 Use this after de-serializing the compound bytes.*/
3763    pub fn b3ConvertBytesToCompound(
3764        bytes: *mut u8,
3765        byteCount: ::std::os::raw::c_int,
3766    ) -> *mut b3CompoundData;
3767}
3768unsafe extern "C" {
3769    /// Compute mass properties of a sphere
3770    pub fn b3ComputeSphereMass(shape: *const b3Sphere, density: f32) -> b3MassData;
3771}
3772unsafe extern "C" {
3773    /// Compute mass properties of a capsule
3774    pub fn b3ComputeCapsuleMass(shape: *const b3Capsule, density: f32) -> b3MassData;
3775}
3776unsafe extern "C" {
3777    /// Compute mass properties of a hull
3778    pub fn b3ComputeHullMass(shape: *const b3HullData, density: f32) -> b3MassData;
3779}
3780unsafe extern "C" {
3781    /// Compute the bounding box of a transformed sphere
3782    pub fn b3ComputeSphereAABB(shape: *const b3Sphere, transform: b3Transform) -> b3AABB;
3783}
3784unsafe extern "C" {
3785    /// Compute the bounding box of a transformed capsule
3786    pub fn b3ComputeCapsuleAABB(
3787        shape: *const b3Capsule,
3788        transform: b3Transform,
3789    ) -> b3AABB;
3790}
3791unsafe extern "C" {
3792    /// Compute the bounding box of a transformed hull
3793    pub fn b3ComputeHullAABB(shape: *const b3HullData, transform: b3Transform) -> b3AABB;
3794}
3795unsafe extern "C" {
3796    /// Compute the bounding box of a transformed mesh. Scale may be non-uniform and have negative components.
3797    pub fn b3ComputeMeshAABB(
3798        shape: *const b3MeshData,
3799        transform: b3Transform,
3800        scale: b3Vec3,
3801    ) -> b3AABB;
3802}
3803unsafe extern "C" {
3804    /// Compute the bounding box of a transformed height-field
3805    pub fn b3ComputeHeightFieldAABB(
3806        shape: *const b3HeightFieldData,
3807        transform: b3Transform,
3808    ) -> b3AABB;
3809}
3810unsafe extern "C" {
3811    /// Compute the bounding box of a compound
3812    pub fn b3ComputeCompoundAABB(
3813        shape: *const b3CompoundData,
3814        transform: b3Transform,
3815    ) -> b3AABB;
3816}
3817unsafe extern "C" {
3818    /// Use this to ensure your ray cast input is valid and avoid internal assertions.
3819    pub fn b3IsValidRay(input: *const b3RayCastInput) -> bool;
3820}
3821unsafe extern "C" {
3822    /// Overlap shape versus capsule
3823    pub fn b3OverlapCapsule(
3824        shape: *const b3Capsule,
3825        shapeTransform: b3Transform,
3826        proxy: *const b3ShapeProxy,
3827    ) -> bool;
3828}
3829unsafe extern "C" {
3830    /// Overlap shape versus compound
3831    pub fn b3OverlapCompound(
3832        shape: *const b3CompoundData,
3833        shapeTransform: b3Transform,
3834        proxy: *const b3ShapeProxy,
3835    ) -> bool;
3836}
3837unsafe extern "C" {
3838    /// Overlap shape versus height field
3839    pub fn b3OverlapHeightField(
3840        shape: *const b3HeightFieldData,
3841        shapeTransform: b3Transform,
3842        proxy: *const b3ShapeProxy,
3843    ) -> bool;
3844}
3845unsafe extern "C" {
3846    /// Overlap shape versus hull
3847    pub fn b3OverlapHull(
3848        shape: *const b3HullData,
3849        shapeTransform: b3Transform,
3850        proxy: *const b3ShapeProxy,
3851    ) -> bool;
3852}
3853unsafe extern "C" {
3854    /// Overlap shape versus mesh
3855    pub fn b3OverlapMesh(
3856        shape: *const b3Mesh,
3857        shapeTransform: b3Transform,
3858        proxy: *const b3ShapeProxy,
3859    ) -> bool;
3860}
3861unsafe extern "C" {
3862    /// Overlap shape versus sphere
3863    pub fn b3OverlapSphere(
3864        shape: *const b3Sphere,
3865        shapeTransform: b3Transform,
3866        proxy: *const b3ShapeProxy,
3867    ) -> bool;
3868}
3869unsafe extern "C" {
3870    /** Ray cast versus sphere in local space. A zero length ray is a point query. Initial overlap
3871 reports a hit at the ray origin with zero fraction and zero normal.*/
3872    pub fn b3RayCastSphere(
3873        shape: *const b3Sphere,
3874        input: *const b3RayCastInput,
3875    ) -> b3CastOutput;
3876}
3877unsafe extern "C" {
3878    /** Ray cast versus a hollow sphere shell in local space. Unlike the solid sphere a ray starting
3879 inside is not an overlap: it passes through and hits the far wall.*/
3880    pub fn b3RayCastHollowSphere(
3881        shape: *const b3Sphere,
3882        input: *const b3RayCastInput,
3883    ) -> b3CastOutput;
3884}
3885unsafe extern "C" {
3886    /** Ray cast versus capsule in local space. A zero length ray is a point query. Initial overlap
3887 reports a hit at the ray origin with zero fraction and zero normal.*/
3888    pub fn b3RayCastCapsule(
3889        shape: *const b3Capsule,
3890        input: *const b3RayCastInput,
3891    ) -> b3CastOutput;
3892}
3893unsafe extern "C" {
3894    /** Ray cast versus compound in local space. A zero length ray is a point query. Initial overlap
3895 with a child reports a hit at the ray origin with zero fraction and zero normal.*/
3896    pub fn b3RayCastCompound(
3897        shape: *const b3CompoundData,
3898        input: *const b3RayCastInput,
3899    ) -> b3CastOutput;
3900}
3901unsafe extern "C" {
3902    /** Ray cast versus hull shape in local space. A zero length ray is a point query. Initial overlap
3903 reports a hit at the ray origin with zero fraction and zero normal.*/
3904    pub fn b3RayCastHull(
3905        shape: *const b3HullData,
3906        input: *const b3RayCastInput,
3907    ) -> b3CastOutput;
3908}
3909unsafe extern "C" {
3910    /// Ray cast versus mesh in local space. A thin surface with no interior, so there is no overlap case.
3911    pub fn b3RayCastMesh(
3912        shape: *const b3Mesh,
3913        input: *const b3RayCastInput,
3914    ) -> b3CastOutput;
3915}
3916unsafe extern "C" {
3917    /// Ray cast versus height field in local space. A thin surface with no interior, so there is no overlap case.
3918    pub fn b3RayCastHeightField(
3919        shape: *const b3HeightFieldData,
3920        input: *const b3RayCastInput,
3921    ) -> b3CastOutput;
3922}
3923unsafe extern "C" {
3924    /// Shape cast versus a sphere. Initial overlap is treated as a miss.
3925    pub fn b3ShapeCastSphere(
3926        shape: *const b3Sphere,
3927        input: *const b3ShapeCastInput,
3928    ) -> b3CastOutput;
3929}
3930unsafe extern "C" {
3931    /// Shape cast versus a capsule. Initial overlap is treated as a miss.
3932    pub fn b3ShapeCastCapsule(
3933        shape: *const b3Capsule,
3934        input: *const b3ShapeCastInput,
3935    ) -> b3CastOutput;
3936}
3937unsafe extern "C" {
3938    /// Shape cast versus compound. Initial overlap is treated as a miss.
3939    pub fn b3ShapeCastCompound(
3940        shape: *const b3CompoundData,
3941        input: *const b3ShapeCastInput,
3942    ) -> b3CastOutput;
3943}
3944unsafe extern "C" {
3945    /// Shape cast versus a hull. Initial overlap is treated as a miss.
3946    pub fn b3ShapeCastHull(
3947        shape: *const b3HullData,
3948        input: *const b3ShapeCastInput,
3949    ) -> b3CastOutput;
3950}
3951unsafe extern "C" {
3952    /// Shape cast versus a mesh. Initial overlap is treated as a miss.
3953    pub fn b3ShapeCastMesh(
3954        shape: *const b3Mesh,
3955        input: *const b3ShapeCastInput,
3956    ) -> b3CastOutput;
3957}
3958unsafe extern "C" {
3959    /// Shape cast versus a height field. Initial overlap is treated as a miss.
3960    pub fn b3ShapeCastHeightField(
3961        shape: *const b3HeightFieldData,
3962        input: *const b3ShapeCastInput,
3963    ) -> b3CastOutput;
3964}
3965/// Query callback.
3966pub type b3MeshQueryFcn = ::std::option::Option<
3967    unsafe extern "C" fn(
3968        a: b3Vec3,
3969        b: b3Vec3,
3970        c: b3Vec3,
3971        triangleIndex: ::std::os::raw::c_int,
3972        context: *mut ::std::os::raw::c_void,
3973    ) -> bool,
3974>;
3975unsafe extern "C" {
3976    /** Query a mesh for triangles overlapping a bounding box in local space. May have false positives. Useful for debug draw.
3977 @param mesh the mesh to query, includes scale
3978 @param bounds the bounding box in local space
3979 @param fcn a user function to collect triangles
3980 @param context the context sent to the user function.*/
3981    pub fn b3QueryMesh(
3982        mesh: *const b3Mesh,
3983        bounds: b3AABB,
3984        fcn: b3MeshQueryFcn,
3985        context: *mut ::std::os::raw::c_void,
3986    );
3987}
3988unsafe extern "C" {
3989    /** Query a height field for triangles overlapping a bounding box in local space. May have false positives. Useful for debug draw.
3990 @param heightField the height field to query
3991 @param bounds the bounding box in local space
3992 @param fcn a user function to collect triangles
3993 @param context the context sent to the user function.*/
3994    pub fn b3QueryHeightField(
3995        heightField: *const b3HeightFieldData,
3996        bounds: b3AABB,
3997        fcn: b3MeshQueryFcn,
3998        context: *mut ::std::os::raw::c_void,
3999    );
4000}
4001unsafe extern "C" {
4002    /** Compute the closest points between two shapes represented as point clouds.
4003 b3SimplexCache cache is input/output. On the first call set b3SimplexCache.count to zero.
4004 The query runs in frame A, so the witness points and normal are returned in frame A.
4005 The underlying GJK algorithm may be debugged by passing in debug simplexes and capacity. You may pass in NULL and 0 for these.*/
4006    pub fn b3ShapeDistance(
4007        input: *const b3DistanceInput,
4008        cache: *mut b3SimplexCache,
4009        simplexes: *mut b3Simplex,
4010        simplexCapacity: ::std::os::raw::c_int,
4011    ) -> b3DistanceOutput;
4012}
4013unsafe extern "C" {
4014    /** Perform a linear shape cast of shape B moving and shape A fixed. Determines the hit point, normal, and translation fraction.
4015 The query runs in frame A, so the hit point and normal are returned in frame A. Initially touching shapes are a miss.*/
4016    pub fn b3ShapeCast(input: *const b3ShapeCastPairInput) -> b3CastOutput;
4017}
4018unsafe extern "C" {
4019    /// Evaluate the transform sweep at a specific time.
4020    pub fn b3GetSweepTransform(sweep: *const b3Sweep, time: f32) -> b3Transform;
4021}
4022unsafe extern "C" {
4023    /** Compute the upper bound on time before two shapes penetrate. Time is represented as
4024 a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate,
4025 non-tunneling collisions. If you change the time interval, you should call this function
4026 again.*/
4027    pub fn b3TimeOfImpact(input: *const b3TOIInput) -> b3TOIOutput;
4028}
4029unsafe extern "C" {
4030    /// Collide two spheres.
4031    pub fn b3CollideSpheres(
4032        manifold: *mut b3LocalManifold,
4033        capacity: ::std::os::raw::c_int,
4034        sphereA: *const b3Sphere,
4035        sphereB: *const b3Sphere,
4036        transformBtoA: b3Transform,
4037    );
4038}
4039unsafe extern "C" {
4040    /// Collide a capsule and a sphere.
4041    pub fn b3CollideCapsuleAndSphere(
4042        manifold: *mut b3LocalManifold,
4043        capacity: ::std::os::raw::c_int,
4044        capsuleA: *const b3Capsule,
4045        sphereB: *const b3Sphere,
4046        transformBtoA: b3Transform,
4047    );
4048}
4049unsafe extern "C" {
4050    /// Collide a hull and a sphere.
4051    pub fn b3CollideHullAndSphere(
4052        manifold: *mut b3LocalManifold,
4053        capacity: ::std::os::raw::c_int,
4054        hullA: *const b3HullData,
4055        sphereB: *const b3Sphere,
4056        transformBtoA: b3Transform,
4057        cache: *mut b3SimplexCache,
4058    );
4059}
4060unsafe extern "C" {
4061    /// Collide two capsules.
4062    pub fn b3CollideCapsules(
4063        manifold: *mut b3LocalManifold,
4064        capacity: ::std::os::raw::c_int,
4065        capsuleA: *const b3Capsule,
4066        capsuleB: *const b3Capsule,
4067        transformBtoA: b3Transform,
4068    );
4069}
4070unsafe extern "C" {
4071    /// Collide a hull and a capsule.
4072    pub fn b3CollideHullAndCapsule(
4073        manifold: *mut b3LocalManifold,
4074        capacity: ::std::os::raw::c_int,
4075        hullA: *const b3HullData,
4076        capsuleB: *const b3Capsule,
4077        transformBtoA: b3Transform,
4078        cache: *mut b3SimplexCache,
4079    );
4080}
4081unsafe extern "C" {
4082    /// Collide two hulls.
4083    pub fn b3CollideHulls(
4084        manifold: *mut b3LocalManifold,
4085        capacity: ::std::os::raw::c_int,
4086        hullA: *const b3HullData,
4087        hullB: *const b3HullData,
4088        transformBtoA: b3Transform,
4089        cache: *mut b3SATCache,
4090    );
4091}
4092unsafe extern "C" {
4093    /// Collide a triangle and capsule. Normal points from triangle to capsule.
4094    pub fn b3CollideTriangleAndCapsule(
4095        manifold: *mut b3LocalManifold,
4096        capacity: ::std::os::raw::c_int,
4097        triangleA: *const b3Vec3,
4098        capsuleB: *const b3Capsule,
4099        cache: *mut b3SimplexCache,
4100    );
4101}
4102unsafe extern "C" {
4103    /// Collide a triangle and hull. Normal points from triangle to hull.
4104    pub fn b3CollideTriangleAndHull(
4105        manifold: *mut b3LocalManifold,
4106        capacity: ::std::os::raw::c_int,
4107        v1: b3Vec3,
4108        v2: b3Vec3,
4109        v3: b3Vec3,
4110        triangleFlags: ::std::os::raw::c_int,
4111        hullB: *const b3HullData,
4112        cache: *mut b3SATCache,
4113        enableSpeculative: bool,
4114    );
4115}
4116unsafe extern "C" {
4117    /// Collide a triangle and sphere. Normal points from triangle to sphere.
4118    pub fn b3CollideTriangleAndSphere(
4119        manifold: *mut b3LocalManifold,
4120        capacity: ::std::os::raw::c_int,
4121        triangleA: *const b3Vec3,
4122        sphereB: *const b3Sphere,
4123    );
4124}
4125unsafe extern "C" {
4126    /** Solves the position of a mover that satisfies the given collision planes.
4127 @param targetDelta the desired translation from the position used to generate the collision planes
4128 @param planes the collision planes
4129 @param count the number of collision planes*/
4130    pub fn b3SolvePlanes(
4131        targetDelta: b3Vec3,
4132        planes: *mut b3CollisionPlane,
4133        count: ::std::os::raw::c_int,
4134    ) -> b3PlaneSolverResult;
4135}
4136unsafe extern "C" {
4137    /** Clips the velocity against the given collision planes. Planes with zero push or clipVelocity
4138 set to false are skipped.*/
4139    pub fn b3ClipVector(
4140        vector: b3Vec3,
4141        planes: *const b3CollisionPlane,
4142        count: ::std::os::raw::c_int,
4143    ) -> b3Vec3;
4144}
4145unsafe extern "C" {
4146    /** Create a world for rigid body simulation. A world contains bodies, shapes, and constraints. You may create
4147 up to 128 worlds. Each world is completely independent and may be simulated in parallel.
4148 @return the world id.*/
4149    pub fn b3CreateWorld(def: *const b3WorldDef) -> b3WorldId;
4150}
4151unsafe extern "C" {
4152    /// Destroy a world
4153    pub fn b3DestroyWorld(worldId: b3WorldId);
4154}
4155unsafe extern "C" {
4156    /// Get the current number of worlds
4157    pub fn b3GetWorldCount() -> ::std::os::raw::c_int;
4158}
4159unsafe extern "C" {
4160    /// Get the maximum number of simultaneous worlds that have been created
4161    pub fn b3GetMaxWorldCount() -> ::std::os::raw::c_int;
4162}
4163unsafe extern "C" {
4164    /// World id validation. Provides validation for up to 64K allocations.
4165    pub fn b3World_IsValid(id: b3WorldId) -> bool;
4166}
4167unsafe extern "C" {
4168    /** Simulate a world for one time step. This performs collision detection, integration, and constraint solution.
4169 @param worldId The world to simulate
4170 @param timeStep The amount of time to simulate, this should be a fixed number. Usually 1/60.
4171 @param subStepCount The number of sub-steps, increasing the sub-step count can increase accuracy. Usually 4.*/
4172    pub fn b3World_Step(
4173        worldId: b3WorldId,
4174        timeStep: f32,
4175        subStepCount: ::std::os::raw::c_int,
4176    );
4177}
4178unsafe extern "C" {
4179    /// Call this to draw shapes and other debug draw data
4180    pub fn b3World_Draw(worldId: b3WorldId, draw: *mut b3DebugDraw, maskBits: u64);
4181}
4182unsafe extern "C" {
4183    /** Get the world's bounds. This is the bounding box that covers the current simulation. May have a small
4184 amount of padding.*/
4185    pub fn b3World_GetBounds(worldId: b3WorldId) -> b3AABB;
4186}
4187unsafe extern "C" {
4188    /// Get the body events for the current time step. The event data is transient. Do not store a reference to this data.
4189    pub fn b3World_GetBodyEvents(worldId: b3WorldId) -> b3BodyEvents;
4190}
4191unsafe extern "C" {
4192    /// Get sensor events for the current time step. The event data is transient. Do not store a reference to this data.
4193    pub fn b3World_GetSensorEvents(worldId: b3WorldId) -> b3SensorEvents;
4194}
4195unsafe extern "C" {
4196    /// Get contact events for this current time step. The event data is transient. Do not store a reference to this data.
4197    pub fn b3World_GetContactEvents(worldId: b3WorldId) -> b3ContactEvents;
4198}
4199unsafe extern "C" {
4200    /// Get the joint events for the current time step. The event data is transient. Do not store a reference to this data.
4201    pub fn b3World_GetJointEvents(worldId: b3WorldId) -> b3JointEvents;
4202}
4203unsafe extern "C" {
4204    /// Overlap test for all shapes that *potentially* overlap the provided AABB
4205    pub fn b3World_OverlapAABB(
4206        worldId: b3WorldId,
4207        aabb: b3AABB,
4208        filter: b3QueryFilter,
4209        fcn: b3OverlapResultFcn,
4210        context: *mut ::std::os::raw::c_void,
4211    ) -> b3TreeStats;
4212}
4213unsafe extern "C" {
4214    /** Overlap test for all shapes that overlap the provided shape proxy. The proxy points are relative
4215 to the world origin, which lets the query stay precise far from the world origin.*/
4216    pub fn b3World_OverlapShape(
4217        worldId: b3WorldId,
4218        origin: b3Pos,
4219        proxy: *const b3ShapeProxy,
4220        filter: b3QueryFilter,
4221        fcn: b3OverlapResultFcn,
4222        context: *mut ::std::os::raw::c_void,
4223    ) -> b3TreeStats;
4224}
4225unsafe extern "C" {
4226    /** Cast a ray into the world to collect shapes in the path of the ray.
4227 Your callback function controls whether you get the closest point, any point, or n-points.
4228 @note The callback function may receive shapes in any order
4229 @param worldId The world to cast the ray against
4230 @param origin The start point of the ray
4231 @param translation The translation of the ray from the start point to the end point
4232 @param filter Contains bit flags to filter unwanted shapes from the results
4233 @param fcn A user implemented callback function
4234 @param context A user context that is passed along to the callback function
4235	@return traversal performance counters*/
4236    pub fn b3World_CastRay(
4237        worldId: b3WorldId,
4238        origin: b3Pos,
4239        translation: b3Vec3,
4240        filter: b3QueryFilter,
4241        fcn: b3CastResultFcn,
4242        context: *mut ::std::os::raw::c_void,
4243    ) -> b3TreeStats;
4244}
4245unsafe extern "C" {
4246    /** Cast a ray into the world to collect the closest hit. This is a convenience function. Ignores initial overlap.
4247 This is less general than b3World_CastRay() and does not allow for custom filtering.*/
4248    pub fn b3World_CastRayClosest(
4249        worldId: b3WorldId,
4250        origin: b3Pos,
4251        translation: b3Vec3,
4252        filter: b3QueryFilter,
4253    ) -> b3RayResult;
4254}
4255unsafe extern "C" {
4256    /** Cast a shape through the world. Similar to a cast ray except that a shape is cast instead of a point.
4257 The proxy points are relative to the origin and the hit points come back as world positions, so the
4258 cast stays precise far from the world origin.
4259	@see b3World_CastRay*/
4260    pub fn b3World_CastShape(
4261        worldId: b3WorldId,
4262        origin: b3Pos,
4263        proxy: *const b3ShapeProxy,
4264        translation: b3Vec3,
4265        filter: b3QueryFilter,
4266        fcn: b3CastResultFcn,
4267        context: *mut ::std::os::raw::c_void,
4268    ) -> b3TreeStats;
4269}
4270unsafe extern "C" {
4271    /** Cast a capsule mover through the world. This is a special shape cast that handles sliding along other shapes while reducing
4272 clipping. This is not a good source of information about what the mover is touching. Instead use the planes returned by
4273 b3World_CollideMover.
4274 @param worldId World to cast the mover against
4275 @param origin World position the mover capsule is relative to
4276 @param mover Capsule mover, relative to the origin
4277 @param translation Desired mover translation
4278 @param filter Contains bit flags to filter unwanted shapes from the results
4279 @param fcn Optional callback for custom shape filtering
4280 @param context A user context that is passed along to the callback function
4281 @return the translation fraction*/
4282    pub fn b3World_CastMover(
4283        worldId: b3WorldId,
4284        origin: b3Pos,
4285        mover: *const b3Capsule,
4286        translation: b3Vec3,
4287        filter: b3QueryFilter,
4288        fcn: b3MoverFilterFcn,
4289        context: *mut ::std::os::raw::c_void,
4290    ) -> f32;
4291}
4292unsafe extern "C" {
4293    /** Collide a capsule mover with the world, gathering collision planes that can be fed to b3SolvePlanes. Useful for
4294 kinematic character movement. The mover and the returned planes are relative to the origin.*/
4295    pub fn b3World_CollideMover(
4296        worldId: b3WorldId,
4297        origin: b3Pos,
4298        mover: *const b3Capsule,
4299        filter: b3QueryFilter,
4300        fcn: b3PlaneResultFcn,
4301        context: *mut ::std::os::raw::c_void,
4302    );
4303}
4304unsafe extern "C" {
4305    /** Enable/disable sleep. If your application does not need sleeping, you can gain some performance
4306 by disabling sleep completely at the world level.
4307 @see b3WorldDef*/
4308    pub fn b3World_EnableSleeping(worldId: b3WorldId, flag: bool);
4309}
4310unsafe extern "C" {
4311    /// Is body sleeping enabled?
4312    pub fn b3World_IsSleepingEnabled(worldId: b3WorldId) -> bool;
4313}
4314unsafe extern "C" {
4315    /** Enable/disable continuous collision between dynamic and static bodies. Generally you should keep continuous
4316 collision enabled to prevent fast moving objects from going through static objects. The performance gain from
4317 disabling continuous collision is minor.
4318 @see b3WorldDef*/
4319    pub fn b3World_EnableContinuous(worldId: b3WorldId, flag: bool);
4320}
4321unsafe extern "C" {
4322    /// Is continuous collision enabled?
4323    pub fn b3World_IsContinuousEnabled(worldId: b3WorldId) -> bool;
4324}
4325unsafe extern "C" {
4326    /** Adjust the restitution threshold. It is recommended not to make this value very small
4327 because it will prevent bodies from sleeping. Usually in meters per second.
4328 @see b3WorldDef*/
4329    pub fn b3World_SetRestitutionThreshold(worldId: b3WorldId, value: f32);
4330}
4331unsafe extern "C" {
4332    /// Get the restitution speed threshold. Usually in meters per second.
4333    pub fn b3World_GetRestitutionThreshold(worldId: b3WorldId) -> f32;
4334}
4335unsafe extern "C" {
4336    /** Adjust the hit event threshold. This controls the collision speed needed to generate a b3ContactHitEvent.
4337 Usually in meters per second.
4338 @see b3WorldDef::hitEventThreshold*/
4339    pub fn b3World_SetHitEventThreshold(worldId: b3WorldId, value: f32);
4340}
4341unsafe extern "C" {
4342    /// Get the hit event speed threshold. Usually in meters per second.
4343    pub fn b3World_GetHitEventThreshold(worldId: b3WorldId) -> f32;
4344}
4345unsafe extern "C" {
4346    /// Register the custom filter callback. This is optional.
4347    pub fn b3World_SetCustomFilterCallback(
4348        worldId: b3WorldId,
4349        fcn: b3CustomFilterFcn,
4350        context: *mut ::std::os::raw::c_void,
4351    );
4352}
4353unsafe extern "C" {
4354    /// Register the pre-solve callback. This is optional.
4355    pub fn b3World_SetPreSolveCallback(
4356        worldId: b3WorldId,
4357        fcn: b3PreSolveFcn,
4358        context: *mut ::std::os::raw::c_void,
4359    );
4360}
4361unsafe extern "C" {
4362    /** Set the gravity vector for the entire world. Box3D has no concept of an up direction and this
4363 is left as a decision for the application. Usually in m/s^2.
4364 @see b3WorldDef*/
4365    pub fn b3World_SetGravity(worldId: b3WorldId, gravity: b3Vec3);
4366}
4367unsafe extern "C" {
4368    /// Get the gravity vector
4369    pub fn b3World_GetGravity(worldId: b3WorldId) -> b3Vec3;
4370}
4371unsafe extern "C" {
4372    /** Apply a radial explosion
4373 @param worldId The world id
4374 @param explosionDef The explosion definition*/
4375    pub fn b3World_Explode(worldId: b3WorldId, explosionDef: *const b3ExplosionDef);
4376}
4377unsafe extern "C" {
4378    /** Adjust contact tuning parameters
4379 @param worldId The world id
4380 @param hertz The contact stiffness (cycles per second)
4381 @param dampingRatio The contact bounciness with 1 being critical damping (non-dimensional)
4382 @param contactSpeed The maximum contact constraint push out speed (meters per second)
4383 @note Advanced feature*/
4384    pub fn b3World_SetContactTuning(
4385        worldId: b3WorldId,
4386        hertz: f32,
4387        dampingRatio: f32,
4388        contactSpeed: f32,
4389    );
4390}
4391unsafe extern "C" {
4392    /** Set the contact point recycling distance. Setting this to zero disables contact point recycling.
4393 Usually in meters.*/
4394    pub fn b3World_SetContactRecycleDistance(worldId: b3WorldId, recycleDistance: f32);
4395}
4396unsafe extern "C" {
4397    /// Get the contact point recycling distance. Usually in meters.
4398    pub fn b3World_GetContactRecycleDistance(worldId: b3WorldId) -> f32;
4399}
4400unsafe extern "C" {
4401    /// Set the maximum linear speed. Usually in m/s.
4402    pub fn b3World_SetMaximumLinearSpeed(worldId: b3WorldId, maximumLinearSpeed: f32);
4403}
4404unsafe extern "C" {
4405    /// Get the maximum linear speed. Usually in m/s.
4406    pub fn b3World_GetMaximumLinearSpeed(worldId: b3WorldId) -> f32;
4407}
4408unsafe extern "C" {
4409    /** Enable/disable constraint warm starting. Advanced feature for testing. Disabling
4410 warm starting greatly reduces stability and provides no performance gain.*/
4411    pub fn b3World_EnableWarmStarting(worldId: b3WorldId, flag: bool);
4412}
4413unsafe extern "C" {
4414    /// Is constraint warm starting enabled?
4415    pub fn b3World_IsWarmStartingEnabled(worldId: b3WorldId) -> bool;
4416}
4417unsafe extern "C" {
4418    /// Get the number of awake bodies
4419    pub fn b3World_GetAwakeBodyCount(worldId: b3WorldId) -> ::std::os::raw::c_int;
4420}
4421unsafe extern "C" {
4422    /// Get the current world performance profile
4423    pub fn b3World_GetProfile(worldId: b3WorldId) -> b3Profile;
4424}
4425unsafe extern "C" {
4426    /// Get world counters and sizes
4427    pub fn b3World_GetCounters(worldId: b3WorldId) -> b3Counters;
4428}
4429unsafe extern "C" {
4430    /// Get max capacity. This can be used with b3WorldDef to avoid run-time allocations and copies
4431    pub fn b3World_GetMaxCapacity(worldId: b3WorldId) -> b3Capacity;
4432}
4433unsafe extern "C" {
4434    /// Set the user data pointer.
4435    pub fn b3World_SetUserData(
4436        worldId: b3WorldId,
4437        userData: *mut ::std::os::raw::c_void,
4438    );
4439}
4440unsafe extern "C" {
4441    /// Get the user data pointer.
4442    pub fn b3World_GetUserData(worldId: b3WorldId) -> *mut ::std::os::raw::c_void;
4443}
4444unsafe extern "C" {
4445    /// Set the friction callback. Passing NULL resets to default.
4446    pub fn b3World_SetFrictionCallback(worldId: b3WorldId, callback: b3FrictionCallback);
4447}
4448unsafe extern "C" {
4449    /// Set the restitution callback. Passing NULL resets to default.
4450    pub fn b3World_SetRestitutionCallback(
4451        worldId: b3WorldId,
4452        callback: b3RestitutionCallback,
4453    );
4454}
4455unsafe extern "C" {
4456    /// Set the worker count. Must be in the range [1, B3_MAX_WORKERS]
4457    pub fn b3World_SetWorkerCount(worldId: b3WorldId, count: ::std::os::raw::c_int);
4458}
4459unsafe extern "C" {
4460    /// Get the worker count.
4461    pub fn b3World_GetWorkerCount(worldId: b3WorldId) -> ::std::os::raw::c_int;
4462}
4463unsafe extern "C" {
4464    /// Dump memory stats to log.
4465    pub fn b3World_DumpMemoryStats(worldId: b3WorldId);
4466}
4467unsafe extern "C" {
4468    /// Dump shape bounds to box3d_bounds.txt
4469    pub fn b3World_DumpShapeBounds(worldId: b3WorldId, type_: b3BodyType);
4470}
4471unsafe extern "C" {
4472    /// This is for internal testing
4473    pub fn b3World_RebuildStaticTree(worldId: b3WorldId);
4474}
4475unsafe extern "C" {
4476    /// This is for internal testing
4477    pub fn b3World_EnableSpeculative(worldId: b3WorldId, flag: bool);
4478}
4479#[repr(C)]
4480#[derive(Debug, Copy, Clone)]
4481pub struct b3Recording {
4482    _unused: [u8; 0],
4483}
4484unsafe extern "C" {
4485    /** Create a recording buffer with an optional initial byte capacity.
4486 Pass 0 to use the default (64 KiB). The buffer grows on demand.
4487 @return a new recording, owned by the caller*/
4488    pub fn b3CreateRecording(byteCapacity: ::std::os::raw::c_int) -> *mut b3Recording;
4489}
4490unsafe extern "C" {
4491    /** Destroy a recording and free its buffer.
4492 @param recording may be NULL*/
4493    pub fn b3DestroyRecording(recording: *mut b3Recording);
4494}
4495unsafe extern "C" {
4496    /** Get a pointer to the raw recording bytes.
4497 Valid until the recording buffer is modified or destroyed.
4498 @param recording the recording handle
4499 @return pointer to the byte buffer, or NULL if no bytes have been written*/
4500    pub fn b3Recording_GetData(recording: *const b3Recording) -> *const u8;
4501}
4502unsafe extern "C" {
4503    /** Get the number of bytes currently in the recording buffer.
4504 @param recording the recording handle*/
4505    pub fn b3Recording_GetSize(recording: *const b3Recording) -> ::std::os::raw::c_int;
4506}
4507unsafe extern "C" {
4508    /** Begin recording world mutations into the provided buffer.
4509 The buffer is reset on each call so a single b3Recording can be reused for multiple sessions.
4510 @param worldId the world to record
4511 @param recording the recording handle to write into*/
4512    pub fn b3World_StartRecording(worldId: b3WorldId, recording: *mut b3Recording);
4513}
4514unsafe extern "C" {
4515    /** End the current recording session. Writes the trailing geometry registry and
4516 backpatches the header. The buffer remains valid until the recording is destroyed.
4517 @param worldId the world currently being recorded*/
4518    pub fn b3World_StopRecording(worldId: b3WorldId);
4519}
4520unsafe extern "C" {
4521    /** Save the recording buffer to a file. Returns true on success.
4522 @param recording the recording to save
4523 @param path file path to write*/
4524    pub fn b3SaveRecordingToFile(
4525        recording: *const b3Recording,
4526        path: *const ::std::os::raw::c_char,
4527    ) -> bool;
4528}
4529unsafe extern "C" {
4530    /** Load a recording from a file. Returns NULL on failure (file not found, wrong magic).
4531 The caller owns the returned recording and must destroy it with b3DestroyRecording.
4532 @param path file path to read*/
4533    pub fn b3LoadRecordingFromFile(
4534        path: *const ::std::os::raw::c_char,
4535    ) -> *mut b3Recording;
4536}
4537unsafe extern "C" {
4538    /** Replay a recording from memory and verify it reproduces the same world-state hashes.
4539 Stands up a fresh world, restores the seed snapshot, replays every op, and checks each embedded
4540 StateHash record. Returns true if replay completed without id mismatches or hash divergences.
4541 @param data pointer to recording bytes
4542 @param size byte count of the recording
4543 @param workerCount reserved for future multithreaded replay; pass 1 for now*/
4544    pub fn b3ValidateReplay(
4545        data: *const ::std::os::raw::c_void,
4546        size: ::std::os::raw::c_int,
4547        workerCount: ::std::os::raw::c_int,
4548    ) -> bool;
4549}
4550#[repr(C)]
4551#[derive(Debug, Copy, Clone)]
4552pub struct b3RecPlayer {
4553    _unused: [u8; 0],
4554}
4555/// Summary of a recording, read once at open so a viewer can frame and label it.
4556#[repr(C)]
4557#[derive(Debug, Copy, Clone)]
4558pub struct b3RecPlayerInfo {
4559    pub frameCount: ::std::os::raw::c_int,
4560    pub workerCount: ::std::os::raw::c_int,
4561    pub timeStep: f32,
4562    pub subStepCount: ::std::os::raw::c_int,
4563    pub lengthScale: f32,
4564    pub bounds: b3AABB,
4565}
4566unsafe extern "C" {
4567    /** Create a player over a recording. Owns a private copy of the bytes.
4568 @param data pointer to recording bytes
4569 @param size byte count of the recording
4570 @param workerCount worker count for the replay world; pass 1 to match a serial recording.
4571 Replaying at a different count re-partitions the constraint graph, so the StateHash check
4572 becomes a cross-thread determinism test. Adjustable later with b3RecPlayer_SetWorkerCount.
4573 @return a new player, or NULL on bad header or deserialization failure*/
4574    pub fn b3RecPlayer_Create(
4575        data: *const ::std::os::raw::c_void,
4576        size: ::std::os::raw::c_int,
4577        workerCount: ::std::os::raw::c_int,
4578    ) -> *mut b3RecPlayer;
4579}
4580unsafe extern "C" {
4581    /// Destroy the player and free all memory. Restores the previous global length scale.
4582    pub fn b3RecPlayer_Destroy(player: *mut b3RecPlayer);
4583}
4584unsafe extern "C" {
4585    /** Advance one frame. dispatch ops until the next Step completes.
4586 @return true when a frame was stepped, false at end-of-recording*/
4587    pub fn b3RecPlayer_StepFrame(player: *mut b3RecPlayer) -> bool;
4588}
4589unsafe extern "C" {
4590    /** Sub-step one frame. This will sub-step and return immediately after body creation.
4591 The next call will execute the time step. This allows bodies to be rendered
4592 at the creation pose.*/
4593    pub fn b3RecPlayer_SubStepFrame(player: *mut b3RecPlayer);
4594}
4595unsafe extern "C" {
4596    /// Rewind to frame 0 (in-place restore so the world id stays stable).
4597    pub fn b3RecPlayer_Restart(player: *mut b3RecPlayer);
4598}
4599unsafe extern "C" {
4600    /** Seek to a specific frame. Forward seek steps op-by-op; backward seek restores
4601 the nearest keyframe then re-steps the remaining gap.*/
4602    pub fn b3RecPlayer_SeekFrame(
4603        player: *mut b3RecPlayer,
4604        targetFrame: ::std::os::raw::c_int,
4605    );
4606}
4607unsafe extern "C" {
4608    /// @return the world currently driven by this player
4609    pub fn b3RecPlayer_GetWorldId(player: *const b3RecPlayer) -> b3WorldId;
4610}
4611unsafe extern "C" {
4612    /// @return the last fully-stepped frame index (0 before any step)
4613    pub fn b3RecPlayer_GetFrame(player: *const b3RecPlayer) -> ::std::os::raw::c_int;
4614}
4615unsafe extern "C" {
4616    /// @return total number of recorded frames
4617    pub fn b3RecPlayer_GetFrameCount(
4618        player: *const b3RecPlayer,
4619    ) -> ::std::os::raw::c_int;
4620}
4621unsafe extern "C" {
4622    /// @return true when the op stream is exhausted
4623    pub fn b3RecPlayer_IsAtEnd(player: *const b3RecPlayer) -> bool;
4624}
4625unsafe extern "C" {
4626    /// @return true when the op stream is paused between body creation and world step.
4627    pub fn b3RecPlayer_IsAtPreStep(player: *const b3RecPlayer) -> bool;
4628}
4629unsafe extern "C" {
4630    /// @return true when any StateHash mismatch has been detected
4631    pub fn b3RecPlayer_HasDiverged(player: *const b3RecPlayer) -> bool;
4632}
4633unsafe extern "C" {
4634    /// @return a summary of the recording read at open: frame count, recorded tuning, and bounds
4635    pub fn b3RecPlayer_GetInfo(player: *const b3RecPlayer) -> b3RecPlayerInfo;
4636}
4637unsafe extern "C" {
4638    /// @return the first frame at which replay diverged, or -1 if it has not diverged
4639    pub fn b3RecPlayer_GetDivergeFrame(
4640        player: *const b3RecPlayer,
4641    ) -> ::std::os::raw::c_int;
4642}
4643unsafe extern "C" {
4644    /** Set the worker count of the replay world. Clamped to [1, B3_MAX_WORKERS]. Applied to the live
4645 world at once and reused whenever the player rebuilds its world on Restart or a backward seek.
4646 Replaying at a different count than recorded re-partitions the constraint graph, so the StateHash
4647 check becomes a cross-thread determinism test.*/
4648    pub fn b3RecPlayer_SetWorkerCount(
4649        player: *mut b3RecPlayer,
4650        count: ::std::os::raw::c_int,
4651    );
4652}
4653unsafe extern "C" {
4654    /** Tune the keyframe ring used to speed up backward seeking. A keyframe is a periodic snapshot the
4655 player restores from instead of replaying from the start, trading memory for seek speed.
4656 @param player the recording player
4657 @param budgetBytes memory cap for the kept snapshots; the spacing widens to stay under it
4658 @param minIntervalFrames finest spacing between keyframes, in frames
4659 A zero budget or a non-positive interval keeps that value. Clears the existing ring, so call
4660 b3RecPlayer_Restart afterward to repopulate it under the new policy.*/
4661    pub fn b3RecPlayer_SetKeyframePolicy(
4662        player: *mut b3RecPlayer,
4663        budgetBytes: usize,
4664        minIntervalFrames: ::std::os::raw::c_int,
4665    );
4666}
4667unsafe extern "C" {
4668    /// @return the keyframe memory budget in bytes
4669    pub fn b3RecPlayer_GetKeyframeBudget(player: *const b3RecPlayer) -> usize;
4670}
4671unsafe extern "C" {
4672    /// @return the finest keyframe spacing in frames
4673    pub fn b3RecPlayer_GetKeyframeMinInterval(
4674        player: *const b3RecPlayer,
4675    ) -> ::std::os::raw::c_int;
4676}
4677unsafe extern "C" {
4678    /** @return the current keyframe spacing in frames; starts at the min interval and doubles as the
4679 ring evicts to stay under budget, so it reflects the effective backward-seek granularity now*/
4680    pub fn b3RecPlayer_GetKeyframeInterval(
4681        player: *const b3RecPlayer,
4682    ) -> ::std::os::raw::c_int;
4683}
4684unsafe extern "C" {
4685    /// @return the memory currently held by keyframe snapshots, in bytes
4686    pub fn b3RecPlayer_GetKeyframeBytes(player: *const b3RecPlayer) -> usize;
4687}
4688unsafe extern "C" {
4689    /// @return the number of bodies tracked in creation order (including holes for destroyed bodies)
4690    pub fn b3RecPlayer_GetBodyCount(player: *const b3RecPlayer) -> ::std::os::raw::c_int;
4691}
4692unsafe extern "C" {
4693    /** Resolve a creation ordinal to the live body id at the current frame.
4694 @return the body id, or a null id if that ordinal is out of range or its body is destroyed*/
4695    pub fn b3RecPlayer_GetBodyId(
4696        player: *const b3RecPlayer,
4697        index: ::std::os::raw::c_int,
4698    ) -> b3BodyId;
4699}
4700unsafe extern "C" {
4701    /** Wire host debug-shape callbacks into the player's replay world so a renderer can build
4702 per-shape draw resources (the 3D sample needs this or the replay world draws nothing).
4703 Rebuilds the current world under the new callbacks and rewinds to frame 0, so call it
4704 once right after b3RecPlayer_Create and re-read the world id afterward. The callbacks
4705 persist across Restart and backward seeks, which recreate the world internally.
4706 @param player the player to configure
4707 @param createDebugShape called when a replayed shape is added; returns a user draw handle
4708 @param destroyDebugShape called when a replayed shape is removed; may be NULL
4709 @param context user context passed to both callbacks*/
4710    pub fn b3RecPlayer_SetDebugShapeCallbacks(
4711        player: *mut b3RecPlayer,
4712        createDebugShape: b3CreateDebugShapeCallback,
4713        destroyDebugShape: b3DestroyDebugShapeCallback,
4714        context: *mut ::std::os::raw::c_void,
4715    );
4716}
4717unsafe extern "C" {
4718    /** Draw the spatial queries recorded during the most recently replayed frame, layered on top of the
4719 world. Call after b3World_Draw. NULL draw function pointers are skipped.
4720 @param player a valid player handle
4721 @param draw debug draw callbacks
4722 @param queryIndex index of the frame query to draw, or -1 to draw all of them
4723 @param selectedIndex index of the query to emphasize (reserved color plus a label), or -1 for none*/
4724    pub fn b3RecPlayer_DrawFrameQueries(
4725        player: *mut b3RecPlayer,
4726        draw: *mut b3DebugDraw,
4727        queryIndex: ::std::os::raw::c_int,
4728        selectedIndex: ::std::os::raw::c_int,
4729    );
4730}
4731pub const b3RecQueryType_b3_recQueryOverlapAABB: b3RecQueryType = 0;
4732pub const b3RecQueryType_b3_recQueryOverlapShape: b3RecQueryType = 1;
4733pub const b3RecQueryType_b3_recQueryCastRay: b3RecQueryType = 2;
4734pub const b3RecQueryType_b3_recQueryCastShape: b3RecQueryType = 3;
4735pub const b3RecQueryType_b3_recQueryCastRayClosest: b3RecQueryType = 4;
4736pub const b3RecQueryType_b3_recQueryCastMover: b3RecQueryType = 5;
4737pub const b3RecQueryType_b3_recQueryCollideMover: b3RecQueryType = 6;
4738/// The kind of a recorded spatial query, matching the public query and cast functions.
4739pub type b3RecQueryType = ::std::os::raw::c_uint;
4740/// A spatial query recorded during a replayed frame, exposed for inspection.
4741#[repr(C)]
4742#[derive(Debug, Copy, Clone)]
4743pub struct b3RecQueryInfo {
4744    pub type_: b3RecQueryType,
4745    pub filter: b3QueryFilter,
4746    pub aabb: b3AABB,
4747    pub origin: b3Pos,
4748    pub translation: b3Vec3,
4749    pub hitCount: ::std::os::raw::c_int,
4750    pub key: u64,
4751    pub id: u64,
4752    pub name: *const ::std::os::raw::c_char,
4753}
4754/// One result of a recorded spatial query.
4755#[repr(C)]
4756#[derive(Debug, Copy, Clone)]
4757pub struct b3RecQueryHit {
4758    pub shape: b3ShapeId,
4759    pub point: b3Pos,
4760    pub normal: b3Vec3,
4761    pub fraction: f32,
4762}
4763unsafe extern "C" {
4764    /// @return the number of spatial queries recorded for the most recently replayed frame
4765    pub fn b3RecPlayer_GetFrameQueryCount(
4766        player: *const b3RecPlayer,
4767    ) -> ::std::os::raw::c_int;
4768}
4769unsafe extern "C" {
4770    /// Get a recorded query from the most recently replayed frame by index.
4771    pub fn b3RecPlayer_GetFrameQuery(
4772        player: *const b3RecPlayer,
4773        index: ::std::os::raw::c_int,
4774    ) -> b3RecQueryInfo;
4775}
4776unsafe extern "C" {
4777    /// Get one result of a recorded query from the most recently replayed frame.
4778    pub fn b3RecPlayer_GetFrameQueryHit(
4779        player: *const b3RecPlayer,
4780        queryIndex: ::std::os::raw::c_int,
4781        hitIndex: ::std::os::raw::c_int,
4782    ) -> b3RecQueryHit;
4783}
4784unsafe extern "C" {
4785    /** Create a rigid body given a definition. No reference to the definition is retained. So you can create the definition
4786 on the stack and pass it as a pointer.
4787 @code{.c}
4788 b3BodyDef bodyDef = b3DefaultBodyDef();
4789 b3BodyId myBodyId = b3CreateBody(myWorldId, &bodyDef);
4790 @endcode
4791 @warning This function is locked during callbacks.*/
4792    pub fn b3CreateBody(worldId: b3WorldId, def: *const b3BodyDef) -> b3BodyId;
4793}
4794unsafe extern "C" {
4795    /** Destroy a rigid body given an id. This destroys all shapes and joints attached to the body.
4796 Do not keep references to the associated shapes and joints.*/
4797    pub fn b3DestroyBody(bodyId: b3BodyId);
4798}
4799unsafe extern "C" {
4800    /** Body identifier validation. A valid body exists in a world and is non-null.
4801 This can be used to detect orphaned ids. Provides validation for up to 64K allocations.*/
4802    pub fn b3Body_IsValid(id: b3BodyId) -> bool;
4803}
4804unsafe extern "C" {
4805    /// Get the body type: static, kinematic, or dynamic
4806    pub fn b3Body_GetType(bodyId: b3BodyId) -> b3BodyType;
4807}
4808unsafe extern "C" {
4809    /** Change the body type. This is an expensive operation. This automatically updates the mass
4810 properties regardless of the automatic mass setting.*/
4811    pub fn b3Body_SetType(bodyId: b3BodyId, type_: b3BodyType);
4812}
4813unsafe extern "C" {
4814    /// Set the body name.
4815    pub fn b3Body_SetName(bodyId: b3BodyId, name: *const ::std::os::raw::c_char);
4816}
4817unsafe extern "C" {
4818    /// Get the body name. Returns an empty string if the name isn't set.
4819    pub fn b3Body_GetName(bodyId: b3BodyId) -> *const ::std::os::raw::c_char;
4820}
4821unsafe extern "C" {
4822    /// Set the user data for a body
4823    pub fn b3Body_SetUserData(bodyId: b3BodyId, userData: *mut ::std::os::raw::c_void);
4824}
4825unsafe extern "C" {
4826    /// Get the user data stored in a body
4827    pub fn b3Body_GetUserData(bodyId: b3BodyId) -> *mut ::std::os::raw::c_void;
4828}
4829unsafe extern "C" {
4830    /// Get the world position of a body. This is the location of the body origin.
4831    pub fn b3Body_GetPosition(bodyId: b3BodyId) -> b3Pos;
4832}
4833unsafe extern "C" {
4834    /// Get the world rotation of a body as a quaternion
4835    pub fn b3Body_GetRotation(bodyId: b3BodyId) -> b3Quat;
4836}
4837unsafe extern "C" {
4838    /// Get the world transform of a body.
4839    pub fn b3Body_GetTransform(bodyId: b3BodyId) -> b3WorldTransform;
4840}
4841unsafe extern "C" {
4842    /** Set the world transform of a body. This acts as a teleport and is fairly expensive.
4843 @note Generally you should create a body with the intended transform.
4844 @see b3BodyDef::position and b3BodyDef::rotation.*/
4845    pub fn b3Body_SetTransform(bodyId: b3BodyId, position: b3Pos, rotation: b3Quat);
4846}
4847unsafe extern "C" {
4848    /// Get a local point on a body given a world point.
4849    pub fn b3Body_GetLocalPoint(bodyId: b3BodyId, worldPoint: b3Pos) -> b3Vec3;
4850}
4851unsafe extern "C" {
4852    /// Get a world point on a body given a local point.
4853    pub fn b3Body_GetWorldPoint(bodyId: b3BodyId, localPoint: b3Vec3) -> b3Pos;
4854}
4855unsafe extern "C" {
4856    /// Get a local vector on a body given a world vector.
4857    pub fn b3Body_GetLocalVector(bodyId: b3BodyId, worldVector: b3Vec3) -> b3Vec3;
4858}
4859unsafe extern "C" {
4860    /// Get a world vector on a body given a local vector.
4861    pub fn b3Body_GetWorldVector(bodyId: b3BodyId, localVector: b3Vec3) -> b3Vec3;
4862}
4863unsafe extern "C" {
4864    /// Get the linear velocity of a body's center of mass. Usually in meters per second.
4865    pub fn b3Body_GetLinearVelocity(bodyId: b3BodyId) -> b3Vec3;
4866}
4867unsafe extern "C" {
4868    /// Get the angular velocity of a body in radians per second.
4869    pub fn b3Body_GetAngularVelocity(bodyId: b3BodyId) -> b3Vec3;
4870}
4871unsafe extern "C" {
4872    /// Set the linear velocity of a body at the center of mass. Usually in meters per second.
4873    pub fn b3Body_SetLinearVelocity(bodyId: b3BodyId, linearVelocity: b3Vec3);
4874}
4875unsafe extern "C" {
4876    /// Set the angular velocity of a body in radians per second.
4877    pub fn b3Body_SetAngularVelocity(bodyId: b3BodyId, angularVelocity: b3Vec3);
4878}
4879unsafe extern "C" {
4880    /** Set the velocity to reach the given transform after a given time step.
4881 The result will be close but maybe not exact. This is meant for kinematic bodies.
4882 The target is not applied if the velocity would be below the sleep threshold.
4883 This will optionally wake the body if asleep, but only if the movement is significant.*/
4884    pub fn b3Body_SetTargetTransform(
4885        bodyId: b3BodyId,
4886        target: b3WorldTransform,
4887        timeStep: f32,
4888        wake: bool,
4889    );
4890}
4891unsafe extern "C" {
4892    /// Get the linear velocity of a local point attached to a body. Usually in meters per second.
4893    pub fn b3Body_GetLocalPointVelocity(bodyId: b3BodyId, localPoint: b3Vec3) -> b3Vec3;
4894}
4895unsafe extern "C" {
4896    /// Get the linear velocity of a world point attached to a body. Usually in meters per second.
4897    pub fn b3Body_GetWorldPointVelocity(bodyId: b3BodyId, worldPoint: b3Pos) -> b3Vec3;
4898}
4899unsafe extern "C" {
4900    /** Apply a force at a world point. If the force is not applied at the center of mass,
4901 it will generate a torque and affect the angular velocity. This optionally wakes up the body.
4902 The force is ignored if the body is not awake.
4903 @param bodyId The body id
4904 @param force The world force vector, usually in newtons (N)
4905 @param point The world position of the point of application
4906 @param wake Option to wake up the body*/
4907    pub fn b3Body_ApplyForce(bodyId: b3BodyId, force: b3Vec3, point: b3Pos, wake: bool);
4908}
4909unsafe extern "C" {
4910    /** Apply a force to the center of mass. This optionally wakes up the body.
4911 The force is ignored if the body is not awake.
4912 @param bodyId The body id
4913 @param force the world force vector, usually in newtons (N).
4914 @param wake also wake up the body*/
4915    pub fn b3Body_ApplyForceToCenter(bodyId: b3BodyId, force: b3Vec3, wake: bool);
4916}
4917unsafe extern "C" {
4918    /** Apply a torque. This affects the angular velocity without affecting the linear velocity.
4919 This optionally wakes the body. The torque is ignored if the body is not awake.
4920 @param bodyId The body id
4921 @param torque the world torque vector, usually in N*m.
4922 @param wake also wake up the body*/
4923    pub fn b3Body_ApplyTorque(bodyId: b3BodyId, torque: b3Vec3, wake: bool);
4924}
4925unsafe extern "C" {
4926    /** Apply an impulse at a point. This immediately modifies the velocity.
4927 It also modifies the angular velocity if the point of application
4928 is not at the center of mass. This optionally wakes the body.
4929 The impulse is ignored if the body is not awake.
4930 @param bodyId The body id
4931 @param impulse the world impulse vector, usually in N*s or kg*m/s.
4932 @param point the world position of the point of application.
4933 @param wake also wake up the body
4934 @warning This should be used for one-shot impulses. If you need a steady force,
4935 use a force instead, which will work better with the sub-stepping solver.*/
4936    pub fn b3Body_ApplyLinearImpulse(
4937        bodyId: b3BodyId,
4938        impulse: b3Vec3,
4939        point: b3Pos,
4940        wake: bool,
4941    );
4942}
4943unsafe extern "C" {
4944    /** Apply an impulse to the center of mass. This immediately modifies the velocity.
4945 The impulse is ignored if the body is not awake. This optionally wakes the body.
4946 @param bodyId The body id
4947 @param impulse the world impulse vector, usually in N*s or kg*m/s.
4948 @param wake also wake up the body
4949 @warning This should be used for one-shot impulses. If you need a steady force,
4950 use a force instead, which will work better with the sub-stepping solver.*/
4951    pub fn b3Body_ApplyLinearImpulseToCenter(
4952        bodyId: b3BodyId,
4953        impulse: b3Vec3,
4954        wake: bool,
4955    );
4956}
4957unsafe extern "C" {
4958    /** Apply an angular impulse in world space. The impulse is ignored if the body is not awake.
4959 This optionally wakes the body.
4960 @param bodyId The body id
4961 @param impulse the world angular impulse vector, usually in units of kg*m*m/s
4962 @param wake also wake up the body
4963 @warning This should be used for one-shot impulses. If you need a steady torque,
4964 use a torque instead, which will work better with the sub-stepping solver.*/
4965    pub fn b3Body_ApplyAngularImpulse(bodyId: b3BodyId, impulse: b3Vec3, wake: bool);
4966}
4967unsafe extern "C" {
4968    /// Get the mass of the body, usually in kilograms
4969    pub fn b3Body_GetMass(bodyId: b3BodyId) -> f32;
4970}
4971unsafe extern "C" {
4972    /// Get the rotational inertia of the body in local space, usually in kg*m^2
4973    pub fn b3Body_GetLocalRotationalInertia(bodyId: b3BodyId) -> b3Matrix3;
4974}
4975unsafe extern "C" {
4976    /// Get the inverse mass of the body, usually in 1/kilograms
4977    pub fn b3Body_GetInverseMass(bodyId: b3BodyId) -> f32;
4978}
4979unsafe extern "C" {
4980    /// Get the inverse rotational inertia of the body in world space, usually in 1/kg*m^2
4981    pub fn b3Body_GetWorldInverseRotationalInertia(bodyId: b3BodyId) -> b3Matrix3;
4982}
4983unsafe extern "C" {
4984    /// Get the center of mass position of the body in local space
4985    pub fn b3Body_GetLocalCenter(bodyId: b3BodyId) -> b3Vec3;
4986}
4987unsafe extern "C" {
4988    /// Get the center of mass position of the body in world space
4989    pub fn b3Body_GetWorldCenter(bodyId: b3BodyId) -> b3Pos;
4990}
4991unsafe extern "C" {
4992    /** Override the body's mass properties. Normally this is computed automatically using the
4993 shape geometry and density. This information is lost if a shape is added or removed or if the
4994 body type changes.*/
4995    pub fn b3Body_SetMassData(bodyId: b3BodyId, massData: b3MassData);
4996}
4997unsafe extern "C" {
4998    /// Get the mass data for a body
4999    pub fn b3Body_GetMassData(bodyId: b3BodyId) -> b3MassData;
5000}
5001unsafe extern "C" {
5002    /** This updates the mass properties to the sum of the mass properties of the shapes.
5003 This normally does not need to be called unless you called SetMassData to override
5004 the mass and you later want to reset the mass.
5005 You may also use this when automatic mass computation has been disabled.
5006 You should call this regardless of body type.*/
5007    pub fn b3Body_ApplyMassFromShapes(bodyId: b3BodyId);
5008}
5009unsafe extern "C" {
5010    /// Adjust the linear damping. Normally this is set in b3BodyDef before creation.
5011    pub fn b3Body_SetLinearDamping(bodyId: b3BodyId, linearDamping: f32);
5012}
5013unsafe extern "C" {
5014    /// Get the current linear damping.
5015    pub fn b3Body_GetLinearDamping(bodyId: b3BodyId) -> f32;
5016}
5017unsafe extern "C" {
5018    /// Adjust the angular damping. Normally this is set in b3BodyDef before creation.
5019    pub fn b3Body_SetAngularDamping(bodyId: b3BodyId, angularDamping: f32);
5020}
5021unsafe extern "C" {
5022    /// Get the current angular damping.
5023    pub fn b3Body_GetAngularDamping(bodyId: b3BodyId) -> f32;
5024}
5025unsafe extern "C" {
5026    /** Adjust the gravity scale. Normally this is set in b3BodyDef before creation.
5027 @see b3BodyDef::gravityScale*/
5028    pub fn b3Body_SetGravityScale(bodyId: b3BodyId, gravityScale: f32);
5029}
5030unsafe extern "C" {
5031    /// Get the current gravity scale
5032    pub fn b3Body_GetGravityScale(bodyId: b3BodyId) -> f32;
5033}
5034unsafe extern "C" {
5035    /// @return true if this body is awake
5036    pub fn b3Body_IsAwake(bodyId: b3BodyId) -> bool;
5037}
5038unsafe extern "C" {
5039    /** Wake a body from sleep. This wakes the entire island the body is touching.
5040 @warning Putting a body to sleep will put the entire island of bodies touching this body to sleep,
5041 which can be expensive and possibly unintuitive.*/
5042    pub fn b3Body_SetAwake(bodyId: b3BodyId, awake: bool);
5043}
5044unsafe extern "C" {
5045    /// Enable or disable sleeping for this body. If sleeping is disabled the body will wake.
5046    pub fn b3Body_EnableSleep(bodyId: b3BodyId, enableSleep: bool);
5047}
5048unsafe extern "C" {
5049    /// Returns true if sleeping is enabled for this body
5050    pub fn b3Body_IsSleepEnabled(bodyId: b3BodyId) -> bool;
5051}
5052unsafe extern "C" {
5053    /// Set the sleep threshold, usually in meters per second
5054    pub fn b3Body_SetSleepThreshold(bodyId: b3BodyId, sleepThreshold: f32);
5055}
5056unsafe extern "C" {
5057    /// Get the sleep threshold, usually in meters per second.
5058    pub fn b3Body_GetSleepThreshold(bodyId: b3BodyId) -> f32;
5059}
5060unsafe extern "C" {
5061    /// Returns true if this body is enabled
5062    pub fn b3Body_IsEnabled(bodyId: b3BodyId) -> bool;
5063}
5064unsafe extern "C" {
5065    /// Disable a body by removing it completely from the simulation. This is expensive.
5066    pub fn b3Body_Disable(bodyId: b3BodyId);
5067}
5068unsafe extern "C" {
5069    /// Enable a body by adding it to the simulation. This is expensive.
5070    pub fn b3Body_Enable(bodyId: b3BodyId);
5071}
5072unsafe extern "C" {
5073    /// Set the motion locks on this body.
5074    pub fn b3Body_SetMotionLocks(bodyId: b3BodyId, locks: b3MotionLocks);
5075}
5076unsafe extern "C" {
5077    /// Get the motion locks for this body.
5078    pub fn b3Body_GetMotionLocks(bodyId: b3BodyId) -> b3MotionLocks;
5079}
5080unsafe extern "C" {
5081    /** Set this body to be a bullet. A bullet does continuous collision detection
5082 against dynamic bodies (but not other bullets).*/
5083    pub fn b3Body_SetBullet(bodyId: b3BodyId, flag: bool);
5084}
5085unsafe extern "C" {
5086    /// Is this body a bullet?
5087    pub fn b3Body_IsBullet(bodyId: b3BodyId) -> bool;
5088}
5089unsafe extern "C" {
5090    /** Allow this body to rotate fast. Useful for axially symmetric bodies, such as vehicle wheels.
5091 Normally rotation speed is clamped to improve CCD. However, this clamping is unnecessary for
5092 bodies that only rotate fast around an axis of symmetry.*/
5093    pub fn b3Body_AllowFastRotation(bodyId: b3BodyId, flag: bool);
5094}
5095unsafe extern "C" {
5096    /// Is this body allowed to rotate fast?
5097    pub fn b3Body_IsFastRotationAllowed(bodyId: b3BodyId) -> bool;
5098}
5099unsafe extern "C" {
5100    /** Enable or disable contact recycling for this body. Contact recycling is a performance optimization
5101 that reuses contact manifolds when bodies move slightly. Disabling it can avoid ghost collisions
5102 on characters at the cost of higher per-step work. Existing contacts retain their prior setting;
5103 only contacts created after this call see the new value.
5104 @see b3BodyDef::enableContactRecycling*/
5105    pub fn b3Body_EnableContactRecycling(bodyId: b3BodyId, flag: bool);
5106}
5107unsafe extern "C" {
5108    /// Is contact recycling enabled on this body?
5109    pub fn b3Body_IsContactRecyclingEnabled(bodyId: b3BodyId) -> bool;
5110}
5111unsafe extern "C" {
5112    /** Enable/disable hit events on all shapes
5113 @see b3ShapeDef::enableHitEvents*/
5114    pub fn b3Body_EnableHitEvents(bodyId: b3BodyId, flag: bool);
5115}
5116unsafe extern "C" {
5117    /// Get the world that owns this body
5118    pub fn b3Body_GetWorld(bodyId: b3BodyId) -> b3WorldId;
5119}
5120unsafe extern "C" {
5121    /// Get the number of shapes on this body
5122    pub fn b3Body_GetShapeCount(bodyId: b3BodyId) -> ::std::os::raw::c_int;
5123}
5124unsafe extern "C" {
5125    /** Get the shape ids for all shapes on this body, up to the provided capacity.
5126 @returns the number of shape ids stored in the user array*/
5127    pub fn b3Body_GetShapes(
5128        bodyId: b3BodyId,
5129        shapeArray: *mut b3ShapeId,
5130        capacity: ::std::os::raw::c_int,
5131    ) -> ::std::os::raw::c_int;
5132}
5133unsafe extern "C" {
5134    /// Get the number of joints on this body
5135    pub fn b3Body_GetJointCount(bodyId: b3BodyId) -> ::std::os::raw::c_int;
5136}
5137unsafe extern "C" {
5138    /** Get the joint ids for all joints on this body, up to the provided capacity
5139 @returns the number of joint ids stored in the user array*/
5140    pub fn b3Body_GetJoints(
5141        bodyId: b3BodyId,
5142        jointArray: *mut b3JointId,
5143        capacity: ::std::os::raw::c_int,
5144    ) -> ::std::os::raw::c_int;
5145}
5146unsafe extern "C" {
5147    /// Get the maximum capacity required for retrieving all the touching contacts on a body
5148    pub fn b3Body_GetContactCapacity(bodyId: b3BodyId) -> ::std::os::raw::c_int;
5149}
5150unsafe extern "C" {
5151    /// Get the touching contact data for a body
5152    pub fn b3Body_GetContactData(
5153        bodyId: b3BodyId,
5154        contactData: *mut b3ContactData,
5155        capacity: ::std::os::raw::c_int,
5156    ) -> ::std::os::raw::c_int;
5157}
5158unsafe extern "C" {
5159    /** Get the current world AABB that contains all the attached shapes. Note that this may not encompass the body origin.
5160 If there are no shapes attached then the returned AABB is empty and centered on the body origin.*/
5161    pub fn b3Body_ComputeAABB(bodyId: b3BodyId) -> b3AABB;
5162}
5163unsafe extern "C" {
5164    /// Get the closest point on a body to a world target.
5165    pub fn b3Body_GetClosestPoint(
5166        bodyId: b3BodyId,
5167        result: *mut b3Vec3,
5168        target: b3Vec3,
5169    ) -> f32;
5170}
5171unsafe extern "C" {
5172    /// Cast a ray at a specific body using a specified body transform.
5173    pub fn b3Body_CastRay(
5174        bodyId: b3BodyId,
5175        origin: b3Pos,
5176        translation: b3Vec3,
5177        filter: b3QueryFilter,
5178        maxFraction: f32,
5179        bodyTransform: b3WorldTransform,
5180    ) -> b3BodyCastResult;
5181}
5182unsafe extern "C" {
5183    /// Cast a shape at a specific body using a specified body transform.
5184    pub fn b3Body_CastShape(
5185        bodyId: b3BodyId,
5186        origin: b3Pos,
5187        proxy: *const b3ShapeProxy,
5188        translation: b3Vec3,
5189        filter: b3QueryFilter,
5190        maxFraction: f32,
5191        canEncroach: bool,
5192        bodyTransform: b3WorldTransform,
5193    ) -> b3BodyCastResult;
5194}
5195unsafe extern "C" {
5196    /// Overlap a shape with a specific body using a specified body transform.
5197    pub fn b3Body_OverlapShape(
5198        bodyId: b3BodyId,
5199        origin: b3Pos,
5200        proxy: *const b3ShapeProxy,
5201        filter: b3QueryFilter,
5202        bodyTransform: b3WorldTransform,
5203    ) -> bool;
5204}
5205unsafe extern "C" {
5206    /// Collide a character mover with a specific body using a specified body transform.
5207    pub fn b3Body_CollideMover(
5208        bodyId: b3BodyId,
5209        bodyPlanes: *mut b3BodyPlaneResult,
5210        planeCapacity: ::std::os::raw::c_int,
5211        origin: b3Pos,
5212        mover: *const b3Capsule,
5213        filter: b3QueryFilter,
5214        bodyTransform: b3WorldTransform,
5215    ) -> ::std::os::raw::c_int;
5216}
5217unsafe extern "C" {
5218    /** Create a circle shape and attach it to a body. The shape definition and geometry are fully cloned.
5219 Contacts are not created until the next time step.
5220 @return the shape id for accessing the shape*/
5221    pub fn b3CreateSphereShape(
5222        bodyId: b3BodyId,
5223        def: *const b3ShapeDef,
5224        sphere: *const b3Sphere,
5225    ) -> b3ShapeId;
5226}
5227unsafe extern "C" {
5228    /** Create a capsule shape and attach it to a body. The shape definition and geometry are fully cloned.
5229 Contacts are not created until the next time step.
5230 @return the shape id for accessing the shape*/
5231    pub fn b3CreateCapsuleShape(
5232        bodyId: b3BodyId,
5233        def: *const b3ShapeDef,
5234        capsule: *const b3Capsule,
5235    ) -> b3ShapeId;
5236}
5237unsafe extern "C" {
5238    /** Create a convex hull shape and attach it to a body. The shape definition is fully cloned. Contacts are not created
5239 until the next time step.
5240 @return the shape id for accessing the shape*/
5241    pub fn b3CreateHullShape(
5242        bodyId: b3BodyId,
5243        def: *const b3ShapeDef,
5244        hull: *const b3HullData,
5245    ) -> b3ShapeId;
5246}
5247unsafe extern "C" {
5248    /** Create a convex hull shape and attach it to a body. The hull is cloned then transformed with scale applied first.
5249 Use this for non-uniform or mirrored scale or a baked local transform. The baked result is shared through the
5250 world hull database. The shape definition and geometry are fully cloned. Contacts are not created until the next time step.
5251 @return the shape id for accessing the shape*/
5252    pub fn b3CreateTransformedHullShape(
5253        bodyId: b3BodyId,
5254        def: *const b3ShapeDef,
5255        hull: *const b3HullData,
5256        transform: b3Transform,
5257        scale: b3Vec3,
5258    ) -> b3ShapeId;
5259}
5260unsafe extern "C" {
5261    /** Create a mesh hull shape and attach it to a body. The shape definition is fully cloned but the mesh is not.
5262 Contacts are not created until the next time step.
5263 Mesh collision only creates contacts on static bodies.
5264 @warning this holds reference to the input mesh data which must remain valid for the lifetime of this shape
5265 @return the shape id for accessing the shape*/
5266    pub fn b3CreateMeshShape(
5267        bodyId: b3BodyId,
5268        def: *const b3ShapeDef,
5269        mesh: *const b3MeshData,
5270        scale: b3Vec3,
5271    ) -> b3ShapeId;
5272}
5273unsafe extern "C" {
5274    /** Create a height-field shape and attach it to a body. The shape definition is fully cloned but the height field is not.
5275 Contacts are not created until the next time step.
5276 Height field is only allowed on static bodies.
5277 @warning this holds reference to the input height field which must remain valid for the lifetime of this shape
5278 @return the shape id for accessing the shape*/
5279    pub fn b3CreateHeightFieldShape(
5280        bodyId: b3BodyId,
5281        def: *const b3ShapeDef,
5282        heightField: *const b3HeightFieldData,
5283    ) -> b3ShapeId;
5284}
5285unsafe extern "C" {
5286    /** Baked compound shapes are only allowed on static bodies.
5287 Note: runtime compounds are achieved by adding multiple shapes to a body.
5288 Runtime compounds can be dynamic and/or kinematic.*/
5289    pub fn b3CreateBakedCompoundShape(
5290        bodyId: b3BodyId,
5291        def: *mut b3ShapeDef,
5292        compound: *const b3CompoundData,
5293    ) -> b3ShapeId;
5294}
5295unsafe extern "C" {
5296    /** Destroy a shape. You may defer the body mass update which can improve performance if several shapes on a
5297	body are destroyed at once.
5298	@see b3Body_ApplyMassFromShapes*/
5299    pub fn b3DestroyShape(shapeId: b3ShapeId, updateBodyMass: bool);
5300}
5301unsafe extern "C" {
5302    /// Shape identifier validation. Provides validation for up to 64K allocations.
5303    pub fn b3Shape_IsValid(id: b3ShapeId) -> bool;
5304}
5305unsafe extern "C" {
5306    /// Get the type of a shape
5307    pub fn b3Shape_GetType(shapeId: b3ShapeId) -> b3ShapeType;
5308}
5309unsafe extern "C" {
5310    /// Get the id of the body that a shape is attached to
5311    pub fn b3Shape_GetBody(shapeId: b3ShapeId) -> b3BodyId;
5312}
5313unsafe extern "C" {
5314    /// Get the world that owns this shape
5315    pub fn b3Shape_GetWorld(shapeId: b3ShapeId) -> b3WorldId;
5316}
5317unsafe extern "C" {
5318    /// Returns true if the shape is a sensor
5319    pub fn b3Shape_IsSensor(shapeId: b3ShapeId) -> bool;
5320}
5321unsafe extern "C" {
5322    /// Set the shape name.
5323    pub fn b3Shape_SetName(shapeId: b3ShapeId, name: *const ::std::os::raw::c_char);
5324}
5325unsafe extern "C" {
5326    /// Get the shape name. Returns an empty string if the name isn't set.
5327    pub fn b3Shape_GetName(shapeId: b3ShapeId) -> *const ::std::os::raw::c_char;
5328}
5329unsafe extern "C" {
5330    /// Set the user data for a shape
5331    pub fn b3Shape_SetUserData(
5332        shapeId: b3ShapeId,
5333        userData: *mut ::std::os::raw::c_void,
5334    );
5335}
5336unsafe extern "C" {
5337    /** Get the user data for a shape. This is useful when you get a shape id
5338 from an event or query.*/
5339    pub fn b3Shape_GetUserData(shapeId: b3ShapeId) -> *mut ::std::os::raw::c_void;
5340}
5341unsafe extern "C" {
5342    /** Set the mass density of a shape, usually in kg/m^3.
5343 This will optionally update the mass properties on the parent body.
5344 @see b3ShapeDef::density, b3Body_ApplyMassFromShapes*/
5345    pub fn b3Shape_SetDensity(shapeId: b3ShapeId, density: f32, updateBodyMass: bool);
5346}
5347unsafe extern "C" {
5348    /// Get the density of a shape, usually in kg/m^3
5349    pub fn b3Shape_GetDensity(shapeId: b3ShapeId) -> f32;
5350}
5351unsafe extern "C" {
5352    /// Set the friction on a shape
5353    pub fn b3Shape_SetFriction(shapeId: b3ShapeId, friction: f32);
5354}
5355unsafe extern "C" {
5356    /// Get the friction of a shape
5357    pub fn b3Shape_GetFriction(shapeId: b3ShapeId) -> f32;
5358}
5359unsafe extern "C" {
5360    /// Set the shape restitution (bounciness)
5361    pub fn b3Shape_SetRestitution(shapeId: b3ShapeId, restitution: f32);
5362}
5363unsafe extern "C" {
5364    /// Get the shape restitution
5365    pub fn b3Shape_GetRestitution(shapeId: b3ShapeId) -> f32;
5366}
5367unsafe extern "C" {
5368    /// Set the shape base surface material. Does not change per triangle materials.
5369    pub fn b3Shape_SetSurfaceMaterial(
5370        shapeId: b3ShapeId,
5371        surfaceMaterial: b3SurfaceMaterial,
5372    );
5373}
5374unsafe extern "C" {
5375    /// Get the base shape surface material.
5376    pub fn b3Shape_GetSurfaceMaterial(shapeId: b3ShapeId) -> b3SurfaceMaterial;
5377}
5378unsafe extern "C" {
5379    /// Get the number of mesh surface materials.
5380    pub fn b3Shape_GetMeshMaterialCount(shapeId: b3ShapeId) -> ::std::os::raw::c_int;
5381}
5382unsafe extern "C" {
5383    /// Set a surface material for a mesh shape.
5384    pub fn b3Shape_SetMeshMaterial(
5385        shapeId: b3ShapeId,
5386        surfaceMaterial: b3SurfaceMaterial,
5387        index: ::std::os::raw::c_int,
5388    );
5389}
5390unsafe extern "C" {
5391    /// Get a surface material for a mesh shape
5392    pub fn b3Shape_GetMeshSurfaceMaterial(
5393        shapeId: b3ShapeId,
5394        index: ::std::os::raw::c_int,
5395    ) -> b3SurfaceMaterial;
5396}
5397unsafe extern "C" {
5398    /// Get the shape filter
5399    pub fn b3Shape_GetFilter(shapeId: b3ShapeId) -> b3Filter;
5400}
5401unsafe extern "C" {
5402    /** Set the current filter. This is almost as expensive as recreating the shape.
5403 @see b3ShapeDef::filter
5404 @param shapeId the shape
5405 @param filter the new filter
5406 @param invokeContacts if true then the shape will have all contacts recomputed the next time step (expensive)*/
5407    pub fn b3Shape_SetFilter(shapeId: b3ShapeId, filter: b3Filter, invokeContacts: bool);
5408}
5409unsafe extern "C" {
5410    /** Enable sensor events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors.
5411 @see b3ShapeDef::isSensor*/
5412    pub fn b3Shape_EnableSensorEvents(shapeId: b3ShapeId, flag: bool);
5413}
5414unsafe extern "C" {
5415    /// Returns true if sensor events are enabled
5416    pub fn b3Shape_AreSensorEventsEnabled(shapeId: b3ShapeId) -> bool;
5417}
5418unsafe extern "C" {
5419    /** Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors.
5420 @see b3ShapeDef::enableContactEvents*/
5421    pub fn b3Shape_EnableContactEvents(shapeId: b3ShapeId, flag: bool);
5422}
5423unsafe extern "C" {
5424    /// Returns true if contact events are enabled
5425    pub fn b3Shape_AreContactEventsEnabled(shapeId: b3ShapeId) -> bool;
5426}
5427unsafe extern "C" {
5428    /** Enable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive
5429 and must be carefully handled due to multithreading. Ignored for sensors.
5430 @see b3PreSolveFcn*/
5431    pub fn b3Shape_EnablePreSolveEvents(shapeId: b3ShapeId, flag: bool);
5432}
5433unsafe extern "C" {
5434    /// Returns true if pre-solve events are enabled
5435    pub fn b3Shape_ArePreSolveEventsEnabled(shapeId: b3ShapeId) -> bool;
5436}
5437unsafe extern "C" {
5438    /** Enable contact hit events for this shape. Ignored for sensors.
5439 @see b3WorldDef.hitEventThreshold*/
5440    pub fn b3Shape_EnableHitEvents(shapeId: b3ShapeId, flag: bool);
5441}
5442unsafe extern "C" {
5443    /// Returns true if hit events are enabled
5444    pub fn b3Shape_AreHitEventsEnabled(shapeId: b3ShapeId) -> bool;
5445}
5446unsafe extern "C" {
5447    /** Ray cast a shape directly. The ray runs from origin to origin + translation and the hit point
5448 comes back as a world position, so the cast stays precise far from the world origin.*/
5449    pub fn b3Shape_RayCast(
5450        shapeId: b3ShapeId,
5451        origin: b3Pos,
5452        translation: b3Vec3,
5453    ) -> b3WorldCastOutput;
5454}
5455unsafe extern "C" {
5456    /// Get a copy of the shape's sphere. Asserts the type is correct.
5457    pub fn b3Shape_GetSphere(shapeId: b3ShapeId) -> b3Sphere;
5458}
5459unsafe extern "C" {
5460    /// Get a copy of the shape's capsule. Asserts the type is correct.
5461    pub fn b3Shape_GetCapsule(shapeId: b3ShapeId) -> b3Capsule;
5462}
5463unsafe extern "C" {
5464    /// Get the shape's convex hull. Asserts the type is correct.
5465    pub fn b3Shape_GetHull(shapeId: b3ShapeId) -> *const b3HullData;
5466}
5467unsafe extern "C" {
5468    /// Get the shape's mesh. Asserts the type is correct.
5469    pub fn b3Shape_GetMesh(shapeId: b3ShapeId) -> b3Mesh;
5470}
5471unsafe extern "C" {
5472    /// Get the shape's height field. Asserts the type is correct.
5473    pub fn b3Shape_GetHeightField(shapeId: b3ShapeId) -> *const b3HeightFieldData;
5474}
5475unsafe extern "C" {
5476    /** Allows you to change a shape to be a sphere or update the current sphere.
5477 This does not modify the mass properties.
5478 @see b3Body_ApplyMassFromShapes*/
5479    pub fn b3Shape_SetSphere(shapeId: b3ShapeId, sphere: *const b3Sphere);
5480}
5481unsafe extern "C" {
5482    /** Allows you to change a shape to be a capsule or update the current capsule.
5483 This does not modify the mass properties.
5484 @see b3Body_ApplyMassFromShapes*/
5485    pub fn b3Shape_SetCapsule(shapeId: b3ShapeId, capsule: *const b3Capsule);
5486}
5487unsafe extern "C" {
5488    /** Allows you to change a shape to be a hull or update the current hull.
5489 This does not modify the mass properties.
5490 @see b3Body_ApplyMassFromShapes*/
5491    pub fn b3Shape_SetHull(shapeId: b3ShapeId, hull: *const b3HullData);
5492}
5493unsafe extern "C" {
5494    /** Allows you to change a shape to be a mesh or update the current mesh.
5495 This does not modify the mass properties.
5496 @see b3Body_ApplyMassFromShapes*/
5497    pub fn b3Shape_SetMesh(
5498        shapeId: b3ShapeId,
5499        meshData: *const b3MeshData,
5500        scale: b3Vec3,
5501    );
5502}
5503unsafe extern "C" {
5504    /// Get the maximum capacity required for retrieving all the touching contacts on a shape
5505    pub fn b3Shape_GetContactCapacity(shapeId: b3ShapeId) -> ::std::os::raw::c_int;
5506}
5507unsafe extern "C" {
5508    /** Get the touching contact data for a shape. The provided shapeId will be either shapeIdA or shapeIdB on the contact data.
5509 @note Box3D uses speculative collision so some contact points may be separated.
5510 @returns the number of elements filled in the provided array
5511 @warning do not ignore the return value, it specifies the valid number of elements*/
5512    pub fn b3Shape_GetContactData(
5513        shapeId: b3ShapeId,
5514        contactData: *mut b3ContactData,
5515        capacity: ::std::os::raw::c_int,
5516    ) -> ::std::os::raw::c_int;
5517}
5518unsafe extern "C" {
5519    /** Get the maximum capacity required for retrieving all the overlapped shapes on a sensor shape.
5520 This returns 0 if the provided shape is not a sensor.
5521 @param shapeId the id of a sensor shape
5522 @returns the required capacity to get all the overlaps in b3Shape_GetSensorOverlaps*/
5523    pub fn b3Shape_GetSensorCapacity(shapeId: b3ShapeId) -> ::std::os::raw::c_int;
5524}
5525unsafe extern "C" {
5526    /** Get the overlap data for a sensor shape.
5527 @param shapeId the id of a sensor shape
5528 @param visitorIds a user allocated array that is filled with the overlapping shapes (visitors)
5529 @param capacity the capacity of overlappedShapes
5530 @returns the number of elements filled in the provided array
5531 @warning do not ignore the return value, it specifies the valid number of elements
5532 @warning overlaps may contain destroyed shapes so use b3Shape_IsValid to confirm each overlap*/
5533    pub fn b3Shape_GetSensorData(
5534        shapeId: b3ShapeId,
5535        visitorIds: *mut b3ShapeId,
5536        capacity: ::std::os::raw::c_int,
5537    ) -> ::std::os::raw::c_int;
5538}
5539unsafe extern "C" {
5540    /// Get the current world AABB
5541    pub fn b3Shape_GetAABB(shapeId: b3ShapeId) -> b3AABB;
5542}
5543unsafe extern "C" {
5544    /// Compute the mass data for a shape
5545    pub fn b3Shape_ComputeMassData(shapeId: b3ShapeId) -> b3MassData;
5546}
5547unsafe extern "C" {
5548    /// Get the closest point on a shape to a target point. Target and result are in world space.
5549    pub fn b3Shape_GetClosestPoint(shapeId: b3ShapeId, target: b3Vec3) -> b3Vec3;
5550}
5551unsafe extern "C" {
5552    /** Apply a wind force to the body for this shape using the density of air. This considers
5553 the projected area of the shape in the wind direction. This also considers
5554 the relative velocity of the shape.
5555 @param shapeId the shape id
5556 @param wind the wind velocity in world space
5557 @param drag the drag coefficient, the force that opposes the relative velocity
5558 @param lift the lift coefficient, the force that is perpendicular to the relative velocity
5559 @param maxSpeed the maximum relative speed. Speed cap is necessary for stability. Typically 10m/s or less.
5560 @param wake should this wake the body*/
5561    pub fn b3Shape_ApplyWind(
5562        shapeId: b3ShapeId,
5563        wind: b3Vec3,
5564        drag: f32,
5565        lift: f32,
5566        maxSpeed: f32,
5567        wake: bool,
5568    );
5569}
5570unsafe extern "C" {
5571    /// Destroy a joint
5572    pub fn b3DestroyJoint(jointId: b3JointId, wakeAttached: bool);
5573}
5574unsafe extern "C" {
5575    /// Joint identifier validation. Provides validation for up to 64K allocations.
5576    pub fn b3Joint_IsValid(id: b3JointId) -> bool;
5577}
5578unsafe extern "C" {
5579    /// Get the joint type
5580    pub fn b3Joint_GetType(jointId: b3JointId) -> b3JointType;
5581}
5582unsafe extern "C" {
5583    /// Get body A id on a joint
5584    pub fn b3Joint_GetBodyA(jointId: b3JointId) -> b3BodyId;
5585}
5586unsafe extern "C" {
5587    /// Get body B id on a joint
5588    pub fn b3Joint_GetBodyB(jointId: b3JointId) -> b3BodyId;
5589}
5590unsafe extern "C" {
5591    /// Get the world that owns this joint
5592    pub fn b3Joint_GetWorld(jointId: b3JointId) -> b3WorldId;
5593}
5594unsafe extern "C" {
5595    /// Set the local frame on bodyA
5596    pub fn b3Joint_SetLocalFrameA(jointId: b3JointId, localFrame: b3Transform);
5597}
5598unsafe extern "C" {
5599    /// Get the local frame on bodyA
5600    pub fn b3Joint_GetLocalFrameA(jointId: b3JointId) -> b3Transform;
5601}
5602unsafe extern "C" {
5603    /// Set the local frame on bodyB
5604    pub fn b3Joint_SetLocalFrameB(jointId: b3JointId, localFrame: b3Transform);
5605}
5606unsafe extern "C" {
5607    /// Get the local frame on bodyB
5608    pub fn b3Joint_GetLocalFrameB(jointId: b3JointId) -> b3Transform;
5609}
5610unsafe extern "C" {
5611    /// Toggle collision between connected bodies
5612    pub fn b3Joint_SetCollideConnected(jointId: b3JointId, shouldCollide: bool);
5613}
5614unsafe extern "C" {
5615    /// Is collision allowed between connected bodies?
5616    pub fn b3Joint_GetCollideConnected(jointId: b3JointId) -> bool;
5617}
5618unsafe extern "C" {
5619    /// Set the user data on a joint
5620    pub fn b3Joint_SetUserData(
5621        jointId: b3JointId,
5622        userData: *mut ::std::os::raw::c_void,
5623    );
5624}
5625unsafe extern "C" {
5626    /// Get the user data on a joint
5627    pub fn b3Joint_GetUserData(jointId: b3JointId) -> *mut ::std::os::raw::c_void;
5628}
5629unsafe extern "C" {
5630    /// Wake the bodies connect to this joint
5631    pub fn b3Joint_WakeBodies(jointId: b3JointId);
5632}
5633unsafe extern "C" {
5634    /// Get the current constraint force for this joint
5635    pub fn b3Joint_GetConstraintForce(jointId: b3JointId) -> b3Vec3;
5636}
5637unsafe extern "C" {
5638    /// Get the current constraint torque for this joint
5639    pub fn b3Joint_GetConstraintTorque(jointId: b3JointId) -> b3Vec3;
5640}
5641unsafe extern "C" {
5642    /// Get the current linear separation error for this joint. Does not consider admissible movement. Usually in meters.
5643    pub fn b3Joint_GetLinearSeparation(jointId: b3JointId) -> f32;
5644}
5645unsafe extern "C" {
5646    /// Get the current angular separation error for this joint. Does not consider admissible movement. Usually in radians.
5647    pub fn b3Joint_GetAngularSeparation(jointId: b3JointId) -> f32;
5648}
5649unsafe extern "C" {
5650    /** Set the joint constraint tuning. Advanced feature.
5651 @param jointId the joint
5652 @param hertz the stiffness in Hertz (cycles per second)
5653 @param dampingRatio the non-dimensional damping ratio (one for critical damping)*/
5654    pub fn b3Joint_SetConstraintTuning(
5655        jointId: b3JointId,
5656        hertz: f32,
5657        dampingRatio: f32,
5658    );
5659}
5660unsafe extern "C" {
5661    /// Get the joint constraint tuning. Advanced feature.
5662    pub fn b3Joint_GetConstraintTuning(
5663        jointId: b3JointId,
5664        hertz: *mut f32,
5665        dampingRatio: *mut f32,
5666    );
5667}
5668unsafe extern "C" {
5669    /// Set the force threshold for joint events (Newtons)
5670    pub fn b3Joint_SetForceThreshold(jointId: b3JointId, threshold: f32);
5671}
5672unsafe extern "C" {
5673    /// Get the force threshold for joint events (Newtons)
5674    pub fn b3Joint_GetForceThreshold(jointId: b3JointId) -> f32;
5675}
5676unsafe extern "C" {
5677    /// Set the torque threshold for joint events (N-m)
5678    pub fn b3Joint_SetTorqueThreshold(jointId: b3JointId, threshold: f32);
5679}
5680unsafe extern "C" {
5681    /// Get the torque threshold for joint events (N-m)
5682    pub fn b3Joint_GetTorqueThreshold(jointId: b3JointId) -> f32;
5683}
5684unsafe extern "C" {
5685    /** Create a parallel joint
5686 @see b3ParallelJointDef for details*/
5687    pub fn b3CreateParallelJoint(
5688        worldId: b3WorldId,
5689        def: *const b3ParallelJointDef,
5690    ) -> b3JointId;
5691}
5692unsafe extern "C" {
5693    /// Set the spring stiffness in Hertz
5694    pub fn b3ParallelJoint_SetSpringHertz(jointId: b3JointId, hertz: f32);
5695}
5696unsafe extern "C" {
5697    /// Set the spring damping ratio, non-dimensional
5698    pub fn b3ParallelJoint_SetSpringDampingRatio(jointId: b3JointId, dampingRatio: f32);
5699}
5700unsafe extern "C" {
5701    /// Get the spring Hertz
5702    pub fn b3ParallelJoint_GetSpringHertz(jointId: b3JointId) -> f32;
5703}
5704unsafe extern "C" {
5705    /// Get the spring damping ratio
5706    pub fn b3ParallelJoint_GetSpringDampingRatio(jointId: b3JointId) -> f32;
5707}
5708unsafe extern "C" {
5709    /// Set the maximum spring torque, usually in newton-meters
5710    pub fn b3ParallelJoint_SetMaxTorque(jointId: b3JointId, force: f32);
5711}
5712unsafe extern "C" {
5713    /// Get the maximum spring torque, usually in newton-meters
5714    pub fn b3ParallelJoint_GetMaxTorque(jointId: b3JointId) -> f32;
5715}
5716unsafe extern "C" {
5717    /** Create a distance joint
5718 @see b3DistanceJointDef for details*/
5719    pub fn b3CreateDistanceJoint(
5720        worldId: b3WorldId,
5721        def: *const b3DistanceJointDef,
5722    ) -> b3JointId;
5723}
5724unsafe extern "C" {
5725    /** Set the rest length of a distance joint
5726 @param jointId The id for a distance joint
5727 @param length The new distance joint length*/
5728    pub fn b3DistanceJoint_SetLength(jointId: b3JointId, length: f32);
5729}
5730unsafe extern "C" {
5731    /// Get the rest length of a distance joint
5732    pub fn b3DistanceJoint_GetLength(jointId: b3JointId) -> f32;
5733}
5734unsafe extern "C" {
5735    /// Enable/disable the distance joint spring. When disabled the distance joint is rigid.
5736    pub fn b3DistanceJoint_EnableSpring(jointId: b3JointId, enableSpring: bool);
5737}
5738unsafe extern "C" {
5739    /// Is the distance joint spring enabled?
5740    pub fn b3DistanceJoint_IsSpringEnabled(jointId: b3JointId) -> bool;
5741}
5742unsafe extern "C" {
5743    /// Set the force range for the spring.
5744    pub fn b3DistanceJoint_SetSpringForceRange(
5745        jointId: b3JointId,
5746        lowerForce: f32,
5747        upperForce: f32,
5748    );
5749}
5750unsafe extern "C" {
5751    /// Get the force range for the spring.
5752    pub fn b3DistanceJoint_GetSpringForceRange(
5753        jointId: b3JointId,
5754        lowerForce: *mut f32,
5755        upperForce: *mut f32,
5756    );
5757}
5758unsafe extern "C" {
5759    /// Set the spring stiffness in Hertz
5760    pub fn b3DistanceJoint_SetSpringHertz(jointId: b3JointId, hertz: f32);
5761}
5762unsafe extern "C" {
5763    /// Set the spring damping ratio, non-dimensional
5764    pub fn b3DistanceJoint_SetSpringDampingRatio(jointId: b3JointId, dampingRatio: f32);
5765}
5766unsafe extern "C" {
5767    /// Get the spring Hertz
5768    pub fn b3DistanceJoint_GetSpringHertz(jointId: b3JointId) -> f32;
5769}
5770unsafe extern "C" {
5771    /// Get the spring damping ratio
5772    pub fn b3DistanceJoint_GetSpringDampingRatio(jointId: b3JointId) -> f32;
5773}
5774unsafe extern "C" {
5775    /** Enable joint limit. The limit only works if the joint spring is enabled. Otherwise the joint is rigid
5776 and the limit has no effect.*/
5777    pub fn b3DistanceJoint_EnableLimit(jointId: b3JointId, enableLimit: bool);
5778}
5779unsafe extern "C" {
5780    /// Is the distance joint limit enabled?
5781    pub fn b3DistanceJoint_IsLimitEnabled(jointId: b3JointId) -> bool;
5782}
5783unsafe extern "C" {
5784    /// Set the minimum and maximum length parameters of a distance joint
5785    pub fn b3DistanceJoint_SetLengthRange(
5786        jointId: b3JointId,
5787        minLength: f32,
5788        maxLength: f32,
5789    );
5790}
5791unsafe extern "C" {
5792    /// Get the distance joint minimum length
5793    pub fn b3DistanceJoint_GetMinLength(jointId: b3JointId) -> f32;
5794}
5795unsafe extern "C" {
5796    /// Get the distance joint maximum length
5797    pub fn b3DistanceJoint_GetMaxLength(jointId: b3JointId) -> f32;
5798}
5799unsafe extern "C" {
5800    /// Get the current length of a distance joint
5801    pub fn b3DistanceJoint_GetCurrentLength(jointId: b3JointId) -> f32;
5802}
5803unsafe extern "C" {
5804    /// Enable/disable the distance joint motor
5805    pub fn b3DistanceJoint_EnableMotor(jointId: b3JointId, enableMotor: bool);
5806}
5807unsafe extern "C" {
5808    /// Is the distance joint motor enabled?
5809    pub fn b3DistanceJoint_IsMotorEnabled(jointId: b3JointId) -> bool;
5810}
5811unsafe extern "C" {
5812    /// Set the distance joint motor speed, usually in meters per second
5813    pub fn b3DistanceJoint_SetMotorSpeed(jointId: b3JointId, motorSpeed: f32);
5814}
5815unsafe extern "C" {
5816    /// Get the distance joint motor speed, usually in meters per second
5817    pub fn b3DistanceJoint_GetMotorSpeed(jointId: b3JointId) -> f32;
5818}
5819unsafe extern "C" {
5820    /// Set the distance joint maximum motor force, usually in newtons
5821    pub fn b3DistanceJoint_SetMaxMotorForce(jointId: b3JointId, force: f32);
5822}
5823unsafe extern "C" {
5824    /// Get the distance joint maximum motor force, usually in newtons
5825    pub fn b3DistanceJoint_GetMaxMotorForce(jointId: b3JointId) -> f32;
5826}
5827unsafe extern "C" {
5828    /// Get the distance joint current motor force, usually in newtons
5829    pub fn b3DistanceJoint_GetMotorForce(jointId: b3JointId) -> f32;
5830}
5831unsafe extern "C" {
5832    /** Create a motor joint
5833 @see b3MotorJointDef for details*/
5834    pub fn b3CreateMotorJoint(
5835        worldId: b3WorldId,
5836        def: *const b3MotorJointDef,
5837    ) -> b3JointId;
5838}
5839unsafe extern "C" {
5840    /// Set the desired relative linear velocity in meters per second
5841    pub fn b3MotorJoint_SetLinearVelocity(jointId: b3JointId, velocity: b3Vec3);
5842}
5843unsafe extern "C" {
5844    /// Get the desired relative linear velocity in meters per second
5845    pub fn b3MotorJoint_GetLinearVelocity(jointId: b3JointId) -> b3Vec3;
5846}
5847unsafe extern "C" {
5848    /// Set the desired relative angular velocity in radians per second
5849    pub fn b3MotorJoint_SetAngularVelocity(jointId: b3JointId, velocity: b3Vec3);
5850}
5851unsafe extern "C" {
5852    /// Get the desired relative angular velocity in radians per second
5853    pub fn b3MotorJoint_GetAngularVelocity(jointId: b3JointId) -> b3Vec3;
5854}
5855unsafe extern "C" {
5856    /// Set the motor joint maximum force, usually in newtons
5857    pub fn b3MotorJoint_SetMaxVelocityForce(jointId: b3JointId, maxForce: f32);
5858}
5859unsafe extern "C" {
5860    /// Get the motor joint maximum force, usually in newtons
5861    pub fn b3MotorJoint_GetMaxVelocityForce(jointId: b3JointId) -> f32;
5862}
5863unsafe extern "C" {
5864    /// Set the motor joint maximum torque, usually in newton-meters
5865    pub fn b3MotorJoint_SetMaxVelocityTorque(jointId: b3JointId, maxTorque: f32);
5866}
5867unsafe extern "C" {
5868    /// Get the motor joint maximum torque, usually in newton-meters
5869    pub fn b3MotorJoint_GetMaxVelocityTorque(jointId: b3JointId) -> f32;
5870}
5871unsafe extern "C" {
5872    /// Set the spring linear hertz stiffness
5873    pub fn b3MotorJoint_SetLinearHertz(jointId: b3JointId, hertz: f32);
5874}
5875unsafe extern "C" {
5876    /// Get the spring linear hertz stiffness
5877    pub fn b3MotorJoint_GetLinearHertz(jointId: b3JointId) -> f32;
5878}
5879unsafe extern "C" {
5880    /// Set the spring linear damping ratio. Use 1.0 for critical damping.
5881    pub fn b3MotorJoint_SetLinearDampingRatio(jointId: b3JointId, damping: f32);
5882}
5883unsafe extern "C" {
5884    /// Get the spring linear damping ratio.
5885    pub fn b3MotorJoint_GetLinearDampingRatio(jointId: b3JointId) -> f32;
5886}
5887unsafe extern "C" {
5888    /// Set the spring angular hertz stiffness
5889    pub fn b3MotorJoint_SetAngularHertz(jointId: b3JointId, hertz: f32);
5890}
5891unsafe extern "C" {
5892    /// Get the spring angular hertz stiffness
5893    pub fn b3MotorJoint_GetAngularHertz(jointId: b3JointId) -> f32;
5894}
5895unsafe extern "C" {
5896    /// Set the spring angular damping ratio. Use 1.0 for critical damping.
5897    pub fn b3MotorJoint_SetAngularDampingRatio(jointId: b3JointId, damping: f32);
5898}
5899unsafe extern "C" {
5900    /// Get the spring angular damping ratio.
5901    pub fn b3MotorJoint_GetAngularDampingRatio(jointId: b3JointId) -> f32;
5902}
5903unsafe extern "C" {
5904    /// Set the maximum spring force in newtons.
5905    pub fn b3MotorJoint_SetMaxSpringForce(jointId: b3JointId, maxForce: f32);
5906}
5907unsafe extern "C" {
5908    /// Get the maximum spring force in newtons.
5909    pub fn b3MotorJoint_GetMaxSpringForce(jointId: b3JointId) -> f32;
5910}
5911unsafe extern "C" {
5912    /// Set the maximum spring torque in newtons * meters
5913    pub fn b3MotorJoint_SetMaxSpringTorque(jointId: b3JointId, maxTorque: f32);
5914}
5915unsafe extern "C" {
5916    /// Get the maximum spring torque in newtons * meters
5917    pub fn b3MotorJoint_GetMaxSpringTorque(jointId: b3JointId) -> f32;
5918}
5919unsafe extern "C" {
5920    /** Create a filter joint.
5921 @see b3FilterJointDef for details*/
5922    pub fn b3CreateFilterJoint(
5923        worldId: b3WorldId,
5924        def: *const b3FilterJointDef,
5925    ) -> b3JointId;
5926}
5927unsafe extern "C" {
5928    /** Create a prismatic (slider) joint.
5929 @see b3PrismaticJointDef for details*/
5930    pub fn b3CreatePrismaticJoint(
5931        worldId: b3WorldId,
5932        def: *const b3PrismaticJointDef,
5933    ) -> b3JointId;
5934}
5935unsafe extern "C" {
5936    /// Enable/disable the joint spring.
5937    pub fn b3PrismaticJoint_EnableSpring(jointId: b3JointId, enableSpring: bool);
5938}
5939unsafe extern "C" {
5940    /// Is the prismatic joint spring enabled or not?
5941    pub fn b3PrismaticJoint_IsSpringEnabled(jointId: b3JointId) -> bool;
5942}
5943unsafe extern "C" {
5944    /** Set the prismatic joint stiffness in Hertz.
5945 This should usually be less than a quarter of the simulation rate. For example, if the simulation
5946 runs at 60Hz then the joint stiffness should be 15Hz or less.*/
5947    pub fn b3PrismaticJoint_SetSpringHertz(jointId: b3JointId, hertz: f32);
5948}
5949unsafe extern "C" {
5950    /// Get the prismatic joint stiffness in Hertz
5951    pub fn b3PrismaticJoint_GetSpringHertz(jointId: b3JointId) -> f32;
5952}
5953unsafe extern "C" {
5954    /// Set the prismatic joint damping ratio (non-dimensional)
5955    pub fn b3PrismaticJoint_SetSpringDampingRatio(jointId: b3JointId, dampingRatio: f32);
5956}
5957unsafe extern "C" {
5958    /// Get the prismatic spring damping ratio (non-dimensional)
5959    pub fn b3PrismaticJoint_GetSpringDampingRatio(jointId: b3JointId) -> f32;
5960}
5961unsafe extern "C" {
5962    /// Set the prismatic joint target translation. Usually in meters.
5963    pub fn b3PrismaticJoint_SetTargetTranslation(
5964        jointId: b3JointId,
5965        targetTranslation: f32,
5966    );
5967}
5968unsafe extern "C" {
5969    /// Get the prismatic joint target translation. Usually in meters.
5970    pub fn b3PrismaticJoint_GetTargetTranslation(jointId: b3JointId) -> f32;
5971}
5972unsafe extern "C" {
5973    /// Enable/disable a prismatic joint limit
5974    pub fn b3PrismaticJoint_EnableLimit(jointId: b3JointId, enableLimit: bool);
5975}
5976unsafe extern "C" {
5977    /// Is the prismatic joint limit enabled?
5978    pub fn b3PrismaticJoint_IsLimitEnabled(jointId: b3JointId) -> bool;
5979}
5980unsafe extern "C" {
5981    /// Get the prismatic joint lower limit
5982    pub fn b3PrismaticJoint_GetLowerLimit(jointId: b3JointId) -> f32;
5983}
5984unsafe extern "C" {
5985    /// Get the prismatic joint upper limit
5986    pub fn b3PrismaticJoint_GetUpperLimit(jointId: b3JointId) -> f32;
5987}
5988unsafe extern "C" {
5989    /// Set the prismatic joint limits
5990    pub fn b3PrismaticJoint_SetLimits(jointId: b3JointId, lower: f32, upper: f32);
5991}
5992unsafe extern "C" {
5993    /// Enable/disable a prismatic joint motor
5994    pub fn b3PrismaticJoint_EnableMotor(jointId: b3JointId, enableMotor: bool);
5995}
5996unsafe extern "C" {
5997    /// Is the prismatic joint motor enabled?
5998    pub fn b3PrismaticJoint_IsMotorEnabled(jointId: b3JointId) -> bool;
5999}
6000unsafe extern "C" {
6001    /// Set the prismatic joint motor speed, usually in meters per second
6002    pub fn b3PrismaticJoint_SetMotorSpeed(jointId: b3JointId, motorSpeed: f32);
6003}
6004unsafe extern "C" {
6005    /// Get the prismatic joint motor speed, usually in meters per second
6006    pub fn b3PrismaticJoint_GetMotorSpeed(jointId: b3JointId) -> f32;
6007}
6008unsafe extern "C" {
6009    /// Set the prismatic joint maximum motor force, usually in newtons
6010    pub fn b3PrismaticJoint_SetMaxMotorForce(jointId: b3JointId, force: f32);
6011}
6012unsafe extern "C" {
6013    /// Get the prismatic joint maximum motor force, usually in newtons
6014    pub fn b3PrismaticJoint_GetMaxMotorForce(jointId: b3JointId) -> f32;
6015}
6016unsafe extern "C" {
6017    /// Get the prismatic joint current motor force, usually in newtons
6018    pub fn b3PrismaticJoint_GetMotorForce(jointId: b3JointId) -> f32;
6019}
6020unsafe extern "C" {
6021    /// Get the current joint translation, usually in meters.
6022    pub fn b3PrismaticJoint_GetTranslation(jointId: b3JointId) -> f32;
6023}
6024unsafe extern "C" {
6025    /// Get the current joint translation speed, usually in meters per second.
6026    pub fn b3PrismaticJoint_GetSpeed(jointId: b3JointId) -> f32;
6027}
6028unsafe extern "C" {
6029    /** Create a revolute joint
6030 @see b3RevoluteJointDef for details*/
6031    pub fn b3CreateRevoluteJoint(
6032        worldId: b3WorldId,
6033        def: *const b3RevoluteJointDef,
6034    ) -> b3JointId;
6035}
6036unsafe extern "C" {
6037    /// Enable/disable the revolute joint spring
6038    pub fn b3RevoluteJoint_EnableSpring(jointId: b3JointId, enableSpring: bool);
6039}
6040unsafe extern "C" {
6041    /// Is the revolute angular spring enabled?
6042    pub fn b3RevoluteJoint_IsSpringEnabled(jointId: b3JointId) -> bool;
6043}
6044unsafe extern "C" {
6045    /// Set the revolute joint spring stiffness in Hertz
6046    pub fn b3RevoluteJoint_SetSpringHertz(jointId: b3JointId, hertz: f32);
6047}
6048unsafe extern "C" {
6049    /// Get the revolute joint spring stiffness in Hertz
6050    pub fn b3RevoluteJoint_GetSpringHertz(jointId: b3JointId) -> f32;
6051}
6052unsafe extern "C" {
6053    /// Set the revolute joint spring damping ratio, non-dimensional
6054    pub fn b3RevoluteJoint_SetSpringDampingRatio(jointId: b3JointId, dampingRatio: f32);
6055}
6056unsafe extern "C" {
6057    /// Get the revolute joint spring damping ratio, non-dimensional
6058    pub fn b3RevoluteJoint_GetSpringDampingRatio(jointId: b3JointId) -> f32;
6059}
6060unsafe extern "C" {
6061    /// Set the revolute joint target angle in radians
6062    pub fn b3RevoluteJoint_SetTargetAngle(jointId: b3JointId, targetRadians: f32);
6063}
6064unsafe extern "C" {
6065    /// Get the revolute joint target angle in radians
6066    pub fn b3RevoluteJoint_GetTargetAngle(jointId: b3JointId) -> f32;
6067}
6068unsafe extern "C" {
6069    /** Get the revolute joint current angle in radians relative to the reference angle
6070 @see b3RevoluteJointDef::referenceAngle*/
6071    pub fn b3RevoluteJoint_GetAngle(jointId: b3JointId) -> f32;
6072}
6073unsafe extern "C" {
6074    /// Enable/disable the revolute joint limit
6075    pub fn b3RevoluteJoint_EnableLimit(jointId: b3JointId, enableLimit: bool);
6076}
6077unsafe extern "C" {
6078    /// Is the revolute joint limit enabled?
6079    pub fn b3RevoluteJoint_IsLimitEnabled(jointId: b3JointId) -> bool;
6080}
6081unsafe extern "C" {
6082    /// Get the revolute joint lower limit in radians
6083    pub fn b3RevoluteJoint_GetLowerLimit(jointId: b3JointId) -> f32;
6084}
6085unsafe extern "C" {
6086    /// Get the revolute joint upper limit in radians
6087    pub fn b3RevoluteJoint_GetUpperLimit(jointId: b3JointId) -> f32;
6088}
6089unsafe extern "C" {
6090    /// Set the revolute joint limits in radians
6091    pub fn b3RevoluteJoint_SetLimits(
6092        jointId: b3JointId,
6093        lowerLimitRadians: f32,
6094        upperLimitRadians: f32,
6095    );
6096}
6097unsafe extern "C" {
6098    /// Enable/disable a revolute joint motor
6099    pub fn b3RevoluteJoint_EnableMotor(jointId: b3JointId, enableMotor: bool);
6100}
6101unsafe extern "C" {
6102    /// Is the revolute joint motor enabled?
6103    pub fn b3RevoluteJoint_IsMotorEnabled(jointId: b3JointId) -> bool;
6104}
6105unsafe extern "C" {
6106    /// Set the revolute joint motor speed in radians per second
6107    pub fn b3RevoluteJoint_SetMotorSpeed(jointId: b3JointId, motorSpeed: f32);
6108}
6109unsafe extern "C" {
6110    /// Get the revolute joint motor speed in radians per second
6111    pub fn b3RevoluteJoint_GetMotorSpeed(jointId: b3JointId) -> f32;
6112}
6113unsafe extern "C" {
6114    /// Get the revolute joint current motor torque, usually in newton-meters
6115    pub fn b3RevoluteJoint_GetMotorTorque(jointId: b3JointId) -> f32;
6116}
6117unsafe extern "C" {
6118    /// Set the revolute joint maximum motor torque, usually in newton-meters
6119    pub fn b3RevoluteJoint_SetMaxMotorTorque(jointId: b3JointId, torque: f32);
6120}
6121unsafe extern "C" {
6122    /// Get the revolute joint maximum motor torque, usually in newton-meters
6123    pub fn b3RevoluteJoint_GetMaxMotorTorque(jointId: b3JointId) -> f32;
6124}
6125unsafe extern "C" {
6126    /** Create a spherical joint
6127 @see b3SphericalJointDef for details*/
6128    pub fn b3CreateSphericalJoint(
6129        worldId: b3WorldId,
6130        def: *const b3SphericalJointDef,
6131    ) -> b3JointId;
6132}
6133unsafe extern "C" {
6134    /// Enable/disable the spherical joint cone limit
6135    pub fn b3SphericalJoint_EnableConeLimit(jointId: b3JointId, enableLimit: bool);
6136}
6137unsafe extern "C" {
6138    /// Is the spherical joint cone limit enabled?
6139    pub fn b3SphericalJoint_IsConeLimitEnabled(jointId: b3JointId) -> bool;
6140}
6141unsafe extern "C" {
6142    /// Get the spherical joint cone limit in radians
6143    pub fn b3SphericalJoint_GetConeLimit(jointId: b3JointId) -> f32;
6144}
6145unsafe extern "C" {
6146    /// Set the spherical joint limits in radians
6147    pub fn b3SphericalJoint_SetConeLimit(jointId: b3JointId, angleRadians: f32);
6148}
6149unsafe extern "C" {
6150    /// Get the spherical joint current cone angle in radians.
6151    pub fn b3SphericalJoint_GetConeAngle(jointId: b3JointId) -> f32;
6152}
6153unsafe extern "C" {
6154    /// Enable/disable the spherical joint limit
6155    pub fn b3SphericalJoint_EnableTwistLimit(jointId: b3JointId, enableLimit: bool);
6156}
6157unsafe extern "C" {
6158    /// Is the spherical joint limit enabled?
6159    pub fn b3SphericalJoint_IsTwistLimitEnabled(jointId: b3JointId) -> bool;
6160}
6161unsafe extern "C" {
6162    /// Get the spherical joint lower limit in radians
6163    pub fn b3SphericalJoint_GetLowerTwistLimit(jointId: b3JointId) -> f32;
6164}
6165unsafe extern "C" {
6166    /// Get the spherical joint upper limit in radians
6167    pub fn b3SphericalJoint_GetUpperTwistLimit(jointId: b3JointId) -> f32;
6168}
6169unsafe extern "C" {
6170    /// Set the spherical joint limits in radians
6171    pub fn b3SphericalJoint_SetTwistLimits(
6172        jointId: b3JointId,
6173        lowerLimitRadians: f32,
6174        upperLimitRadians: f32,
6175    );
6176}
6177unsafe extern "C" {
6178    /// Get the spherical joint current twist angle in radians.
6179    pub fn b3SphericalJoint_GetTwistAngle(jointId: b3JointId) -> f32;
6180}
6181unsafe extern "C" {
6182    /// Enable/disable the spherical joint spring
6183    pub fn b3SphericalJoint_EnableSpring(jointId: b3JointId, enableSpring: bool);
6184}
6185unsafe extern "C" {
6186    /// Is the spherical angular spring enabled?
6187    pub fn b3SphericalJoint_IsSpringEnabled(jointId: b3JointId) -> bool;
6188}
6189unsafe extern "C" {
6190    /// Set the spherical joint spring stiffness in Hertz
6191    pub fn b3SphericalJoint_SetSpringHertz(jointId: b3JointId, hertz: f32);
6192}
6193unsafe extern "C" {
6194    /// Get the spherical joint spring stiffness in Hertz
6195    pub fn b3SphericalJoint_GetSpringHertz(jointId: b3JointId) -> f32;
6196}
6197unsafe extern "C" {
6198    /// Set the spherical joint spring damping ratio, non-dimensional
6199    pub fn b3SphericalJoint_SetSpringDampingRatio(jointId: b3JointId, dampingRatio: f32);
6200}
6201unsafe extern "C" {
6202    /// Get the spherical joint spring damping ratio, non-dimensional
6203    pub fn b3SphericalJoint_GetSpringDampingRatio(jointId: b3JointId) -> f32;
6204}
6205unsafe extern "C" {
6206    /// Set the spherical joint spring target rotation
6207    pub fn b3SphericalJoint_SetTargetRotation(
6208        jointId: b3JointId,
6209        targetRotation: b3Quat,
6210    );
6211}
6212unsafe extern "C" {
6213    /// Get the spherical joint spring target rotation
6214    pub fn b3SphericalJoint_GetTargetRotation(jointId: b3JointId) -> b3Quat;
6215}
6216unsafe extern "C" {
6217    /// Enable/disable a spherical joint motor
6218    pub fn b3SphericalJoint_EnableMotor(jointId: b3JointId, enableMotor: bool);
6219}
6220unsafe extern "C" {
6221    /// Is the spherical joint motor enabled?
6222    pub fn b3SphericalJoint_IsMotorEnabled(jointId: b3JointId) -> bool;
6223}
6224unsafe extern "C" {
6225    /// Set the spherical joint motor velocity in radians per second
6226    pub fn b3SphericalJoint_SetMotorVelocity(jointId: b3JointId, motorVelocity: b3Vec3);
6227}
6228unsafe extern "C" {
6229    /// Get the spherical joint motor velocity in radians per second
6230    pub fn b3SphericalJoint_GetMotorVelocity(jointId: b3JointId) -> b3Vec3;
6231}
6232unsafe extern "C" {
6233    /// Get the spherical joint current motor torque, usually in newton-meters
6234    pub fn b3SphericalJoint_GetMotorTorque(jointId: b3JointId) -> b3Vec3;
6235}
6236unsafe extern "C" {
6237    /// Set the spherical joint maximum motor torque, usually in newton-meters
6238    pub fn b3SphericalJoint_SetMaxMotorTorque(jointId: b3JointId, torque: f32);
6239}
6240unsafe extern "C" {
6241    /// Get the spherical joint maximum motor torque, usually in newton-meters
6242    pub fn b3SphericalJoint_GetMaxMotorTorque(jointId: b3JointId) -> f32;
6243}
6244unsafe extern "C" {
6245    /** Create a weld joint
6246 @see b3WeldJointDef for details*/
6247    pub fn b3CreateWeldJoint(
6248        worldId: b3WorldId,
6249        def: *const b3WeldJointDef,
6250    ) -> b3JointId;
6251}
6252unsafe extern "C" {
6253    /// Set the weld joint linear stiffness in Hertz. 0 is rigid.
6254    pub fn b3WeldJoint_SetLinearHertz(jointId: b3JointId, hertz: f32);
6255}
6256unsafe extern "C" {
6257    /// Get the weld joint linear stiffness in Hertz
6258    pub fn b3WeldJoint_GetLinearHertz(jointId: b3JointId) -> f32;
6259}
6260unsafe extern "C" {
6261    /// Set the weld joint linear damping ratio (non-dimensional)
6262    pub fn b3WeldJoint_SetLinearDampingRatio(jointId: b3JointId, dampingRatio: f32);
6263}
6264unsafe extern "C" {
6265    /// Get the weld joint linear damping ratio (non-dimensional)
6266    pub fn b3WeldJoint_GetLinearDampingRatio(jointId: b3JointId) -> f32;
6267}
6268unsafe extern "C" {
6269    /// Set the weld joint angular stiffness in Hertz. 0 is rigid.
6270    pub fn b3WeldJoint_SetAngularHertz(jointId: b3JointId, hertz: f32);
6271}
6272unsafe extern "C" {
6273    /// Get the weld joint angular stiffness in Hertz
6274    pub fn b3WeldJoint_GetAngularHertz(jointId: b3JointId) -> f32;
6275}
6276unsafe extern "C" {
6277    /// Set weld joint angular damping ratio, non-dimensional
6278    pub fn b3WeldJoint_SetAngularDampingRatio(jointId: b3JointId, dampingRatio: f32);
6279}
6280unsafe extern "C" {
6281    /// Get the weld joint angular damping ratio, non-dimensional
6282    pub fn b3WeldJoint_GetAngularDampingRatio(jointId: b3JointId) -> f32;
6283}
6284unsafe extern "C" {
6285    /** Create a wheel joint.
6286 @see b3WheelJointDef for details.*/
6287    pub fn b3CreateWheelJoint(
6288        worldId: b3WorldId,
6289        def: *const b3WheelJointDef,
6290    ) -> b3JointId;
6291}
6292unsafe extern "C" {
6293    /// Enable/disable the wheel joint spring.
6294    pub fn b3WheelJoint_EnableSuspension(jointId: b3JointId, flag: bool);
6295}
6296unsafe extern "C" {
6297    /// Is the wheel joint spring enabled?
6298    pub fn b3WheelJoint_IsSuspensionEnabled(jointId: b3JointId) -> bool;
6299}
6300unsafe extern "C" {
6301    /// Set the wheel joint stiffness in Hertz.
6302    pub fn b3WheelJoint_SetSuspensionHertz(jointId: b3JointId, hertz: f32);
6303}
6304unsafe extern "C" {
6305    /// Get the wheel joint stiffness in Hertz.
6306    pub fn b3WheelJoint_GetSuspensionHertz(jointId: b3JointId) -> f32;
6307}
6308unsafe extern "C" {
6309    /// Set the wheel joint damping ratio, non-dimensional.
6310    pub fn b3WheelJoint_SetSuspensionDampingRatio(jointId: b3JointId, dampingRatio: f32);
6311}
6312unsafe extern "C" {
6313    /// Get the wheel joint damping ratio, non-dimensional.
6314    pub fn b3WheelJoint_GetSuspensionDampingRatio(jointId: b3JointId) -> f32;
6315}
6316unsafe extern "C" {
6317    /// Enable/disable the wheel joint limit.
6318    pub fn b3WheelJoint_EnableSuspensionLimit(jointId: b3JointId, flag: bool);
6319}
6320unsafe extern "C" {
6321    /// Is the wheel joint limit enabled?
6322    pub fn b3WheelJoint_IsSuspensionLimitEnabled(jointId: b3JointId) -> bool;
6323}
6324unsafe extern "C" {
6325    /// Get the wheel joint lower limit.
6326    pub fn b3WheelJoint_GetLowerSuspensionLimit(jointId: b3JointId) -> f32;
6327}
6328unsafe extern "C" {
6329    /// Get the wheel joint upper limit.
6330    pub fn b3WheelJoint_GetUpperSuspensionLimit(jointId: b3JointId) -> f32;
6331}
6332unsafe extern "C" {
6333    /// Set the wheel joint limits.
6334    pub fn b3WheelJoint_SetSuspensionLimits(jointId: b3JointId, lower: f32, upper: f32);
6335}
6336unsafe extern "C" {
6337    /// Enable/disable the wheel joint motor.
6338    pub fn b3WheelJoint_EnableSpinMotor(jointId: b3JointId, flag: bool);
6339}
6340unsafe extern "C" {
6341    /// Is the wheel joint motor enabled?
6342    pub fn b3WheelJoint_IsSpinMotorEnabled(jointId: b3JointId) -> bool;
6343}
6344unsafe extern "C" {
6345    /// Set the wheel joint motor speed in radians per second.
6346    pub fn b3WheelJoint_SetSpinMotorSpeed(jointId: b3JointId, speed: f32);
6347}
6348unsafe extern "C" {
6349    /// Get the wheel joint motor speed in radians per second.
6350    pub fn b3WheelJoint_GetSpinMotorSpeed(jointId: b3JointId) -> f32;
6351}
6352unsafe extern "C" {
6353    /// Set the wheel joint maximum motor torque, usually in newton-meters.
6354    pub fn b3WheelJoint_SetMaxSpinTorque(jointId: b3JointId, torque: f32);
6355}
6356unsafe extern "C" {
6357    /// Get the wheel joint maximum motor torque, usually in newton-meters.
6358    pub fn b3WheelJoint_GetMaxSpinTorque(jointId: b3JointId) -> f32;
6359}
6360unsafe extern "C" {
6361    /// Get the current spin speed in radians per second.
6362    pub fn b3WheelJoint_GetSpinSpeed(jointId: b3JointId) -> f32;
6363}
6364unsafe extern "C" {
6365    /// Get the wheel joint current motor torque, usually in newton-meters.
6366    pub fn b3WheelJoint_GetSpinTorque(jointId: b3JointId) -> f32;
6367}
6368unsafe extern "C" {
6369    /// Enable/disable wheel steering. Steering allows the wheel to rotate about the suspension axis.
6370    pub fn b3WheelJoint_EnableSteering(jointId: b3JointId, flag: bool);
6371}
6372unsafe extern "C" {
6373    /// Can the wheel steer?
6374    pub fn b3WheelJoint_IsSteeringEnabled(jointId: b3JointId) -> bool;
6375}
6376unsafe extern "C" {
6377    /// Set the wheel joint steering stiffness in Hertz.
6378    pub fn b3WheelJoint_SetSteeringHertz(jointId: b3JointId, hertz: f32);
6379}
6380unsafe extern "C" {
6381    /// Get the wheel joint steering stiffness in Hertz.
6382    pub fn b3WheelJoint_GetSteeringHertz(jointId: b3JointId) -> f32;
6383}
6384unsafe extern "C" {
6385    /// Set the wheel joint steering damping ratio, non-dimensional.
6386    pub fn b3WheelJoint_SetSteeringDampingRatio(jointId: b3JointId, dampingRatio: f32);
6387}
6388unsafe extern "C" {
6389    /// Get the wheel joint steering damping ratio, non-dimensional.
6390    pub fn b3WheelJoint_GetSteeringDampingRatio(jointId: b3JointId) -> f32;
6391}
6392unsafe extern "C" {
6393    /// Set the wheel joint maximum steering torque in N*m.
6394    pub fn b3WheelJoint_SetMaxSteeringTorque(jointId: b3JointId, torque: f32);
6395}
6396unsafe extern "C" {
6397    /// Get the wheel joint maximum steering torque in N*m.
6398    pub fn b3WheelJoint_GetMaxSteeringTorque(jointId: b3JointId) -> f32;
6399}
6400unsafe extern "C" {
6401    /// Enable/disable the wheel joint steering limit.
6402    pub fn b3WheelJoint_EnableSteeringLimit(jointId: b3JointId, flag: bool);
6403}
6404unsafe extern "C" {
6405    /// Is the wheel joint steering limit enabled?
6406    pub fn b3WheelJoint_IsSteeringLimitEnabled(jointId: b3JointId) -> bool;
6407}
6408unsafe extern "C" {
6409    /// Get the wheel joint lower steering limit in radians.
6410    pub fn b3WheelJoint_GetLowerSteeringLimit(jointId: b3JointId) -> f32;
6411}
6412unsafe extern "C" {
6413    /// Get the wheel joint upper steering limit in radians.
6414    pub fn b3WheelJoint_GetUpperSteeringLimit(jointId: b3JointId) -> f32;
6415}
6416unsafe extern "C" {
6417    /// Set the wheel joint steering limits in radians.
6418    pub fn b3WheelJoint_SetSteeringLimits(
6419        jointId: b3JointId,
6420        lowerRadians: f32,
6421        upperRadians: f32,
6422    );
6423}
6424unsafe extern "C" {
6425    /// Set the wheel joint target steering angle in radians.
6426    pub fn b3WheelJoint_SetTargetSteeringAngle(jointId: b3JointId, radians: f32);
6427}
6428unsafe extern "C" {
6429    /// Get the wheel joint target steering angle in radians.
6430    pub fn b3WheelJoint_GetTargetSteeringAngle(jointId: b3JointId) -> f32;
6431}
6432unsafe extern "C" {
6433    /// Get the current steering angle in radians.
6434    pub fn b3WheelJoint_GetSteeringAngle(jointId: b3JointId) -> f32;
6435}
6436unsafe extern "C" {
6437    /// Get the current steering torque in N*m.
6438    pub fn b3WheelJoint_GetSteeringTorque(jointId: b3JointId) -> f32;
6439}
6440unsafe extern "C" {
6441    /// Contact identifier validation. Provides validation for up to 2^32 allocations.
6442    pub fn b3Contact_IsValid(id: b3ContactId) -> bool;
6443}
6444unsafe extern "C" {
6445    /// Get the manifolds for a contact. The manifold may have no points if the contact is not touching.
6446    pub fn b3Contact_GetData(contactId: b3ContactId) -> b3ContactData;
6447}