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