/* automatically generated by rust-bindgen 0.72.1 */
#[doc = " Prototype for user allocation function\n @param size the allocation size in bytes\n @param alignment the required alignment, guaranteed to be a power of 2"]
pub type b2AllocFcn = ::std::option::Option<
unsafe extern "C" fn(size: ::std::os::raw::c_uint, alignment: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void,
>;
#[doc = " Prototype for user free function\n @param mem the memory previously allocated through `b2AllocFcn`"]
pub type b2FreeFcn = ::std::option::Option<unsafe extern "C" fn(mem: *mut ::std::os::raw::c_void)>;
#[doc = " Prototype for the user assert callback. Return 0 to skip the debugger break."]
pub type b2AssertFcn = ::std::option::Option<
unsafe extern "C" fn(
condition: *const ::std::os::raw::c_char,
fileName: *const ::std::os::raw::c_char,
lineNumber: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
#[doc = " Version numbering scheme.\n See https://semver.org/"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Version {
#[doc = " Significant changes"]
pub major: ::std::os::raw::c_int,
#[doc = " Incremental changes"]
pub minor: ::std::os::raw::c_int,
#[doc = " Bug fixes"]
pub revision: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Version"][::std::mem::size_of::<b2Version>() - 12usize];
["Alignment of b2Version"][::std::mem::align_of::<b2Version>() - 4usize];
["Offset of field: b2Version::major"][::std::mem::offset_of!(b2Version, major) - 0usize];
["Offset of field: b2Version::minor"][::std::mem::offset_of!(b2Version, minor) - 4usize];
["Offset of field: b2Version::revision"][::std::mem::offset_of!(b2Version, revision) - 8usize];
};
#[doc = " 2D vector\n This can be used to represent a point or free vector"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Vec2 {
#[doc = " coordinates"]
pub x: f32,
#[doc = " coordinates"]
pub y: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Vec2"][::std::mem::size_of::<b2Vec2>() - 8usize];
["Alignment of b2Vec2"][::std::mem::align_of::<b2Vec2>() - 4usize];
["Offset of field: b2Vec2::x"][::std::mem::offset_of!(b2Vec2, x) - 0usize];
["Offset of field: b2Vec2::y"][::std::mem::offset_of!(b2Vec2, y) - 4usize];
};
#[doc = " Cosine and sine pair\n This uses a custom implementation designed for cross-platform determinism"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2CosSin {
#[doc = " cosine and sine"]
pub cosine: f32,
pub sine: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2CosSin"][::std::mem::size_of::<b2CosSin>() - 8usize];
["Alignment of b2CosSin"][::std::mem::align_of::<b2CosSin>() - 4usize];
["Offset of field: b2CosSin::cosine"][::std::mem::offset_of!(b2CosSin, cosine) - 0usize];
["Offset of field: b2CosSin::sine"][::std::mem::offset_of!(b2CosSin, sine) - 4usize];
};
#[doc = " 2D rotation\n This is similar to using a complex number for rotation"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Rot {
#[doc = " cosine and sine"]
pub c: f32,
#[doc = " cosine and sine"]
pub s: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Rot"][::std::mem::size_of::<b2Rot>() - 8usize];
["Alignment of b2Rot"][::std::mem::align_of::<b2Rot>() - 4usize];
["Offset of field: b2Rot::c"][::std::mem::offset_of!(b2Rot, c) - 0usize];
["Offset of field: b2Rot::s"][::std::mem::offset_of!(b2Rot, s) - 4usize];
};
#[doc = " A 2D rigid transform"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Transform {
pub p: b2Vec2,
pub q: b2Rot,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Transform"][::std::mem::size_of::<b2Transform>() - 16usize];
["Alignment of b2Transform"][::std::mem::align_of::<b2Transform>() - 4usize];
["Offset of field: b2Transform::p"][::std::mem::offset_of!(b2Transform, p) - 0usize];
["Offset of field: b2Transform::q"][::std::mem::offset_of!(b2Transform, q) - 8usize];
};
#[doc = " A 2-by-2 Matrix"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Mat22 {
#[doc = " columns"]
pub cx: b2Vec2,
#[doc = " columns"]
pub cy: b2Vec2,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Mat22"][::std::mem::size_of::<b2Mat22>() - 16usize];
["Alignment of b2Mat22"][::std::mem::align_of::<b2Mat22>() - 4usize];
["Offset of field: b2Mat22::cx"][::std::mem::offset_of!(b2Mat22, cx) - 0usize];
["Offset of field: b2Mat22::cy"][::std::mem::offset_of!(b2Mat22, cy) - 8usize];
};
#[doc = " Axis-aligned bounding box"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2AABB {
pub lowerBound: b2Vec2,
pub upperBound: b2Vec2,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2AABB"][::std::mem::size_of::<b2AABB>() - 16usize];
["Alignment of b2AABB"][::std::mem::align_of::<b2AABB>() - 4usize];
["Offset of field: b2AABB::lowerBound"][::std::mem::offset_of!(b2AABB, lowerBound) - 0usize];
["Offset of field: b2AABB::upperBound"][::std::mem::offset_of!(b2AABB, upperBound) - 8usize];
};
#[doc = " separation = dot(normal, point) - offset"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Plane {
pub normal: b2Vec2,
pub offset: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Plane"][::std::mem::size_of::<b2Plane>() - 12usize];
["Alignment of b2Plane"][::std::mem::align_of::<b2Plane>() - 4usize];
["Offset of field: b2Plane::normal"][::std::mem::offset_of!(b2Plane, normal) - 0usize];
["Offset of field: b2Plane::offset"][::std::mem::offset_of!(b2Plane, offset) - 8usize];
};
#[doc = " Low level ray cast input data"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2RayCastInput {
#[doc = " Start point of the ray cast"]
pub origin: b2Vec2,
#[doc = " Translation of the ray cast"]
pub translation: b2Vec2,
#[doc = " The maximum fraction of the translation to consider, typically 1"]
pub maxFraction: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2RayCastInput"][::std::mem::size_of::<b2RayCastInput>() - 20usize];
["Alignment of b2RayCastInput"][::std::mem::align_of::<b2RayCastInput>() - 4usize];
["Offset of field: b2RayCastInput::origin"][::std::mem::offset_of!(b2RayCastInput, origin) - 0usize];
["Offset of field: b2RayCastInput::translation"][::std::mem::offset_of!(b2RayCastInput, translation) - 8usize];
["Offset of field: b2RayCastInput::maxFraction"][::std::mem::offset_of!(b2RayCastInput, maxFraction) - 16usize];
};
#[doc = " A distance proxy is used by the GJK algorithm. It encapsulates any shape.\n You can provide between 1 and B2_MAX_POLYGON_VERTICES and a radius."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeProxy {
#[doc = " The point cloud"]
pub points: [b2Vec2; 8usize],
#[doc = " The number of points. Must be greater than 0."]
pub count: ::std::os::raw::c_int,
#[doc = " The external radius of the point cloud. May be zero."]
pub radius: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ShapeProxy"][::std::mem::size_of::<b2ShapeProxy>() - 72usize];
["Alignment of b2ShapeProxy"][::std::mem::align_of::<b2ShapeProxy>() - 4usize];
["Offset of field: b2ShapeProxy::points"][::std::mem::offset_of!(b2ShapeProxy, points) - 0usize];
["Offset of field: b2ShapeProxy::count"][::std::mem::offset_of!(b2ShapeProxy, count) - 64usize];
["Offset of field: b2ShapeProxy::radius"][::std::mem::offset_of!(b2ShapeProxy, radius) - 68usize];
};
#[doc = " Low level shape cast input in generic form. This allows casting an arbitrary point\n cloud wrap with a radius. For example, a circle 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."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeCastInput {
#[doc = " A generic shape"]
pub proxy: b2ShapeProxy,
#[doc = " The translation of the shape cast"]
pub translation: b2Vec2,
#[doc = " The maximum fraction of the translation to consider, typically 1"]
pub maxFraction: f32,
#[doc = " Allow shape cast to encroach when initially touching. This only works if the radius is greater than zero."]
pub canEncroach: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ShapeCastInput"][::std::mem::size_of::<b2ShapeCastInput>() - 88usize];
["Alignment of b2ShapeCastInput"][::std::mem::align_of::<b2ShapeCastInput>() - 4usize];
["Offset of field: b2ShapeCastInput::proxy"][::std::mem::offset_of!(b2ShapeCastInput, proxy) - 0usize];
["Offset of field: b2ShapeCastInput::translation"][::std::mem::offset_of!(b2ShapeCastInput, translation) - 72usize];
["Offset of field: b2ShapeCastInput::maxFraction"][::std::mem::offset_of!(b2ShapeCastInput, maxFraction) - 80usize];
["Offset of field: b2ShapeCastInput::canEncroach"][::std::mem::offset_of!(b2ShapeCastInput, canEncroach) - 84usize];
};
#[doc = " Low level ray cast or shape-cast output data. Returns a zero fraction and normal in the case of initial overlap."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2CastOutput {
#[doc = " The surface normal at the hit point"]
pub normal: b2Vec2,
#[doc = " The surface hit point"]
pub point: b2Vec2,
#[doc = " The fraction of the input translation at collision"]
pub fraction: f32,
#[doc = " The number of iterations used"]
pub iterations: ::std::os::raw::c_int,
#[doc = " Did the cast hit?"]
pub hit: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2CastOutput"][::std::mem::size_of::<b2CastOutput>() - 28usize];
["Alignment of b2CastOutput"][::std::mem::align_of::<b2CastOutput>() - 4usize];
["Offset of field: b2CastOutput::normal"][::std::mem::offset_of!(b2CastOutput, normal) - 0usize];
["Offset of field: b2CastOutput::point"][::std::mem::offset_of!(b2CastOutput, point) - 8usize];
["Offset of field: b2CastOutput::fraction"][::std::mem::offset_of!(b2CastOutput, fraction) - 16usize];
["Offset of field: b2CastOutput::iterations"][::std::mem::offset_of!(b2CastOutput, iterations) - 20usize];
["Offset of field: b2CastOutput::hit"][::std::mem::offset_of!(b2CastOutput, hit) - 24usize];
};
#[doc = " This holds the mass data computed for a shape."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2MassData {
#[doc = " The mass of the shape, usually in kilograms."]
pub mass: f32,
#[doc = " The position of the shape's centroid relative to the shape's origin."]
pub center: b2Vec2,
#[doc = " The rotational inertia of the shape about the local origin."]
pub rotationalInertia: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2MassData"][::std::mem::size_of::<b2MassData>() - 16usize];
["Alignment of b2MassData"][::std::mem::align_of::<b2MassData>() - 4usize];
["Offset of field: b2MassData::mass"][::std::mem::offset_of!(b2MassData, mass) - 0usize];
["Offset of field: b2MassData::center"][::std::mem::offset_of!(b2MassData, center) - 4usize];
["Offset of field: b2MassData::rotationalInertia"][::std::mem::offset_of!(b2MassData, rotationalInertia) - 12usize];
};
#[doc = " A solid circle"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Circle {
#[doc = " The local center"]
pub center: b2Vec2,
#[doc = " The radius"]
pub radius: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Circle"][::std::mem::size_of::<b2Circle>() - 12usize];
["Alignment of b2Circle"][::std::mem::align_of::<b2Circle>() - 4usize];
["Offset of field: b2Circle::center"][::std::mem::offset_of!(b2Circle, center) - 0usize];
["Offset of field: b2Circle::radius"][::std::mem::offset_of!(b2Circle, radius) - 8usize];
};
#[doc = " A solid capsule can be viewed as two semicircles connected\n by a rectangle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Capsule {
#[doc = " Local center of the first semicircle"]
pub center1: b2Vec2,
#[doc = " Local center of the second semicircle"]
pub center2: b2Vec2,
#[doc = " The radius of the semicircles"]
pub radius: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Capsule"][::std::mem::size_of::<b2Capsule>() - 20usize];
["Alignment of b2Capsule"][::std::mem::align_of::<b2Capsule>() - 4usize];
["Offset of field: b2Capsule::center1"][::std::mem::offset_of!(b2Capsule, center1) - 0usize];
["Offset of field: b2Capsule::center2"][::std::mem::offset_of!(b2Capsule, center2) - 8usize];
["Offset of field: b2Capsule::radius"][::std::mem::offset_of!(b2Capsule, radius) - 16usize];
};
#[doc = " A solid convex polygon. It is assumed that the interior of the polygon is to\n the left of each edge.\n Polygons have a maximum number of vertices equal to B2_MAX_POLYGON_VERTICES.\n In most cases you should not need many vertices for a convex polygon.\n @warning DO NOT fill this out manually, instead use a helper function like\n b2MakePolygon or b2MakeBox."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Polygon {
#[doc = " The polygon vertices"]
pub vertices: [b2Vec2; 8usize],
#[doc = " The outward normal vectors of the polygon sides"]
pub normals: [b2Vec2; 8usize],
#[doc = " The centroid of the polygon"]
pub centroid: b2Vec2,
#[doc = " The external radius for rounded polygons"]
pub radius: f32,
#[doc = " The number of polygon vertices"]
pub count: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Polygon"][::std::mem::size_of::<b2Polygon>() - 144usize];
["Alignment of b2Polygon"][::std::mem::align_of::<b2Polygon>() - 4usize];
["Offset of field: b2Polygon::vertices"][::std::mem::offset_of!(b2Polygon, vertices) - 0usize];
["Offset of field: b2Polygon::normals"][::std::mem::offset_of!(b2Polygon, normals) - 64usize];
["Offset of field: b2Polygon::centroid"][::std::mem::offset_of!(b2Polygon, centroid) - 128usize];
["Offset of field: b2Polygon::radius"][::std::mem::offset_of!(b2Polygon, radius) - 136usize];
["Offset of field: b2Polygon::count"][::std::mem::offset_of!(b2Polygon, count) - 140usize];
};
#[doc = " A line segment with two-sided collision."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Segment {
#[doc = " The first point"]
pub point1: b2Vec2,
#[doc = " The second point"]
pub point2: b2Vec2,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Segment"][::std::mem::size_of::<b2Segment>() - 16usize];
["Alignment of b2Segment"][::std::mem::align_of::<b2Segment>() - 4usize];
["Offset of field: b2Segment::point1"][::std::mem::offset_of!(b2Segment, point1) - 0usize];
["Offset of field: b2Segment::point2"][::std::mem::offset_of!(b2Segment, point2) - 8usize];
};
#[doc = " A line segment with one-sided collision. Only collides on the right side.\n Several of these are generated for a chain shape.\n ghost1 -> point1 -> point2 -> ghost2"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ChainSegment {
#[doc = " The tail ghost vertex"]
pub ghost1: b2Vec2,
#[doc = " The line segment"]
pub segment: b2Segment,
#[doc = " The head ghost vertex"]
pub ghost2: b2Vec2,
#[doc = " The owning chain shape index (internal usage only)"]
pub chainId: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ChainSegment"][::std::mem::size_of::<b2ChainSegment>() - 36usize];
["Alignment of b2ChainSegment"][::std::mem::align_of::<b2ChainSegment>() - 4usize];
["Offset of field: b2ChainSegment::ghost1"][::std::mem::offset_of!(b2ChainSegment, ghost1) - 0usize];
["Offset of field: b2ChainSegment::segment"][::std::mem::offset_of!(b2ChainSegment, segment) - 8usize];
["Offset of field: b2ChainSegment::ghost2"][::std::mem::offset_of!(b2ChainSegment, ghost2) - 24usize];
["Offset of field: b2ChainSegment::chainId"][::std::mem::offset_of!(b2ChainSegment, chainId) - 32usize];
};
#[doc = " A convex hull. Used to create convex polygons.\n @warning Do not modify these values directly, instead use b2ComputeHull()"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Hull {
#[doc = " The final points of the hull"]
pub points: [b2Vec2; 8usize],
#[doc = " The number of points"]
pub count: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Hull"][::std::mem::size_of::<b2Hull>() - 68usize];
["Alignment of b2Hull"][::std::mem::align_of::<b2Hull>() - 4usize];
["Offset of field: b2Hull::points"][::std::mem::offset_of!(b2Hull, points) - 0usize];
["Offset of field: b2Hull::count"][::std::mem::offset_of!(b2Hull, count) - 64usize];
};
#[doc = " Result of computing the distance between two line segments"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SegmentDistanceResult {
#[doc = " The closest point on the first segment"]
pub closest1: b2Vec2,
#[doc = " The closest point on the second segment"]
pub closest2: b2Vec2,
#[doc = " The barycentric coordinate on the first segment"]
pub fraction1: f32,
#[doc = " The barycentric coordinate on the second segment"]
pub fraction2: f32,
#[doc = " The squared distance between the closest points"]
pub distanceSquared: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2SegmentDistanceResult"][::std::mem::size_of::<b2SegmentDistanceResult>() - 28usize];
["Alignment of b2SegmentDistanceResult"][::std::mem::align_of::<b2SegmentDistanceResult>() - 4usize];
["Offset of field: b2SegmentDistanceResult::closest1"]
[::std::mem::offset_of!(b2SegmentDistanceResult, closest1) - 0usize];
["Offset of field: b2SegmentDistanceResult::closest2"]
[::std::mem::offset_of!(b2SegmentDistanceResult, closest2) - 8usize];
["Offset of field: b2SegmentDistanceResult::fraction1"]
[::std::mem::offset_of!(b2SegmentDistanceResult, fraction1) - 16usize];
["Offset of field: b2SegmentDistanceResult::fraction2"]
[::std::mem::offset_of!(b2SegmentDistanceResult, fraction2) - 20usize];
["Offset of field: b2SegmentDistanceResult::distanceSquared"]
[::std::mem::offset_of!(b2SegmentDistanceResult, distanceSquared) - 24usize];
};
#[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."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SimplexCache {
#[doc = " The number of stored simplex points"]
pub count: u16,
#[doc = " The cached simplex indices on shape A"]
pub indexA: [u8; 3usize],
#[doc = " The cached simplex indices on shape B"]
pub indexB: [u8; 3usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2SimplexCache"][::std::mem::size_of::<b2SimplexCache>() - 8usize];
["Alignment of b2SimplexCache"][::std::mem::align_of::<b2SimplexCache>() - 2usize];
["Offset of field: b2SimplexCache::count"][::std::mem::offset_of!(b2SimplexCache, count) - 0usize];
["Offset of field: b2SimplexCache::indexA"][::std::mem::offset_of!(b2SimplexCache, indexA) - 2usize];
["Offset of field: b2SimplexCache::indexB"][::std::mem::offset_of!(b2SimplexCache, indexB) - 5usize];
};
#[doc = " Input for b2ShapeDistance"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DistanceInput {
#[doc = " The proxy for shape A"]
pub proxyA: b2ShapeProxy,
#[doc = " The proxy for shape B"]
pub proxyB: b2ShapeProxy,
#[doc = " The world transform for shape A"]
pub transformA: b2Transform,
#[doc = " The world transform for shape B"]
pub transformB: b2Transform,
#[doc = " Should the proxy radius be considered?"]
pub useRadii: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2DistanceInput"][::std::mem::size_of::<b2DistanceInput>() - 180usize];
["Alignment of b2DistanceInput"][::std::mem::align_of::<b2DistanceInput>() - 4usize];
["Offset of field: b2DistanceInput::proxyA"][::std::mem::offset_of!(b2DistanceInput, proxyA) - 0usize];
["Offset of field: b2DistanceInput::proxyB"][::std::mem::offset_of!(b2DistanceInput, proxyB) - 72usize];
["Offset of field: b2DistanceInput::transformA"][::std::mem::offset_of!(b2DistanceInput, transformA) - 144usize];
["Offset of field: b2DistanceInput::transformB"][::std::mem::offset_of!(b2DistanceInput, transformB) - 160usize];
["Offset of field: b2DistanceInput::useRadii"][::std::mem::offset_of!(b2DistanceInput, useRadii) - 176usize];
};
#[doc = " Output for b2ShapeDistance"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DistanceOutput {
#[doc = "< Closest point on shapeA"]
pub pointA: b2Vec2,
#[doc = "< Closest point on shapeB"]
pub pointB: b2Vec2,
#[doc = "< Normal vector that points from A to B. Invalid if distance is zero."]
pub normal: b2Vec2,
#[doc = "< The final distance, zero if overlapped"]
pub distance: f32,
#[doc = "< Number of GJK iterations used"]
pub iterations: ::std::os::raw::c_int,
#[doc = "< The number of simplexes stored in the simplex array"]
pub simplexCount: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2DistanceOutput"][::std::mem::size_of::<b2DistanceOutput>() - 36usize];
["Alignment of b2DistanceOutput"][::std::mem::align_of::<b2DistanceOutput>() - 4usize];
["Offset of field: b2DistanceOutput::pointA"][::std::mem::offset_of!(b2DistanceOutput, pointA) - 0usize];
["Offset of field: b2DistanceOutput::pointB"][::std::mem::offset_of!(b2DistanceOutput, pointB) - 8usize];
["Offset of field: b2DistanceOutput::normal"][::std::mem::offset_of!(b2DistanceOutput, normal) - 16usize];
["Offset of field: b2DistanceOutput::distance"][::std::mem::offset_of!(b2DistanceOutput, distance) - 24usize];
["Offset of field: b2DistanceOutput::iterations"][::std::mem::offset_of!(b2DistanceOutput, iterations) - 28usize];
["Offset of field: b2DistanceOutput::simplexCount"]
[::std::mem::offset_of!(b2DistanceOutput, simplexCount) - 32usize];
};
#[doc = " Simplex vertex for debugging the GJK algorithm"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SimplexVertex {
#[doc = "< support point in proxyA"]
pub wA: b2Vec2,
#[doc = "< support point in proxyB"]
pub wB: b2Vec2,
#[doc = "< wB - wA"]
pub w: b2Vec2,
#[doc = "< barycentric coordinate for closest point"]
pub a: f32,
#[doc = "< wA index"]
pub indexA: ::std::os::raw::c_int,
#[doc = "< wB index"]
pub indexB: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2SimplexVertex"][::std::mem::size_of::<b2SimplexVertex>() - 36usize];
["Alignment of b2SimplexVertex"][::std::mem::align_of::<b2SimplexVertex>() - 4usize];
["Offset of field: b2SimplexVertex::wA"][::std::mem::offset_of!(b2SimplexVertex, wA) - 0usize];
["Offset of field: b2SimplexVertex::wB"][::std::mem::offset_of!(b2SimplexVertex, wB) - 8usize];
["Offset of field: b2SimplexVertex::w"][::std::mem::offset_of!(b2SimplexVertex, w) - 16usize];
["Offset of field: b2SimplexVertex::a"][::std::mem::offset_of!(b2SimplexVertex, a) - 24usize];
["Offset of field: b2SimplexVertex::indexA"][::std::mem::offset_of!(b2SimplexVertex, indexA) - 28usize];
["Offset of field: b2SimplexVertex::indexB"][::std::mem::offset_of!(b2SimplexVertex, indexB) - 32usize];
};
#[doc = " Simplex from the GJK algorithm"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Simplex {
#[doc = "< vertices"]
pub v1: b2SimplexVertex,
#[doc = "< vertices"]
pub v2: b2SimplexVertex,
#[doc = "< vertices"]
pub v3: b2SimplexVertex,
#[doc = "< number of valid vertices"]
pub count: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Simplex"][::std::mem::size_of::<b2Simplex>() - 112usize];
["Alignment of b2Simplex"][::std::mem::align_of::<b2Simplex>() - 4usize];
["Offset of field: b2Simplex::v1"][::std::mem::offset_of!(b2Simplex, v1) - 0usize];
["Offset of field: b2Simplex::v2"][::std::mem::offset_of!(b2Simplex, v2) - 36usize];
["Offset of field: b2Simplex::v3"][::std::mem::offset_of!(b2Simplex, v3) - 72usize];
["Offset of field: b2Simplex::count"][::std::mem::offset_of!(b2Simplex, count) - 108usize];
};
#[doc = " Input parameters for b2ShapeCast"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeCastPairInput {
#[doc = "< The proxy for shape A"]
pub proxyA: b2ShapeProxy,
#[doc = "< The proxy for shape B"]
pub proxyB: b2ShapeProxy,
#[doc = "< The world transform for shape A"]
pub transformA: b2Transform,
#[doc = "< The world transform for shape B"]
pub transformB: b2Transform,
#[doc = "< The translation of shape B"]
pub translationB: b2Vec2,
#[doc = "< The fraction of the translation to consider, typically 1"]
pub maxFraction: f32,
#[doc = "< Allows shapes with a radius to move slightly closer if already touching"]
pub canEncroach: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ShapeCastPairInput"][::std::mem::size_of::<b2ShapeCastPairInput>() - 192usize];
["Alignment of b2ShapeCastPairInput"][::std::mem::align_of::<b2ShapeCastPairInput>() - 4usize];
["Offset of field: b2ShapeCastPairInput::proxyA"][::std::mem::offset_of!(b2ShapeCastPairInput, proxyA) - 0usize];
["Offset of field: b2ShapeCastPairInput::proxyB"][::std::mem::offset_of!(b2ShapeCastPairInput, proxyB) - 72usize];
["Offset of field: b2ShapeCastPairInput::transformA"]
[::std::mem::offset_of!(b2ShapeCastPairInput, transformA) - 144usize];
["Offset of field: b2ShapeCastPairInput::transformB"]
[::std::mem::offset_of!(b2ShapeCastPairInput, transformB) - 160usize];
["Offset of field: b2ShapeCastPairInput::translationB"]
[::std::mem::offset_of!(b2ShapeCastPairInput, translationB) - 176usize];
["Offset of field: b2ShapeCastPairInput::maxFraction"]
[::std::mem::offset_of!(b2ShapeCastPairInput, maxFraction) - 184usize];
["Offset of field: b2ShapeCastPairInput::canEncroach"]
[::std::mem::offset_of!(b2ShapeCastPairInput, canEncroach) - 188usize];
};
#[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."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Sweep {
#[doc = "< Local center of mass position"]
pub localCenter: b2Vec2,
#[doc = "< Starting center of mass world position"]
pub c1: b2Vec2,
#[doc = "< Ending center of mass world position"]
pub c2: b2Vec2,
#[doc = "< Starting world rotation"]
pub q1: b2Rot,
#[doc = "< Ending world rotation"]
pub q2: b2Rot,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Sweep"][::std::mem::size_of::<b2Sweep>() - 40usize];
["Alignment of b2Sweep"][::std::mem::align_of::<b2Sweep>() - 4usize];
["Offset of field: b2Sweep::localCenter"][::std::mem::offset_of!(b2Sweep, localCenter) - 0usize];
["Offset of field: b2Sweep::c1"][::std::mem::offset_of!(b2Sweep, c1) - 8usize];
["Offset of field: b2Sweep::c2"][::std::mem::offset_of!(b2Sweep, c2) - 16usize];
["Offset of field: b2Sweep::q1"][::std::mem::offset_of!(b2Sweep, q1) - 24usize];
["Offset of field: b2Sweep::q2"][::std::mem::offset_of!(b2Sweep, q2) - 32usize];
};
#[doc = " Input parameters for b2TimeOfImpact"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2TOIInput {
#[doc = "< The proxy for shape A"]
pub proxyA: b2ShapeProxy,
#[doc = "< The proxy for shape B"]
pub proxyB: b2ShapeProxy,
#[doc = "< The movement of shape A"]
pub sweepA: b2Sweep,
#[doc = "< The movement of shape B"]
pub sweepB: b2Sweep,
#[doc = "< Defines the sweep interval [0, maxFraction]"]
pub maxFraction: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2TOIInput"][::std::mem::size_of::<b2TOIInput>() - 228usize];
["Alignment of b2TOIInput"][::std::mem::align_of::<b2TOIInput>() - 4usize];
["Offset of field: b2TOIInput::proxyA"][::std::mem::offset_of!(b2TOIInput, proxyA) - 0usize];
["Offset of field: b2TOIInput::proxyB"][::std::mem::offset_of!(b2TOIInput, proxyB) - 72usize];
["Offset of field: b2TOIInput::sweepA"][::std::mem::offset_of!(b2TOIInput, sweepA) - 144usize];
["Offset of field: b2TOIInput::sweepB"][::std::mem::offset_of!(b2TOIInput, sweepB) - 184usize];
["Offset of field: b2TOIInput::maxFraction"][::std::mem::offset_of!(b2TOIInput, maxFraction) - 224usize];
};
pub const b2TOIState_b2_toiStateUnknown: b2TOIState = 0;
pub const b2TOIState_b2_toiStateFailed: b2TOIState = 1;
pub const b2TOIState_b2_toiStateOverlapped: b2TOIState = 2;
pub const b2TOIState_b2_toiStateHit: b2TOIState = 3;
pub const b2TOIState_b2_toiStateSeparated: b2TOIState = 4;
#[doc = " Describes the TOI output"]
pub type b2TOIState = ::std::os::raw::c_uint;
#[doc = " Output parameters for b2TimeOfImpact."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2TOIOutput {
#[doc = "< The type of result"]
pub state: b2TOIState,
#[doc = "< The sweep time of the collision"]
pub fraction: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2TOIOutput"][::std::mem::size_of::<b2TOIOutput>() - 8usize];
["Alignment of b2TOIOutput"][::std::mem::align_of::<b2TOIOutput>() - 4usize];
["Offset of field: b2TOIOutput::state"][::std::mem::offset_of!(b2TOIOutput, state) - 0usize];
["Offset of field: b2TOIOutput::fraction"][::std::mem::offset_of!(b2TOIOutput, fraction) - 4usize];
};
#[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 Box2D uses speculative collision so some contact points may be separated.\n You may use the totalNormalImpulse to determine if there was an interaction during\n the time step."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ManifoldPoint {
#[doc = " Location of the contact point in world space. Subject to precision loss at large coordinates.\n @note Should only be used for debugging."]
pub point: b2Vec2,
#[doc = " Location of the contact point relative to shapeA's origin in world space\n @note When used internally to the Box2D solver, this is relative to the body center of mass."]
pub anchorA: b2Vec2,
#[doc = " Location of the contact point relative to shapeB's origin in world space\n @note When used internally to the Box2D solver, this is relative to the body center of mass."]
pub anchorB: b2Vec2,
#[doc = " The separation of the contact point, negative if penetrating"]
pub separation: f32,
#[doc = " The impulse along the manifold normal vector."]
pub normalImpulse: f32,
#[doc = " The friction impulse"]
pub tangentImpulse: f32,
#[doc = " The total normal impulse applied across sub-stepping and restitution. This is important\n to identify speculative contact points that had an interaction in the time step."]
pub totalNormalImpulse: f32,
#[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."]
pub normalVelocity: f32,
#[doc = " Uniquely identifies a contact point between two shapes"]
pub id: u16,
#[doc = " Did this contact point exist the previous step?"]
pub persisted: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ManifoldPoint"][::std::mem::size_of::<b2ManifoldPoint>() - 48usize];
["Alignment of b2ManifoldPoint"][::std::mem::align_of::<b2ManifoldPoint>() - 4usize];
["Offset of field: b2ManifoldPoint::point"][::std::mem::offset_of!(b2ManifoldPoint, point) - 0usize];
["Offset of field: b2ManifoldPoint::anchorA"][::std::mem::offset_of!(b2ManifoldPoint, anchorA) - 8usize];
["Offset of field: b2ManifoldPoint::anchorB"][::std::mem::offset_of!(b2ManifoldPoint, anchorB) - 16usize];
["Offset of field: b2ManifoldPoint::separation"][::std::mem::offset_of!(b2ManifoldPoint, separation) - 24usize];
["Offset of field: b2ManifoldPoint::normalImpulse"]
[::std::mem::offset_of!(b2ManifoldPoint, normalImpulse) - 28usize];
["Offset of field: b2ManifoldPoint::tangentImpulse"]
[::std::mem::offset_of!(b2ManifoldPoint, tangentImpulse) - 32usize];
["Offset of field: b2ManifoldPoint::totalNormalImpulse"]
[::std::mem::offset_of!(b2ManifoldPoint, totalNormalImpulse) - 36usize];
["Offset of field: b2ManifoldPoint::normalVelocity"]
[::std::mem::offset_of!(b2ManifoldPoint, normalVelocity) - 40usize];
["Offset of field: b2ManifoldPoint::id"][::std::mem::offset_of!(b2ManifoldPoint, id) - 44usize];
["Offset of field: b2ManifoldPoint::persisted"][::std::mem::offset_of!(b2ManifoldPoint, persisted) - 46usize];
};
#[doc = " A contact manifold describes the contact points between colliding shapes.\n @note Box2D uses speculative collision so some contact points may be separated."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Manifold {
#[doc = " The unit normal vector in world space, points from shape A to bodyB"]
pub normal: b2Vec2,
#[doc = " Angular impulse applied for rolling resistance. N * m * s = kg * m^2 / s"]
pub rollingImpulse: f32,
#[doc = " The manifold points, up to two are possible in 2D"]
pub points: [b2ManifoldPoint; 2usize],
#[doc = " The number of contacts points, will be 0, 1, or 2"]
pub pointCount: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Manifold"][::std::mem::size_of::<b2Manifold>() - 112usize];
["Alignment of b2Manifold"][::std::mem::align_of::<b2Manifold>() - 4usize];
["Offset of field: b2Manifold::normal"][::std::mem::offset_of!(b2Manifold, normal) - 0usize];
["Offset of field: b2Manifold::rollingImpulse"][::std::mem::offset_of!(b2Manifold, rollingImpulse) - 8usize];
["Offset of field: b2Manifold::points"][::std::mem::offset_of!(b2Manifold, points) - 12usize];
["Offset of field: b2Manifold::pointCount"][::std::mem::offset_of!(b2Manifold, pointCount) - 108usize];
};
#[doc = " The dynamic tree structure. This should be considered private data.\n It is placed here for performance reasons."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DynamicTree {
#[doc = " The tree nodes"]
pub nodes: *mut b2TreeNode,
#[doc = " The root index"]
pub root: ::std::os::raw::c_int,
#[doc = " The number of nodes"]
pub nodeCount: ::std::os::raw::c_int,
#[doc = " The allocated node space"]
pub nodeCapacity: ::std::os::raw::c_int,
#[doc = " Node free list"]
pub freeList: ::std::os::raw::c_int,
#[doc = " Number of proxies created"]
pub proxyCount: ::std::os::raw::c_int,
#[doc = " Leaf indices for rebuild"]
pub leafIndices: *mut ::std::os::raw::c_int,
#[doc = " Leaf bounding boxes for rebuild"]
pub leafBoxes: *mut b2AABB,
#[doc = " Leaf bounding box centers for rebuild"]
pub leafCenters: *mut b2Vec2,
#[doc = " Bins for sorting during rebuild"]
pub binIndices: *mut ::std::os::raw::c_int,
#[doc = " Allocated space for rebuilding"]
pub rebuildCapacity: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2DynamicTree"][::std::mem::size_of::<b2DynamicTree>() - 72usize];
["Alignment of b2DynamicTree"][::std::mem::align_of::<b2DynamicTree>() - 8usize];
["Offset of field: b2DynamicTree::nodes"][::std::mem::offset_of!(b2DynamicTree, nodes) - 0usize];
["Offset of field: b2DynamicTree::root"][::std::mem::offset_of!(b2DynamicTree, root) - 8usize];
["Offset of field: b2DynamicTree::nodeCount"][::std::mem::offset_of!(b2DynamicTree, nodeCount) - 12usize];
["Offset of field: b2DynamicTree::nodeCapacity"][::std::mem::offset_of!(b2DynamicTree, nodeCapacity) - 16usize];
["Offset of field: b2DynamicTree::freeList"][::std::mem::offset_of!(b2DynamicTree, freeList) - 20usize];
["Offset of field: b2DynamicTree::proxyCount"][::std::mem::offset_of!(b2DynamicTree, proxyCount) - 24usize];
["Offset of field: b2DynamicTree::leafIndices"][::std::mem::offset_of!(b2DynamicTree, leafIndices) - 32usize];
["Offset of field: b2DynamicTree::leafBoxes"][::std::mem::offset_of!(b2DynamicTree, leafBoxes) - 40usize];
["Offset of field: b2DynamicTree::leafCenters"][::std::mem::offset_of!(b2DynamicTree, leafCenters) - 48usize];
["Offset of field: b2DynamicTree::binIndices"][::std::mem::offset_of!(b2DynamicTree, binIndices) - 56usize];
["Offset of field: b2DynamicTree::rebuildCapacity"]
[::std::mem::offset_of!(b2DynamicTree, rebuildCapacity) - 64usize];
};
#[doc = " These are performance results returned by dynamic tree queries."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2TreeStats {
#[doc = " Number of internal nodes visited during the query"]
pub nodeVisits: ::std::os::raw::c_int,
#[doc = " Number of leaf nodes visited during the query"]
pub leafVisits: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2TreeStats"][::std::mem::size_of::<b2TreeStats>() - 8usize];
["Alignment of b2TreeStats"][::std::mem::align_of::<b2TreeStats>() - 4usize];
["Offset of field: b2TreeStats::nodeVisits"][::std::mem::offset_of!(b2TreeStats, nodeVisits) - 0usize];
["Offset of field: b2TreeStats::leafVisits"][::std::mem::offset_of!(b2TreeStats, leafVisits) - 4usize];
};
#[doc = " This function receives proxies found in the AABB query.\n @return true if the query should continue"]
pub type b2TreeQueryCallbackFcn = ::std::option::Option<
unsafe extern "C" fn(proxyId: ::std::os::raw::c_int, userData: u64, context: *mut ::std::os::raw::c_void) -> bool,
>;
#[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"]
pub type b2TreeRayCastCallbackFcn = ::std::option::Option<
unsafe extern "C" fn(
input: *const b2RayCastInput,
proxyId: ::std::os::raw::c_int,
userData: u64,
context: *mut ::std::os::raw::c_void,
) -> f32,
>;
#[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"]
pub type b2TreeShapeCastCallbackFcn = ::std::option::Option<
unsafe extern "C" fn(
input: *const b2ShapeCastInput,
proxyId: ::std::os::raw::c_int,
userData: u64,
context: *mut ::std::os::raw::c_void,
) -> f32,
>;
#[doc = " These are the collision planes returned from b2World_CollideMover"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2PlaneResult {
#[doc = " The collision plane between the mover and a convex shape"]
pub plane: b2Plane,
pub point: b2Vec2,
#[doc = " Did the collision register a hit? If not this plane should be ignored."]
pub hit: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2PlaneResult"][::std::mem::size_of::<b2PlaneResult>() - 24usize];
["Alignment of b2PlaneResult"][::std::mem::align_of::<b2PlaneResult>() - 4usize];
["Offset of field: b2PlaneResult::plane"][::std::mem::offset_of!(b2PlaneResult, plane) - 0usize];
["Offset of field: b2PlaneResult::point"][::std::mem::offset_of!(b2PlaneResult, point) - 12usize];
["Offset of field: b2PlaneResult::hit"][::std::mem::offset_of!(b2PlaneResult, hit) - 20usize];
};
#[doc = " These are collision planes that can be fed to b2SolvePlanes. Normally\n this is assembled by the user from plane results in b2PlaneResult"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2CollisionPlane {
#[doc = " The collision plane between the mover and some shape"]
pub plane: b2Plane,
#[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."]
pub pushLimit: f32,
#[doc = " The push on the mover determined by b2SolvePlanes. Usually in meters."]
pub push: f32,
#[doc = " Indicates if b2ClipVector should clip against this plane. Should be false for soft collision."]
pub clipVelocity: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2CollisionPlane"][::std::mem::size_of::<b2CollisionPlane>() - 24usize];
["Alignment of b2CollisionPlane"][::std::mem::align_of::<b2CollisionPlane>() - 4usize];
["Offset of field: b2CollisionPlane::plane"][::std::mem::offset_of!(b2CollisionPlane, plane) - 0usize];
["Offset of field: b2CollisionPlane::pushLimit"][::std::mem::offset_of!(b2CollisionPlane, pushLimit) - 12usize];
["Offset of field: b2CollisionPlane::push"][::std::mem::offset_of!(b2CollisionPlane, push) - 16usize];
["Offset of field: b2CollisionPlane::clipVelocity"]
[::std::mem::offset_of!(b2CollisionPlane, clipVelocity) - 20usize];
};
#[doc = " Result returned by b2SolvePlanes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2PlaneSolverResult {
#[doc = " The translation of the mover"]
pub translation: b2Vec2,
#[doc = " The number of iterations used by the plane solver. For diagnostics."]
pub iterationCount: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2PlaneSolverResult"][::std::mem::size_of::<b2PlaneSolverResult>() - 12usize];
["Alignment of b2PlaneSolverResult"][::std::mem::align_of::<b2PlaneSolverResult>() - 4usize];
["Offset of field: b2PlaneSolverResult::translation"]
[::std::mem::offset_of!(b2PlaneSolverResult, translation) - 0usize];
["Offset of field: b2PlaneSolverResult::iterationCount"]
[::std::mem::offset_of!(b2PlaneSolverResult, iterationCount) - 8usize];
};
#[doc = " World id references a world instance. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2WorldId {
pub index1: u16,
pub generation: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2WorldId"][::std::mem::size_of::<b2WorldId>() - 4usize];
["Alignment of b2WorldId"][::std::mem::align_of::<b2WorldId>() - 2usize];
["Offset of field: b2WorldId::index1"][::std::mem::offset_of!(b2WorldId, index1) - 0usize];
["Offset of field: b2WorldId::generation"][::std::mem::offset_of!(b2WorldId, generation) - 2usize];
};
#[doc = " Body id references a body instance. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2BodyId {
pub index1: i32,
pub world0: u16,
pub generation: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2BodyId"][::std::mem::size_of::<b2BodyId>() - 8usize];
["Alignment of b2BodyId"][::std::mem::align_of::<b2BodyId>() - 4usize];
["Offset of field: b2BodyId::index1"][::std::mem::offset_of!(b2BodyId, index1) - 0usize];
["Offset of field: b2BodyId::world0"][::std::mem::offset_of!(b2BodyId, world0) - 4usize];
["Offset of field: b2BodyId::generation"][::std::mem::offset_of!(b2BodyId, generation) - 6usize];
};
#[doc = " Shape id references a shape instance. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeId {
pub index1: i32,
pub world0: u16,
pub generation: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ShapeId"][::std::mem::size_of::<b2ShapeId>() - 8usize];
["Alignment of b2ShapeId"][::std::mem::align_of::<b2ShapeId>() - 4usize];
["Offset of field: b2ShapeId::index1"][::std::mem::offset_of!(b2ShapeId, index1) - 0usize];
["Offset of field: b2ShapeId::world0"][::std::mem::offset_of!(b2ShapeId, world0) - 4usize];
["Offset of field: b2ShapeId::generation"][::std::mem::offset_of!(b2ShapeId, generation) - 6usize];
};
#[doc = " Chain id references a chain instances. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ChainId {
pub index1: i32,
pub world0: u16,
pub generation: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ChainId"][::std::mem::size_of::<b2ChainId>() - 8usize];
["Alignment of b2ChainId"][::std::mem::align_of::<b2ChainId>() - 4usize];
["Offset of field: b2ChainId::index1"][::std::mem::offset_of!(b2ChainId, index1) - 0usize];
["Offset of field: b2ChainId::world0"][::std::mem::offset_of!(b2ChainId, world0) - 4usize];
["Offset of field: b2ChainId::generation"][::std::mem::offset_of!(b2ChainId, generation) - 6usize];
};
#[doc = " Joint id references a joint instance. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2JointId {
pub index1: i32,
pub world0: u16,
pub generation: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2JointId"][::std::mem::size_of::<b2JointId>() - 8usize];
["Alignment of b2JointId"][::std::mem::align_of::<b2JointId>() - 4usize];
["Offset of field: b2JointId::index1"][::std::mem::offset_of!(b2JointId, index1) - 0usize];
["Offset of field: b2JointId::world0"][::std::mem::offset_of!(b2JointId, world0) - 4usize];
["Offset of field: b2JointId::generation"][::std::mem::offset_of!(b2JointId, generation) - 6usize];
};
#[doc = " Task interface\n This is prototype for a Box2D task. Your task system is expected to invoke the Box2D task with these arguments.\n The task spans a range of the parallel-for: [startIndex, endIndex)\n The worker index must correctly identify each worker in the user thread pool, expected in [0, workerCount).\n A worker must only exist on only one thread at a time and is analogous to the thread index.\n The task context is the context pointer sent from Box2D when it is enqueued.\n The startIndex and endIndex are expected in the range [0, itemCount) where itemCount is the argument to b2EnqueueTaskCallback\n below. Box2D expects startIndex < endIndex and will execute a loop like this:\n\n @code{.c}\n for (int i = startIndex; i < endIndex; ++i)\n {\n \tDoWork();\n }\n @endcode\n @ingroup world"]
pub type b2TaskCallback = ::std::option::Option<
unsafe extern "C" fn(
startIndex: ::std::os::raw::c_int,
endIndex: ::std::os::raw::c_int,
workerIndex: u32,
taskContext: *mut ::std::os::raw::c_void,
),
>;
#[doc = " These functions can be provided to Box2D to invoke a task system. These are designed to work well with enkiTS.\n Returns a pointer to the user's task object. May be nullptr. A nullptr indicates to Box2D that the work was executed\n serially within the callback and there is no need to call b2FinishTaskCallback.\n The itemCount is the number of Box2D work items that are to be partitioned among workers by the user's task system.\n This is essentially a parallel-for. The minRange parameter is a suggestion of the minimum number of items to assign\n per worker to reduce overhead. For example, suppose the task is small and that itemCount is 16. A minRange of 8 suggests\n that your task system should split the work items among just two workers, even if you have more available.\n In general the range [startIndex, endIndex) send to b2TaskCallback should obey:\n endIndex - startIndex >= minRange\n The exception of course is when itemCount < minRange.\n @ingroup world"]
pub type b2EnqueueTaskCallback = ::std::option::Option<
unsafe extern "C" fn(
task: b2TaskCallback,
itemCount: ::std::os::raw::c_int,
minRange: ::std::os::raw::c_int,
taskContext: *mut ::std::os::raw::c_void,
userContext: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void,
>;
#[doc = " Finishes a user task object that wraps a Box2D task.\n @ingroup world"]
pub type b2FinishTaskCallback = ::std::option::Option<
unsafe extern "C" fn(userTask: *mut ::std::os::raw::c_void, userContext: *mut ::std::os::raw::c_void),
>;
#[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 Box2D state or user application state.\n @ingroup world"]
pub type b2FrictionCallback = ::std::option::Option<
unsafe extern "C" fn(
frictionA: f32,
userMaterialIdA: ::std::os::raw::c_int,
frictionB: f32,
userMaterialIdB: ::std::os::raw::c_int,
) -> f32,
>;
#[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 Box2D state or user application state.\n @ingroup world"]
pub type b2RestitutionCallback = ::std::option::Option<
unsafe extern "C" fn(
restitutionA: f32,
userMaterialIdA: ::std::os::raw::c_int,
restitutionB: f32,
userMaterialIdB: ::std::os::raw::c_int,
) -> f32,
>;
#[doc = " Result from b2World_RayCastClosest\n If there is initial overlap the fraction and normal will be zero while the point is an arbitrary point in the overlap region.\n @ingroup world"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2RayResult {
pub shapeId: b2ShapeId,
pub point: b2Vec2,
pub normal: b2Vec2,
pub fraction: f32,
pub nodeVisits: ::std::os::raw::c_int,
pub leafVisits: ::std::os::raw::c_int,
pub hit: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2RayResult"][::std::mem::size_of::<b2RayResult>() - 40usize];
["Alignment of b2RayResult"][::std::mem::align_of::<b2RayResult>() - 4usize];
["Offset of field: b2RayResult::shapeId"][::std::mem::offset_of!(b2RayResult, shapeId) - 0usize];
["Offset of field: b2RayResult::point"][::std::mem::offset_of!(b2RayResult, point) - 8usize];
["Offset of field: b2RayResult::normal"][::std::mem::offset_of!(b2RayResult, normal) - 16usize];
["Offset of field: b2RayResult::fraction"][::std::mem::offset_of!(b2RayResult, fraction) - 24usize];
["Offset of field: b2RayResult::nodeVisits"][::std::mem::offset_of!(b2RayResult, nodeVisits) - 28usize];
["Offset of field: b2RayResult::leafVisits"][::std::mem::offset_of!(b2RayResult, leafVisits) - 32usize];
["Offset of field: b2RayResult::hit"][::std::mem::offset_of!(b2RayResult, hit) - 36usize];
};
#[doc = " World definition used to create a simulation world.\n Must be initialized using b2DefaultWorldDef().\n @ingroup world"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2WorldDef {
#[doc = " Gravity vector. Box2D has no up-vector defined."]
pub gravity: b2Vec2,
#[doc = " Restitution speed threshold, usually in m/s. Collisions above this\n speed have restitution applied (will bounce)."]
pub restitutionThreshold: f32,
#[doc = " Threshold speed for hit events. Usually meters per second."]
pub hitEventThreshold: f32,
#[doc = " Contact stiffness. Cycles per second. Increasing this increases the speed of overlap recovery, but can introduce jitter."]
pub contactHertz: f32,
#[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."]
pub contactDampingRatio: f32,
#[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."]
pub maxContactPushSpeed: f32,
#[doc = " Maximum linear speed. Usually meters per second."]
pub maximumLinearSpeed: f32,
#[doc = " Optional mixing callback for friction. The default uses sqrt(frictionA * frictionB)."]
pub frictionCallback: b2FrictionCallback,
#[doc = " Optional mixing callback for restitution. The default uses max(restitutionA, restitutionB)."]
pub restitutionCallback: b2RestitutionCallback,
#[doc = " Can bodies go to sleep to improve performance"]
pub enableSleep: bool,
#[doc = " Enable continuous collision"]
pub enableContinuous: bool,
#[doc = " Number of workers to use with the provided task system. Box2D 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 @note Box2D does not create threads. This is the number of threads your applications has created\n that you are allocating to b2World_Step.\n @warning Do not modify the default value unless you are also providing a task system and providing\n task callbacks (enqueueTask and finishTask)."]
pub workerCount: ::std::os::raw::c_int,
#[doc = " Function to spawn tasks"]
pub enqueueTask: b2EnqueueTaskCallback,
#[doc = " Function to finish a task"]
pub finishTask: b2FinishTaskCallback,
#[doc = " User context that is provided to enqueueTask and finishTask"]
pub userTaskContext: *mut ::std::os::raw::c_void,
#[doc = " User data"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2WorldDef"][::std::mem::size_of::<b2WorldDef>() - 96usize];
["Alignment of b2WorldDef"][::std::mem::align_of::<b2WorldDef>() - 8usize];
["Offset of field: b2WorldDef::gravity"][::std::mem::offset_of!(b2WorldDef, gravity) - 0usize];
["Offset of field: b2WorldDef::restitutionThreshold"]
[::std::mem::offset_of!(b2WorldDef, restitutionThreshold) - 8usize];
["Offset of field: b2WorldDef::hitEventThreshold"][::std::mem::offset_of!(b2WorldDef, hitEventThreshold) - 12usize];
["Offset of field: b2WorldDef::contactHertz"][::std::mem::offset_of!(b2WorldDef, contactHertz) - 16usize];
["Offset of field: b2WorldDef::contactDampingRatio"]
[::std::mem::offset_of!(b2WorldDef, contactDampingRatio) - 20usize];
["Offset of field: b2WorldDef::maxContactPushSpeed"]
[::std::mem::offset_of!(b2WorldDef, maxContactPushSpeed) - 24usize];
["Offset of field: b2WorldDef::maximumLinearSpeed"]
[::std::mem::offset_of!(b2WorldDef, maximumLinearSpeed) - 28usize];
["Offset of field: b2WorldDef::frictionCallback"][::std::mem::offset_of!(b2WorldDef, frictionCallback) - 32usize];
["Offset of field: b2WorldDef::restitutionCallback"]
[::std::mem::offset_of!(b2WorldDef, restitutionCallback) - 40usize];
["Offset of field: b2WorldDef::enableSleep"][::std::mem::offset_of!(b2WorldDef, enableSleep) - 48usize];
["Offset of field: b2WorldDef::enableContinuous"][::std::mem::offset_of!(b2WorldDef, enableContinuous) - 49usize];
["Offset of field: b2WorldDef::workerCount"][::std::mem::offset_of!(b2WorldDef, workerCount) - 52usize];
["Offset of field: b2WorldDef::enqueueTask"][::std::mem::offset_of!(b2WorldDef, enqueueTask) - 56usize];
["Offset of field: b2WorldDef::finishTask"][::std::mem::offset_of!(b2WorldDef, finishTask) - 64usize];
["Offset of field: b2WorldDef::userTaskContext"][::std::mem::offset_of!(b2WorldDef, userTaskContext) - 72usize];
["Offset of field: b2WorldDef::userData"][::std::mem::offset_of!(b2WorldDef, userData) - 80usize];
["Offset of field: b2WorldDef::internalValue"][::std::mem::offset_of!(b2WorldDef, internalValue) - 88usize];
};
#[doc = " zero mass, zero velocity, may be manually moved"]
pub const b2BodyType_b2_staticBody: b2BodyType = 0;
#[doc = " zero mass, velocity set by user, moved by solver"]
pub const b2BodyType_b2_kinematicBody: b2BodyType = 1;
#[doc = " positive mass, velocity determined by forces, moved by solver"]
pub const b2BodyType_b2_dynamicBody: b2BodyType = 2;
#[doc = " number of body types"]
pub const b2BodyType_b2_bodyTypeCount: b2BodyType = 3;
#[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"]
pub type b2BodyType = ::std::os::raw::c_uint;
#[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 b2DefaultBodyDef().\n @ingroup body"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2BodyDef {
#[doc = " The body type: static, kinematic, or dynamic."]
pub type_: b2BodyType,
#[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."]
pub position: b2Vec2,
#[doc = " The initial world rotation of the body. Use b2MakeRot() if you have an angle."]
pub rotation: b2Rot,
#[doc = " The initial linear velocity of the body's origin. Usually in meters per second."]
pub linearVelocity: b2Vec2,
#[doc = " The initial angular velocity of the body. Radians per second."]
pub angularVelocity: f32,
#[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."]
pub linearDamping: f32,
#[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 use slow down rotating bodies."]
pub angularDamping: f32,
#[doc = " Scale the gravity applied to this body. Non-dimensional."]
pub gravityScale: f32,
#[doc = " Sleep speed threshold, default is 0.05 meters per second"]
pub sleepThreshold: f32,
#[doc = " Optional body name for debugging. Up to 31 characters (excluding null termination)"]
pub name: *const ::std::os::raw::c_char,
#[doc = " Use this to store application specific body data."]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Set this flag to false if this body should never fall asleep."]
pub enableSleep: bool,
#[doc = " Is this body initially awake or sleeping?"]
pub isAwake: bool,
#[doc = " Should this body be prevented from rotating? Useful for characters."]
pub fixedRotation: bool,
#[doc = " Treat this body as 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 may interfere with joint constraints."]
pub isBullet: bool,
#[doc = " Used to disable a body. A disabled body does not move or collide."]
pub isEnabled: bool,
#[doc = " This allows this body to bypass rotational speed limits. Should only be used\n for circular objects, like wheels."]
pub allowFastRotation: bool,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2BodyDef"][::std::mem::size_of::<b2BodyDef>() - 80usize];
["Alignment of b2BodyDef"][::std::mem::align_of::<b2BodyDef>() - 8usize];
["Offset of field: b2BodyDef::type_"][::std::mem::offset_of!(b2BodyDef, type_) - 0usize];
["Offset of field: b2BodyDef::position"][::std::mem::offset_of!(b2BodyDef, position) - 4usize];
["Offset of field: b2BodyDef::rotation"][::std::mem::offset_of!(b2BodyDef, rotation) - 12usize];
["Offset of field: b2BodyDef::linearVelocity"][::std::mem::offset_of!(b2BodyDef, linearVelocity) - 20usize];
["Offset of field: b2BodyDef::angularVelocity"][::std::mem::offset_of!(b2BodyDef, angularVelocity) - 28usize];
["Offset of field: b2BodyDef::linearDamping"][::std::mem::offset_of!(b2BodyDef, linearDamping) - 32usize];
["Offset of field: b2BodyDef::angularDamping"][::std::mem::offset_of!(b2BodyDef, angularDamping) - 36usize];
["Offset of field: b2BodyDef::gravityScale"][::std::mem::offset_of!(b2BodyDef, gravityScale) - 40usize];
["Offset of field: b2BodyDef::sleepThreshold"][::std::mem::offset_of!(b2BodyDef, sleepThreshold) - 44usize];
["Offset of field: b2BodyDef::name"][::std::mem::offset_of!(b2BodyDef, name) - 48usize];
["Offset of field: b2BodyDef::userData"][::std::mem::offset_of!(b2BodyDef, userData) - 56usize];
["Offset of field: b2BodyDef::enableSleep"][::std::mem::offset_of!(b2BodyDef, enableSleep) - 64usize];
["Offset of field: b2BodyDef::isAwake"][::std::mem::offset_of!(b2BodyDef, isAwake) - 65usize];
["Offset of field: b2BodyDef::fixedRotation"][::std::mem::offset_of!(b2BodyDef, fixedRotation) - 66usize];
["Offset of field: b2BodyDef::isBullet"][::std::mem::offset_of!(b2BodyDef, isBullet) - 67usize];
["Offset of field: b2BodyDef::isEnabled"][::std::mem::offset_of!(b2BodyDef, isEnabled) - 68usize];
["Offset of field: b2BodyDef::allowFastRotation"][::std::mem::offset_of!(b2BodyDef, allowFastRotation) - 69usize];
["Offset of field: b2BodyDef::internalValue"][::std::mem::offset_of!(b2BodyDef, internalValue) - 72usize];
};
#[doc = " This is used to filter collision on shapes. It affects shape-vs-shape collision\n and shape-versus-query collision (such as b2World_CastRay).\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Filter {
#[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"]
pub categoryBits: u64,
#[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"]
pub maskBits: u64,
#[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."]
pub groupIndex: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Filter"][::std::mem::size_of::<b2Filter>() - 24usize];
["Alignment of b2Filter"][::std::mem::align_of::<b2Filter>() - 8usize];
["Offset of field: b2Filter::categoryBits"][::std::mem::offset_of!(b2Filter, categoryBits) - 0usize];
["Offset of field: b2Filter::maskBits"][::std::mem::offset_of!(b2Filter, maskBits) - 8usize];
["Offset of field: b2Filter::groupIndex"][::std::mem::offset_of!(b2Filter, groupIndex) - 16usize];
};
#[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.\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2QueryFilter {
#[doc = " The collision category bits of this query. Normally you would just set one bit."]
pub categoryBits: u64,
#[doc = " The collision mask bits. This states the shape categories that this\n query would accept for collision."]
pub maskBits: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2QueryFilter"][::std::mem::size_of::<b2QueryFilter>() - 16usize];
["Alignment of b2QueryFilter"][::std::mem::align_of::<b2QueryFilter>() - 8usize];
["Offset of field: b2QueryFilter::categoryBits"][::std::mem::offset_of!(b2QueryFilter, categoryBits) - 0usize];
["Offset of field: b2QueryFilter::maskBits"][::std::mem::offset_of!(b2QueryFilter, maskBits) - 8usize];
};
#[doc = " A circle with an offset"]
pub const b2ShapeType_b2_circleShape: b2ShapeType = 0;
#[doc = " A capsule is an extruded circle"]
pub const b2ShapeType_b2_capsuleShape: b2ShapeType = 1;
#[doc = " A line segment"]
pub const b2ShapeType_b2_segmentShape: b2ShapeType = 2;
#[doc = " A convex polygon"]
pub const b2ShapeType_b2_polygonShape: b2ShapeType = 3;
#[doc = " A line segment owned by a chain shape"]
pub const b2ShapeType_b2_chainSegmentShape: b2ShapeType = 4;
#[doc = " The number of shape types"]
pub const b2ShapeType_b2_shapeTypeCount: b2ShapeType = 5;
#[doc = " Shape type\n @ingroup shape"]
pub type b2ShapeType = ::std::os::raw::c_uint;
#[doc = " Surface materials allow chain shapes to have per segment surface properties.\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SurfaceMaterial {
#[doc = " The Coulomb (dry) friction coefficient, usually in the range [0,1]."]
pub friction: f32,
#[doc = " The coefficient of restitution (bounce) usually in the range [0,1].\n https://en.wikipedia.org/wiki/Coefficient_of_restitution"]
pub restitution: f32,
#[doc = " The rolling resistance usually in the range [0,1]."]
pub rollingResistance: f32,
#[doc = " The tangent speed for conveyor belts"]
pub tangentSpeed: f32,
#[doc = " User material identifier. This is passed with query results and to friction and restitution\n combining functions. It is not used internally."]
pub userMaterialId: ::std::os::raw::c_int,
#[doc = " Custom debug draw color."]
pub customColor: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2SurfaceMaterial"][::std::mem::size_of::<b2SurfaceMaterial>() - 24usize];
["Alignment of b2SurfaceMaterial"][::std::mem::align_of::<b2SurfaceMaterial>() - 4usize];
["Offset of field: b2SurfaceMaterial::friction"][::std::mem::offset_of!(b2SurfaceMaterial, friction) - 0usize];
["Offset of field: b2SurfaceMaterial::restitution"]
[::std::mem::offset_of!(b2SurfaceMaterial, restitution) - 4usize];
["Offset of field: b2SurfaceMaterial::rollingResistance"]
[::std::mem::offset_of!(b2SurfaceMaterial, rollingResistance) - 8usize];
["Offset of field: b2SurfaceMaterial::tangentSpeed"]
[::std::mem::offset_of!(b2SurfaceMaterial, tangentSpeed) - 12usize];
["Offset of field: b2SurfaceMaterial::userMaterialId"]
[::std::mem::offset_of!(b2SurfaceMaterial, userMaterialId) - 16usize];
["Offset of field: b2SurfaceMaterial::customColor"]
[::std::mem::offset_of!(b2SurfaceMaterial, customColor) - 20usize];
};
#[doc = " Used to create a shape.\n This is a temporary object used to bundle shape creation parameters. You may use\n the same shape definition to create multiple shapes.\n Must be initialized using b2DefaultShapeDef().\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeDef {
#[doc = " Use this to store application specific shape data."]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " The surface material for this shape."]
pub material: b2SurfaceMaterial,
#[doc = " The density, usually in kg/m^2.\n This is not part of the surface material because this is for the interior, which may have\n other considerations, such as being hollow. For example a wood barrel may be hollow or full of water."]
pub density: f32,
#[doc = " Collision filtering data."]
pub filter: b2Filter,
#[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"]
pub isSensor: bool,
#[doc = " Enable sensor events for this shape. This applies to sensors and non-sensors. False by default, even for sensors."]
pub enableSensorEvents: bool,
#[doc = " Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default."]
pub enableContactEvents: bool,
#[doc = " Enable hit events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default."]
pub enableHitEvents: bool,
#[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 threading. Ignored for sensors."]
pub enablePreSolveEvents: bool,
#[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."]
pub invokeContactCreation: bool,
#[doc = " Should the body update the mass properties when this shape is created. Default is true."]
pub updateBodyMass: bool,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ShapeDef"][::std::mem::size_of::<b2ShapeDef>() - 80usize];
["Alignment of b2ShapeDef"][::std::mem::align_of::<b2ShapeDef>() - 8usize];
["Offset of field: b2ShapeDef::userData"][::std::mem::offset_of!(b2ShapeDef, userData) - 0usize];
["Offset of field: b2ShapeDef::material"][::std::mem::offset_of!(b2ShapeDef, material) - 8usize];
["Offset of field: b2ShapeDef::density"][::std::mem::offset_of!(b2ShapeDef, density) - 32usize];
["Offset of field: b2ShapeDef::filter"][::std::mem::offset_of!(b2ShapeDef, filter) - 40usize];
["Offset of field: b2ShapeDef::isSensor"][::std::mem::offset_of!(b2ShapeDef, isSensor) - 64usize];
["Offset of field: b2ShapeDef::enableSensorEvents"]
[::std::mem::offset_of!(b2ShapeDef, enableSensorEvents) - 65usize];
["Offset of field: b2ShapeDef::enableContactEvents"]
[::std::mem::offset_of!(b2ShapeDef, enableContactEvents) - 66usize];
["Offset of field: b2ShapeDef::enableHitEvents"][::std::mem::offset_of!(b2ShapeDef, enableHitEvents) - 67usize];
["Offset of field: b2ShapeDef::enablePreSolveEvents"]
[::std::mem::offset_of!(b2ShapeDef, enablePreSolveEvents) - 68usize];
["Offset of field: b2ShapeDef::invokeContactCreation"]
[::std::mem::offset_of!(b2ShapeDef, invokeContactCreation) - 69usize];
["Offset of field: b2ShapeDef::updateBodyMass"][::std::mem::offset_of!(b2ShapeDef, updateBodyMass) - 70usize];
["Offset of field: b2ShapeDef::internalValue"][::std::mem::offset_of!(b2ShapeDef, internalValue) - 72usize];
};
#[doc = " Used to create a chain of line segments. This is designed to eliminate ghost collisions with some limitations.\n - chains are one-sided\n - chains have no mass and should be used on static bodies\n - chains have a counter-clockwise winding order (normal points right of segment direction)\n - chains are either a loop or open\n - a chain must have at least 4 points\n - the distance between any two points must be greater than B2_LINEAR_SLOP\n - a chain shape should not self intersect (this is not validated)\n - an open chain shape has NO COLLISION on the first and final edge\n - you may overlap two open chains on their first three and/or last three points to get smooth collision\n - a chain shape creates multiple line segment shapes on the body\n https://en.wikipedia.org/wiki/Polygonal_chain\n Must be initialized using b2DefaultChainDef().\n @warning Do not use chain shapes unless you understand the limitations. This is an advanced feature.\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ChainDef {
#[doc = " Use this to store application specific shape data."]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " An array of at least 4 points. These are cloned and may be temporary."]
pub points: *const b2Vec2,
#[doc = " The point count, must be 4 or more."]
pub count: ::std::os::raw::c_int,
#[doc = " Surface materials for each segment. These are cloned."]
pub materials: *const b2SurfaceMaterial,
#[doc = " The material count. Must be 1 or count. This allows you to provide one\n material for all segments or a unique material per segment."]
pub materialCount: ::std::os::raw::c_int,
#[doc = " Contact filtering data."]
pub filter: b2Filter,
#[doc = " Indicates a closed chain formed by connecting the first and last points"]
pub isLoop: bool,
#[doc = " Enable sensors to detect this chain. False by default."]
pub enableSensorEvents: bool,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ChainDef"][::std::mem::size_of::<b2ChainDef>() - 72usize];
["Alignment of b2ChainDef"][::std::mem::align_of::<b2ChainDef>() - 8usize];
["Offset of field: b2ChainDef::userData"][::std::mem::offset_of!(b2ChainDef, userData) - 0usize];
["Offset of field: b2ChainDef::points"][::std::mem::offset_of!(b2ChainDef, points) - 8usize];
["Offset of field: b2ChainDef::count"][::std::mem::offset_of!(b2ChainDef, count) - 16usize];
["Offset of field: b2ChainDef::materials"][::std::mem::offset_of!(b2ChainDef, materials) - 24usize];
["Offset of field: b2ChainDef::materialCount"][::std::mem::offset_of!(b2ChainDef, materialCount) - 32usize];
["Offset of field: b2ChainDef::filter"][::std::mem::offset_of!(b2ChainDef, filter) - 40usize];
["Offset of field: b2ChainDef::isLoop"][::std::mem::offset_of!(b2ChainDef, isLoop) - 64usize];
["Offset of field: b2ChainDef::enableSensorEvents"]
[::std::mem::offset_of!(b2ChainDef, enableSensorEvents) - 65usize];
["Offset of field: b2ChainDef::internalValue"][::std::mem::offset_of!(b2ChainDef, internalValue) - 68usize];
};
#[doc = "! @cond\n Profiling data. Times are in milliseconds."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Profile {
pub step: f32,
pub pairs: f32,
pub collide: f32,
pub solve: f32,
pub mergeIslands: f32,
pub prepareStages: f32,
pub solveConstraints: f32,
pub prepareConstraints: f32,
pub integrateVelocities: f32,
pub warmStart: f32,
pub solveImpulses: f32,
pub integratePositions: f32,
pub relaxImpulses: f32,
pub applyRestitution: f32,
pub storeImpulses: f32,
pub splitIslands: f32,
pub transforms: f32,
pub hitEvents: f32,
pub refit: f32,
pub bullets: f32,
pub sleepIslands: f32,
pub sensors: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Profile"][::std::mem::size_of::<b2Profile>() - 88usize];
["Alignment of b2Profile"][::std::mem::align_of::<b2Profile>() - 4usize];
["Offset of field: b2Profile::step"][::std::mem::offset_of!(b2Profile, step) - 0usize];
["Offset of field: b2Profile::pairs"][::std::mem::offset_of!(b2Profile, pairs) - 4usize];
["Offset of field: b2Profile::collide"][::std::mem::offset_of!(b2Profile, collide) - 8usize];
["Offset of field: b2Profile::solve"][::std::mem::offset_of!(b2Profile, solve) - 12usize];
["Offset of field: b2Profile::mergeIslands"][::std::mem::offset_of!(b2Profile, mergeIslands) - 16usize];
["Offset of field: b2Profile::prepareStages"][::std::mem::offset_of!(b2Profile, prepareStages) - 20usize];
["Offset of field: b2Profile::solveConstraints"][::std::mem::offset_of!(b2Profile, solveConstraints) - 24usize];
["Offset of field: b2Profile::prepareConstraints"][::std::mem::offset_of!(b2Profile, prepareConstraints) - 28usize];
["Offset of field: b2Profile::integrateVelocities"]
[::std::mem::offset_of!(b2Profile, integrateVelocities) - 32usize];
["Offset of field: b2Profile::warmStart"][::std::mem::offset_of!(b2Profile, warmStart) - 36usize];
["Offset of field: b2Profile::solveImpulses"][::std::mem::offset_of!(b2Profile, solveImpulses) - 40usize];
["Offset of field: b2Profile::integratePositions"][::std::mem::offset_of!(b2Profile, integratePositions) - 44usize];
["Offset of field: b2Profile::relaxImpulses"][::std::mem::offset_of!(b2Profile, relaxImpulses) - 48usize];
["Offset of field: b2Profile::applyRestitution"][::std::mem::offset_of!(b2Profile, applyRestitution) - 52usize];
["Offset of field: b2Profile::storeImpulses"][::std::mem::offset_of!(b2Profile, storeImpulses) - 56usize];
["Offset of field: b2Profile::splitIslands"][::std::mem::offset_of!(b2Profile, splitIslands) - 60usize];
["Offset of field: b2Profile::transforms"][::std::mem::offset_of!(b2Profile, transforms) - 64usize];
["Offset of field: b2Profile::hitEvents"][::std::mem::offset_of!(b2Profile, hitEvents) - 68usize];
["Offset of field: b2Profile::refit"][::std::mem::offset_of!(b2Profile, refit) - 72usize];
["Offset of field: b2Profile::bullets"][::std::mem::offset_of!(b2Profile, bullets) - 76usize];
["Offset of field: b2Profile::sleepIslands"][::std::mem::offset_of!(b2Profile, sleepIslands) - 80usize];
["Offset of field: b2Profile::sensors"][::std::mem::offset_of!(b2Profile, sensors) - 84usize];
};
#[doc = " Counters that give details of the simulation size."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Counters {
pub bodyCount: ::std::os::raw::c_int,
pub shapeCount: ::std::os::raw::c_int,
pub contactCount: ::std::os::raw::c_int,
pub jointCount: ::std::os::raw::c_int,
pub islandCount: ::std::os::raw::c_int,
pub stackUsed: ::std::os::raw::c_int,
pub staticTreeHeight: ::std::os::raw::c_int,
pub treeHeight: ::std::os::raw::c_int,
pub byteCount: ::std::os::raw::c_int,
pub taskCount: ::std::os::raw::c_int,
pub colorCounts: [::std::os::raw::c_int; 12usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2Counters"][::std::mem::size_of::<b2Counters>() - 88usize];
["Alignment of b2Counters"][::std::mem::align_of::<b2Counters>() - 4usize];
["Offset of field: b2Counters::bodyCount"][::std::mem::offset_of!(b2Counters, bodyCount) - 0usize];
["Offset of field: b2Counters::shapeCount"][::std::mem::offset_of!(b2Counters, shapeCount) - 4usize];
["Offset of field: b2Counters::contactCount"][::std::mem::offset_of!(b2Counters, contactCount) - 8usize];
["Offset of field: b2Counters::jointCount"][::std::mem::offset_of!(b2Counters, jointCount) - 12usize];
["Offset of field: b2Counters::islandCount"][::std::mem::offset_of!(b2Counters, islandCount) - 16usize];
["Offset of field: b2Counters::stackUsed"][::std::mem::offset_of!(b2Counters, stackUsed) - 20usize];
["Offset of field: b2Counters::staticTreeHeight"][::std::mem::offset_of!(b2Counters, staticTreeHeight) - 24usize];
["Offset of field: b2Counters::treeHeight"][::std::mem::offset_of!(b2Counters, treeHeight) - 28usize];
["Offset of field: b2Counters::byteCount"][::std::mem::offset_of!(b2Counters, byteCount) - 32usize];
["Offset of field: b2Counters::taskCount"][::std::mem::offset_of!(b2Counters, taskCount) - 36usize];
["Offset of field: b2Counters::colorCounts"][::std::mem::offset_of!(b2Counters, colorCounts) - 40usize];
};
pub const b2JointType_b2_distanceJoint: b2JointType = 0;
pub const b2JointType_b2_filterJoint: b2JointType = 1;
pub const b2JointType_b2_motorJoint: b2JointType = 2;
pub const b2JointType_b2_mouseJoint: b2JointType = 3;
pub const b2JointType_b2_prismaticJoint: b2JointType = 4;
pub const b2JointType_b2_revoluteJoint: b2JointType = 5;
pub const b2JointType_b2_weldJoint: b2JointType = 6;
pub const b2JointType_b2_wheelJoint: b2JointType = 7;
#[doc = " Joint type enumeration\n\n This is useful because all joint types use b2JointId and sometimes you\n want to get the type of a joint.\n @ingroup joint"]
pub type b2JointType = ::std::os::raw::c_uint;
#[doc = " Distance joint definition\n\n This requires defining an anchor point on both\n bodies and the non-zero distance of the distance joint. The definition uses\n local anchor points so that the initial configuration can violate the\n constraint slightly. This helps when saving and loading a game.\n @ingroup distance_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DistanceJointDef {
#[doc = " The first attached body"]
pub bodyIdA: b2BodyId,
#[doc = " The second attached body"]
pub bodyIdB: b2BodyId,
#[doc = " The local anchor point relative to bodyA's origin"]
pub localAnchorA: b2Vec2,
#[doc = " The local anchor point relative to bodyB's origin"]
pub localAnchorB: b2Vec2,
#[doc = " The rest length of this joint. Clamped to a stable minimum value."]
pub length: f32,
#[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."]
pub enableSpring: bool,
#[doc = " The spring linear stiffness Hertz, cycles per second"]
pub hertz: f32,
#[doc = " The spring linear damping ratio, non-dimensional"]
pub dampingRatio: f32,
#[doc = " Enable/disable the joint limit"]
pub enableLimit: bool,
#[doc = " Minimum length. Clamped to a stable minimum value."]
pub minLength: f32,
#[doc = " Maximum length. Must be greater than or equal to the minimum length."]
pub maxLength: f32,
#[doc = " Enable/disable the joint motor"]
pub enableMotor: bool,
#[doc = " The maximum motor force, usually in newtons"]
pub maxMotorForce: f32,
#[doc = " The desired motor speed, usually in meters per second"]
pub motorSpeed: f32,
#[doc = " Set this flag to true if the attached bodies should collide"]
pub collideConnected: bool,
#[doc = " User data pointer"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2DistanceJointDef"][::std::mem::size_of::<b2DistanceJointDef>() - 96usize];
["Alignment of b2DistanceJointDef"][::std::mem::align_of::<b2DistanceJointDef>() - 8usize];
["Offset of field: b2DistanceJointDef::bodyIdA"][::std::mem::offset_of!(b2DistanceJointDef, bodyIdA) - 0usize];
["Offset of field: b2DistanceJointDef::bodyIdB"][::std::mem::offset_of!(b2DistanceJointDef, bodyIdB) - 8usize];
["Offset of field: b2DistanceJointDef::localAnchorA"]
[::std::mem::offset_of!(b2DistanceJointDef, localAnchorA) - 16usize];
["Offset of field: b2DistanceJointDef::localAnchorB"]
[::std::mem::offset_of!(b2DistanceJointDef, localAnchorB) - 24usize];
["Offset of field: b2DistanceJointDef::length"][::std::mem::offset_of!(b2DistanceJointDef, length) - 32usize];
["Offset of field: b2DistanceJointDef::enableSpring"]
[::std::mem::offset_of!(b2DistanceJointDef, enableSpring) - 36usize];
["Offset of field: b2DistanceJointDef::hertz"][::std::mem::offset_of!(b2DistanceJointDef, hertz) - 40usize];
["Offset of field: b2DistanceJointDef::dampingRatio"]
[::std::mem::offset_of!(b2DistanceJointDef, dampingRatio) - 44usize];
["Offset of field: b2DistanceJointDef::enableLimit"]
[::std::mem::offset_of!(b2DistanceJointDef, enableLimit) - 48usize];
["Offset of field: b2DistanceJointDef::minLength"][::std::mem::offset_of!(b2DistanceJointDef, minLength) - 52usize];
["Offset of field: b2DistanceJointDef::maxLength"][::std::mem::offset_of!(b2DistanceJointDef, maxLength) - 56usize];
["Offset of field: b2DistanceJointDef::enableMotor"]
[::std::mem::offset_of!(b2DistanceJointDef, enableMotor) - 60usize];
["Offset of field: b2DistanceJointDef::maxMotorForce"]
[::std::mem::offset_of!(b2DistanceJointDef, maxMotorForce) - 64usize];
["Offset of field: b2DistanceJointDef::motorSpeed"]
[::std::mem::offset_of!(b2DistanceJointDef, motorSpeed) - 68usize];
["Offset of field: b2DistanceJointDef::collideConnected"]
[::std::mem::offset_of!(b2DistanceJointDef, collideConnected) - 72usize];
["Offset of field: b2DistanceJointDef::userData"][::std::mem::offset_of!(b2DistanceJointDef, userData) - 80usize];
["Offset of field: b2DistanceJointDef::internalValue"]
[::std::mem::offset_of!(b2DistanceJointDef, internalValue) - 88usize];
};
#[doc = " A motor joint is used to control the relative motion between two bodies\n\n A typical usage is to control the movement of a dynamic body with respect to the ground.\n @ingroup motor_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2MotorJointDef {
#[doc = " The first attached body"]
pub bodyIdA: b2BodyId,
#[doc = " The second attached body"]
pub bodyIdB: b2BodyId,
#[doc = " Position of bodyB minus the position of bodyA, in bodyA's frame"]
pub linearOffset: b2Vec2,
#[doc = " The bodyB angle minus bodyA angle in radians"]
pub angularOffset: f32,
#[doc = " The maximum motor force in newtons"]
pub maxForce: f32,
#[doc = " The maximum motor torque in newton-meters"]
pub maxTorque: f32,
#[doc = " Position correction factor in the range [0,1]"]
pub correctionFactor: f32,
#[doc = " Set this flag to true if the attached bodies should collide"]
pub collideConnected: bool,
#[doc = " User data pointer"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2MotorJointDef"][::std::mem::size_of::<b2MotorJointDef>() - 64usize];
["Alignment of b2MotorJointDef"][::std::mem::align_of::<b2MotorJointDef>() - 8usize];
["Offset of field: b2MotorJointDef::bodyIdA"][::std::mem::offset_of!(b2MotorJointDef, bodyIdA) - 0usize];
["Offset of field: b2MotorJointDef::bodyIdB"][::std::mem::offset_of!(b2MotorJointDef, bodyIdB) - 8usize];
["Offset of field: b2MotorJointDef::linearOffset"][::std::mem::offset_of!(b2MotorJointDef, linearOffset) - 16usize];
["Offset of field: b2MotorJointDef::angularOffset"]
[::std::mem::offset_of!(b2MotorJointDef, angularOffset) - 24usize];
["Offset of field: b2MotorJointDef::maxForce"][::std::mem::offset_of!(b2MotorJointDef, maxForce) - 28usize];
["Offset of field: b2MotorJointDef::maxTorque"][::std::mem::offset_of!(b2MotorJointDef, maxTorque) - 32usize];
["Offset of field: b2MotorJointDef::correctionFactor"]
[::std::mem::offset_of!(b2MotorJointDef, correctionFactor) - 36usize];
["Offset of field: b2MotorJointDef::collideConnected"]
[::std::mem::offset_of!(b2MotorJointDef, collideConnected) - 40usize];
["Offset of field: b2MotorJointDef::userData"][::std::mem::offset_of!(b2MotorJointDef, userData) - 48usize];
["Offset of field: b2MotorJointDef::internalValue"]
[::std::mem::offset_of!(b2MotorJointDef, internalValue) - 56usize];
};
#[doc = " A mouse joint is used to make a point on a body track a specified world point.\n\n This a soft constraint and allows the constraint to stretch without\n applying huge forces. This also applies rotation constraint heuristic to improve control.\n @ingroup mouse_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2MouseJointDef {
#[doc = " The first attached body. This is assumed to be static."]
pub bodyIdA: b2BodyId,
#[doc = " The second attached body."]
pub bodyIdB: b2BodyId,
#[doc = " The initial target point in world space"]
pub target: b2Vec2,
#[doc = " Stiffness in hertz"]
pub hertz: f32,
#[doc = " Damping ratio, non-dimensional"]
pub dampingRatio: f32,
#[doc = " Maximum force, typically in newtons"]
pub maxForce: f32,
#[doc = " Set this flag to true if the attached bodies should collide."]
pub collideConnected: bool,
#[doc = " User data pointer"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2MouseJointDef"][::std::mem::size_of::<b2MouseJointDef>() - 56usize];
["Alignment of b2MouseJointDef"][::std::mem::align_of::<b2MouseJointDef>() - 8usize];
["Offset of field: b2MouseJointDef::bodyIdA"][::std::mem::offset_of!(b2MouseJointDef, bodyIdA) - 0usize];
["Offset of field: b2MouseJointDef::bodyIdB"][::std::mem::offset_of!(b2MouseJointDef, bodyIdB) - 8usize];
["Offset of field: b2MouseJointDef::target"][::std::mem::offset_of!(b2MouseJointDef, target) - 16usize];
["Offset of field: b2MouseJointDef::hertz"][::std::mem::offset_of!(b2MouseJointDef, hertz) - 24usize];
["Offset of field: b2MouseJointDef::dampingRatio"][::std::mem::offset_of!(b2MouseJointDef, dampingRatio) - 28usize];
["Offset of field: b2MouseJointDef::maxForce"][::std::mem::offset_of!(b2MouseJointDef, maxForce) - 32usize];
["Offset of field: b2MouseJointDef::collideConnected"]
[::std::mem::offset_of!(b2MouseJointDef, collideConnected) - 36usize];
["Offset of field: b2MouseJointDef::userData"][::std::mem::offset_of!(b2MouseJointDef, userData) - 40usize];
["Offset of field: b2MouseJointDef::internalValue"]
[::std::mem::offset_of!(b2MouseJointDef, internalValue) - 48usize];
};
#[doc = " A filter joint is used to disable collision between two specific bodies.\n\n @ingroup filter_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2FilterJointDef {
#[doc = " The first attached body."]
pub bodyIdA: b2BodyId,
#[doc = " The second attached body."]
pub bodyIdB: b2BodyId,
#[doc = " User data pointer"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2FilterJointDef"][::std::mem::size_of::<b2FilterJointDef>() - 32usize];
["Alignment of b2FilterJointDef"][::std::mem::align_of::<b2FilterJointDef>() - 8usize];
["Offset of field: b2FilterJointDef::bodyIdA"][::std::mem::offset_of!(b2FilterJointDef, bodyIdA) - 0usize];
["Offset of field: b2FilterJointDef::bodyIdB"][::std::mem::offset_of!(b2FilterJointDef, bodyIdB) - 8usize];
["Offset of field: b2FilterJointDef::userData"][::std::mem::offset_of!(b2FilterJointDef, userData) - 16usize];
["Offset of field: b2FilterJointDef::internalValue"]
[::std::mem::offset_of!(b2FilterJointDef, internalValue) - 24usize];
};
#[doc = " Prismatic joint definition\n\n This requires defining a line of motion using an axis and an anchor point.\n The definition uses local anchor points and a local axis so that the initial\n configuration can violate the constraint slightly. The joint translation is zero\n when the local anchor points coincide in world space.\n @ingroup prismatic_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2PrismaticJointDef {
#[doc = " The first attached body"]
pub bodyIdA: b2BodyId,
#[doc = " The second attached body"]
pub bodyIdB: b2BodyId,
#[doc = " The local anchor point relative to bodyA's origin"]
pub localAnchorA: b2Vec2,
#[doc = " The local anchor point relative to bodyB's origin"]
pub localAnchorB: b2Vec2,
#[doc = " The local translation unit axis in bodyA"]
pub localAxisA: b2Vec2,
#[doc = " The constrained angle between the bodies: bodyB_angle - bodyA_angle"]
pub referenceAngle: f32,
#[doc = " The target translation for the joint in meters. The spring-damper will drive\n to this translation."]
pub targetTranslation: f32,
#[doc = " Enable a linear spring along the prismatic joint axis"]
pub enableSpring: bool,
#[doc = " The spring stiffness Hertz, cycles per second"]
pub hertz: f32,
#[doc = " The spring damping ratio, non-dimensional"]
pub dampingRatio: f32,
#[doc = " Enable/disable the joint limit"]
pub enableLimit: bool,
#[doc = " The lower translation limit"]
pub lowerTranslation: f32,
#[doc = " The upper translation limit"]
pub upperTranslation: f32,
#[doc = " Enable/disable the joint motor"]
pub enableMotor: bool,
#[doc = " The maximum motor force, typically in newtons"]
pub maxMotorForce: f32,
#[doc = " The desired motor speed, typically in meters per second"]
pub motorSpeed: f32,
#[doc = " Set this flag to true if the attached bodies should collide"]
pub collideConnected: bool,
#[doc = " User data pointer"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2PrismaticJointDef"][::std::mem::size_of::<b2PrismaticJointDef>() - 104usize];
["Alignment of b2PrismaticJointDef"][::std::mem::align_of::<b2PrismaticJointDef>() - 8usize];
["Offset of field: b2PrismaticJointDef::bodyIdA"][::std::mem::offset_of!(b2PrismaticJointDef, bodyIdA) - 0usize];
["Offset of field: b2PrismaticJointDef::bodyIdB"][::std::mem::offset_of!(b2PrismaticJointDef, bodyIdB) - 8usize];
["Offset of field: b2PrismaticJointDef::localAnchorA"]
[::std::mem::offset_of!(b2PrismaticJointDef, localAnchorA) - 16usize];
["Offset of field: b2PrismaticJointDef::localAnchorB"]
[::std::mem::offset_of!(b2PrismaticJointDef, localAnchorB) - 24usize];
["Offset of field: b2PrismaticJointDef::localAxisA"]
[::std::mem::offset_of!(b2PrismaticJointDef, localAxisA) - 32usize];
["Offset of field: b2PrismaticJointDef::referenceAngle"]
[::std::mem::offset_of!(b2PrismaticJointDef, referenceAngle) - 40usize];
["Offset of field: b2PrismaticJointDef::targetTranslation"]
[::std::mem::offset_of!(b2PrismaticJointDef, targetTranslation) - 44usize];
["Offset of field: b2PrismaticJointDef::enableSpring"]
[::std::mem::offset_of!(b2PrismaticJointDef, enableSpring) - 48usize];
["Offset of field: b2PrismaticJointDef::hertz"][::std::mem::offset_of!(b2PrismaticJointDef, hertz) - 52usize];
["Offset of field: b2PrismaticJointDef::dampingRatio"]
[::std::mem::offset_of!(b2PrismaticJointDef, dampingRatio) - 56usize];
["Offset of field: b2PrismaticJointDef::enableLimit"]
[::std::mem::offset_of!(b2PrismaticJointDef, enableLimit) - 60usize];
["Offset of field: b2PrismaticJointDef::lowerTranslation"]
[::std::mem::offset_of!(b2PrismaticJointDef, lowerTranslation) - 64usize];
["Offset of field: b2PrismaticJointDef::upperTranslation"]
[::std::mem::offset_of!(b2PrismaticJointDef, upperTranslation) - 68usize];
["Offset of field: b2PrismaticJointDef::enableMotor"]
[::std::mem::offset_of!(b2PrismaticJointDef, enableMotor) - 72usize];
["Offset of field: b2PrismaticJointDef::maxMotorForce"]
[::std::mem::offset_of!(b2PrismaticJointDef, maxMotorForce) - 76usize];
["Offset of field: b2PrismaticJointDef::motorSpeed"]
[::std::mem::offset_of!(b2PrismaticJointDef, motorSpeed) - 80usize];
["Offset of field: b2PrismaticJointDef::collideConnected"]
[::std::mem::offset_of!(b2PrismaticJointDef, collideConnected) - 84usize];
["Offset of field: b2PrismaticJointDef::userData"][::std::mem::offset_of!(b2PrismaticJointDef, userData) - 88usize];
["Offset of field: b2PrismaticJointDef::internalValue"]
[::std::mem::offset_of!(b2PrismaticJointDef, internalValue) - 96usize];
};
#[doc = " Revolute joint definition\n\n This requires defining an anchor point where the bodies are joined.\n The definition uses local anchor points so that the\n initial configuration can violate the constraint slightly. You also need to\n specify the initial relative angle for joint limits. This helps when saving\n and loading a game.\n The local anchor points are measured from the body's origin\n 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 revolute_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2RevoluteJointDef {
#[doc = " The first attached body"]
pub bodyIdA: b2BodyId,
#[doc = " The second attached body"]
pub bodyIdB: b2BodyId,
#[doc = " The local anchor point relative to bodyA's origin"]
pub localAnchorA: b2Vec2,
#[doc = " The local anchor point relative to bodyB's origin"]
pub localAnchorB: b2Vec2,
#[doc = " The bodyB angle minus bodyA angle in the reference state (radians).\n This defines the zero angle for the joint limit."]
pub referenceAngle: f32,
#[doc = " The target angle for the joint in radians. The spring-damper will drive\n to this angle."]
pub targetAngle: f32,
#[doc = " Enable a rotational spring on the revolute hinge axis"]
pub enableSpring: bool,
#[doc = " The spring stiffness Hertz, cycles per second"]
pub hertz: f32,
#[doc = " The spring damping ratio, non-dimensional"]
pub dampingRatio: f32,
#[doc = " A flag to enable joint limits"]
pub enableLimit: bool,
#[doc = " The lower angle for the joint limit in radians. Minimum of -0.99*pi radians."]
pub lowerAngle: f32,
#[doc = " The upper angle for the joint limit in radians. Maximum of 0.99*pi radians."]
pub upperAngle: f32,
#[doc = " A flag to enable the joint motor"]
pub enableMotor: bool,
#[doc = " The maximum motor torque, typically in newton-meters"]
pub maxMotorTorque: f32,
#[doc = " The desired motor speed in radians per second"]
pub motorSpeed: f32,
#[doc = " Scale the debug draw"]
pub drawSize: f32,
#[doc = " Set this flag to true if the attached bodies should collide"]
pub collideConnected: bool,
#[doc = " User data pointer"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2RevoluteJointDef"][::std::mem::size_of::<b2RevoluteJointDef>() - 104usize];
["Alignment of b2RevoluteJointDef"][::std::mem::align_of::<b2RevoluteJointDef>() - 8usize];
["Offset of field: b2RevoluteJointDef::bodyIdA"][::std::mem::offset_of!(b2RevoluteJointDef, bodyIdA) - 0usize];
["Offset of field: b2RevoluteJointDef::bodyIdB"][::std::mem::offset_of!(b2RevoluteJointDef, bodyIdB) - 8usize];
["Offset of field: b2RevoluteJointDef::localAnchorA"]
[::std::mem::offset_of!(b2RevoluteJointDef, localAnchorA) - 16usize];
["Offset of field: b2RevoluteJointDef::localAnchorB"]
[::std::mem::offset_of!(b2RevoluteJointDef, localAnchorB) - 24usize];
["Offset of field: b2RevoluteJointDef::referenceAngle"]
[::std::mem::offset_of!(b2RevoluteJointDef, referenceAngle) - 32usize];
["Offset of field: b2RevoluteJointDef::targetAngle"]
[::std::mem::offset_of!(b2RevoluteJointDef, targetAngle) - 36usize];
["Offset of field: b2RevoluteJointDef::enableSpring"]
[::std::mem::offset_of!(b2RevoluteJointDef, enableSpring) - 40usize];
["Offset of field: b2RevoluteJointDef::hertz"][::std::mem::offset_of!(b2RevoluteJointDef, hertz) - 44usize];
["Offset of field: b2RevoluteJointDef::dampingRatio"]
[::std::mem::offset_of!(b2RevoluteJointDef, dampingRatio) - 48usize];
["Offset of field: b2RevoluteJointDef::enableLimit"]
[::std::mem::offset_of!(b2RevoluteJointDef, enableLimit) - 52usize];
["Offset of field: b2RevoluteJointDef::lowerAngle"]
[::std::mem::offset_of!(b2RevoluteJointDef, lowerAngle) - 56usize];
["Offset of field: b2RevoluteJointDef::upperAngle"]
[::std::mem::offset_of!(b2RevoluteJointDef, upperAngle) - 60usize];
["Offset of field: b2RevoluteJointDef::enableMotor"]
[::std::mem::offset_of!(b2RevoluteJointDef, enableMotor) - 64usize];
["Offset of field: b2RevoluteJointDef::maxMotorTorque"]
[::std::mem::offset_of!(b2RevoluteJointDef, maxMotorTorque) - 68usize];
["Offset of field: b2RevoluteJointDef::motorSpeed"]
[::std::mem::offset_of!(b2RevoluteJointDef, motorSpeed) - 72usize];
["Offset of field: b2RevoluteJointDef::drawSize"][::std::mem::offset_of!(b2RevoluteJointDef, drawSize) - 76usize];
["Offset of field: b2RevoluteJointDef::collideConnected"]
[::std::mem::offset_of!(b2RevoluteJointDef, collideConnected) - 80usize];
["Offset of field: b2RevoluteJointDef::userData"][::std::mem::offset_of!(b2RevoluteJointDef, userData) - 88usize];
["Offset of field: b2RevoluteJointDef::internalValue"]
[::std::mem::offset_of!(b2RevoluteJointDef, internalValue) - 96usize];
};
#[doc = " Weld joint definition\n\n A weld joint connect to bodies together rigidly. This constraint provides springs to mimic\n soft-body simulation.\n @note The approximate solver in Box2D cannot hold many bodies together rigidly\n @ingroup weld_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2WeldJointDef {
#[doc = " The first attached body"]
pub bodyIdA: b2BodyId,
#[doc = " The second attached body"]
pub bodyIdB: b2BodyId,
#[doc = " The local anchor point relative to bodyA's origin"]
pub localAnchorA: b2Vec2,
#[doc = " The local anchor point relative to bodyB's origin"]
pub localAnchorB: b2Vec2,
#[doc = " The bodyB angle minus bodyA angle in the reference state (radians)\n todo maybe make this a b2Rot"]
pub referenceAngle: f32,
#[doc = " Linear stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness."]
pub linearHertz: f32,
#[doc = " Angular stiffness as Hertz (cycles per second). Use zero for maximum stiffness."]
pub angularHertz: f32,
#[doc = " Linear damping ratio, non-dimensional. Use 1 for critical damping."]
pub linearDampingRatio: f32,
#[doc = " Linear damping ratio, non-dimensional. Use 1 for critical damping."]
pub angularDampingRatio: f32,
#[doc = " Set this flag to true if the attached bodies should collide"]
pub collideConnected: bool,
#[doc = " User data pointer"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2WeldJointDef"][::std::mem::size_of::<b2WeldJointDef>() - 72usize];
["Alignment of b2WeldJointDef"][::std::mem::align_of::<b2WeldJointDef>() - 8usize];
["Offset of field: b2WeldJointDef::bodyIdA"][::std::mem::offset_of!(b2WeldJointDef, bodyIdA) - 0usize];
["Offset of field: b2WeldJointDef::bodyIdB"][::std::mem::offset_of!(b2WeldJointDef, bodyIdB) - 8usize];
["Offset of field: b2WeldJointDef::localAnchorA"][::std::mem::offset_of!(b2WeldJointDef, localAnchorA) - 16usize];
["Offset of field: b2WeldJointDef::localAnchorB"][::std::mem::offset_of!(b2WeldJointDef, localAnchorB) - 24usize];
["Offset of field: b2WeldJointDef::referenceAngle"]
[::std::mem::offset_of!(b2WeldJointDef, referenceAngle) - 32usize];
["Offset of field: b2WeldJointDef::linearHertz"][::std::mem::offset_of!(b2WeldJointDef, linearHertz) - 36usize];
["Offset of field: b2WeldJointDef::angularHertz"][::std::mem::offset_of!(b2WeldJointDef, angularHertz) - 40usize];
["Offset of field: b2WeldJointDef::linearDampingRatio"]
[::std::mem::offset_of!(b2WeldJointDef, linearDampingRatio) - 44usize];
["Offset of field: b2WeldJointDef::angularDampingRatio"]
[::std::mem::offset_of!(b2WeldJointDef, angularDampingRatio) - 48usize];
["Offset of field: b2WeldJointDef::collideConnected"]
[::std::mem::offset_of!(b2WeldJointDef, collideConnected) - 52usize];
["Offset of field: b2WeldJointDef::userData"][::std::mem::offset_of!(b2WeldJointDef, userData) - 56usize];
["Offset of field: b2WeldJointDef::internalValue"][::std::mem::offset_of!(b2WeldJointDef, internalValue) - 64usize];
};
#[doc = " Wheel joint definition\n\n This requires defining a line of motion using an axis and an anchor point.\n The definition uses local anchor points and a local axis so that the initial\n configuration can violate the constraint slightly. The joint translation is zero\n when the local anchor points coincide in world space.\n @ingroup wheel_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2WheelJointDef {
#[doc = " The first attached body"]
pub bodyIdA: b2BodyId,
#[doc = " The second attached body"]
pub bodyIdB: b2BodyId,
#[doc = " The local anchor point relative to bodyA's origin"]
pub localAnchorA: b2Vec2,
#[doc = " The local anchor point relative to bodyB's origin"]
pub localAnchorB: b2Vec2,
#[doc = " The local translation unit axis in bodyA"]
pub localAxisA: b2Vec2,
#[doc = " Enable a linear spring along the local axis"]
pub enableSpring: bool,
#[doc = " Spring stiffness in Hertz"]
pub hertz: f32,
#[doc = " Spring damping ratio, non-dimensional"]
pub dampingRatio: f32,
#[doc = " Enable/disable the joint linear limit"]
pub enableLimit: bool,
#[doc = " The lower translation limit"]
pub lowerTranslation: f32,
#[doc = " The upper translation limit"]
pub upperTranslation: f32,
#[doc = " Enable/disable the joint rotational motor"]
pub enableMotor: bool,
#[doc = " The maximum motor torque, typically in newton-meters"]
pub maxMotorTorque: f32,
#[doc = " The desired motor speed in radians per second"]
pub motorSpeed: f32,
#[doc = " Set this flag to true if the attached bodies should collide"]
pub collideConnected: bool,
#[doc = " User data pointer"]
pub userData: *mut ::std::os::raw::c_void,
#[doc = " Used internally to detect a valid definition. DO NOT SET."]
pub internalValue: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2WheelJointDef"][::std::mem::size_of::<b2WheelJointDef>() - 96usize];
["Alignment of b2WheelJointDef"][::std::mem::align_of::<b2WheelJointDef>() - 8usize];
["Offset of field: b2WheelJointDef::bodyIdA"][::std::mem::offset_of!(b2WheelJointDef, bodyIdA) - 0usize];
["Offset of field: b2WheelJointDef::bodyIdB"][::std::mem::offset_of!(b2WheelJointDef, bodyIdB) - 8usize];
["Offset of field: b2WheelJointDef::localAnchorA"][::std::mem::offset_of!(b2WheelJointDef, localAnchorA) - 16usize];
["Offset of field: b2WheelJointDef::localAnchorB"][::std::mem::offset_of!(b2WheelJointDef, localAnchorB) - 24usize];
["Offset of field: b2WheelJointDef::localAxisA"][::std::mem::offset_of!(b2WheelJointDef, localAxisA) - 32usize];
["Offset of field: b2WheelJointDef::enableSpring"][::std::mem::offset_of!(b2WheelJointDef, enableSpring) - 40usize];
["Offset of field: b2WheelJointDef::hertz"][::std::mem::offset_of!(b2WheelJointDef, hertz) - 44usize];
["Offset of field: b2WheelJointDef::dampingRatio"][::std::mem::offset_of!(b2WheelJointDef, dampingRatio) - 48usize];
["Offset of field: b2WheelJointDef::enableLimit"][::std::mem::offset_of!(b2WheelJointDef, enableLimit) - 52usize];
["Offset of field: b2WheelJointDef::lowerTranslation"]
[::std::mem::offset_of!(b2WheelJointDef, lowerTranslation) - 56usize];
["Offset of field: b2WheelJointDef::upperTranslation"]
[::std::mem::offset_of!(b2WheelJointDef, upperTranslation) - 60usize];
["Offset of field: b2WheelJointDef::enableMotor"][::std::mem::offset_of!(b2WheelJointDef, enableMotor) - 64usize];
["Offset of field: b2WheelJointDef::maxMotorTorque"]
[::std::mem::offset_of!(b2WheelJointDef, maxMotorTorque) - 68usize];
["Offset of field: b2WheelJointDef::motorSpeed"][::std::mem::offset_of!(b2WheelJointDef, motorSpeed) - 72usize];
["Offset of field: b2WheelJointDef::collideConnected"]
[::std::mem::offset_of!(b2WheelJointDef, collideConnected) - 76usize];
["Offset of field: b2WheelJointDef::userData"][::std::mem::offset_of!(b2WheelJointDef, userData) - 80usize];
["Offset of field: b2WheelJointDef::internalValue"]
[::std::mem::offset_of!(b2WheelJointDef, internalValue) - 88usize];
};
#[doc = " The explosion definition is used to configure options for explosions. Explosions\n consider shape geometry when computing the impulse.\n @ingroup world"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ExplosionDef {
#[doc = " Mask bits to filter shapes"]
pub maskBits: u64,
#[doc = " The center of the explosion in world space"]
pub position: b2Vec2,
#[doc = " The radius of the explosion"]
pub radius: f32,
#[doc = " The falloff distance beyond the radius. Impulse is reduced to zero at this distance."]
pub falloff: f32,
#[doc = " Impulse per unit length. This applies an impulse according to the shape perimeter that\n is facing the explosion. Explosions only apply to circles, capsules, and polygons. This\n may be negative for implosions."]
pub impulsePerLength: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ExplosionDef"][::std::mem::size_of::<b2ExplosionDef>() - 32usize];
["Alignment of b2ExplosionDef"][::std::mem::align_of::<b2ExplosionDef>() - 8usize];
["Offset of field: b2ExplosionDef::maskBits"][::std::mem::offset_of!(b2ExplosionDef, maskBits) - 0usize];
["Offset of field: b2ExplosionDef::position"][::std::mem::offset_of!(b2ExplosionDef, position) - 8usize];
["Offset of field: b2ExplosionDef::radius"][::std::mem::offset_of!(b2ExplosionDef, radius) - 16usize];
["Offset of field: b2ExplosionDef::falloff"][::std::mem::offset_of!(b2ExplosionDef, falloff) - 20usize];
["Offset of field: b2ExplosionDef::impulsePerLength"]
[::std::mem::offset_of!(b2ExplosionDef, impulsePerLength) - 24usize];
};
#[doc = " A begin touch event is generated when a shape starts to overlap a sensor shape."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SensorBeginTouchEvent {
#[doc = " The id of the sensor shape"]
pub sensorShapeId: b2ShapeId,
#[doc = " The id of the dynamic shape that began touching the sensor shape"]
pub visitorShapeId: b2ShapeId,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2SensorBeginTouchEvent"][::std::mem::size_of::<b2SensorBeginTouchEvent>() - 16usize];
["Alignment of b2SensorBeginTouchEvent"][::std::mem::align_of::<b2SensorBeginTouchEvent>() - 4usize];
["Offset of field: b2SensorBeginTouchEvent::sensorShapeId"]
[::std::mem::offset_of!(b2SensorBeginTouchEvent, sensorShapeId) - 0usize];
["Offset of field: b2SensorBeginTouchEvent::visitorShapeId"]
[::std::mem::offset_of!(b2SensorBeginTouchEvent, visitorShapeId) - 8usize];
};
#[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 b2Shape_IsValid."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SensorEndTouchEvent {
#[doc = " The id of the sensor shape\n\t@warning this shape may have been destroyed\n\t@see b2Shape_IsValid"]
pub sensorShapeId: b2ShapeId,
#[doc = " The id of the dynamic shape that stopped touching the sensor shape\n\t@warning this shape may have been destroyed\n\t@see b2Shape_IsValid"]
pub visitorShapeId: b2ShapeId,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2SensorEndTouchEvent"][::std::mem::size_of::<b2SensorEndTouchEvent>() - 16usize];
["Alignment of b2SensorEndTouchEvent"][::std::mem::align_of::<b2SensorEndTouchEvent>() - 4usize];
["Offset of field: b2SensorEndTouchEvent::sensorShapeId"]
[::std::mem::offset_of!(b2SensorEndTouchEvent, sensorShapeId) - 0usize];
["Offset of field: b2SensorEndTouchEvent::visitorShapeId"]
[::std::mem::offset_of!(b2SensorEndTouchEvent, visitorShapeId) - 8usize];
};
#[doc = " Sensor events are buffered in the Box2D world and are available\n as begin/end overlap event arrays after the time step is complete.\n Note: these may become invalid if bodies and/or shapes are destroyed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SensorEvents {
#[doc = " Array of sensor begin touch events"]
pub beginEvents: *mut b2SensorBeginTouchEvent,
#[doc = " Array of sensor end touch events"]
pub endEvents: *mut b2SensorEndTouchEvent,
#[doc = " The number of begin touch events"]
pub beginCount: ::std::os::raw::c_int,
#[doc = " The number of end touch events"]
pub endCount: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2SensorEvents"][::std::mem::size_of::<b2SensorEvents>() - 24usize];
["Alignment of b2SensorEvents"][::std::mem::align_of::<b2SensorEvents>() - 8usize];
["Offset of field: b2SensorEvents::beginEvents"][::std::mem::offset_of!(b2SensorEvents, beginEvents) - 0usize];
["Offset of field: b2SensorEvents::endEvents"][::std::mem::offset_of!(b2SensorEvents, endEvents) - 8usize];
["Offset of field: b2SensorEvents::beginCount"][::std::mem::offset_of!(b2SensorEvents, beginCount) - 16usize];
["Offset of field: b2SensorEvents::endCount"][::std::mem::offset_of!(b2SensorEvents, endCount) - 20usize];
};
#[doc = " A begin touch event is generated when two shapes begin touching."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactBeginTouchEvent {
#[doc = " Id of the first shape"]
pub shapeIdA: b2ShapeId,
#[doc = " Id of the second shape"]
pub shapeIdB: b2ShapeId,
#[doc = " The initial contact manifold. This is recorded before the solver is called,\n so all the impulses will be zero."]
pub manifold: b2Manifold,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ContactBeginTouchEvent"][::std::mem::size_of::<b2ContactBeginTouchEvent>() - 128usize];
["Alignment of b2ContactBeginTouchEvent"][::std::mem::align_of::<b2ContactBeginTouchEvent>() - 4usize];
["Offset of field: b2ContactBeginTouchEvent::shapeIdA"]
[::std::mem::offset_of!(b2ContactBeginTouchEvent, shapeIdA) - 0usize];
["Offset of field: b2ContactBeginTouchEvent::shapeIdB"]
[::std::mem::offset_of!(b2ContactBeginTouchEvent, shapeIdB) - 8usize];
["Offset of field: b2ContactBeginTouchEvent::manifold"]
[::std::mem::offset_of!(b2ContactBeginTouchEvent, manifold) - 16usize];
};
#[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."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactEndTouchEvent {
#[doc = " Id of the first shape\n\t@warning this shape may have been destroyed\n\t@see b2Shape_IsValid"]
pub shapeIdA: b2ShapeId,
#[doc = " Id of the second shape\n\t@warning this shape may have been destroyed\n\t@see b2Shape_IsValid"]
pub shapeIdB: b2ShapeId,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ContactEndTouchEvent"][::std::mem::size_of::<b2ContactEndTouchEvent>() - 16usize];
["Alignment of b2ContactEndTouchEvent"][::std::mem::align_of::<b2ContactEndTouchEvent>() - 4usize];
["Offset of field: b2ContactEndTouchEvent::shapeIdA"]
[::std::mem::offset_of!(b2ContactEndTouchEvent, shapeIdA) - 0usize];
["Offset of field: b2ContactEndTouchEvent::shapeIdB"]
[::std::mem::offset_of!(b2ContactEndTouchEvent, shapeIdB) - 8usize];
};
#[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."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactHitEvent {
#[doc = " Id of the first shape"]
pub shapeIdA: b2ShapeId,
#[doc = " Id of the second shape"]
pub shapeIdB: b2ShapeId,
#[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."]
pub point: b2Vec2,
#[doc = " Normal vector pointing from shape A to shape B"]
pub normal: b2Vec2,
#[doc = " The speed the shapes are approaching. Always positive. Typically in meters per second."]
pub approachSpeed: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ContactHitEvent"][::std::mem::size_of::<b2ContactHitEvent>() - 36usize];
["Alignment of b2ContactHitEvent"][::std::mem::align_of::<b2ContactHitEvent>() - 4usize];
["Offset of field: b2ContactHitEvent::shapeIdA"][::std::mem::offset_of!(b2ContactHitEvent, shapeIdA) - 0usize];
["Offset of field: b2ContactHitEvent::shapeIdB"][::std::mem::offset_of!(b2ContactHitEvent, shapeIdB) - 8usize];
["Offset of field: b2ContactHitEvent::point"][::std::mem::offset_of!(b2ContactHitEvent, point) - 16usize];
["Offset of field: b2ContactHitEvent::normal"][::std::mem::offset_of!(b2ContactHitEvent, normal) - 24usize];
["Offset of field: b2ContactHitEvent::approachSpeed"]
[::std::mem::offset_of!(b2ContactHitEvent, approachSpeed) - 32usize];
};
#[doc = " Contact events are buffered in the Box2D world and are available\n as event arrays after the time step is complete.\n Note: these may become invalid if bodies and/or shapes are destroyed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactEvents {
#[doc = " Array of begin touch events"]
pub beginEvents: *mut b2ContactBeginTouchEvent,
#[doc = " Array of end touch events"]
pub endEvents: *mut b2ContactEndTouchEvent,
#[doc = " Array of hit events"]
pub hitEvents: *mut b2ContactHitEvent,
#[doc = " Number of begin touch events"]
pub beginCount: ::std::os::raw::c_int,
#[doc = " Number of end touch events"]
pub endCount: ::std::os::raw::c_int,
#[doc = " Number of hit events"]
pub hitCount: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ContactEvents"][::std::mem::size_of::<b2ContactEvents>() - 40usize];
["Alignment of b2ContactEvents"][::std::mem::align_of::<b2ContactEvents>() - 8usize];
["Offset of field: b2ContactEvents::beginEvents"][::std::mem::offset_of!(b2ContactEvents, beginEvents) - 0usize];
["Offset of field: b2ContactEvents::endEvents"][::std::mem::offset_of!(b2ContactEvents, endEvents) - 8usize];
["Offset of field: b2ContactEvents::hitEvents"][::std::mem::offset_of!(b2ContactEvents, hitEvents) - 16usize];
["Offset of field: b2ContactEvents::beginCount"][::std::mem::offset_of!(b2ContactEvents, beginCount) - 24usize];
["Offset of field: b2ContactEvents::endCount"][::std::mem::offset_of!(b2ContactEvents, endCount) - 28usize];
["Offset of field: b2ContactEvents::hitCount"][::std::mem::offset_of!(b2ContactEvents, hitCount) - 32usize];
};
#[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 b2Body_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."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2BodyMoveEvent {
pub transform: b2Transform,
pub bodyId: b2BodyId,
pub userData: *mut ::std::os::raw::c_void,
pub fellAsleep: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2BodyMoveEvent"][::std::mem::size_of::<b2BodyMoveEvent>() - 40usize];
["Alignment of b2BodyMoveEvent"][::std::mem::align_of::<b2BodyMoveEvent>() - 8usize];
["Offset of field: b2BodyMoveEvent::transform"][::std::mem::offset_of!(b2BodyMoveEvent, transform) - 0usize];
["Offset of field: b2BodyMoveEvent::bodyId"][::std::mem::offset_of!(b2BodyMoveEvent, bodyId) - 16usize];
["Offset of field: b2BodyMoveEvent::userData"][::std::mem::offset_of!(b2BodyMoveEvent, userData) - 24usize];
["Offset of field: b2BodyMoveEvent::fellAsleep"][::std::mem::offset_of!(b2BodyMoveEvent, fellAsleep) - 32usize];
};
#[doc = " Body events are buffered in the Box2D world and are available\n as event arrays after the time step is complete.\n Note: this data becomes invalid if bodies are destroyed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2BodyEvents {
#[doc = " Array of move events"]
pub moveEvents: *mut b2BodyMoveEvent,
#[doc = " Number of move events"]
pub moveCount: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2BodyEvents"][::std::mem::size_of::<b2BodyEvents>() - 16usize];
["Alignment of b2BodyEvents"][::std::mem::align_of::<b2BodyEvents>() - 8usize];
["Offset of field: b2BodyEvents::moveEvents"][::std::mem::offset_of!(b2BodyEvents, moveEvents) - 0usize];
["Offset of field: b2BodyEvents::moveCount"][::std::mem::offset_of!(b2BodyEvents, moveCount) - 8usize];
};
#[doc = " The contact data for two shapes. By convention the manifold normal points\n from shape A to shape B.\n @see b2Shape_GetContactData() and b2Body_GetContactData()"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactData {
pub shapeIdA: b2ShapeId,
pub shapeIdB: b2ShapeId,
pub manifold: b2Manifold,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2ContactData"][::std::mem::size_of::<b2ContactData>() - 128usize];
["Alignment of b2ContactData"][::std::mem::align_of::<b2ContactData>() - 4usize];
["Offset of field: b2ContactData::shapeIdA"][::std::mem::offset_of!(b2ContactData, shapeIdA) - 0usize];
["Offset of field: b2ContactData::shapeIdB"][::std::mem::offset_of!(b2ContactData, shapeIdB) - 8usize];
["Offset of field: b2ContactData::manifold"][::std::mem::offset_of!(b2ContactData, manifold) - 16usize];
};
#[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.\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 @see b2ShapeDef\n @warning Do not attempt to modify the world inside this callback\n @ingroup world"]
pub type b2CustomFilterFcn = ::std::option::Option<
unsafe extern "C" fn(shapeIdA: b2ShapeId, shapeIdB: b2ShapeId, context: *mut ::std::os::raw::c_void) -> bool,
>;
#[doc = " Prototype for a pre-solve callback.\n This is called after a contact is updated. This allows you to inspect a\n contact before it goes to the solver. If you are careful, you can modify the\n contact manifold (e.g. modify the normal).\n Notes:\n - this function must be thread-safe\n - this is only called if the shape has enabled pre-solve events\n - this is called only for awake dynamic bodies\n - this is not called for sensors\n - the supplied manifold has impulse values from the previous step\n Return false if you want to disable the contact this step\n @warning Do not attempt to modify the world inside this callback\n @ingroup world"]
pub type b2PreSolveFcn = ::std::option::Option<
unsafe extern "C" fn(
shapeIdA: b2ShapeId,
shapeIdB: b2ShapeId,
manifold: *mut b2Manifold,
context: *mut ::std::os::raw::c_void,
) -> bool,
>;
#[doc = " Prototype callback for overlap queries.\n Called for each shape found in the query.\n @see b2World_OverlapABB\n @return false to terminate the query.\n @ingroup world"]
pub type b2OverlapResultFcn =
::std::option::Option<unsafe extern "C" fn(shapeId: b2ShapeId, context: *mut ::std::os::raw::c_void) -> bool>;
#[doc = " Prototype callback for ray and shape 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 A cast with initial overlap will return a zero fraction and a zero normal.\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, zero for a shape cast with initial overlap\n @param fraction the fraction along the ray at the point of intersection, zero for a shape cast with initial overlap\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 b2World_CastRay\n @ingroup world"]
pub type b2CastResultFcn = ::std::option::Option<
unsafe extern "C" fn(
shapeId: b2ShapeId,
point: b2Vec2,
normal: b2Vec2,
fraction: f32,
context: *mut ::std::os::raw::c_void,
) -> f32,
>;
pub type b2PlaneResultFcn = ::std::option::Option<
unsafe extern "C" fn(shapeId: b2ShapeId, plane: *const b2PlaneResult, context: *mut ::std::os::raw::c_void) -> bool,
>;
pub const b2HexColor_b2_colorAliceBlue: b2HexColor = 15792383;
pub const b2HexColor_b2_colorAntiqueWhite: b2HexColor = 16444375;
pub const b2HexColor_b2_colorAqua: b2HexColor = 65535;
pub const b2HexColor_b2_colorAquamarine: b2HexColor = 8388564;
pub const b2HexColor_b2_colorAzure: b2HexColor = 15794175;
pub const b2HexColor_b2_colorBeige: b2HexColor = 16119260;
pub const b2HexColor_b2_colorBisque: b2HexColor = 16770244;
pub const b2HexColor_b2_colorBlack: b2HexColor = 0;
pub const b2HexColor_b2_colorBlanchedAlmond: b2HexColor = 16772045;
pub const b2HexColor_b2_colorBlue: b2HexColor = 255;
pub const b2HexColor_b2_colorBlueViolet: b2HexColor = 9055202;
pub const b2HexColor_b2_colorBrown: b2HexColor = 10824234;
pub const b2HexColor_b2_colorBurlywood: b2HexColor = 14596231;
pub const b2HexColor_b2_colorCadetBlue: b2HexColor = 6266528;
pub const b2HexColor_b2_colorChartreuse: b2HexColor = 8388352;
pub const b2HexColor_b2_colorChocolate: b2HexColor = 13789470;
pub const b2HexColor_b2_colorCoral: b2HexColor = 16744272;
pub const b2HexColor_b2_colorCornflowerBlue: b2HexColor = 6591981;
pub const b2HexColor_b2_colorCornsilk: b2HexColor = 16775388;
pub const b2HexColor_b2_colorCrimson: b2HexColor = 14423100;
pub const b2HexColor_b2_colorCyan: b2HexColor = 65535;
pub const b2HexColor_b2_colorDarkBlue: b2HexColor = 139;
pub const b2HexColor_b2_colorDarkCyan: b2HexColor = 35723;
pub const b2HexColor_b2_colorDarkGoldenRod: b2HexColor = 12092939;
pub const b2HexColor_b2_colorDarkGray: b2HexColor = 11119017;
pub const b2HexColor_b2_colorDarkGreen: b2HexColor = 25600;
pub const b2HexColor_b2_colorDarkKhaki: b2HexColor = 12433259;
pub const b2HexColor_b2_colorDarkMagenta: b2HexColor = 9109643;
pub const b2HexColor_b2_colorDarkOliveGreen: b2HexColor = 5597999;
pub const b2HexColor_b2_colorDarkOrange: b2HexColor = 16747520;
pub const b2HexColor_b2_colorDarkOrchid: b2HexColor = 10040012;
pub const b2HexColor_b2_colorDarkRed: b2HexColor = 9109504;
pub const b2HexColor_b2_colorDarkSalmon: b2HexColor = 15308410;
pub const b2HexColor_b2_colorDarkSeaGreen: b2HexColor = 9419919;
pub const b2HexColor_b2_colorDarkSlateBlue: b2HexColor = 4734347;
pub const b2HexColor_b2_colorDarkSlateGray: b2HexColor = 3100495;
pub const b2HexColor_b2_colorDarkTurquoise: b2HexColor = 52945;
pub const b2HexColor_b2_colorDarkViolet: b2HexColor = 9699539;
pub const b2HexColor_b2_colorDeepPink: b2HexColor = 16716947;
pub const b2HexColor_b2_colorDeepSkyBlue: b2HexColor = 49151;
pub const b2HexColor_b2_colorDimGray: b2HexColor = 6908265;
pub const b2HexColor_b2_colorDodgerBlue: b2HexColor = 2003199;
pub const b2HexColor_b2_colorFireBrick: b2HexColor = 11674146;
pub const b2HexColor_b2_colorFloralWhite: b2HexColor = 16775920;
pub const b2HexColor_b2_colorForestGreen: b2HexColor = 2263842;
pub const b2HexColor_b2_colorFuchsia: b2HexColor = 16711935;
pub const b2HexColor_b2_colorGainsboro: b2HexColor = 14474460;
pub const b2HexColor_b2_colorGhostWhite: b2HexColor = 16316671;
pub const b2HexColor_b2_colorGold: b2HexColor = 16766720;
pub const b2HexColor_b2_colorGoldenRod: b2HexColor = 14329120;
pub const b2HexColor_b2_colorGray: b2HexColor = 8421504;
pub const b2HexColor_b2_colorGreen: b2HexColor = 32768;
pub const b2HexColor_b2_colorGreenYellow: b2HexColor = 11403055;
pub const b2HexColor_b2_colorHoneyDew: b2HexColor = 15794160;
pub const b2HexColor_b2_colorHotPink: b2HexColor = 16738740;
pub const b2HexColor_b2_colorIndianRed: b2HexColor = 13458524;
pub const b2HexColor_b2_colorIndigo: b2HexColor = 4915330;
pub const b2HexColor_b2_colorIvory: b2HexColor = 16777200;
pub const b2HexColor_b2_colorKhaki: b2HexColor = 15787660;
pub const b2HexColor_b2_colorLavender: b2HexColor = 15132410;
pub const b2HexColor_b2_colorLavenderBlush: b2HexColor = 16773365;
pub const b2HexColor_b2_colorLawnGreen: b2HexColor = 8190976;
pub const b2HexColor_b2_colorLemonChiffon: b2HexColor = 16775885;
pub const b2HexColor_b2_colorLightBlue: b2HexColor = 11393254;
pub const b2HexColor_b2_colorLightCoral: b2HexColor = 15761536;
pub const b2HexColor_b2_colorLightCyan: b2HexColor = 14745599;
pub const b2HexColor_b2_colorLightGoldenRodYellow: b2HexColor = 16448210;
pub const b2HexColor_b2_colorLightGray: b2HexColor = 13882323;
pub const b2HexColor_b2_colorLightGreen: b2HexColor = 9498256;
pub const b2HexColor_b2_colorLightPink: b2HexColor = 16758465;
pub const b2HexColor_b2_colorLightSalmon: b2HexColor = 16752762;
pub const b2HexColor_b2_colorLightSeaGreen: b2HexColor = 2142890;
pub const b2HexColor_b2_colorLightSkyBlue: b2HexColor = 8900346;
pub const b2HexColor_b2_colorLightSlateGray: b2HexColor = 7833753;
pub const b2HexColor_b2_colorLightSteelBlue: b2HexColor = 11584734;
pub const b2HexColor_b2_colorLightYellow: b2HexColor = 16777184;
pub const b2HexColor_b2_colorLime: b2HexColor = 65280;
pub const b2HexColor_b2_colorLimeGreen: b2HexColor = 3329330;
pub const b2HexColor_b2_colorLinen: b2HexColor = 16445670;
pub const b2HexColor_b2_colorMagenta: b2HexColor = 16711935;
pub const b2HexColor_b2_colorMaroon: b2HexColor = 8388608;
pub const b2HexColor_b2_colorMediumAquaMarine: b2HexColor = 6737322;
pub const b2HexColor_b2_colorMediumBlue: b2HexColor = 205;
pub const b2HexColor_b2_colorMediumOrchid: b2HexColor = 12211667;
pub const b2HexColor_b2_colorMediumPurple: b2HexColor = 9662683;
pub const b2HexColor_b2_colorMediumSeaGreen: b2HexColor = 3978097;
pub const b2HexColor_b2_colorMediumSlateBlue: b2HexColor = 8087790;
pub const b2HexColor_b2_colorMediumSpringGreen: b2HexColor = 64154;
pub const b2HexColor_b2_colorMediumTurquoise: b2HexColor = 4772300;
pub const b2HexColor_b2_colorMediumVioletRed: b2HexColor = 13047173;
pub const b2HexColor_b2_colorMidnightBlue: b2HexColor = 1644912;
pub const b2HexColor_b2_colorMintCream: b2HexColor = 16121850;
pub const b2HexColor_b2_colorMistyRose: b2HexColor = 16770273;
pub const b2HexColor_b2_colorMoccasin: b2HexColor = 16770229;
pub const b2HexColor_b2_colorNavajoWhite: b2HexColor = 16768685;
pub const b2HexColor_b2_colorNavy: b2HexColor = 128;
pub const b2HexColor_b2_colorOldLace: b2HexColor = 16643558;
pub const b2HexColor_b2_colorOlive: b2HexColor = 8421376;
pub const b2HexColor_b2_colorOliveDrab: b2HexColor = 7048739;
pub const b2HexColor_b2_colorOrange: b2HexColor = 16753920;
pub const b2HexColor_b2_colorOrangeRed: b2HexColor = 16729344;
pub const b2HexColor_b2_colorOrchid: b2HexColor = 14315734;
pub const b2HexColor_b2_colorPaleGoldenRod: b2HexColor = 15657130;
pub const b2HexColor_b2_colorPaleGreen: b2HexColor = 10025880;
pub const b2HexColor_b2_colorPaleTurquoise: b2HexColor = 11529966;
pub const b2HexColor_b2_colorPaleVioletRed: b2HexColor = 14381203;
pub const b2HexColor_b2_colorPapayaWhip: b2HexColor = 16773077;
pub const b2HexColor_b2_colorPeachPuff: b2HexColor = 16767673;
pub const b2HexColor_b2_colorPeru: b2HexColor = 13468991;
pub const b2HexColor_b2_colorPink: b2HexColor = 16761035;
pub const b2HexColor_b2_colorPlum: b2HexColor = 14524637;
pub const b2HexColor_b2_colorPowderBlue: b2HexColor = 11591910;
pub const b2HexColor_b2_colorPurple: b2HexColor = 8388736;
pub const b2HexColor_b2_colorRebeccaPurple: b2HexColor = 6697881;
pub const b2HexColor_b2_colorRed: b2HexColor = 16711680;
pub const b2HexColor_b2_colorRosyBrown: b2HexColor = 12357519;
pub const b2HexColor_b2_colorRoyalBlue: b2HexColor = 4286945;
pub const b2HexColor_b2_colorSaddleBrown: b2HexColor = 9127187;
pub const b2HexColor_b2_colorSalmon: b2HexColor = 16416882;
pub const b2HexColor_b2_colorSandyBrown: b2HexColor = 16032864;
pub const b2HexColor_b2_colorSeaGreen: b2HexColor = 3050327;
pub const b2HexColor_b2_colorSeaShell: b2HexColor = 16774638;
pub const b2HexColor_b2_colorSienna: b2HexColor = 10506797;
pub const b2HexColor_b2_colorSilver: b2HexColor = 12632256;
pub const b2HexColor_b2_colorSkyBlue: b2HexColor = 8900331;
pub const b2HexColor_b2_colorSlateBlue: b2HexColor = 6970061;
pub const b2HexColor_b2_colorSlateGray: b2HexColor = 7372944;
pub const b2HexColor_b2_colorSnow: b2HexColor = 16775930;
pub const b2HexColor_b2_colorSpringGreen: b2HexColor = 65407;
pub const b2HexColor_b2_colorSteelBlue: b2HexColor = 4620980;
pub const b2HexColor_b2_colorTan: b2HexColor = 13808780;
pub const b2HexColor_b2_colorTeal: b2HexColor = 32896;
pub const b2HexColor_b2_colorThistle: b2HexColor = 14204888;
pub const b2HexColor_b2_colorTomato: b2HexColor = 16737095;
pub const b2HexColor_b2_colorTurquoise: b2HexColor = 4251856;
pub const b2HexColor_b2_colorViolet: b2HexColor = 15631086;
pub const b2HexColor_b2_colorWheat: b2HexColor = 16113331;
pub const b2HexColor_b2_colorWhite: b2HexColor = 16777215;
pub const b2HexColor_b2_colorWhiteSmoke: b2HexColor = 16119285;
pub const b2HexColor_b2_colorYellow: b2HexColor = 16776960;
pub const b2HexColor_b2_colorYellowGreen: b2HexColor = 10145074;
pub const b2HexColor_b2_colorBox2DRed: b2HexColor = 14430514;
pub const b2HexColor_b2_colorBox2DBlue: b2HexColor = 3190463;
pub const b2HexColor_b2_colorBox2DGreen: b2HexColor = 9226532;
pub const b2HexColor_b2_colorBox2DYellow: b2HexColor = 16772748;
#[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"]
pub type b2HexColor = ::std::os::raw::c_uint;
#[doc = " This struct holds callbacks you can implement to draw a Box2D world.\n This structure should be zero initialized.\n @ingroup world"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DebugDraw {
#[doc = " Draw a closed polygon provided in CCW order."]
pub DrawPolygonFcn: ::std::option::Option<
unsafe extern "C" fn(
vertices: *const b2Vec2,
vertexCount: ::std::os::raw::c_int,
color: b2HexColor,
context: *mut ::std::os::raw::c_void,
),
>,
#[doc = " Draw a solid closed polygon provided in CCW order."]
pub DrawSolidPolygonFcn: ::std::option::Option<
unsafe extern "C" fn(
transform: b2Transform,
vertices: *const b2Vec2,
vertexCount: ::std::os::raw::c_int,
radius: f32,
color: b2HexColor,
context: *mut ::std::os::raw::c_void,
),
>,
#[doc = " Draw a circle."]
pub DrawCircleFcn: ::std::option::Option<
unsafe extern "C" fn(center: b2Vec2, radius: f32, color: b2HexColor, context: *mut ::std::os::raw::c_void),
>,
#[doc = " Draw a solid circle."]
pub DrawSolidCircleFcn: ::std::option::Option<
unsafe extern "C" fn(
transform: b2Transform,
radius: f32,
color: b2HexColor,
context: *mut ::std::os::raw::c_void,
),
>,
#[doc = " Draw a solid capsule."]
pub DrawSolidCapsuleFcn: ::std::option::Option<
unsafe extern "C" fn(
p1: b2Vec2,
p2: b2Vec2,
radius: f32,
color: b2HexColor,
context: *mut ::std::os::raw::c_void,
),
>,
#[doc = " Draw a line segment."]
pub DrawSegmentFcn: ::std::option::Option<
unsafe extern "C" fn(p1: b2Vec2, p2: b2Vec2, color: b2HexColor, context: *mut ::std::os::raw::c_void),
>,
#[doc = " Draw a transform. Choose your own length scale."]
pub DrawTransformFcn:
::std::option::Option<unsafe extern "C" fn(transform: b2Transform, context: *mut ::std::os::raw::c_void)>,
#[doc = " Draw a point."]
pub DrawPointFcn: ::std::option::Option<
unsafe extern "C" fn(p: b2Vec2, size: f32, color: b2HexColor, context: *mut ::std::os::raw::c_void),
>,
#[doc = " Draw a string in world space"]
pub DrawStringFcn: ::std::option::Option<
unsafe extern "C" fn(
p: b2Vec2,
s: *const ::std::os::raw::c_char,
color: b2HexColor,
context: *mut ::std::os::raw::c_void,
),
>,
#[doc = " Bounds to use if restricting drawing to a rectangular region"]
pub drawingBounds: b2AABB,
#[doc = " Option to restrict drawing to a rectangular region. May suffer from unstable depth sorting."]
pub useDrawingBounds: bool,
#[doc = " Option to draw shapes"]
pub drawShapes: bool,
#[doc = " Option to draw joints"]
pub drawJoints: bool,
#[doc = " Option to draw additional information for joints"]
pub drawJointExtras: bool,
#[doc = " Option to draw the bounding boxes for shapes"]
pub drawBounds: bool,
#[doc = " Option to draw the mass and center of mass of dynamic bodies"]
pub drawMass: bool,
#[doc = " Option to draw body names"]
pub drawBodyNames: bool,
#[doc = " Option to draw contact points"]
pub drawContacts: bool,
#[doc = " Option to visualize the graph coloring used for contacts and joints"]
pub drawGraphColors: bool,
#[doc = " Option to draw contact normals"]
pub drawContactNormals: bool,
#[doc = " Option to draw contact normal impulses"]
pub drawContactImpulses: bool,
#[doc = " Option to draw contact feature ids"]
pub drawContactFeatures: bool,
#[doc = " Option to draw contact friction impulses"]
pub drawFrictionImpulses: bool,
#[doc = " Option to draw islands as bounding boxes"]
pub drawIslands: bool,
#[doc = " User context that is passed as an argument to drawing callback functions"]
pub context: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of b2DebugDraw"][::std::mem::size_of::<b2DebugDraw>() - 112usize];
["Alignment of b2DebugDraw"][::std::mem::align_of::<b2DebugDraw>() - 8usize];
["Offset of field: b2DebugDraw::DrawPolygonFcn"][::std::mem::offset_of!(b2DebugDraw, DrawPolygonFcn) - 0usize];
["Offset of field: b2DebugDraw::DrawSolidPolygonFcn"]
[::std::mem::offset_of!(b2DebugDraw, DrawSolidPolygonFcn) - 8usize];
["Offset of field: b2DebugDraw::DrawCircleFcn"][::std::mem::offset_of!(b2DebugDraw, DrawCircleFcn) - 16usize];
["Offset of field: b2DebugDraw::DrawSolidCircleFcn"]
[::std::mem::offset_of!(b2DebugDraw, DrawSolidCircleFcn) - 24usize];
["Offset of field: b2DebugDraw::DrawSolidCapsuleFcn"]
[::std::mem::offset_of!(b2DebugDraw, DrawSolidCapsuleFcn) - 32usize];
["Offset of field: b2DebugDraw::DrawSegmentFcn"][::std::mem::offset_of!(b2DebugDraw, DrawSegmentFcn) - 40usize];
["Offset of field: b2DebugDraw::DrawTransformFcn"][::std::mem::offset_of!(b2DebugDraw, DrawTransformFcn) - 48usize];
["Offset of field: b2DebugDraw::DrawPointFcn"][::std::mem::offset_of!(b2DebugDraw, DrawPointFcn) - 56usize];
["Offset of field: b2DebugDraw::DrawStringFcn"][::std::mem::offset_of!(b2DebugDraw, DrawStringFcn) - 64usize];
["Offset of field: b2DebugDraw::drawingBounds"][::std::mem::offset_of!(b2DebugDraw, drawingBounds) - 72usize];
["Offset of field: b2DebugDraw::useDrawingBounds"][::std::mem::offset_of!(b2DebugDraw, useDrawingBounds) - 88usize];
["Offset of field: b2DebugDraw::drawShapes"][::std::mem::offset_of!(b2DebugDraw, drawShapes) - 89usize];
["Offset of field: b2DebugDraw::drawJoints"][::std::mem::offset_of!(b2DebugDraw, drawJoints) - 90usize];
["Offset of field: b2DebugDraw::drawJointExtras"][::std::mem::offset_of!(b2DebugDraw, drawJointExtras) - 91usize];
["Offset of field: b2DebugDraw::drawBounds"][::std::mem::offset_of!(b2DebugDraw, drawBounds) - 92usize];
["Offset of field: b2DebugDraw::drawMass"][::std::mem::offset_of!(b2DebugDraw, drawMass) - 93usize];
["Offset of field: b2DebugDraw::drawBodyNames"][::std::mem::offset_of!(b2DebugDraw, drawBodyNames) - 94usize];
["Offset of field: b2DebugDraw::drawContacts"][::std::mem::offset_of!(b2DebugDraw, drawContacts) - 95usize];
["Offset of field: b2DebugDraw::drawGraphColors"][::std::mem::offset_of!(b2DebugDraw, drawGraphColors) - 96usize];
["Offset of field: b2DebugDraw::drawContactNormals"]
[::std::mem::offset_of!(b2DebugDraw, drawContactNormals) - 97usize];
["Offset of field: b2DebugDraw::drawContactImpulses"]
[::std::mem::offset_of!(b2DebugDraw, drawContactImpulses) - 98usize];
["Offset of field: b2DebugDraw::drawContactFeatures"]
[::std::mem::offset_of!(b2DebugDraw, drawContactFeatures) - 99usize];
["Offset of field: b2DebugDraw::drawFrictionImpulses"]
[::std::mem::offset_of!(b2DebugDraw, drawFrictionImpulses) - 100usize];
["Offset of field: b2DebugDraw::drawIslands"][::std::mem::offset_of!(b2DebugDraw, drawIslands) - 101usize];
["Offset of field: b2DebugDraw::context"][::std::mem::offset_of!(b2DebugDraw, context) - 104usize];
};
#[doc = " The tree nodes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2TreeNode {
pub _address: u8,
}
unsafe extern "C" {
#[doc = " This allows the user to override the allocation functions. These should be\n set during application startup."]
pub fn b2SetAllocator(allocFcn: b2AllocFcn, freeFcn: b2FreeFcn);
#[doc = " @return the total bytes allocated by Box2D"]
pub fn b2GetByteCount() -> ::std::os::raw::c_int;
#[doc = " Override the default assert callback\n @param assertFcn a non-null assert callback"]
pub fn b2SetAssertFcn(assertFcn: b2AssertFcn);
#[doc = " Get the current version of Box2D"]
pub fn b2GetVersion() -> b2Version;
pub fn b2InternalAssertFcn(
condition: *const ::std::os::raw::c_char,
fileName: *const ::std::os::raw::c_char,
lineNumber: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
#[doc = " Get the absolute number of system ticks. The value is platform specific."]
pub fn b2GetTicks() -> u64;
#[doc = " Get the milliseconds passed from an initial tick value."]
pub fn b2GetMilliseconds(ticks: u64) -> f32;
#[doc = " Get the milliseconds passed from an initial tick value. Resets the passed in\n value to the current tick value."]
pub fn b2GetMillisecondsAndReset(ticks: *mut u64) -> f32;
#[doc = " Yield to be used in a busy loop."]
pub fn b2Yield();
pub fn b2Hash(hash: u32, data: *const u8, count: ::std::os::raw::c_int) -> u32;
pub static b2Vec2_zero: b2Vec2;
pub static b2Rot_identity: b2Rot;
pub static b2Transform_identity: b2Transform;
pub static b2Mat22_zero: b2Mat22;
#[doc = " Is this a valid number? Not NaN or infinity."]
pub fn b2IsValidFloat(a: f32) -> bool;
#[doc = " Is this a valid vector? Not NaN or infinity."]
pub fn b2IsValidVec2(v: b2Vec2) -> bool;
#[doc = " Is this a valid rotation? Not NaN or infinity. Is normalized."]
pub fn b2IsValidRotation(q: b2Rot) -> bool;
#[doc = " Is this a valid bounding box? Not Nan or infinity. Upper bound greater than or equal to lower bound."]
pub fn b2IsValidAABB(aabb: b2AABB) -> bool;
#[doc = " Is this a valid plane? Normal is a unit vector. Not Nan or infinity."]
pub fn b2IsValidPlane(a: b2Plane) -> bool;
#[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"]
pub fn b2Atan2(y: f32, x: f32) -> f32;
#[doc = " Compute the cosine and sine of an angle in radians. Implemented\n for cross-platform determinism."]
pub fn b2ComputeCosSin(radians: f32) -> b2CosSin;
#[doc = " Compute the rotation between two unit vectors"]
pub fn b2ComputeRotationBetweenUnitVectors(v1: b2Vec2, v2: b2Vec2) -> b2Rot;
#[doc = " Box2D 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 For example, if your game uses pixels for units you can use pixels for all length values\n sent to Box2D. There should be no extra cost. However, Box2D has some internal tolerances\n and thresholds that have been tuned for meters. By calling this function, Box2D is able\n to adjust those tolerances and thresholds to improve accuracy.\n A good rule of thumb is to pass the height of your player character to this function. So\n if your player character is 32 pixels high, then pass 32 to this function. Then you may\n confidently use pixels for all the length values sent to Box2D. All length values returned\n from Box2D will also be pixels because Box2D does not do any scaling internally.\n However, you are now on the hook for coming up with good values for gravity, density, and\n forces.\n @warning This must be modified before any calls to Box2D"]
pub fn b2SetLengthUnitsPerMeter(lengthUnits: f32);
#[doc = " Get the current length units per meter."]
pub fn b2GetLengthUnitsPerMeter() -> f32;
#[doc = " Validate ray cast input data (NaN, etc)"]
pub fn b2IsValidRay(input: *const b2RayCastInput) -> bool;
#[doc = " Make a convex polygon from a convex hull. This will assert if the hull is not valid.\n @warning Do not manually fill in the hull data, it must come directly from b2ComputeHull"]
pub fn b2MakePolygon(hull: *const b2Hull, radius: f32) -> b2Polygon;
#[doc = " Make an offset convex polygon from a convex hull. This will assert if the hull is not valid.\n @warning Do not manually fill in the hull data, it must come directly from b2ComputeHull"]
pub fn b2MakeOffsetPolygon(hull: *const b2Hull, position: b2Vec2, rotation: b2Rot) -> b2Polygon;
#[doc = " Make an offset convex polygon from a convex hull. This will assert if the hull is not valid.\n @warning Do not manually fill in the hull data, it must come directly from b2ComputeHull"]
pub fn b2MakeOffsetRoundedPolygon(hull: *const b2Hull, position: b2Vec2, rotation: b2Rot, radius: f32)
-> b2Polygon;
#[doc = " Make a square polygon, bypassing the need for a convex hull.\n @param halfWidth the half-width"]
pub fn b2MakeSquare(halfWidth: f32) -> b2Polygon;
#[doc = " Make a box (rectangle) polygon, bypassing the need for a convex hull.\n @param halfWidth the half-width (x-axis)\n @param halfHeight the half-height (y-axis)"]
pub fn b2MakeBox(halfWidth: f32, halfHeight: f32) -> b2Polygon;
#[doc = " Make a rounded box, bypassing the need for a convex hull.\n @param halfWidth the half-width (x-axis)\n @param halfHeight the half-height (y-axis)\n @param radius the radius of the rounded extension"]
pub fn b2MakeRoundedBox(halfWidth: f32, halfHeight: f32, radius: f32) -> b2Polygon;
#[doc = " Make an offset box, bypassing the need for a convex hull.\n @param halfWidth the half-width (x-axis)\n @param halfHeight the half-height (y-axis)\n @param center the local center of the box\n @param rotation the local rotation of the box"]
pub fn b2MakeOffsetBox(halfWidth: f32, halfHeight: f32, center: b2Vec2, rotation: b2Rot) -> b2Polygon;
#[doc = " Make an offset rounded box, bypassing the need for a convex hull.\n @param halfWidth the half-width (x-axis)\n @param halfHeight the half-height (y-axis)\n @param center the local center of the box\n @param rotation the local rotation of the box\n @param radius the radius of the rounded extension"]
pub fn b2MakeOffsetRoundedBox(
halfWidth: f32,
halfHeight: f32,
center: b2Vec2,
rotation: b2Rot,
radius: f32,
) -> b2Polygon;
#[doc = " Transform a polygon. This is useful for transferring a shape from one body to another."]
pub fn b2TransformPolygon(transform: b2Transform, polygon: *const b2Polygon) -> b2Polygon;
#[doc = " Compute mass properties of a circle"]
pub fn b2ComputeCircleMass(shape: *const b2Circle, density: f32) -> b2MassData;
#[doc = " Compute mass properties of a capsule"]
pub fn b2ComputeCapsuleMass(shape: *const b2Capsule, density: f32) -> b2MassData;
#[doc = " Compute mass properties of a polygon"]
pub fn b2ComputePolygonMass(shape: *const b2Polygon, density: f32) -> b2MassData;
#[doc = " Compute the bounding box of a transformed circle"]
pub fn b2ComputeCircleAABB(shape: *const b2Circle, transform: b2Transform) -> b2AABB;
#[doc = " Compute the bounding box of a transformed capsule"]
pub fn b2ComputeCapsuleAABB(shape: *const b2Capsule, transform: b2Transform) -> b2AABB;
#[doc = " Compute the bounding box of a transformed polygon"]
pub fn b2ComputePolygonAABB(shape: *const b2Polygon, transform: b2Transform) -> b2AABB;
#[doc = " Compute the bounding box of a transformed line segment"]
pub fn b2ComputeSegmentAABB(shape: *const b2Segment, transform: b2Transform) -> b2AABB;
#[doc = " Test a point for overlap with a circle in local space"]
pub fn b2PointInCircle(point: b2Vec2, shape: *const b2Circle) -> bool;
#[doc = " Test a point for overlap with a capsule in local space"]
pub fn b2PointInCapsule(point: b2Vec2, shape: *const b2Capsule) -> bool;
#[doc = " Test a point for overlap with a convex polygon in local space"]
pub fn b2PointInPolygon(point: b2Vec2, shape: *const b2Polygon) -> bool;
#[doc = " Ray cast versus circle shape in local space. Initial overlap is treated as a miss."]
pub fn b2RayCastCircle(input: *const b2RayCastInput, shape: *const b2Circle) -> b2CastOutput;
#[doc = " Ray cast versus capsule shape in local space. Initial overlap is treated as a miss."]
pub fn b2RayCastCapsule(input: *const b2RayCastInput, shape: *const b2Capsule) -> b2CastOutput;
#[doc = " Ray cast versus segment shape in local space. Optionally treat the segment as one-sided with hits from\n the left side being treated as a miss."]
pub fn b2RayCastSegment(input: *const b2RayCastInput, shape: *const b2Segment, oneSided: bool) -> b2CastOutput;
#[doc = " Ray cast versus polygon shape in local space. Initial overlap is treated as a miss."]
pub fn b2RayCastPolygon(input: *const b2RayCastInput, shape: *const b2Polygon) -> b2CastOutput;
#[doc = " Shape cast versus a circle. Initial overlap is treated as a miss."]
pub fn b2ShapeCastCircle(input: *const b2ShapeCastInput, shape: *const b2Circle) -> b2CastOutput;
#[doc = " Shape cast versus a capsule. Initial overlap is treated as a miss."]
pub fn b2ShapeCastCapsule(input: *const b2ShapeCastInput, shape: *const b2Capsule) -> b2CastOutput;
#[doc = " Shape cast versus a line segment. Initial overlap is treated as a miss."]
pub fn b2ShapeCastSegment(input: *const b2ShapeCastInput, shape: *const b2Segment) -> b2CastOutput;
#[doc = " Shape cast versus a convex polygon. Initial overlap is treated as a miss."]
pub fn b2ShapeCastPolygon(input: *const b2ShapeCastInput, shape: *const b2Polygon) -> b2CastOutput;
#[doc = " Compute the convex hull of a set of points. Returns an empty hull if it fails.\n Some failure cases:\n - all points very close together\n - all points on a line\n - less than 3 points\n - more than B2_MAX_POLYGON_VERTICES points\n This welds close points and removes collinear points.\n @warning Do not modify a hull once it has been computed"]
pub fn b2ComputeHull(points: *const b2Vec2, count: ::std::os::raw::c_int) -> b2Hull;
#[doc = " This determines if a hull is valid. Checks for:\n - convexity\n - collinear points\n This is expensive and should not be called at runtime."]
pub fn b2ValidateHull(hull: *const b2Hull) -> bool;
#[doc = " Compute the distance between two line segments, clamping at the end points if needed."]
pub fn b2SegmentDistance(p1: b2Vec2, q1: b2Vec2, p2: b2Vec2, q2: b2Vec2) -> b2SegmentDistanceResult;
pub static b2_emptySimplexCache: b2SimplexCache;
#[doc = " Compute the closest points between two shapes represented as point clouds.\n b2SimplexCache cache is input/output. On the first call set b2SimplexCache.count to zero.\n The underlying GJK algorithm may be debugged by passing in debug simplexes and capacity. You may pass in NULL and 0 for these."]
pub fn b2ShapeDistance(
input: *const b2DistanceInput,
cache: *mut b2SimplexCache,
simplexes: *mut b2Simplex,
simplexCapacity: ::std::os::raw::c_int,
) -> b2DistanceOutput;
#[doc = " Perform a linear shape cast of shape B moving and shape A fixed. Determines the hit point, normal, and translation fraction.\n Initially touching shapes are treated as a miss."]
pub fn b2ShapeCast(input: *const b2ShapeCastPairInput) -> b2CastOutput;
#[doc = " Make a proxy for use in overlap, shape cast, and related functions. This is a deep copy of the points."]
pub fn b2MakeProxy(points: *const b2Vec2, count: ::std::os::raw::c_int, radius: f32) -> b2ShapeProxy;
#[doc = " Make a proxy with a transform. This is a deep copy of the points."]
pub fn b2MakeOffsetProxy(
points: *const b2Vec2,
count: ::std::os::raw::c_int,
radius: f32,
position: b2Vec2,
rotation: b2Rot,
) -> b2ShapeProxy;
#[doc = " Evaluate the transform sweep at a specific time."]
pub fn b2GetSweepTransform(sweep: *const b2Sweep, time: f32) -> b2Transform;
#[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."]
pub fn b2TimeOfImpact(input: *const b2TOIInput) -> b2TOIOutput;
#[doc = " Compute the contact manifold between two circles"]
pub fn b2CollideCircles(
circleA: *const b2Circle,
xfA: b2Transform,
circleB: *const b2Circle,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between a capsule and circle"]
pub fn b2CollideCapsuleAndCircle(
capsuleA: *const b2Capsule,
xfA: b2Transform,
circleB: *const b2Circle,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between an segment and a circle"]
pub fn b2CollideSegmentAndCircle(
segmentA: *const b2Segment,
xfA: b2Transform,
circleB: *const b2Circle,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between a polygon and a circle"]
pub fn b2CollidePolygonAndCircle(
polygonA: *const b2Polygon,
xfA: b2Transform,
circleB: *const b2Circle,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between a capsule and circle"]
pub fn b2CollideCapsules(
capsuleA: *const b2Capsule,
xfA: b2Transform,
capsuleB: *const b2Capsule,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between an segment and a capsule"]
pub fn b2CollideSegmentAndCapsule(
segmentA: *const b2Segment,
xfA: b2Transform,
capsuleB: *const b2Capsule,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between a polygon and capsule"]
pub fn b2CollidePolygonAndCapsule(
polygonA: *const b2Polygon,
xfA: b2Transform,
capsuleB: *const b2Capsule,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between two polygons"]
pub fn b2CollidePolygons(
polygonA: *const b2Polygon,
xfA: b2Transform,
polygonB: *const b2Polygon,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between an segment and a polygon"]
pub fn b2CollideSegmentAndPolygon(
segmentA: *const b2Segment,
xfA: b2Transform,
polygonB: *const b2Polygon,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between a chain segment and a circle"]
pub fn b2CollideChainSegmentAndCircle(
segmentA: *const b2ChainSegment,
xfA: b2Transform,
circleB: *const b2Circle,
xfB: b2Transform,
) -> b2Manifold;
#[doc = " Compute the contact manifold between a chain segment and a capsule"]
pub fn b2CollideChainSegmentAndCapsule(
segmentA: *const b2ChainSegment,
xfA: b2Transform,
capsuleB: *const b2Capsule,
xfB: b2Transform,
cache: *mut b2SimplexCache,
) -> b2Manifold;
#[doc = " Compute the contact manifold between a chain segment and a rounded polygon"]
pub fn b2CollideChainSegmentAndPolygon(
segmentA: *const b2ChainSegment,
xfA: b2Transform,
polygonB: *const b2Polygon,
xfB: b2Transform,
cache: *mut b2SimplexCache,
) -> b2Manifold;
#[doc = " Constructing the tree initializes the node pool."]
pub fn b2DynamicTree_Create() -> b2DynamicTree;
#[doc = " Destroy the tree, freeing the node pool."]
pub fn b2DynamicTree_Destroy(tree: *mut b2DynamicTree);
#[doc = " Create a proxy. Provide an AABB and a userData value."]
pub fn b2DynamicTree_CreateProxy(
tree: *mut b2DynamicTree,
aabb: b2AABB,
categoryBits: u64,
userData: u64,
) -> ::std::os::raw::c_int;
#[doc = " Destroy a proxy. This asserts if the id is invalid."]
pub fn b2DynamicTree_DestroyProxy(tree: *mut b2DynamicTree, proxyId: ::std::os::raw::c_int);
#[doc = " Move a proxy to a new AABB by removing and reinserting into the tree."]
pub fn b2DynamicTree_MoveProxy(tree: *mut b2DynamicTree, proxyId: ::std::os::raw::c_int, aabb: b2AABB);
#[doc = " Enlarge a proxy and enlarge ancestors as necessary."]
pub fn b2DynamicTree_EnlargeProxy(tree: *mut b2DynamicTree, proxyId: ::std::os::raw::c_int, aabb: b2AABB);
#[doc = " Modify the category bits on a proxy. This is an expensive operation."]
pub fn b2DynamicTree_SetCategoryBits(tree: *mut b2DynamicTree, proxyId: ::std::os::raw::c_int, categoryBits: u64);
#[doc = " Get the category bits on a proxy."]
pub fn b2DynamicTree_GetCategoryBits(tree: *mut b2DynamicTree, proxyId: ::std::os::raw::c_int) -> u64;
#[doc = " Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB.\n\t@return performance data"]
pub fn b2DynamicTree_Query(
tree: *const b2DynamicTree,
aabb: b2AABB,
maskBits: u64,
callback: b2TreeQueryCallbackFcn,
context: *mut ::std::os::raw::c_void,
) -> b2TreeStats;
#[doc = " Ray cast against the proxies in the tree. This relies on the callback\n to perform a exact ray cast in the case were the proxy contains a shape.\n The callback also performs the 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 mask bit hint: `bool accept = (maskBits & node->categoryBits) != 0;`\n @param callback a callback class 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"]
pub fn b2DynamicTree_RayCast(
tree: *const b2DynamicTree,
input: *const b2RayCastInput,
maskBits: u64,
callback: b2TreeRayCastCallbackFcn,
context: *mut ::std::os::raw::c_void,
) -> b2TreeStats;
#[doc = " Ray cast against the proxies in the tree. This relies on the callback\n to perform a exact ray cast in the case were the proxy contains a shape.\n The callback also performs the 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 @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 filter bits: `bool accept = (maskBits & node->categoryBits) != 0;`\n @param callback a callback class that is called for each proxy that is hit by the shape\n @param context user context that is passed to the callback\n\t@return performance data"]
pub fn b2DynamicTree_ShapeCast(
tree: *const b2DynamicTree,
input: *const b2ShapeCastInput,
maskBits: u64,
callback: b2TreeShapeCastCallbackFcn,
context: *mut ::std::os::raw::c_void,
) -> b2TreeStats;
#[doc = " Get the height of the binary tree."]
pub fn b2DynamicTree_GetHeight(tree: *const b2DynamicTree) -> ::std::os::raw::c_int;
#[doc = " Get the ratio of the sum of the node areas to the root area."]
pub fn b2DynamicTree_GetAreaRatio(tree: *const b2DynamicTree) -> f32;
#[doc = " Get the bounding box that contains the entire tree"]
pub fn b2DynamicTree_GetRootBounds(tree: *const b2DynamicTree) -> b2AABB;
#[doc = " Get the number of proxies created"]
pub fn b2DynamicTree_GetProxyCount(tree: *const b2DynamicTree) -> ::std::os::raw::c_int;
#[doc = " Rebuild the tree while retaining subtrees that haven't changed. Returns the number of boxes sorted."]
pub fn b2DynamicTree_Rebuild(tree: *mut b2DynamicTree, fullBuild: bool) -> ::std::os::raw::c_int;
#[doc = " Get the number of bytes used by this tree"]
pub fn b2DynamicTree_GetByteCount(tree: *const b2DynamicTree) -> ::std::os::raw::c_int;
#[doc = " Get proxy user data"]
pub fn b2DynamicTree_GetUserData(tree: *const b2DynamicTree, proxyId: ::std::os::raw::c_int) -> u64;
#[doc = " Get the AABB of a proxy"]
pub fn b2DynamicTree_GetAABB(tree: *const b2DynamicTree, proxyId: ::std::os::raw::c_int) -> b2AABB;
#[doc = " Validate this tree. For testing."]
pub fn b2DynamicTree_Validate(tree: *const b2DynamicTree);
#[doc = " Validate this tree has no enlarged AABBs. For testing."]
pub fn b2DynamicTree_ValidateNoEnlarged(tree: *const b2DynamicTree);
#[doc = " Solves the position of a mover that satisfies the given collision planes.\n @param targetDelta the desired movement from the position used to generate the collision planes\n @param planes the collision planes\n @param count the number of collision planes"]
pub fn b2SolvePlanes(
targetDelta: b2Vec2,
planes: *mut b2CollisionPlane,
count: ::std::os::raw::c_int,
) -> b2PlaneSolverResult;
#[doc = " Clips the velocity against the given collision planes. Planes with zero push or clipVelocity\n set to false are skipped."]
pub fn b2ClipVector(vector: b2Vec2, planes: *const b2CollisionPlane, count: ::std::os::raw::c_int) -> b2Vec2;
#[doc = " Use these to make your identifiers null.\n You may also use zero initialization to get null."]
pub static b2_nullWorldId: b2WorldId;
pub static b2_nullBodyId: b2BodyId;
pub static b2_nullShapeId: b2ShapeId;
pub static b2_nullChainId: b2ChainId;
pub static b2_nullJointId: b2JointId;
#[doc = " Use this to initialize your world definition\n @ingroup world"]
pub fn b2DefaultWorldDef() -> b2WorldDef;
#[doc = " Use this to initialize your body definition\n @ingroup body"]
pub fn b2DefaultBodyDef() -> b2BodyDef;
#[doc = " Use this to initialize your filter\n @ingroup shape"]
pub fn b2DefaultFilter() -> b2Filter;
#[doc = " Use this to initialize your query filter\n @ingroup shape"]
pub fn b2DefaultQueryFilter() -> b2QueryFilter;
#[doc = " Use this to initialize your surface material\n @ingroup shape"]
pub fn b2DefaultSurfaceMaterial() -> b2SurfaceMaterial;
#[doc = " Use this to initialize your shape definition\n @ingroup shape"]
pub fn b2DefaultShapeDef() -> b2ShapeDef;
#[doc = " Use this to initialize your chain definition\n @ingroup shape"]
pub fn b2DefaultChainDef() -> b2ChainDef;
#[doc = " Use this to initialize your joint definition\n @ingroup distance_joint"]
pub fn b2DefaultDistanceJointDef() -> b2DistanceJointDef;
#[doc = " Use this to initialize your joint definition\n @ingroup motor_joint"]
pub fn b2DefaultMotorJointDef() -> b2MotorJointDef;
#[doc = " Use this to initialize your joint definition\n @ingroup mouse_joint"]
pub fn b2DefaultMouseJointDef() -> b2MouseJointDef;
#[doc = " Use this to initialize your joint definition\n @ingroup filter_joint"]
pub fn b2DefaultFilterJointDef() -> b2FilterJointDef;
#[doc = " Use this to initialize your joint definition\n @ingroupd prismatic_joint"]
pub fn b2DefaultPrismaticJointDef() -> b2PrismaticJointDef;
#[doc = " Use this to initialize your joint definition.\n @ingroup revolute_joint"]
pub fn b2DefaultRevoluteJointDef() -> b2RevoluteJointDef;
#[doc = " Use this to initialize your joint definition\n @ingroup weld_joint"]
pub fn b2DefaultWeldJointDef() -> b2WeldJointDef;
#[doc = " Use this to initialize your joint definition\n @ingroup wheel_joint"]
pub fn b2DefaultWheelJointDef() -> b2WheelJointDef;
#[doc = " Use this to initialize your explosion definition\n @ingroup world"]
pub fn b2DefaultExplosionDef() -> b2ExplosionDef;
#[doc = " Use this to initialize your drawing interface. This allows you to implement a sub-set\n of the drawing functions."]
pub fn b2DefaultDebugDraw() -> b2DebugDraw;
#[doc = " Create a world for rigid body simulation. A world contains bodies, shapes, and constraints. You make create\n up to 128 worlds. Each world is completely independent and may be simulated in parallel.\n @return the world id."]
pub fn b2CreateWorld(def: *const b2WorldDef) -> b2WorldId;
#[doc = " Destroy a world"]
pub fn b2DestroyWorld(worldId: b2WorldId);
#[doc = " World id validation. Provides validation for up to 64K allocations."]
pub fn b2World_IsValid(id: b2WorldId) -> bool;
#[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."]
pub fn b2World_Step(worldId: b2WorldId, timeStep: f32, subStepCount: ::std::os::raw::c_int);
#[doc = " Call this to draw shapes and other debug draw data"]
pub fn b2World_Draw(worldId: b2WorldId, draw: *mut b2DebugDraw);
#[doc = " Get the body events for the current time step. The event data is transient. Do not store a reference to this data."]
pub fn b2World_GetBodyEvents(worldId: b2WorldId) -> b2BodyEvents;
#[doc = " Get sensor events for the current time step. The event data is transient. Do not store a reference to this data."]
pub fn b2World_GetSensorEvents(worldId: b2WorldId) -> b2SensorEvents;
#[doc = " Get contact events for this current time step. The event data is transient. Do not store a reference to this data."]
pub fn b2World_GetContactEvents(worldId: b2WorldId) -> b2ContactEvents;
#[doc = " Overlap test for all shapes that *potentially* overlap the provided AABB"]
pub fn b2World_OverlapAABB(
worldId: b2WorldId,
aabb: b2AABB,
filter: b2QueryFilter,
fcn: b2OverlapResultFcn,
context: *mut ::std::os::raw::c_void,
) -> b2TreeStats;
#[doc = " Overlap test for all shapes that overlap the provided shape proxy."]
pub fn b2World_OverlapShape(
worldId: b2WorldId,
proxy: *const b2ShapeProxy,
filter: b2QueryFilter,
fcn: b2OverlapResultFcn,
context: *mut ::std::os::raw::c_void,
) -> b2TreeStats;
#[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"]
pub fn b2World_CastRay(
worldId: b2WorldId,
origin: b2Vec2,
translation: b2Vec2,
filter: b2QueryFilter,
fcn: b2CastResultFcn,
context: *mut ::std::os::raw::c_void,
) -> b2TreeStats;
#[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 b2World_CastRay() and does not allow for custom filtering."]
pub fn b2World_CastRayClosest(
worldId: b2WorldId,
origin: b2Vec2,
translation: b2Vec2,
filter: b2QueryFilter,
) -> b2RayResult;
#[doc = " Cast a shape through the world. Similar to a cast ray except that a shape is cast instead of a point.\n\t@see b2World_CastRay"]
pub fn b2World_CastShape(
worldId: b2WorldId,
proxy: *const b2ShapeProxy,
translation: b2Vec2,
filter: b2QueryFilter,
fcn: b2CastResultFcn,
context: *mut ::std::os::raw::c_void,
) -> b2TreeStats;
#[doc = " Cast a capsule mover through the world. This is a special shape cast that handles sliding along other shapes while reducing\n clipping."]
pub fn b2World_CastMover(
worldId: b2WorldId,
mover: *const b2Capsule,
translation: b2Vec2,
filter: b2QueryFilter,
) -> f32;
#[doc = " Collide a capsule mover with the world, gathering collision planes that can be fed to b2SolvePlanes. Useful for\n kinematic character movement."]
pub fn b2World_CollideMover(
worldId: b2WorldId,
mover: *const b2Capsule,
filter: b2QueryFilter,
fcn: b2PlaneResultFcn,
context: *mut ::std::os::raw::c_void,
);
#[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 b2WorldDef"]
pub fn b2World_EnableSleeping(worldId: b2WorldId, flag: bool);
#[doc = " Is body sleeping enabled?"]
pub fn b2World_IsSleepingEnabled(worldId: b2WorldId) -> bool;
#[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 b2WorldDef"]
pub fn b2World_EnableContinuous(worldId: b2WorldId, flag: bool);
#[doc = " Is continuous collision enabled?"]
pub fn b2World_IsContinuousEnabled(worldId: b2WorldId) -> bool;
#[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 b2WorldDef"]
pub fn b2World_SetRestitutionThreshold(worldId: b2WorldId, value: f32);
#[doc = " Get the the restitution speed threshold. Usually in meters per second."]
pub fn b2World_GetRestitutionThreshold(worldId: b2WorldId) -> f32;
#[doc = " Adjust the hit event threshold. This controls the collision speed needed to generate a b2ContactHitEvent.\n Usually in meters per second.\n @see b2WorldDef::hitEventThreshold"]
pub fn b2World_SetHitEventThreshold(worldId: b2WorldId, value: f32);
#[doc = " Get the the hit event speed threshold. Usually in meters per second."]
pub fn b2World_GetHitEventThreshold(worldId: b2WorldId) -> f32;
#[doc = " Register the custom filter callback. This is optional."]
pub fn b2World_SetCustomFilterCallback(
worldId: b2WorldId,
fcn: b2CustomFilterFcn,
context: *mut ::std::os::raw::c_void,
);
#[doc = " Register the pre-solve callback. This is optional."]
pub fn b2World_SetPreSolveCallback(worldId: b2WorldId, fcn: b2PreSolveFcn, context: *mut ::std::os::raw::c_void);
#[doc = " Set the gravity vector for the entire world. Box2D 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 b2WorldDef"]
pub fn b2World_SetGravity(worldId: b2WorldId, gravity: b2Vec2);
#[doc = " Get the gravity vector"]
pub fn b2World_GetGravity(worldId: b2WorldId) -> b2Vec2;
#[doc = " Apply a radial explosion\n @param worldId The world id\n @param explosionDef The explosion definition"]
pub fn b2World_Explode(worldId: b2WorldId, explosionDef: *const b2ExplosionDef);
#[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 pushSpeed The maximum contact constraint push out speed (meters per second)\n @note Advanced feature"]
pub fn b2World_SetContactTuning(worldId: b2WorldId, hertz: f32, dampingRatio: f32, pushSpeed: f32);
#[doc = " Set the maximum linear speed. Usually in m/s."]
pub fn b2World_SetMaximumLinearSpeed(worldId: b2WorldId, maximumLinearSpeed: f32);
#[doc = " Get the maximum linear speed. Usually in m/s."]
pub fn b2World_GetMaximumLinearSpeed(worldId: b2WorldId) -> f32;
#[doc = " Enable/disable constraint warm starting. Advanced feature for testing. Disabling\n warm starting greatly reduces stability and provides no performance gain."]
pub fn b2World_EnableWarmStarting(worldId: b2WorldId, flag: bool);
#[doc = " Is constraint warm starting enabled?"]
pub fn b2World_IsWarmStartingEnabled(worldId: b2WorldId) -> bool;
#[doc = " Get the number of awake bodies."]
pub fn b2World_GetAwakeBodyCount(worldId: b2WorldId) -> ::std::os::raw::c_int;
#[doc = " Get the current world performance profile"]
pub fn b2World_GetProfile(worldId: b2WorldId) -> b2Profile;
#[doc = " Get world counters and sizes"]
pub fn b2World_GetCounters(worldId: b2WorldId) -> b2Counters;
#[doc = " Set the user data pointer."]
pub fn b2World_SetUserData(worldId: b2WorldId, userData: *mut ::std::os::raw::c_void);
#[doc = " Get the user data pointer."]
pub fn b2World_GetUserData(worldId: b2WorldId) -> *mut ::std::os::raw::c_void;
#[doc = " Set the friction callback. Passing NULL resets to default."]
pub fn b2World_SetFrictionCallback(worldId: b2WorldId, callback: b2FrictionCallback);
#[doc = " Set the restitution callback. Passing NULL resets to default."]
pub fn b2World_SetRestitutionCallback(worldId: b2WorldId, callback: b2RestitutionCallback);
#[doc = " Dump memory stats to box2d_memory.txt"]
pub fn b2World_DumpMemoryStats(worldId: b2WorldId);
#[doc = " This is for internal testing"]
pub fn b2World_RebuildStaticTree(worldId: b2WorldId);
#[doc = " This is for internal testing"]
pub fn b2World_EnableSpeculative(worldId: b2WorldId, flag: bool);
#[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 b2BodyDef bodyDef = b2DefaultBodyDef();\n b2BodyId myBodyId = b2CreateBody(myWorldId, &bodyDef);\n @endcode\n @warning This function is locked during callbacks."]
pub fn b2CreateBody(worldId: b2WorldId, def: *const b2BodyDef) -> b2BodyId;
#[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."]
pub fn b2DestroyBody(bodyId: b2BodyId);
#[doc = " Body identifier validation. Can be used to detect orphaned ids. Provides validation for up to 64K allocations."]
pub fn b2Body_IsValid(id: b2BodyId) -> bool;
#[doc = " Get the body type: static, kinematic, or dynamic"]
pub fn b2Body_GetType(bodyId: b2BodyId) -> b2BodyType;
#[doc = " Change the body type. This is an expensive operation. This automatically updates the mass\n properties regardless of the automatic mass setting."]
pub fn b2Body_SetType(bodyId: b2BodyId, type_: b2BodyType);
#[doc = " Set the body name. Up to 31 characters excluding 0 termination."]
pub fn b2Body_SetName(bodyId: b2BodyId, name: *const ::std::os::raw::c_char);
#[doc = " Get the body name. May be null."]
pub fn b2Body_GetName(bodyId: b2BodyId) -> *const ::std::os::raw::c_char;
#[doc = " Set the user data for a body"]
pub fn b2Body_SetUserData(bodyId: b2BodyId, userData: *mut ::std::os::raw::c_void);
#[doc = " Get the user data stored in a body"]
pub fn b2Body_GetUserData(bodyId: b2BodyId) -> *mut ::std::os::raw::c_void;
#[doc = " Get the world position of a body. This is the location of the body origin."]
pub fn b2Body_GetPosition(bodyId: b2BodyId) -> b2Vec2;
#[doc = " Get the world rotation of a body as a cosine/sine pair (complex number)"]
pub fn b2Body_GetRotation(bodyId: b2BodyId) -> b2Rot;
#[doc = " Get the world transform of a body."]
pub fn b2Body_GetTransform(bodyId: b2BodyId) -> b2Transform;
#[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 then intended transform.\n @see b2BodyDef::position and b2BodyDef::angle"]
pub fn b2Body_SetTransform(bodyId: b2BodyId, position: b2Vec2, rotation: b2Rot);
#[doc = " Get a local point on a body given a world point"]
pub fn b2Body_GetLocalPoint(bodyId: b2BodyId, worldPoint: b2Vec2) -> b2Vec2;
#[doc = " Get a world point on a body given a local point"]
pub fn b2Body_GetWorldPoint(bodyId: b2BodyId, localPoint: b2Vec2) -> b2Vec2;
#[doc = " Get a local vector on a body given a world vector"]
pub fn b2Body_GetLocalVector(bodyId: b2BodyId, worldVector: b2Vec2) -> b2Vec2;
#[doc = " Get a world vector on a body given a local vector"]
pub fn b2Body_GetWorldVector(bodyId: b2BodyId, localVector: b2Vec2) -> b2Vec2;
#[doc = " Get the linear velocity of a body's center of mass. Usually in meters per second."]
pub fn b2Body_GetLinearVelocity(bodyId: b2BodyId) -> b2Vec2;
#[doc = " Get the angular velocity of a body in radians per second"]
pub fn b2Body_GetAngularVelocity(bodyId: b2BodyId) -> f32;
#[doc = " Set the linear velocity of a body. Usually in meters per second."]
pub fn b2Body_SetLinearVelocity(bodyId: b2BodyId, linearVelocity: b2Vec2);
#[doc = " Set the angular velocity of a body in radians per second"]
pub fn b2Body_SetAngularVelocity(bodyId: b2BodyId, angularVelocity: f32);
#[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 automatically wake the body if asleep."]
pub fn b2Body_SetTargetTransform(bodyId: b2BodyId, target: b2Transform, timeStep: f32);
#[doc = " Get the linear velocity of a local point attached to a body. Usually in meters per second."]
pub fn b2Body_GetLocalPointVelocity(bodyId: b2BodyId, localPoint: b2Vec2) -> b2Vec2;
#[doc = " Get the linear velocity of a world point attached to a body. Usually in meters per second."]
pub fn b2Body_GetWorldPointVelocity(bodyId: b2BodyId, worldPoint: b2Vec2) -> b2Vec2;
#[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"]
pub fn b2Body_ApplyForce(bodyId: b2BodyId, force: b2Vec2, point: b2Vec2, wake: bool);
#[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"]
pub fn b2Body_ApplyForceToCenter(bodyId: b2BodyId, force: b2Vec2, wake: bool);
#[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 about the z-axis (out of the screen), usually in N*m.\n @param wake also wake up the body"]
pub fn b2Body_ApplyTorque(bodyId: b2BodyId, torque: f32, wake: bool);
#[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."]
pub fn b2Body_ApplyLinearImpulse(bodyId: b2BodyId, impulse: b2Vec2, point: b2Vec2, wake: bool);
#[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."]
pub fn b2Body_ApplyLinearImpulseToCenter(bodyId: b2BodyId, impulse: b2Vec2, wake: bool);
#[doc = " Apply an angular impulse. 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 angular impulse, 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 force,\n use a force instead, which will work better with the sub-stepping solver."]
pub fn b2Body_ApplyAngularImpulse(bodyId: b2BodyId, impulse: f32, wake: bool);
#[doc = " Get the mass of the body, usually in kilograms"]
pub fn b2Body_GetMass(bodyId: b2BodyId) -> f32;
#[doc = " Get the rotational inertia of the body, usually in kg*m^2"]
pub fn b2Body_GetRotationalInertia(bodyId: b2BodyId) -> f32;
#[doc = " Get the center of mass position of the body in local space"]
pub fn b2Body_GetLocalCenterOfMass(bodyId: b2BodyId) -> b2Vec2;
#[doc = " Get the center of mass position of the body in world space"]
pub fn b2Body_GetWorldCenterOfMass(bodyId: b2BodyId) -> b2Vec2;
#[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."]
pub fn b2Body_SetMassData(bodyId: b2BodyId, massData: b2MassData);
#[doc = " Get the mass data for a body"]
pub fn b2Body_GetMassData(bodyId: b2BodyId) -> b2MassData;
#[doc = " This update 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.\n Note that sensor shapes may have mass."]
pub fn b2Body_ApplyMassFromShapes(bodyId: b2BodyId);
#[doc = " Adjust the linear damping. Normally this is set in b2BodyDef before creation."]
pub fn b2Body_SetLinearDamping(bodyId: b2BodyId, linearDamping: f32);
#[doc = " Get the current linear damping."]
pub fn b2Body_GetLinearDamping(bodyId: b2BodyId) -> f32;
#[doc = " Adjust the angular damping. Normally this is set in b2BodyDef before creation."]
pub fn b2Body_SetAngularDamping(bodyId: b2BodyId, angularDamping: f32);
#[doc = " Get the current angular damping."]
pub fn b2Body_GetAngularDamping(bodyId: b2BodyId) -> f32;
#[doc = " Adjust the gravity scale. Normally this is set in b2BodyDef before creation.\n @see b2BodyDef::gravityScale"]
pub fn b2Body_SetGravityScale(bodyId: b2BodyId, gravityScale: f32);
#[doc = " Get the current gravity scale"]
pub fn b2Body_GetGravityScale(bodyId: b2BodyId) -> f32;
#[doc = " @return true if this body is awake"]
pub fn b2Body_IsAwake(bodyId: b2BodyId) -> bool;
#[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."]
pub fn b2Body_SetAwake(bodyId: b2BodyId, awake: bool);
#[doc = " Enable or disable sleeping for this body. If sleeping is disabled the body will wake."]
pub fn b2Body_EnableSleep(bodyId: b2BodyId, enableSleep: bool);
#[doc = " Returns true if sleeping is enabled for this body"]
pub fn b2Body_IsSleepEnabled(bodyId: b2BodyId) -> bool;
#[doc = " Set the sleep threshold, usually in meters per second"]
pub fn b2Body_SetSleepThreshold(bodyId: b2BodyId, sleepThreshold: f32);
#[doc = " Get the sleep threshold, usually in meters per second."]
pub fn b2Body_GetSleepThreshold(bodyId: b2BodyId) -> f32;
#[doc = " Returns true if this body is enabled"]
pub fn b2Body_IsEnabled(bodyId: b2BodyId) -> bool;
#[doc = " Disable a body by removing it completely from the simulation. This is expensive."]
pub fn b2Body_Disable(bodyId: b2BodyId);
#[doc = " Enable a body by adding it to the simulation. This is expensive."]
pub fn b2Body_Enable(bodyId: b2BodyId);
#[doc = " Set this body to have fixed rotation. This causes the mass to be reset in all cases."]
pub fn b2Body_SetFixedRotation(bodyId: b2BodyId, flag: bool);
#[doc = " Does this body have fixed rotation?"]
pub fn b2Body_IsFixedRotation(bodyId: b2BodyId) -> bool;
#[doc = " Set this body to be a bullet. A bullet does continuous collision detection\n against dynamic bodies (but not other bullets)."]
pub fn b2Body_SetBullet(bodyId: b2BodyId, flag: bool);
#[doc = " Is this body a bullet?"]
pub fn b2Body_IsBullet(bodyId: b2BodyId) -> bool;
#[doc = " Enable/disable contact events on all shapes.\n @see b2ShapeDef::enableContactEvents\n @warning changing this at runtime may cause mismatched begin/end touch events"]
pub fn b2Body_EnableContactEvents(bodyId: b2BodyId, flag: bool);
#[doc = " Enable/disable hit events on all shapes\n @see b2ShapeDef::enableHitEvents"]
pub fn b2Body_EnableHitEvents(bodyId: b2BodyId, flag: bool);
#[doc = " Get the world that owns this body"]
pub fn b2Body_GetWorld(bodyId: b2BodyId) -> b2WorldId;
#[doc = " Get the number of shapes on this body"]
pub fn b2Body_GetShapeCount(bodyId: b2BodyId) -> ::std::os::raw::c_int;
#[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"]
pub fn b2Body_GetShapes(
bodyId: b2BodyId,
shapeArray: *mut b2ShapeId,
capacity: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
#[doc = " Get the number of joints on this body"]
pub fn b2Body_GetJointCount(bodyId: b2BodyId) -> ::std::os::raw::c_int;
#[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"]
pub fn b2Body_GetJoints(
bodyId: b2BodyId,
jointArray: *mut b2JointId,
capacity: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
#[doc = " Get the maximum capacity required for retrieving all the touching contacts on a body"]
pub fn b2Body_GetContactCapacity(bodyId: b2BodyId) -> ::std::os::raw::c_int;
#[doc = " Get the touching contact data for a body.\n @note Box2D 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"]
pub fn b2Body_GetContactData(
bodyId: b2BodyId,
contactData: *mut b2ContactData,
capacity: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
#[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."]
pub fn b2Body_ComputeAABB(bodyId: b2BodyId) -> b2AABB;
#[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"]
pub fn b2CreateCircleShape(bodyId: b2BodyId, def: *const b2ShapeDef, circle: *const b2Circle) -> b2ShapeId;
#[doc = " Create a line segment 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"]
pub fn b2CreateSegmentShape(bodyId: b2BodyId, def: *const b2ShapeDef, segment: *const b2Segment) -> b2ShapeId;
#[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"]
pub fn b2CreateCapsuleShape(bodyId: b2BodyId, def: *const b2ShapeDef, capsule: *const b2Capsule) -> b2ShapeId;
#[doc = " Create a polygon 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"]
pub fn b2CreatePolygonShape(bodyId: b2BodyId, def: *const b2ShapeDef, polygon: *const b2Polygon) -> b2ShapeId;
#[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 b2Body_ApplyMassFromShapes"]
pub fn b2DestroyShape(shapeId: b2ShapeId, updateBodyMass: bool);
#[doc = " Shape identifier validation. Provides validation for up to 64K allocations."]
pub fn b2Shape_IsValid(id: b2ShapeId) -> bool;
#[doc = " Get the type of a shape"]
pub fn b2Shape_GetType(shapeId: b2ShapeId) -> b2ShapeType;
#[doc = " Get the id of the body that a shape is attached to"]
pub fn b2Shape_GetBody(shapeId: b2ShapeId) -> b2BodyId;
#[doc = " Get the world that owns this shape"]
pub fn b2Shape_GetWorld(shapeId: b2ShapeId) -> b2WorldId;
#[doc = " Returns true if the shape is a sensor. It is not possible to change a shape\n from sensor to solid dynamically because this breaks the contract for\n sensor events."]
pub fn b2Shape_IsSensor(shapeId: b2ShapeId) -> bool;
#[doc = " Set the user data for a shape"]
pub fn b2Shape_SetUserData(shapeId: b2ShapeId, userData: *mut ::std::os::raw::c_void);
#[doc = " Get the user data for a shape. This is useful when you get a shape id\n from an event or query."]
pub fn b2Shape_GetUserData(shapeId: b2ShapeId) -> *mut ::std::os::raw::c_void;
#[doc = " Set the mass density of a shape, usually in kg/m^2.\n This will optionally update the mass properties on the parent body.\n @see b2ShapeDef::density, b2Body_ApplyMassFromShapes"]
pub fn b2Shape_SetDensity(shapeId: b2ShapeId, density: f32, updateBodyMass: bool);
#[doc = " Get the density of a shape, usually in kg/m^2"]
pub fn b2Shape_GetDensity(shapeId: b2ShapeId) -> f32;
#[doc = " Set the friction on a shape\n @see b2ShapeDef::friction"]
pub fn b2Shape_SetFriction(shapeId: b2ShapeId, friction: f32);
#[doc = " Get the friction of a shape"]
pub fn b2Shape_GetFriction(shapeId: b2ShapeId) -> f32;
#[doc = " Set the shape restitution (bounciness)\n @see b2ShapeDef::restitution"]
pub fn b2Shape_SetRestitution(shapeId: b2ShapeId, restitution: f32);
#[doc = " Get the shape restitution"]
pub fn b2Shape_GetRestitution(shapeId: b2ShapeId) -> f32;
#[doc = " Set the shape material identifier\n @see b2ShapeDef::material"]
pub fn b2Shape_SetMaterial(shapeId: b2ShapeId, material: ::std::os::raw::c_int);
#[doc = " Get the shape material identifier"]
pub fn b2Shape_GetMaterial(shapeId: b2ShapeId) -> ::std::os::raw::c_int;
#[doc = " Set the shape surface material"]
pub fn b2Shape_SetSurfaceMaterial(shapeId: b2ShapeId, surfaceMaterial: b2SurfaceMaterial);
#[doc = " Get the shape surface material"]
pub fn b2Shape_GetSurfaceMaterial(shapeId: b2ShapeId) -> b2SurfaceMaterial;
#[doc = " Get the shape filter"]
pub fn b2Shape_GetFilter(shapeId: b2ShapeId) -> b2Filter;
#[doc = " Set the current filter. This is almost as expensive as recreating the shape. This may cause\n contacts to be immediately destroyed. However contacts are not created until the next world step.\n Sensor overlap state is also not updated until the next world step.\n @see b2ShapeDef::filter"]
pub fn b2Shape_SetFilter(shapeId: b2ShapeId, filter: b2Filter);
#[doc = " Enable sensor events for this shape.\n @see b2ShapeDef::enableSensorEvents"]
pub fn b2Shape_EnableSensorEvents(shapeId: b2ShapeId, flag: bool);
#[doc = " Returns true if sensor events are enabled."]
pub fn b2Shape_AreSensorEventsEnabled(shapeId: b2ShapeId) -> bool;
#[doc = " Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors.\n @see b2ShapeDef::enableContactEvents\n @warning changing this at run-time may lead to lost begin/end events"]
pub fn b2Shape_EnableContactEvents(shapeId: b2ShapeId, flag: bool);
#[doc = " Returns true if contact events are enabled"]
pub fn b2Shape_AreContactEventsEnabled(shapeId: b2ShapeId) -> bool;
#[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 b2PreSolveFcn"]
pub fn b2Shape_EnablePreSolveEvents(shapeId: b2ShapeId, flag: bool);
#[doc = " Returns true if pre-solve events are enabled"]
pub fn b2Shape_ArePreSolveEventsEnabled(shapeId: b2ShapeId) -> bool;
#[doc = " Enable contact hit events for this shape. Ignored for sensors.\n @see b2WorldDef.hitEventThreshold"]
pub fn b2Shape_EnableHitEvents(shapeId: b2ShapeId, flag: bool);
#[doc = " Returns true if hit events are enabled"]
pub fn b2Shape_AreHitEventsEnabled(shapeId: b2ShapeId) -> bool;
#[doc = " Test a point for overlap with a shape"]
pub fn b2Shape_TestPoint(shapeId: b2ShapeId, point: b2Vec2) -> bool;
#[doc = " Ray cast a shape directly"]
pub fn b2Shape_RayCast(shapeId: b2ShapeId, input: *const b2RayCastInput) -> b2CastOutput;
#[doc = " Get a copy of the shape's circle. Asserts the type is correct."]
pub fn b2Shape_GetCircle(shapeId: b2ShapeId) -> b2Circle;
#[doc = " Get a copy of the shape's line segment. Asserts the type is correct."]
pub fn b2Shape_GetSegment(shapeId: b2ShapeId) -> b2Segment;
#[doc = " Get a copy of the shape's chain segment. These come from chain shapes.\n Asserts the type is correct."]
pub fn b2Shape_GetChainSegment(shapeId: b2ShapeId) -> b2ChainSegment;
#[doc = " Get a copy of the shape's capsule. Asserts the type is correct."]
pub fn b2Shape_GetCapsule(shapeId: b2ShapeId) -> b2Capsule;
#[doc = " Get a copy of the shape's convex polygon. Asserts the type is correct."]
pub fn b2Shape_GetPolygon(shapeId: b2ShapeId) -> b2Polygon;
#[doc = " Allows you to change a shape to be a circle or update the current circle.\n This does not modify the mass properties.\n @see b2Body_ApplyMassFromShapes"]
pub fn b2Shape_SetCircle(shapeId: b2ShapeId, circle: *const b2Circle);
#[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 b2Body_ApplyMassFromShapes"]
pub fn b2Shape_SetCapsule(shapeId: b2ShapeId, capsule: *const b2Capsule);
#[doc = " Allows you to change a shape to be a segment or update the current segment."]
pub fn b2Shape_SetSegment(shapeId: b2ShapeId, segment: *const b2Segment);
#[doc = " Allows you to change a shape to be a polygon or update the current polygon.\n This does not modify the mass properties.\n @see b2Body_ApplyMassFromShapes"]
pub fn b2Shape_SetPolygon(shapeId: b2ShapeId, polygon: *const b2Polygon);
#[doc = " Get the parent chain id if the shape type is a chain segment, otherwise\n returns b2_nullChainId."]
pub fn b2Shape_GetParentChain(shapeId: b2ShapeId) -> b2ChainId;
#[doc = " Get the maximum capacity required for retrieving all the touching contacts on a shape"]
pub fn b2Shape_GetContactCapacity(shapeId: b2ShapeId) -> ::std::os::raw::c_int;
#[doc = " Get the touching contact data for a shape. The provided shapeId will be either shapeIdA or shapeIdB on the contact data.\n @note Box2D 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"]
pub fn b2Shape_GetContactData(
shapeId: b2ShapeId,
contactData: *mut b2ContactData,
capacity: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
#[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 b2Shape_GetSensorOverlaps"]
pub fn b2Shape_GetSensorCapacity(shapeId: b2ShapeId) -> ::std::os::raw::c_int;
#[doc = " Get the overlapped shapes for a sensor shape.\n @param shapeId the id of a sensor shape\n @param overlaps a user allocated array that is filled with the overlapping shapes\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 b2Shape_IsValid to confirm each overlap"]
pub fn b2Shape_GetSensorOverlaps(
shapeId: b2ShapeId,
overlaps: *mut b2ShapeId,
capacity: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
#[doc = " Get the current world AABB"]
pub fn b2Shape_GetAABB(shapeId: b2ShapeId) -> b2AABB;
#[doc = " Get the mass data for a shape"]
pub fn b2Shape_GetMassData(shapeId: b2ShapeId) -> b2MassData;
#[doc = " Get the closest point on a shape to a target point. Target and result are in world space.\n todo need sample"]
pub fn b2Shape_GetClosestPoint(shapeId: b2ShapeId, target: b2Vec2) -> b2Vec2;
#[doc = " Create a chain shape\n @see b2ChainDef for details"]
pub fn b2CreateChain(bodyId: b2BodyId, def: *const b2ChainDef) -> b2ChainId;
#[doc = " Destroy a chain shape"]
pub fn b2DestroyChain(chainId: b2ChainId);
#[doc = " Get the world that owns this chain shape"]
pub fn b2Chain_GetWorld(chainId: b2ChainId) -> b2WorldId;
#[doc = " Get the number of segments on this chain"]
pub fn b2Chain_GetSegmentCount(chainId: b2ChainId) -> ::std::os::raw::c_int;
#[doc = " Fill a user array with chain segment shape ids up to the specified capacity. Returns\n the actual number of segments returned."]
pub fn b2Chain_GetSegments(
chainId: b2ChainId,
segmentArray: *mut b2ShapeId,
capacity: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
#[doc = " Set the chain friction\n @see b2ChainDef::friction"]
pub fn b2Chain_SetFriction(chainId: b2ChainId, friction: f32);
#[doc = " Get the chain friction"]
pub fn b2Chain_GetFriction(chainId: b2ChainId) -> f32;
#[doc = " Set the chain restitution (bounciness)\n @see b2ChainDef::restitution"]
pub fn b2Chain_SetRestitution(chainId: b2ChainId, restitution: f32);
#[doc = " Get the chain restitution"]
pub fn b2Chain_GetRestitution(chainId: b2ChainId) -> f32;
#[doc = " Set the chain material\n @see b2ChainDef::material"]
pub fn b2Chain_SetMaterial(chainId: b2ChainId, material: ::std::os::raw::c_int);
#[doc = " Get the chain material"]
pub fn b2Chain_GetMaterial(chainId: b2ChainId) -> ::std::os::raw::c_int;
#[doc = " Chain identifier validation. Provides validation for up to 64K allocations."]
pub fn b2Chain_IsValid(id: b2ChainId) -> bool;
#[doc = " Destroy a joint"]
pub fn b2DestroyJoint(jointId: b2JointId);
#[doc = " Joint identifier validation. Provides validation for up to 64K allocations."]
pub fn b2Joint_IsValid(id: b2JointId) -> bool;
#[doc = " Get the joint type"]
pub fn b2Joint_GetType(jointId: b2JointId) -> b2JointType;
#[doc = " Get body A id on a joint"]
pub fn b2Joint_GetBodyA(jointId: b2JointId) -> b2BodyId;
#[doc = " Get body B id on a joint"]
pub fn b2Joint_GetBodyB(jointId: b2JointId) -> b2BodyId;
#[doc = " Get the world that owns this joint"]
pub fn b2Joint_GetWorld(jointId: b2JointId) -> b2WorldId;
#[doc = " Set the local anchor on bodyA"]
pub fn b2Joint_SetLocalAnchorA(jointId: b2JointId, localAnchor: b2Vec2);
#[doc = " Get the local anchor on bodyA"]
pub fn b2Joint_GetLocalAnchorA(jointId: b2JointId) -> b2Vec2;
#[doc = " Set the local anchor on bodyB"]
pub fn b2Joint_SetLocalAnchorB(jointId: b2JointId, localAnchor: b2Vec2);
#[doc = " Get the local anchor on bodyB"]
pub fn b2Joint_GetLocalAnchorB(jointId: b2JointId) -> b2Vec2;
#[doc = " Get the joint reference angle in radians (revolute, prismatic, and weld)"]
pub fn b2Joint_GetReferenceAngle(jointId: b2JointId) -> f32;
#[doc = " Set the joint reference angle in radians, must be in [-pi,pi]. (revolute, prismatic, and weld)"]
pub fn b2Joint_SetReferenceAngle(jointId: b2JointId, angleInRadians: f32);
#[doc = " Set the local axis on bodyA (prismatic and wheel)"]
pub fn b2Joint_SetLocalAxisA(jointId: b2JointId, localAxis: b2Vec2);
#[doc = " Get the local axis on bodyA (prismatic and wheel)"]
pub fn b2Joint_GetLocalAxisA(jointId: b2JointId) -> b2Vec2;
#[doc = " Toggle collision between connected bodies"]
pub fn b2Joint_SetCollideConnected(jointId: b2JointId, shouldCollide: bool);
#[doc = " Is collision allowed between connected bodies?"]
pub fn b2Joint_GetCollideConnected(jointId: b2JointId) -> bool;
#[doc = " Set the user data on a joint"]
pub fn b2Joint_SetUserData(jointId: b2JointId, userData: *mut ::std::os::raw::c_void);
#[doc = " Get the user data on a joint"]
pub fn b2Joint_GetUserData(jointId: b2JointId) -> *mut ::std::os::raw::c_void;
#[doc = " Wake the bodies connect to this joint"]
pub fn b2Joint_WakeBodies(jointId: b2JointId);
#[doc = " Get the current constraint force for this joint. Usually in Newtons."]
pub fn b2Joint_GetConstraintForce(jointId: b2JointId) -> b2Vec2;
#[doc = " Get the current constraint torque for this joint. Usually in Newton * meters."]
pub fn b2Joint_GetConstraintTorque(jointId: b2JointId) -> f32;
#[doc = " Get the current linear separation error for this joint. Does not consider admissible movement. Usually in meters."]
pub fn b2Joint_GetLinearSeparation(jointId: b2JointId) -> f32;
#[doc = " Get the current angular separation error for this joint. Does not consider admissible movement. Usually in meters."]
pub fn b2Joint_GetAngularSeparation(jointId: b2JointId) -> f32;
#[doc = " Get the joint constraint tuning. Advanced feature."]
pub fn b2Joint_GetConstraintTuning(jointId: b2JointId, hertz: *mut f32, dampingRatio: *mut f32);
#[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)"]
pub fn b2Joint_SetConstraintTuning(jointId: b2JointId, hertz: f32, dampingRatio: f32);
#[doc = " Create a distance joint\n @see b2DistanceJointDef for details"]
pub fn b2CreateDistanceJoint(worldId: b2WorldId, def: *const b2DistanceJointDef) -> b2JointId;
#[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"]
pub fn b2DistanceJoint_SetLength(jointId: b2JointId, length: f32);
#[doc = " Get the rest length of a distance joint"]
pub fn b2DistanceJoint_GetLength(jointId: b2JointId) -> f32;
#[doc = " Enable/disable the distance joint spring. When disabled the distance joint is rigid."]
pub fn b2DistanceJoint_EnableSpring(jointId: b2JointId, enableSpring: bool);
#[doc = " Is the distance joint spring enabled?"]
pub fn b2DistanceJoint_IsSpringEnabled(jointId: b2JointId) -> bool;
#[doc = " Set the spring stiffness in Hertz"]
pub fn b2DistanceJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
#[doc = " Set the spring damping ratio, non-dimensional"]
pub fn b2DistanceJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
#[doc = " Get the spring Hertz"]
pub fn b2DistanceJoint_GetSpringHertz(jointId: b2JointId) -> f32;
#[doc = " Get the spring damping ratio"]
pub fn b2DistanceJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
#[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."]
pub fn b2DistanceJoint_EnableLimit(jointId: b2JointId, enableLimit: bool);
#[doc = " Is the distance joint limit enabled?"]
pub fn b2DistanceJoint_IsLimitEnabled(jointId: b2JointId) -> bool;
#[doc = " Set the minimum and maximum length parameters of a distance joint"]
pub fn b2DistanceJoint_SetLengthRange(jointId: b2JointId, minLength: f32, maxLength: f32);
#[doc = " Get the distance joint minimum length"]
pub fn b2DistanceJoint_GetMinLength(jointId: b2JointId) -> f32;
#[doc = " Get the distance joint maximum length"]
pub fn b2DistanceJoint_GetMaxLength(jointId: b2JointId) -> f32;
#[doc = " Get the current length of a distance joint"]
pub fn b2DistanceJoint_GetCurrentLength(jointId: b2JointId) -> f32;
#[doc = " Enable/disable the distance joint motor"]
pub fn b2DistanceJoint_EnableMotor(jointId: b2JointId, enableMotor: bool);
#[doc = " Is the distance joint motor enabled?"]
pub fn b2DistanceJoint_IsMotorEnabled(jointId: b2JointId) -> bool;
#[doc = " Set the distance joint motor speed, usually in meters per second"]
pub fn b2DistanceJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: f32);
#[doc = " Get the distance joint motor speed, usually in meters per second"]
pub fn b2DistanceJoint_GetMotorSpeed(jointId: b2JointId) -> f32;
#[doc = " Set the distance joint maximum motor force, usually in newtons"]
pub fn b2DistanceJoint_SetMaxMotorForce(jointId: b2JointId, force: f32);
#[doc = " Get the distance joint maximum motor force, usually in newtons"]
pub fn b2DistanceJoint_GetMaxMotorForce(jointId: b2JointId) -> f32;
#[doc = " Get the distance joint current motor force, usually in newtons"]
pub fn b2DistanceJoint_GetMotorForce(jointId: b2JointId) -> f32;
#[doc = " Create a motor joint\n @see b2MotorJointDef for details"]
pub fn b2CreateMotorJoint(worldId: b2WorldId, def: *const b2MotorJointDef) -> b2JointId;
#[doc = " Set the motor joint linear offset target"]
pub fn b2MotorJoint_SetLinearOffset(jointId: b2JointId, linearOffset: b2Vec2);
#[doc = " Get the motor joint linear offset target"]
pub fn b2MotorJoint_GetLinearOffset(jointId: b2JointId) -> b2Vec2;
#[doc = " Set the motor joint angular offset target in radians. This angle will be unwound\n so the motor will drive along the shortest arc."]
pub fn b2MotorJoint_SetAngularOffset(jointId: b2JointId, angularOffset: f32);
#[doc = " Get the motor joint angular offset target in radians"]
pub fn b2MotorJoint_GetAngularOffset(jointId: b2JointId) -> f32;
#[doc = " Set the motor joint maximum force, usually in newtons"]
pub fn b2MotorJoint_SetMaxForce(jointId: b2JointId, maxForce: f32);
#[doc = " Get the motor joint maximum force, usually in newtons"]
pub fn b2MotorJoint_GetMaxForce(jointId: b2JointId) -> f32;
#[doc = " Set the motor joint maximum torque, usually in newton-meters"]
pub fn b2MotorJoint_SetMaxTorque(jointId: b2JointId, maxTorque: f32);
#[doc = " Get the motor joint maximum torque, usually in newton-meters"]
pub fn b2MotorJoint_GetMaxTorque(jointId: b2JointId) -> f32;
#[doc = " Set the motor joint correction factor, usually in [0, 1]"]
pub fn b2MotorJoint_SetCorrectionFactor(jointId: b2JointId, correctionFactor: f32);
#[doc = " Get the motor joint correction factor, usually in [0, 1]"]
pub fn b2MotorJoint_GetCorrectionFactor(jointId: b2JointId) -> f32;
#[doc = " Create a mouse joint\n @see b2MouseJointDef for details"]
pub fn b2CreateMouseJoint(worldId: b2WorldId, def: *const b2MouseJointDef) -> b2JointId;
#[doc = " Set the mouse joint target"]
pub fn b2MouseJoint_SetTarget(jointId: b2JointId, target: b2Vec2);
#[doc = " Get the mouse joint target"]
pub fn b2MouseJoint_GetTarget(jointId: b2JointId) -> b2Vec2;
#[doc = " Set the mouse joint spring stiffness in Hertz"]
pub fn b2MouseJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
#[doc = " Get the mouse joint spring stiffness in Hertz"]
pub fn b2MouseJoint_GetSpringHertz(jointId: b2JointId) -> f32;
#[doc = " Set the mouse joint spring damping ratio, non-dimensional"]
pub fn b2MouseJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
#[doc = " Get the mouse joint damping ratio, non-dimensional"]
pub fn b2MouseJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
#[doc = " Set the mouse joint maximum force, usually in newtons"]
pub fn b2MouseJoint_SetMaxForce(jointId: b2JointId, maxForce: f32);
#[doc = " Get the mouse joint maximum force, usually in newtons"]
pub fn b2MouseJoint_GetMaxForce(jointId: b2JointId) -> f32;
#[doc = " Create a filter joint.\n @see b2FilterJointDef for details"]
pub fn b2CreateFilterJoint(worldId: b2WorldId, def: *const b2FilterJointDef) -> b2JointId;
#[doc = " Create a prismatic (slider) joint.\n @see b2PrismaticJointDef for details"]
pub fn b2CreatePrismaticJoint(worldId: b2WorldId, def: *const b2PrismaticJointDef) -> b2JointId;
#[doc = " Enable/disable the joint spring."]
pub fn b2PrismaticJoint_EnableSpring(jointId: b2JointId, enableSpring: bool);
#[doc = " Is the prismatic joint spring enabled or not?"]
pub fn b2PrismaticJoint_IsSpringEnabled(jointId: b2JointId) -> bool;
#[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."]
pub fn b2PrismaticJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
#[doc = " Get the prismatic joint stiffness in Hertz"]
pub fn b2PrismaticJoint_GetSpringHertz(jointId: b2JointId) -> f32;
#[doc = " Set the prismatic joint damping ratio (non-dimensional)"]
pub fn b2PrismaticJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
#[doc = " Get the prismatic spring damping ratio (non-dimensional)"]
pub fn b2PrismaticJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
#[doc = " Set the prismatic joint spring target angle, usually in meters"]
pub fn b2PrismaticJoint_SetTargetTranslation(jointId: b2JointId, translation: f32);
#[doc = " Get the prismatic joint spring target translation, usually in meters"]
pub fn b2PrismaticJoint_GetTargetTranslation(jointId: b2JointId) -> f32;
#[doc = " Enable/disable a prismatic joint limit"]
pub fn b2PrismaticJoint_EnableLimit(jointId: b2JointId, enableLimit: bool);
#[doc = " Is the prismatic joint limit enabled?"]
pub fn b2PrismaticJoint_IsLimitEnabled(jointId: b2JointId) -> bool;
#[doc = " Get the prismatic joint lower limit"]
pub fn b2PrismaticJoint_GetLowerLimit(jointId: b2JointId) -> f32;
#[doc = " Get the prismatic joint upper limit"]
pub fn b2PrismaticJoint_GetUpperLimit(jointId: b2JointId) -> f32;
#[doc = " Set the prismatic joint limits"]
pub fn b2PrismaticJoint_SetLimits(jointId: b2JointId, lower: f32, upper: f32);
#[doc = " Enable/disable a prismatic joint motor"]
pub fn b2PrismaticJoint_EnableMotor(jointId: b2JointId, enableMotor: bool);
#[doc = " Is the prismatic joint motor enabled?"]
pub fn b2PrismaticJoint_IsMotorEnabled(jointId: b2JointId) -> bool;
#[doc = " Set the prismatic joint motor speed, usually in meters per second"]
pub fn b2PrismaticJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: f32);
#[doc = " Get the prismatic joint motor speed, usually in meters per second"]
pub fn b2PrismaticJoint_GetMotorSpeed(jointId: b2JointId) -> f32;
#[doc = " Set the prismatic joint maximum motor force, usually in newtons"]
pub fn b2PrismaticJoint_SetMaxMotorForce(jointId: b2JointId, force: f32);
#[doc = " Get the prismatic joint maximum motor force, usually in newtons"]
pub fn b2PrismaticJoint_GetMaxMotorForce(jointId: b2JointId) -> f32;
#[doc = " Get the prismatic joint current motor force, usually in newtons"]
pub fn b2PrismaticJoint_GetMotorForce(jointId: b2JointId) -> f32;
#[doc = " Get the current joint translation, usually in meters."]
pub fn b2PrismaticJoint_GetTranslation(jointId: b2JointId) -> f32;
#[doc = " Get the current joint translation speed, usually in meters per second."]
pub fn b2PrismaticJoint_GetSpeed(jointId: b2JointId) -> f32;
#[doc = " Create a revolute joint\n @see b2RevoluteJointDef for details"]
pub fn b2CreateRevoluteJoint(worldId: b2WorldId, def: *const b2RevoluteJointDef) -> b2JointId;
#[doc = " Enable/disable the revolute joint spring"]
pub fn b2RevoluteJoint_EnableSpring(jointId: b2JointId, enableSpring: bool);
#[doc = " It the revolute angular spring enabled?"]
pub fn b2RevoluteJoint_IsSpringEnabled(jointId: b2JointId) -> bool;
#[doc = " Set the revolute joint spring stiffness in Hertz"]
pub fn b2RevoluteJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
#[doc = " Get the revolute joint spring stiffness in Hertz"]
pub fn b2RevoluteJoint_GetSpringHertz(jointId: b2JointId) -> f32;
#[doc = " Set the revolute joint spring damping ratio, non-dimensional"]
pub fn b2RevoluteJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
#[doc = " Get the revolute joint spring damping ratio, non-dimensional"]
pub fn b2RevoluteJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
#[doc = " Set the revolute joint spring target angle, radians"]
pub fn b2RevoluteJoint_SetTargetAngle(jointId: b2JointId, angle: f32);
#[doc = " Get the revolute joint spring target angle, radians"]
pub fn b2RevoluteJoint_GetTargetAngle(jointId: b2JointId) -> f32;
#[doc = " Get the revolute joint current angle in radians relative to the reference angle\n @see b2RevoluteJointDef::referenceAngle"]
pub fn b2RevoluteJoint_GetAngle(jointId: b2JointId) -> f32;
#[doc = " Enable/disable the revolute joint limit"]
pub fn b2RevoluteJoint_EnableLimit(jointId: b2JointId, enableLimit: bool);
#[doc = " Is the revolute joint limit enabled?"]
pub fn b2RevoluteJoint_IsLimitEnabled(jointId: b2JointId) -> bool;
#[doc = " Get the revolute joint lower limit in radians"]
pub fn b2RevoluteJoint_GetLowerLimit(jointId: b2JointId) -> f32;
#[doc = " Get the revolute joint upper limit in radians"]
pub fn b2RevoluteJoint_GetUpperLimit(jointId: b2JointId) -> f32;
#[doc = " Set the revolute joint limits in radians. It is expected that lower <= upper\n and that -0.99 * B2_PI <= lower && upper <= -0.99 * B2_PI."]
pub fn b2RevoluteJoint_SetLimits(jointId: b2JointId, lower: f32, upper: f32);
#[doc = " Enable/disable a revolute joint motor"]
pub fn b2RevoluteJoint_EnableMotor(jointId: b2JointId, enableMotor: bool);
#[doc = " Is the revolute joint motor enabled?"]
pub fn b2RevoluteJoint_IsMotorEnabled(jointId: b2JointId) -> bool;
#[doc = " Set the revolute joint motor speed in radians per second"]
pub fn b2RevoluteJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: f32);
#[doc = " Get the revolute joint motor speed in radians per second"]
pub fn b2RevoluteJoint_GetMotorSpeed(jointId: b2JointId) -> f32;
#[doc = " Get the revolute joint current motor torque, usually in newton-meters"]
pub fn b2RevoluteJoint_GetMotorTorque(jointId: b2JointId) -> f32;
#[doc = " Set the revolute joint maximum motor torque, usually in newton-meters"]
pub fn b2RevoluteJoint_SetMaxMotorTorque(jointId: b2JointId, torque: f32);
#[doc = " Get the revolute joint maximum motor torque, usually in newton-meters"]
pub fn b2RevoluteJoint_GetMaxMotorTorque(jointId: b2JointId) -> f32;
#[doc = " Create a weld joint\n @see b2WeldJointDef for details"]
pub fn b2CreateWeldJoint(worldId: b2WorldId, def: *const b2WeldJointDef) -> b2JointId;
#[doc = " Set the weld joint linear stiffness in Hertz. 0 is rigid."]
pub fn b2WeldJoint_SetLinearHertz(jointId: b2JointId, hertz: f32);
#[doc = " Get the weld joint linear stiffness in Hertz"]
pub fn b2WeldJoint_GetLinearHertz(jointId: b2JointId) -> f32;
#[doc = " Set the weld joint linear damping ratio (non-dimensional)"]
pub fn b2WeldJoint_SetLinearDampingRatio(jointId: b2JointId, dampingRatio: f32);
#[doc = " Get the weld joint linear damping ratio (non-dimensional)"]
pub fn b2WeldJoint_GetLinearDampingRatio(jointId: b2JointId) -> f32;
#[doc = " Set the weld joint angular stiffness in Hertz. 0 is rigid."]
pub fn b2WeldJoint_SetAngularHertz(jointId: b2JointId, hertz: f32);
#[doc = " Get the weld joint angular stiffness in Hertz"]
pub fn b2WeldJoint_GetAngularHertz(jointId: b2JointId) -> f32;
#[doc = " Set weld joint angular damping ratio, non-dimensional"]
pub fn b2WeldJoint_SetAngularDampingRatio(jointId: b2JointId, dampingRatio: f32);
#[doc = " Get the weld joint angular damping ratio, non-dimensional"]
pub fn b2WeldJoint_GetAngularDampingRatio(jointId: b2JointId) -> f32;
#[doc = " Create a wheel joint\n @see b2WheelJointDef for details"]
pub fn b2CreateWheelJoint(worldId: b2WorldId, def: *const b2WheelJointDef) -> b2JointId;
#[doc = " Enable/disable the wheel joint spring"]
pub fn b2WheelJoint_EnableSpring(jointId: b2JointId, enableSpring: bool);
#[doc = " Is the wheel joint spring enabled?"]
pub fn b2WheelJoint_IsSpringEnabled(jointId: b2JointId) -> bool;
#[doc = " Set the wheel joint stiffness in Hertz"]
pub fn b2WheelJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
#[doc = " Get the wheel joint stiffness in Hertz"]
pub fn b2WheelJoint_GetSpringHertz(jointId: b2JointId) -> f32;
#[doc = " Set the wheel joint damping ratio, non-dimensional"]
pub fn b2WheelJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
#[doc = " Get the wheel joint damping ratio, non-dimensional"]
pub fn b2WheelJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
#[doc = " Enable/disable the wheel joint limit"]
pub fn b2WheelJoint_EnableLimit(jointId: b2JointId, enableLimit: bool);
#[doc = " Is the wheel joint limit enabled?"]
pub fn b2WheelJoint_IsLimitEnabled(jointId: b2JointId) -> bool;
#[doc = " Get the wheel joint lower limit"]
pub fn b2WheelJoint_GetLowerLimit(jointId: b2JointId) -> f32;
#[doc = " Get the wheel joint upper limit"]
pub fn b2WheelJoint_GetUpperLimit(jointId: b2JointId) -> f32;
#[doc = " Set the wheel joint limits"]
pub fn b2WheelJoint_SetLimits(jointId: b2JointId, lower: f32, upper: f32);
#[doc = " Enable/disable the wheel joint motor"]
pub fn b2WheelJoint_EnableMotor(jointId: b2JointId, enableMotor: bool);
#[doc = " Is the wheel joint motor enabled?"]
pub fn b2WheelJoint_IsMotorEnabled(jointId: b2JointId) -> bool;
#[doc = " Set the wheel joint motor speed in radians per second"]
pub fn b2WheelJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: f32);
#[doc = " Get the wheel joint motor speed in radians per second"]
pub fn b2WheelJoint_GetMotorSpeed(jointId: b2JointId) -> f32;
#[doc = " Set the wheel joint maximum motor torque, usually in newton-meters"]
pub fn b2WheelJoint_SetMaxMotorTorque(jointId: b2JointId, torque: f32);
#[doc = " Get the wheel joint maximum motor torque, usually in newton-meters"]
pub fn b2WheelJoint_GetMaxMotorTorque(jointId: b2JointId) -> f32;
#[doc = " Get the wheel joint current motor torque, usually in newton-meters"]
pub fn b2WheelJoint_GetMotorTorque(jointId: b2JointId) -> f32;
}