Class B3
- Namespace
- Box3D.Native
- Assembly
- Box3D.NET.Native.dll
The Box3D C API, one method per exported function.
public static class B3Inheritance
Inherited Members
Remarks
Every method here corresponds to a B3_API declaration in the Box3D
headers and keeps its C name, so the binding can be checked against the
header by inspection and so Box3D's own documentation applies verbatim.
The B3_INLINE helpers in the headers are not exported from the shared
library and therefore cannot be bound. They are reimplemented in
Box3D.Native.B3Math and Box3D.Native.Ids.
This class performs no validation and manages no lifetimes. Passing an
invalid identifier or violating an ownership rule is undefined behaviour that
will usually crash the process rather than raise an exception. Prefer the
Box3D namespace of the Box3D.NET package unless you need something it
does not yet expose.
Methods
- GetHeightFieldHeightSpan(b3HeightFieldData*)
-
Gets the compressed heights of a height field as a span.
- GetHullEdgeSpan(b3HullData*)
-
Gets the half-edges of a convex hull as a span.
- GetHullPlaneSpan(b3HullData*)
-
Gets the face planes of a convex hull as a span.
- GetHullPointSpan(b3HullData*)
-
Gets the points of a convex hull as a span.
- GetMeshTriangleSpan(b3MeshData*)
-
Gets the triangles of a mesh as a span.
- GetMeshVertexSpan(b3MeshData*)
-
Gets the vertices of a mesh as a span.
- b3Atan2(float, float)
-
Computes an approximate arctangent in the range minus pi to pi.
- b3Body_AllowFastRotation(b3BodyId, NativeBool)
-
Allow this body to rotate fast. Useful for axially symmetric bodies, such as vehicle wheels. Normally rotation speed is clamped to improve CCD. However, this clamping is unnecessary for bodies that only rotate fast around an axis of symmetry.
- b3Body_ApplyAngularImpulse(b3BodyId, Vector3, NativeBool)
-
Apply an angular impulse in world space. The impulse is ignored if the body is not awake. This optionally wakes the body.
- b3Body_ApplyForce(b3BodyId, Vector3, Vector3, NativeBool)
-
Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. This optionally wakes up the body. The force is ignored if the body is not awake.
- b3Body_ApplyForceToCenter(b3BodyId, Vector3, NativeBool)
-
Apply a force to the center of mass. This optionally wakes up the body. The force is ignored if the body is not awake.
- b3Body_ApplyLinearImpulse(b3BodyId, Vector3, Vector3, NativeBool)
-
Apply an impulse at a point. This immediately modifies the velocity. It also modifies the angular velocity if the point of application is not at the center of mass. This optionally wakes the body. The impulse is ignored if the body is not awake.
- b3Body_ApplyLinearImpulseToCenter(b3BodyId, Vector3, NativeBool)
-
Apply an impulse to the center of mass. This immediately modifies the velocity. The impulse is ignored if the body is not awake. This optionally wakes the body.
- b3Body_ApplyMassFromShapes(b3BodyId)
-
This updates the mass properties to the sum of the mass properties of the shapes. This normally does not need to be called unless you called SetMassData to override the mass and you later want to reset the mass. You may also use this when automatic mass computation has been disabled. You should call this regardless of body type.
- b3Body_ApplyTorque(b3BodyId, Vector3, NativeBool)
-
Apply a torque. This affects the angular velocity without affecting the linear velocity. This optionally wakes the body. The torque is ignored if the body is not awake.
- b3Body_CastRay(b3BodyId, Vector3, Vector3, b3QueryFilter, float, b3Transform)
-
Cast a ray at a specific body using a specified body transform.
- b3Body_CastShape(b3BodyId, Vector3, b3ShapeProxy*, Vector3, b3QueryFilter, float, NativeBool, b3Transform)
-
Cast a shape at a specific body using a specified body transform.
- b3Body_CollideMover(b3BodyId, b3BodyPlaneResult*, int, Vector3, b3Capsule*, b3QueryFilter, b3Transform)
-
Collide a character mover with a specific body using a specified body transform.
- b3Body_ComputeAABB(b3BodyId)
-
Get the current world AABB that contains all the attached shapes. Note that this may not encompass the body origin. If there are no shapes attached then the returned AABB is empty and centered on the body origin.
- b3Body_Disable(b3BodyId)
-
Disable a body by removing it completely from the simulation. This is expensive.
- b3Body_Enable(b3BodyId)
-
Enable a body by adding it to the simulation. This is expensive.
- b3Body_EnableContactRecycling(b3BodyId, NativeBool)
-
Enable or disable contact recycling for this body. Contact recycling is a performance optimization that reuses contact manifolds when bodies move slightly. Disabling it can avoid ghost collisions on characters at the cost of higher per-step work. Existing contacts retain their prior setting; only contacts created after this call see the new value.
- b3Body_EnableHitEvents(b3BodyId, NativeBool)
-
Enable/disable hit events on all shapes
- b3Body_EnableSleep(b3BodyId, NativeBool)
-
Enable or disable sleeping for this body. If sleeping is disabled the body will wake.
- b3Body_GetAngularDamping(b3BodyId)
-
Get the current angular damping.
- b3Body_GetAngularVelocity(b3BodyId)
-
Get the angular velocity of a body in radians per second.
- b3Body_GetClosestPoint(b3BodyId, Vector3*, Vector3)
-
Get the closest point on a body to a world target.
- b3Body_GetContactCapacity(b3BodyId)
-
Get the maximum capacity required for retrieving all the touching contacts on a body
- b3Body_GetContactData(b3BodyId, b3ContactData*, int)
-
Get the touching contact data for a body
- b3Body_GetGravityScale(b3BodyId)
-
Get the current gravity scale
- b3Body_GetInverseMass(b3BodyId)
-
Get the inverse mass of the body, usually in 1/kilograms
- b3Body_GetJointCount(b3BodyId)
-
Get the number of joints on this body
- b3Body_GetJoints(b3BodyId, b3JointId*, int)
-
Get the joint ids for all joints on this body, up to the provided capacity
- b3Body_GetLinearDamping(b3BodyId)
-
Get the current linear damping.
- b3Body_GetLinearVelocity(b3BodyId)
-
Get the linear velocity of a body's center of mass. Usually in meters per second.
- b3Body_GetLocalCenter(b3BodyId)
-
Get the center of mass position of the body in local space
- b3Body_GetLocalPoint(b3BodyId, Vector3)
-
Get a local point on a body given a world point.
- b3Body_GetLocalPointVelocity(b3BodyId, Vector3)
-
Get the linear velocity of a local point attached to a body. Usually in meters per second.
- b3Body_GetLocalRotationalInertia(b3BodyId)
-
Get the rotational inertia of the body in local space, usually in kg*m^2
- b3Body_GetLocalVector(b3BodyId, Vector3)
-
Get a local vector on a body given a world vector.
- b3Body_GetMass(b3BodyId)
-
Get the mass of the body, usually in kilograms
- b3Body_GetMassData(b3BodyId)
-
Get the mass data for a body
- b3Body_GetMotionLocks(b3BodyId)
-
Get the motion locks for this body.
- b3Body_GetName(b3BodyId)
-
Get the body name. Returns an empty string if the name isn't set.
- b3Body_GetPosition(b3BodyId)
-
Get the world position of a body. This is the location of the body origin.
- b3Body_GetRotation(b3BodyId)
-
Get the world rotation of a body as a quaternion
- b3Body_GetShapeCount(b3BodyId)
-
Get the number of shapes on this body
- b3Body_GetShapes(b3BodyId, b3ShapeId*, int)
-
Get the shape ids for all shapes on this body, up to the provided capacity.
- b3Body_GetSleepThreshold(b3BodyId)
-
Get the sleep threshold, usually in meters per second.
- b3Body_GetTransform(b3BodyId)
-
Get the world transform of a body.
- b3Body_GetType(b3BodyId)
-
Get the body type: static, kinematic, or dynamic
- b3Body_GetUserData(b3BodyId)
-
Get the user data stored in a body
- b3Body_GetWorld(b3BodyId)
-
Get the world that owns this body
- b3Body_GetWorldCenter(b3BodyId)
-
Get the center of mass position of the body in world space
- b3Body_GetWorldInverseRotationalInertia(b3BodyId)
-
Get the inverse rotational inertia of the body in world space, usually in 1/kg*m^2
- b3Body_GetWorldPoint(b3BodyId, Vector3)
-
Get a world point on a body given a local point.
- b3Body_GetWorldPointVelocity(b3BodyId, Vector3)
-
Get the linear velocity of a world point attached to a body. Usually in meters per second.
- b3Body_GetWorldVector(b3BodyId, Vector3)
-
Get a world vector on a body given a local vector.
- b3Body_IsAwake(b3BodyId)
-
See the Box3D documentation.
- b3Body_IsBullet(b3BodyId)
-
Is this body a bullet?
- b3Body_IsContactRecyclingEnabled(b3BodyId)
-
Is contact recycling enabled on this body?
- b3Body_IsEnabled(b3BodyId)
-
Returns true if this body is enabled
- b3Body_IsFastRotationAllowed(b3BodyId)
-
Is this body allowed to rotate fast?
- b3Body_IsSleepEnabled(b3BodyId)
-
Returns true if sleeping is enabled for this body
- b3Body_IsValid(b3BodyId)
-
Body identifier validation. A valid body exists in a world and is non-null. This can be used to detect orphaned ids. Provides validation for up to 64K allocations.
- b3Body_OverlapShape(b3BodyId, Vector3, b3ShapeProxy*, b3QueryFilter, b3Transform)
-
Overlap a shape with a specific body using a specified body transform.
- b3Body_SetAngularDamping(b3BodyId, float)
-
Adjust the angular damping. Normally this is set in b3BodyDef before creation.
- b3Body_SetAngularVelocity(b3BodyId, Vector3)
-
Set the angular velocity of a body in radians per second.
- b3Body_SetAwake(b3BodyId, NativeBool)
-
Wake a body from sleep. This wakes the entire island the body is touching.
- b3Body_SetBullet(b3BodyId, NativeBool)
-
Set this body to be a bullet. A bullet does continuous collision detection against dynamic bodies (but not other bullets).
- b3Body_SetGravityScale(b3BodyId, float)
-
Adjust the gravity scale. Normally this is set in b3BodyDef before creation.
- b3Body_SetLinearDamping(b3BodyId, float)
-
Adjust the linear damping. Normally this is set in b3BodyDef before creation.
- b3Body_SetLinearVelocity(b3BodyId, Vector3)
-
Set the linear velocity of a body at the center of mass. Usually in meters per second.
- b3Body_SetMassData(b3BodyId, b3MassData)
-
Override the body's mass properties. Normally this is computed automatically using the shape geometry and density. This information is lost if a shape is added or removed or if the body type changes.
- b3Body_SetMotionLocks(b3BodyId, b3MotionLocks)
-
Set the motion locks on this body.
- b3Body_SetName(b3BodyId, byte*)
-
Set the body name.
- b3Body_SetSleepThreshold(b3BodyId, float)
-
Set the sleep threshold, usually in meters per second
- b3Body_SetTargetTransform(b3BodyId, b3Transform, float, NativeBool)
-
Set the velocity to reach the given transform after a given time step. The result will be close but maybe not exact. This is meant for kinematic bodies. The target is not applied if the velocity would be below the sleep threshold. This will optionally wake the body if asleep, but only if the movement is significant.
- b3Body_SetTransform(b3BodyId, Vector3, Quaternion)
-
Set the world transform of a body. This acts as a teleport and is fairly expensive.
- b3Body_SetType(b3BodyId, b3BodyType)
-
Change the body type. This is an expensive operation. This automatically updates the mass properties regardless of the automatic mass setting.
- b3Body_SetUserData(b3BodyId, void*)
-
Set the user data for a body
- b3ClipVector(Vector3, b3CollisionPlane*, int)
-
Clips the velocity against the given collision planes. Planes with zero push or clipVelocity set to false are skipped.
- b3CloneAndTransformHull(b3HullData*, b3Transform, Vector3)
-
Clone and transform a hull. Supports non-uniform and mirroring scale.
- b3CloneHull(b3HullData*)
-
Deep clone a hull.
- b3CollideCapsuleAndSphere(b3LocalManifold*, int, b3Capsule*, b3Sphere*, b3Transform)
-
Collide a capsule and a sphere.
- b3CollideCapsules(b3LocalManifold*, int, b3Capsule*, b3Capsule*, b3Transform)
-
Collide two capsules.
- b3CollideHullAndCapsule(b3LocalManifold*, int, b3HullData*, b3Capsule*, b3Transform, b3SimplexCache*)
-
Collide a hull and a capsule.
- b3CollideHullAndSphere(b3LocalManifold*, int, b3HullData*, b3Sphere*, b3Transform, b3SimplexCache*)
-
Collide a hull and a sphere.
- b3CollideHulls(b3LocalManifold*, int, b3HullData*, b3HullData*, b3Transform, b3SATCache*)
-
Collide two hulls.
- b3CollideSpheres(b3LocalManifold*, int, b3Sphere*, b3Sphere*, b3Transform)
-
Collide two spheres.
- b3CollideTriangleAndCapsule(b3LocalManifold*, int, Vector3*, b3Capsule*, b3SimplexCache*)
-
Collide a triangle and capsule. Normal points from triangle to capsule.
- b3CollideTriangleAndHull(b3LocalManifold*, int, Vector3, Vector3, Vector3, int, b3HullData*, b3SATCache*, NativeBool)
-
Collide a triangle and hull. Normal points from triangle to hull.
- b3CollideTriangleAndSphere(b3LocalManifold*, int, Vector3*, b3Sphere*)
-
Collide a triangle and sphere. Normal points from triangle to sphere.
- b3ComputeCapsuleAABB(b3Capsule*, b3Transform)
-
Compute the bounding box of a transformed capsule
- b3ComputeCapsuleMass(b3Capsule*, float)
-
Compute mass properties of a capsule
- b3ComputeCompoundAABB(b3CompoundData*, b3Transform)
-
Compute the bounding box of a compound
- b3ComputeCosSin(float)
-
Computes the cosine and sine of an angle, deterministically across platforms.
- b3ComputeHeightFieldAABB(b3HeightFieldData*, b3Transform)
-
Compute the bounding box of a transformed height-field
- b3ComputeHullAABB(b3HullData*, b3Transform)
-
Compute the bounding box of a transformed hull
- b3ComputeHullMass(b3HullData*, float)
-
Compute mass properties of a hull
- b3ComputeMeshAABB(b3MeshData*, b3Transform, Vector3)
-
Compute the bounding box of a transformed mesh. Scale may be non-uniform and have negative components.
- b3ComputeQuatBetweenUnitVectors(Vector3, Vector3)
-
Computes the shortest rotation taking one unit vector to another.
- b3ComputeSphereAABB(b3Sphere*, b3Transform)
-
Compute the bounding box of a transformed sphere
- b3ComputeSphereMass(b3Sphere*, float)
-
Compute mass properties of a sphere
- b3Contact_GetData(b3ContactId)
-
Get the manifolds for a contact. The manifold may have no points if the contact is not touching.
- b3Contact_IsValid(b3ContactId)
-
Contact identifier validation. Provides validation for up to 2^32 allocations.
- b3ConvertBytesToCompound(byte*, int)
-
Cast the provided bytes to compound data, setting up internal pointers. Use this after de-serializing the compound bytes.
- b3ConvertCompoundToBytes(b3CompoundData*)
-
Cast the provided compound data to bytes, setting the internal pointers to null. Use this before serializing the compound bytes.
- b3CreateBakedCompoundShape(b3BodyId, b3ShapeDef*, b3CompoundData*)
-
Baked compound shapes are only allowed on static bodies. Note: runtime compounds are achieved by adding multiple shapes to a body. Runtime compounds can be dynamic and/or kinematic.
- b3CreateBody(b3WorldId, b3BodyDef*)
-
Create a rigid body given a definition. No reference to the definition is retained. So you can create the definition on the stack and pass it as a pointer. @code{.c} b3BodyDef bodyDef = b3DefaultBodyDef(); b3BodyId myBodyId = b3CreateBody(myWorldId, &bodyDef); @endcode
- b3CreateBoxMesh(Vector3, Vector3, NativeBool)
-
Create a box mesh.
- b3CreateCapsuleShape(b3BodyId, b3ShapeDef*, b3Capsule*)
-
Create a capsule shape and attach it to a body. The shape definition and geometry are fully cloned. Contacts are not created until the next time step.
- b3CreateCompound(b3CompoundDef*)
-
Create a compound shape. All input data in the definition is cloned into the resulting compound.
- b3CreateCone(float, float, float, int)
-
Create a tessellated cone as a hull.
- b3CreateCylinder(float, float, float, int)
-
Create a tessellated cylinder as a hull.
- b3CreateDistanceJoint(b3WorldId, b3DistanceJointDef*)
-
Create a distance joint
- b3CreateFilterJoint(b3WorldId, b3FilterJointDef*)
-
Create a filter joint.
- b3CreateGrid(int, int, Vector3, NativeBool)
-
Create a grid as a height field.
- b3CreateGridMesh(int, int, float, int, NativeBool)
-
Create a grid mesh along the x and z axes.
- b3CreateHeightField(b3HeightFieldDef*)
-
Create a generic height field.
- b3CreateHeightFieldShape(b3BodyId, b3ShapeDef*, b3HeightFieldData*)
-
Create a height-field shape and attach it to a body. The shape definition is fully cloned but the height field is not. Contacts are not created until the next time step. Height field is only allowed on static bodies.
- b3CreateHollowBoxMesh(Vector3, Vector3)
-
Create a hollow box mesh.
- b3CreateHull(Vector3*, int, int)
-
Create a generic convex hull.
- b3CreateHullShape(b3BodyId, b3ShapeDef*, b3HullData*)
-
Create a convex hull shape and attach it to a body. The shape definition is fully cloned. Contacts are not created until the next time step.
- b3CreateMesh(b3MeshDef*, int*, int)
-
Create a generic mesh.
- b3CreateMeshShape(b3BodyId, b3ShapeDef*, b3MeshData*, Vector3)
-
Create a mesh hull shape and attach it to a body. The shape definition is fully cloned but the mesh is not. Contacts are not created until the next time step. Mesh collision only creates contacts on static bodies.
- b3CreateMotorJoint(b3WorldId, b3MotorJointDef*)
-
Create a motor joint
- b3CreateParallelJoint(b3WorldId, b3ParallelJointDef*)
-
Create a parallel joint
- b3CreatePlatformMesh(Vector3, float, float, float)
-
Create a platform mesh. A truncated pyramid.
- b3CreatePrismaticJoint(b3WorldId, b3PrismaticJointDef*)
-
Create a prismatic (slider) joint.
- b3CreateRecording(int)
-
Create a recording buffer with an optional initial byte capacity. Pass 0 to use the default (64 KiB). The buffer grows on demand.
- b3CreateRevoluteJoint(b3WorldId, b3RevoluteJointDef*)
-
Create a revolute joint
- b3CreateRock(float)
-
Create a rock shaped hull.
- b3CreateSphereShape(b3BodyId, b3ShapeDef*, b3Sphere*)
-
Create a circle shape and attach it to a body. The shape definition and geometry are fully cloned. Contacts are not created until the next time step.
- b3CreateSphericalJoint(b3WorldId, b3SphericalJointDef*)
-
Create a spherical joint
- b3CreateTorusMesh(int, int, float, float)
-
Create a torus mesh.
- b3CreateTransformedHullShape(b3BodyId, b3ShapeDef*, b3HullData*, b3Transform, Vector3)
-
Create a convex hull shape and attach it to a body. The hull is cloned then transformed with scale applied first. Use this for non-uniform or mirrored scale or a baked local transform. The baked result is shared through the world hull database. The shape definition and geometry are fully cloned. Contacts are not created until the next time step.
- b3CreateWave(int, int, Vector3, float, float, NativeBool)
-
Create a wave grid as a height field.
- b3CreateWaveMesh(int, int, float, float, float, float)
-
Create a wave mesh along the x and z axes.
- b3CreateWeldJoint(b3WorldId, b3WeldJointDef*)
-
Create a weld joint
- b3CreateWheelJoint(b3WorldId, b3WheelJointDef*)
-
Create a wheel joint.
- b3CreateWorld(b3WorldDef*)
-
Create a world for rigid body simulation. A world contains bodies, shapes, and constraints. You may create up to 128 worlds. Each world is completely independent and may be simulated in parallel.
- b3DefaultBodyDef()
-
Use this to initialize your body definition @ingroup body
- b3DefaultDebugDraw()
-
Create a debug draw struct with default values.
- b3DefaultDistanceJointDef()
-
Use this to initialize your joint definition @ingroup distance_joint
- b3DefaultExplosionDef()
-
Use this to initialize your explosion definition @ingroup world
- b3DefaultFilter()
-
Use this to initialize your filter @ingroup shape
- b3DefaultFilterJointDef()
-
Use this to initialize your joint definition @ingroup filter_joint
- b3DefaultMotorJointDef()
-
Use this to initialize your joint definition @ingroup motor_joint
- b3DefaultParallelJointDef()
-
Use this to initialize your joint definition @ingroup parallel_joint
- b3DefaultPrismaticJointDef()
-
Use this to initialize your joint definition @ingroup prismatic_joint
- b3DefaultQueryFilter()
-
Use this to initialize your query filter
- b3DefaultRevoluteJointDef()
-
Use this to initialize your joint definition. @ingroup revolute_joint
- b3DefaultShapeDef()
-
Use this to initialize your shape definition @ingroup shape
- b3DefaultSphericalJointDef()
-
Use this to initialize your joint definition. @ingroup spherical_joint
- b3DefaultSurfaceMaterial()
-
Use this to initialize your surface material @ingroup shape
- b3DefaultWeldJointDef()
-
Use this to initialize your joint definition @ingroup weld_joint
- b3DefaultWheelJointDef()
-
Use this to initialize your joint definition @ingroup wheel_joint
- b3DefaultWorldDef()
-
Use this to initialize your world definition @ingroup world
- b3DestroyBody(b3BodyId)
-
Destroy a rigid body given an id. This destroys all shapes and joints attached to the body. Do not keep references to the associated shapes and joints.
- b3DestroyCompound(b3CompoundData*)
-
Destroy a compound shape.
- b3DestroyHeightField(b3HeightFieldData*)
-
Destroy a height field.
- b3DestroyHull(b3HullData*)
-
Destroy a hull.
- b3DestroyJoint(b3JointId, NativeBool)
-
Destroy a joint
- b3DestroyMesh(b3MeshData*)
-
Destroy a mesh.
- b3DestroyRecording(b3Recording*)
-
Destroy a recording and free its buffer.
- b3DestroyShape(b3ShapeId, NativeBool)
-
Destroy a shape. You may defer the body mass update which can improve performance if several shapes on a body are destroyed at once.
- b3DestroyWorld(b3WorldId)
-
Destroy a world
- b3DistanceJoint_EnableLimit(b3JointId, NativeBool)
-
Enable joint limit. The limit only works if the joint spring is enabled. Otherwise the joint is rigid and the limit has no effect.
- b3DistanceJoint_EnableMotor(b3JointId, NativeBool)
-
Enable/disable the distance joint motor
- b3DistanceJoint_EnableSpring(b3JointId, NativeBool)
-
Enable/disable the distance joint spring. When disabled the distance joint is rigid.
- b3DistanceJoint_GetCurrentLength(b3JointId)
-
Get the current length of a distance joint
- b3DistanceJoint_GetLength(b3JointId)
-
Get the rest length of a distance joint
- b3DistanceJoint_GetMaxLength(b3JointId)
-
Get the distance joint maximum length
- b3DistanceJoint_GetMaxMotorForce(b3JointId)
-
Get the distance joint maximum motor force, usually in newtons
- b3DistanceJoint_GetMinLength(b3JointId)
-
Get the distance joint minimum length
- b3DistanceJoint_GetMotorForce(b3JointId)
-
Get the distance joint current motor force, usually in newtons
- b3DistanceJoint_GetMotorSpeed(b3JointId)
-
Get the distance joint motor speed, usually in meters per second
- b3DistanceJoint_GetSpringDampingRatio(b3JointId)
-
Get the spring damping ratio
- b3DistanceJoint_GetSpringForceRange(b3JointId, float*, float*)
-
Get the force range for the spring.
- b3DistanceJoint_GetSpringHertz(b3JointId)
-
Get the spring Hertz
- b3DistanceJoint_IsLimitEnabled(b3JointId)
-
Is the distance joint limit enabled?
- b3DistanceJoint_IsMotorEnabled(b3JointId)
-
Is the distance joint motor enabled?
- b3DistanceJoint_IsSpringEnabled(b3JointId)
-
Is the distance joint spring enabled?
- b3DistanceJoint_SetLength(b3JointId, float)
-
Set the rest length of a distance joint
- b3DistanceJoint_SetLengthRange(b3JointId, float, float)
-
Set the minimum and maximum length parameters of a distance joint
- b3DistanceJoint_SetMaxMotorForce(b3JointId, float)
-
Set the distance joint maximum motor force, usually in newtons
- b3DistanceJoint_SetMotorSpeed(b3JointId, float)
-
Set the distance joint motor speed, usually in meters per second
- b3DistanceJoint_SetSpringDampingRatio(b3JointId, float)
-
Set the spring damping ratio, non-dimensional
- b3DistanceJoint_SetSpringForceRange(b3JointId, float, float)
-
Set the force range for the spring.
- b3DistanceJoint_SetSpringHertz(b3JointId, float)
-
Set the spring stiffness in Hertz
- b3DumpHeightData(b3HeightFieldDef*, byte*)
-
Save input height data to a file
- b3DynamicTree_BoxCast(b3DynamicTree*, b3BoxCastInput*, ulong, NativeBool, delegate* unmanaged[Cdecl]<b3BoxCastInput*, int, ulong, void*, float>, void*)
-
Sweep an AABB through the tree. The box is in the tree's world float frame and the callback re-differences each shape at full precision against the query origin. Used by the large world spatial queries so the tree traversal stays float while the narrow phase stays precise.
- b3DynamicTree_Create(int)
-
Constructing the tree initializes the node pool.
- b3DynamicTree_CreateProxy(b3DynamicTree*, b3AABB, ulong, ulong)
-
Create a proxy. Provide an AABB and a userData value.
- b3DynamicTree_Destroy(b3DynamicTree*)
-
Destroy the tree, freeing the node pool.
- b3DynamicTree_DestroyProxy(b3DynamicTree*, int)
-
Destroy a proxy. This asserts if the id is invalid.
- b3DynamicTree_EnlargeProxy(b3DynamicTree*, int, b3AABB)
-
Enlarge a proxy and enlarge ancestors as necessary.
- b3DynamicTree_GetAABB(b3DynamicTree*, int)
-
Gets the bounding box of a tree proxy.
- b3DynamicTree_GetAreaRatio(b3DynamicTree*)
-
Get the ratio of the sum of the node areas to the root area.
- b3DynamicTree_GetByteCount(b3DynamicTree*)
-
Get the number of bytes used by this tree
- b3DynamicTree_GetCategoryBits(b3DynamicTree*, int)
-
Get the category bits on a proxy.
- b3DynamicTree_GetHeight(b3DynamicTree*)
-
Get the height of the binary tree.
- b3DynamicTree_GetProxyCount(b3DynamicTree*)
-
Get the number of proxies created
- b3DynamicTree_GetRootBounds(b3DynamicTree*)
-
Get the bounding box that contains the entire tree
- b3DynamicTree_GetUserData(b3DynamicTree*, int)
-
Gets the user data of a tree proxy.
- b3DynamicTree_Load(byte*, float)
-
Load a file for debugging
- b3DynamicTree_MoveProxy(b3DynamicTree*, int, b3AABB)
-
Move a proxy to a new AABB by removing and reinserting into the tree.
- b3DynamicTree_Query(b3DynamicTree*, b3AABB, ulong, NativeBool, delegate* unmanaged[Cdecl]<int, ulong, void*, NativeBool>, void*)
-
Query an AABB for overlapping proxies. The callback function is called for each proxy that overlaps the supplied AABB.
- b3DynamicTree_QueryClosest(b3DynamicTree*, Vector3, ulong, NativeBool, delegate* unmanaged[Cdecl]<float, int, ulong, void*, float>, void*, float*)
-
Query an AABB for the closest object. The callback function is called for each proxy that might be closest to the supplied point.
- b3DynamicTree_RayCast(b3DynamicTree*, b3RayCastInput*, ulong, NativeBool, delegate* unmanaged[Cdecl]<b3RayCastInput*, int, ulong, void*, float>, void*)
-
Ray cast against the proxies in the tree. This relies on the callback to perform an exact ray cast in the case where the proxy contains a shape. The callback also performs any collision filtering. This has performance roughly equal to k * log(n), where k is the number of collisions and n is the number of proxies in the tree. Bit-wise filtering using mask bits can greatly improve performance in some scenarios. However, this filtering may be approximate, so the user should still apply filtering to results.
- b3DynamicTree_Rebuild(b3DynamicTree*, NativeBool)
-
Rebuild the tree while retaining subtrees that haven't changed. Returns the number of boxes sorted.
- b3DynamicTree_Save(b3DynamicTree*, byte*)
-
Save this tree to a file for debugging
- b3DynamicTree_SetCategoryBits(b3DynamicTree*, int, ulong)
-
Modify the category bits on a proxy. This is an expensive operation.
- b3DynamicTree_Validate(b3DynamicTree*)
-
Validate this tree. For testing.
- b3DynamicTree_ValidateNoEnlarged(b3DynamicTree*)
-
Validate this tree has no enlarged AABBs. For testing.
- b3GetByteCount()
-
Gets the total number of bytes currently allocated by Box3D.
- b3GetCompoundCapsule(b3CompoundData*, int)
-
Access a child capsule by index.
- b3GetCompoundChild(b3CompoundData*, int)
-
Get a child shape of a compound.
- b3GetCompoundHull(b3CompoundData*, int)
-
Access a child hull by index.
- b3GetCompoundMaterials(b3CompoundData*)
-
Access the compound material array.
- b3GetCompoundMesh(b3CompoundData*, int)
-
Access a child mesh by index.
- b3GetCompoundSphere(b3CompoundData*, int)
-
Access a child sphere by index.
- b3GetGraphColor(int)
-
Gets the visualization colour of a constraint graph colour slot.
- b3GetHeight(b3MeshData*)
-
Get the height of the mesh BVH.
- b3GetHeightFieldCompressedHeights(b3HeightFieldData*)
-
Gets the compressed heights of a height field.
- b3GetHeightFieldFlags(b3HeightFieldData*)
-
Gets the per-triangle flags of a height field.
- b3GetHeightFieldMaterialIndices(b3HeightFieldData*)
-
Gets the per-cell material indices of a height field.
- b3GetHullEdges(b3HullData*)
-
Gets the half-edges of a convex hull.
- b3GetHullFaces(b3HullData*)
-
Gets the faces of a convex hull.
- b3GetHullPlanes(b3HullData*)
-
Gets the face planes of a convex hull.
- b3GetHullPoints(b3HullData*)
-
Gets the points of a convex hull.
- b3GetHullSoaNormals(b3HullData*)
-
Gets the structure-of-arrays face normals of a convex hull.
- b3GetHullSoaVertices(b3HullData*)
-
Gets the structure-of-arrays vertex data of a convex hull: every x, then every y, then every z.
- b3GetHullVertices(b3HullData*)
-
Gets the vertices of a convex hull.
- b3GetLengthUnitsPerMeter()
-
Gets the current number of length units per metre.
- b3GetMaxWorldCount()
-
Get the maximum number of simultaneous worlds that have been created
- b3GetMeshFlags(b3MeshData*)
-
Gets the per-triangle adjacency flags of a mesh.
- b3GetMeshMaterialIndices(b3MeshData*)
-
Gets the per-triangle material indices of a mesh.
- b3GetMeshNodes(b3MeshData*)
-
Gets the bounding volume hierarchy nodes of a mesh.
- b3GetMeshTriangles(b3MeshData*)
-
Gets the triangles of a mesh.
- b3GetMeshVertices(b3MeshData*)
-
Gets the vertices of a mesh.
- b3GetMilliseconds(ulong)
-
Gets the milliseconds elapsed since an earlier tick value.
- b3GetMillisecondsAndReset(ref ulong)
-
Gets the milliseconds elapsed since an earlier tick value and resets it to now.
- b3GetStallThreshold()
-
Gets the threshold, in seconds, above which a stall is logged.
- b3GetSweepTransform(b3Sweep*, float)
-
Evaluate the transform sweep at a specific time.
- b3GetTicks()
-
Gets the absolute number of system ticks. The unit is platform specific.
- b3GetVersion()
-
Gets the version of the loaded Box3D library.
- b3GetWorldCount()
-
Get the current number of worlds
- b3Hash(uint, byte*, int)
-
Computes a djb2 hash, used for determinism testing.
- b3IsBoundedAABB(b3AABB)
-
Determines whether a bounding box lies reasonably close to the origin.
- b3IsDoublePrecision()
-
Gets a value indicating whether the library was built with
BOX3D_DOUBLE_PRECISION, also known as large world mode. - b3IsSaneAABB(b3AABB)
-
Determines whether a bounding box is both valid and bounded.
- b3IsValidAABB(b3AABB)
-
Determines whether a bounding box is valid, meaning finite with the upper bound at least the lower bound.
- b3IsValidFloat(float)
-
Determines whether a number is neither NaN nor infinite.
- b3IsValidMatrix3(b3Matrix3)
-
Determines whether a matrix is neither NaN nor infinite.
- b3IsValidPlane(b3Plane)
-
Determines whether a plane is valid, meaning finite with a normalized normal.
- b3IsValidPosition(Vector3)
-
Determines whether a world position is neither NaN nor infinite.
- b3IsValidQuat(Quaternion)
-
Determines whether a quaternion is valid and normalized.
- b3IsValidRay(b3RayCastInput*)
-
Use this to ensure your ray cast input is valid and avoid internal assertions.
- b3IsValidTransform(b3Transform)
-
Determines whether a transform is valid and its rotation normalized.
- b3IsValidVec3(Vector3)
-
Determines whether a vector is neither NaN nor infinite.
- b3IsValidWorldTransform(b3Transform)
-
Determines whether a world transform is valid and its rotation normalized.
- b3Joint_GetAngularSeparation(b3JointId)
-
Get the current angular separation error for this joint. Does not consider admissible movement. Usually in radians.
- b3Joint_GetBodyA(b3JointId)
-
Get body A id on a joint
- b3Joint_GetBodyB(b3JointId)
-
Get body B id on a joint
- b3Joint_GetCollideConnected(b3JointId)
-
Is collision allowed between connected bodies?
- b3Joint_GetConstraintForce(b3JointId)
-
Get the current constraint force for this joint
- b3Joint_GetConstraintTorque(b3JointId)
-
Get the current constraint torque for this joint
- b3Joint_GetConstraintTuning(b3JointId, float*, float*)
-
Get the joint constraint tuning. Advanced feature.
- b3Joint_GetForceThreshold(b3JointId)
-
Get the force threshold for joint events (Newtons)
- b3Joint_GetLinearSeparation(b3JointId)
-
Get the current linear separation error for this joint. Does not consider admissible movement. Usually in meters.
- b3Joint_GetLocalFrameA(b3JointId)
-
Get the local frame on bodyA
- b3Joint_GetLocalFrameB(b3JointId)
-
Get the local frame on bodyB
- b3Joint_GetTorqueThreshold(b3JointId)
-
Get the torque threshold for joint events (N-m)
- b3Joint_GetType(b3JointId)
-
Get the joint type
- b3Joint_GetUserData(b3JointId)
-
Get the user data on a joint
- b3Joint_GetWorld(b3JointId)
-
Get the world that owns this joint
- b3Joint_IsValid(b3JointId)
-
Joint identifier validation. Provides validation for up to 64K allocations.
- b3Joint_SetCollideConnected(b3JointId, NativeBool)
-
Toggle collision between connected bodies
- b3Joint_SetConstraintTuning(b3JointId, float, float)
-
Set the joint constraint tuning. Advanced feature.
- b3Joint_SetForceThreshold(b3JointId, float)
-
Set the force threshold for joint events (Newtons)
- b3Joint_SetLocalFrameA(b3JointId, b3Transform)
-
Set the local frame on bodyA
- b3Joint_SetLocalFrameB(b3JointId, b3Transform)
-
Set the local frame on bodyB
- b3Joint_SetTorqueThreshold(b3JointId, float)
-
Set the torque threshold for joint events (N-m)
- b3Joint_SetUserData(b3JointId, void*)
-
Set the user data on a joint
- b3Joint_WakeBodies(b3JointId)
-
Wake the bodies connect to this joint
- b3LineDistance(Vector3, Vector3, Vector3, Vector3)
-
Computes the closest points on two infinite lines.
- b3LoadHeightField(byte*)
-
Create a height field by loading a previously saved height data
- b3LoadRecordingFromFile(byte*)
-
Load a recording from a file. Returns NULL on failure (file not found, wrong magic). The caller owns the returned recording and must destroy it with b3DestroyRecording.
- b3MakeBoxHull(float, float, float)
-
Make a box as a hull. Do not call b3DestroyHull on this.
- b3MakeCubeHull(float)
-
Make a cube as a hull. Do not call b3DestroyHull on this.
- b3MakeDebugColor(b3HexColor, b3DebugMaterial)
-
Packs an RGB colour together with a debug draw material preset. Port of the inline
b3MakeDebugColor. - b3MakeOffsetBoxHull(float, float, float, Vector3)
-
Make an offset box as a hull. Do not call b3DestroyHull on this.
- b3MakeQuatFromMatrix(b3Matrix3*)
-
Builds a quaternion from a rotation matrix.
- b3MakeScaledBoxHull(Vector3, b3Transform, Vector3)
-
This makes a transformed box hull with post scaling. This is useful for boxes that are scaled in a level editor. Such scaling can have reflection and shear. In the case of shear the result may be approximate. If you need to support shear consider using b3CreateHull. Do not call b3DestroyHull on this.
- b3MakeTransformedBoxHull(float, float, float, b3Transform)
-
Make a transformed box as a hull. Do not call b3DestroyHull on this.
- b3MotorJoint_GetAngularDampingRatio(b3JointId)
-
Get the spring angular damping ratio.
- b3MotorJoint_GetAngularHertz(b3JointId)
-
Get the spring angular hertz stiffness
- b3MotorJoint_GetAngularVelocity(b3JointId)
-
Get the desired relative angular velocity in radians per second
- b3MotorJoint_GetLinearDampingRatio(b3JointId)
-
Get the spring linear damping ratio.
- b3MotorJoint_GetLinearHertz(b3JointId)
-
Get the spring linear hertz stiffness
- b3MotorJoint_GetLinearVelocity(b3JointId)
-
Get the desired relative linear velocity in meters per second
- b3MotorJoint_GetMaxSpringForce(b3JointId)
-
Get the maximum spring force in newtons.
- b3MotorJoint_GetMaxSpringTorque(b3JointId)
-
Get the maximum spring torque in newtons * meters
- b3MotorJoint_GetMaxVelocityForce(b3JointId)
-
Get the motor joint maximum force, usually in newtons
- b3MotorJoint_GetMaxVelocityTorque(b3JointId)
-
Get the motor joint maximum torque, usually in newton-meters
- b3MotorJoint_SetAngularDampingRatio(b3JointId, float)
-
Set the spring angular damping ratio. Use 1.0 for critical damping.
- b3MotorJoint_SetAngularHertz(b3JointId, float)
-
Set the spring angular hertz stiffness
- b3MotorJoint_SetAngularVelocity(b3JointId, Vector3)
-
Set the desired relative angular velocity in radians per second
- b3MotorJoint_SetLinearDampingRatio(b3JointId, float)
-
Set the spring linear damping ratio. Use 1.0 for critical damping.
- b3MotorJoint_SetLinearHertz(b3JointId, float)
-
Set the spring linear hertz stiffness
- b3MotorJoint_SetLinearVelocity(b3JointId, Vector3)
-
Set the desired relative linear velocity in meters per second
- b3MotorJoint_SetMaxSpringForce(b3JointId, float)
-
Set the maximum spring force in newtons.
- b3MotorJoint_SetMaxSpringTorque(b3JointId, float)
-
Set the maximum spring torque in newtons * meters
- b3MotorJoint_SetMaxVelocityForce(b3JointId, float)
-
Set the motor joint maximum force, usually in newtons
- b3MotorJoint_SetMaxVelocityTorque(b3JointId, float)
-
Set the motor joint maximum torque, usually in newton-meters
- b3OverlapCapsule(b3Capsule*, b3Transform, b3ShapeProxy*)
-
Overlap shape versus capsule
- b3OverlapCompound(b3CompoundData*, b3Transform, b3ShapeProxy*)
-
Overlap shape versus compound
- b3OverlapHeightField(b3HeightFieldData*, b3Transform, b3ShapeProxy*)
-
Overlap shape versus height field
- b3OverlapHull(b3HullData*, b3Transform, b3ShapeProxy*)
-
Overlap shape versus hull
- b3OverlapMesh(b3Mesh*, b3Transform, b3ShapeProxy*)
-
Overlap shape versus mesh
- b3OverlapSphere(b3Sphere*, b3Transform, b3ShapeProxy*)
-
Overlap shape versus sphere
- b3ParallelJoint_GetMaxTorque(b3JointId)
-
Get the maximum spring torque, usually in newton-meters
- b3ParallelJoint_GetSpringDampingRatio(b3JointId)
-
Get the spring damping ratio
- b3ParallelJoint_GetSpringHertz(b3JointId)
-
Get the spring Hertz
- b3ParallelJoint_SetMaxTorque(b3JointId, float)
-
Set the maximum spring torque, usually in newton-meters
- b3ParallelJoint_SetSpringDampingRatio(b3JointId, float)
-
Set the spring damping ratio, non-dimensional
- b3ParallelJoint_SetSpringHertz(b3JointId, float)
-
Set the spring stiffness in Hertz
- b3PointToSegmentDistance(Vector3, Vector3, Vector3)
-
Computes the closest point on the segment from
atob. - b3PrismaticJoint_EnableLimit(b3JointId, NativeBool)
-
Enable/disable a prismatic joint limit
- b3PrismaticJoint_EnableMotor(b3JointId, NativeBool)
-
Enable/disable a prismatic joint motor
- b3PrismaticJoint_EnableSpring(b3JointId, NativeBool)
-
Enable/disable the joint spring.
- b3PrismaticJoint_GetLowerLimit(b3JointId)
-
Get the prismatic joint lower limit
- b3PrismaticJoint_GetMaxMotorForce(b3JointId)
-
Get the prismatic joint maximum motor force, usually in newtons
- b3PrismaticJoint_GetMotorForce(b3JointId)
-
Get the prismatic joint current motor force, usually in newtons
- b3PrismaticJoint_GetMotorSpeed(b3JointId)
-
Get the prismatic joint motor speed, usually in meters per second
- b3PrismaticJoint_GetSpeed(b3JointId)
-
Get the current joint translation speed, usually in meters per second.
- b3PrismaticJoint_GetSpringDampingRatio(b3JointId)
-
Get the prismatic spring damping ratio (non-dimensional)
- b3PrismaticJoint_GetSpringHertz(b3JointId)
-
Get the prismatic joint stiffness in Hertz
- b3PrismaticJoint_GetTargetTranslation(b3JointId)
-
Get the prismatic joint target translation. Usually in meters.
- b3PrismaticJoint_GetTranslation(b3JointId)
-
Get the current joint translation, usually in meters.
- b3PrismaticJoint_GetUpperLimit(b3JointId)
-
Get the prismatic joint upper limit
- b3PrismaticJoint_IsLimitEnabled(b3JointId)
-
Is the prismatic joint limit enabled?
- b3PrismaticJoint_IsMotorEnabled(b3JointId)
-
Is the prismatic joint motor enabled?
- b3PrismaticJoint_IsSpringEnabled(b3JointId)
-
Is the prismatic joint spring enabled or not?
- b3PrismaticJoint_SetLimits(b3JointId, float, float)
-
Set the prismatic joint limits
- b3PrismaticJoint_SetMaxMotorForce(b3JointId, float)
-
Set the prismatic joint maximum motor force, usually in newtons
- b3PrismaticJoint_SetMotorSpeed(b3JointId, float)
-
Set the prismatic joint motor speed, usually in meters per second
- b3PrismaticJoint_SetSpringDampingRatio(b3JointId, float)
-
Set the prismatic joint damping ratio (non-dimensional)
- b3PrismaticJoint_SetSpringHertz(b3JointId, float)
-
Set the prismatic joint stiffness in Hertz. This should usually be less than a quarter of the simulation rate. For example, if the simulation runs at 60Hz then the joint stiffness should be 15Hz or less.
- b3PrismaticJoint_SetTargetTranslation(b3JointId, float)
-
Set the prismatic joint target translation. Usually in meters.
- b3QueryCompound(b3CompoundData*, b3AABB, delegate* unmanaged[Cdecl]<b3CompoundData*, int, void*, NativeBool>, void*)
-
Query a compound shape for children that overlap an AABB.
- b3QueryHeightField(b3HeightFieldData*, b3AABB, delegate* unmanaged[Cdecl]<Vector3, Vector3, Vector3, int, void*, NativeBool>, void*)
-
Query a height field for triangles overlapping a bounding box in local space. May have false positives. Useful for debug draw.
- b3QueryMesh(b3Mesh*, b3AABB, delegate* unmanaged[Cdecl]<Vector3, Vector3, Vector3, int, void*, NativeBool>, void*)
-
Query a mesh for triangles overlapping a bounding box in local space. May have false positives. Useful for debug draw.
- b3RayCastCapsule(b3Capsule*, b3RayCastInput*)
-
Ray cast versus capsule in local space. A zero length ray is a point query. Initial overlap reports a hit at the ray origin with zero fraction and zero normal.
- b3RayCastCompound(b3CompoundData*, b3RayCastInput*)
-
Ray cast versus compound in local space. A zero length ray is a point query. Initial overlap with a child reports a hit at the ray origin with zero fraction and zero normal.
- b3RayCastHeightField(b3HeightFieldData*, b3RayCastInput*)
-
Ray cast versus height field in local space. A thin surface with no interior, so there is no overlap case.
- b3RayCastHollowSphere(b3Sphere*, b3RayCastInput*)
-
Ray cast versus a hollow sphere shell in local space. Unlike the solid sphere a ray starting inside is not an overlap: it passes through and hits the far wall.
- b3RayCastHull(b3HullData*, b3RayCastInput*)
-
Ray cast versus hull shape in local space. A zero length ray is a point query. Initial overlap reports a hit at the ray origin with zero fraction and zero normal.
- b3RayCastMesh(b3Mesh*, b3RayCastInput*)
-
Ray cast versus mesh in local space. A thin surface with no interior, so there is no overlap case.
- b3RayCastSphere(b3Sphere*, b3RayCastInput*)
-
Ray cast versus sphere in local space. A zero length ray is a point query. Initial overlap reports a hit at the ray origin with zero fraction and zero normal.
- b3RecPlayer_Create(void*, int, int)
-
Create a player over a recording. Owns a private copy of the bytes.
- b3RecPlayer_Destroy(b3RecPlayer*)
-
Destroy the player and free all memory. Restores the previous global length scale.
- b3RecPlayer_DrawFrameQueries(b3RecPlayer*, b3DebugDraw*, int, int)
-
Draw the spatial queries recorded during the most recently replayed frame, layered on top of the world. Call after b3World_Draw. NULL draw function pointers are skipped.
- b3RecPlayer_GetBodyCount(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetBodyId(b3RecPlayer*, int)
-
Resolve a creation ordinal to the live body id at the current frame.
- b3RecPlayer_GetDivergeFrame(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetFrame(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetFrameCount(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetFrameQuery(b3RecPlayer*, int)
-
Get a recorded query from the most recently replayed frame by index.
- b3RecPlayer_GetFrameQueryCount(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetFrameQueryHit(b3RecPlayer*, int, int)
-
Get one result of a recorded query from the most recently replayed frame.
- b3RecPlayer_GetInfo(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetKeyframeBudget(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetKeyframeBytes(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetKeyframeInterval(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetKeyframeMinInterval(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_GetWorldId(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_HasDiverged(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_IsAtEnd(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_IsAtPreStep(b3RecPlayer*)
-
See the Box3D documentation.
- b3RecPlayer_Restart(b3RecPlayer*)
-
Rewind to frame 0 (in-place restore so the world id stays stable).
- b3RecPlayer_SeekFrame(b3RecPlayer*, int)
-
Seek to a specific frame. Forward seek steps op-by-op; backward seek restores the nearest keyframe then re-steps the remaining gap.
- b3RecPlayer_SetDebugShapeCallbacks(b3RecPlayer*, delegate* unmanaged[Cdecl]<b3DebugShape*, void*, void*>, delegate* unmanaged[Cdecl]<void*, void*, void>, void*)
-
Wire host debug-shape callbacks into the player's replay world so a renderer can build per-shape draw resources (the 3D sample needs this or the replay world draws nothing). Rebuilds the current world under the new callbacks and rewinds to frame 0, so call it once right after b3RecPlayer_Create and re-read the world id afterward. The callbacks persist across Restart and backward seeks, which recreate the world internally.
- b3RecPlayer_SetKeyframePolicy(b3RecPlayer*, nuint, int)
-
Tune the keyframe ring used to speed up backward seeking. A keyframe is a periodic snapshot the player restores from instead of replaying from the start, trading memory for seek speed.
- b3RecPlayer_SetWorkerCount(b3RecPlayer*, int)
-
Set the worker count of the replay world. Clamped to [1, B3_MAX_WORKERS]. Applied to the live world at once and reused whenever the player rebuilds its world on Restart or a backward seek. Replaying at a different count than recorded re-partitions the constraint graph, so the StateHash check becomes a cross-thread determinism test.
- b3RecPlayer_StepFrame(b3RecPlayer*)
-
Advance one frame. dispatch ops until the next Step completes.
- b3RecPlayer_SubStepFrame(b3RecPlayer*)
-
Sub-step one frame. This will sub-step and return immediately after body creation. The next call will execute the time step. This allows bodies to be rendered at the creation pose.
- b3Recording_GetData(b3Recording*)
-
Get a pointer to the raw recording bytes. Valid until the recording buffer is modified or destroyed.
- b3Recording_GetSize(b3Recording*)
-
Get the number of bytes currently in the recording buffer.
- b3RevoluteJoint_EnableLimit(b3JointId, NativeBool)
-
Enable/disable the revolute joint limit
- b3RevoluteJoint_EnableMotor(b3JointId, NativeBool)
-
Enable/disable a revolute joint motor
- b3RevoluteJoint_EnableSpring(b3JointId, NativeBool)
-
Enable/disable the revolute joint spring
- b3RevoluteJoint_GetAngle(b3JointId)
-
Get the revolute joint current angle in radians relative to the reference angle
- b3RevoluteJoint_GetLowerLimit(b3JointId)
-
Get the revolute joint lower limit in radians
- b3RevoluteJoint_GetMaxMotorTorque(b3JointId)
-
Get the revolute joint maximum motor torque, usually in newton-meters
- b3RevoluteJoint_GetMotorSpeed(b3JointId)
-
Get the revolute joint motor speed in radians per second
- b3RevoluteJoint_GetMotorTorque(b3JointId)
-
Get the revolute joint current motor torque, usually in newton-meters
- b3RevoluteJoint_GetSpringDampingRatio(b3JointId)
-
Get the revolute joint spring damping ratio, non-dimensional
- b3RevoluteJoint_GetSpringHertz(b3JointId)
-
Get the revolute joint spring stiffness in Hertz
- b3RevoluteJoint_GetTargetAngle(b3JointId)
-
Get the revolute joint target angle in radians
- b3RevoluteJoint_GetUpperLimit(b3JointId)
-
Get the revolute joint upper limit in radians
- b3RevoluteJoint_IsLimitEnabled(b3JointId)
-
Is the revolute joint limit enabled?
- b3RevoluteJoint_IsMotorEnabled(b3JointId)
-
Is the revolute joint motor enabled?
- b3RevoluteJoint_IsSpringEnabled(b3JointId)
-
Is the revolute angular spring enabled?
- b3RevoluteJoint_SetLimits(b3JointId, float, float)
-
Set the revolute joint limits in radians
- b3RevoluteJoint_SetMaxMotorTorque(b3JointId, float)
-
Set the revolute joint maximum motor torque, usually in newton-meters
- b3RevoluteJoint_SetMotorSpeed(b3JointId, float)
-
Set the revolute joint motor speed in radians per second
- b3RevoluteJoint_SetSpringDampingRatio(b3JointId, float)
-
Set the revolute joint spring damping ratio, non-dimensional
- b3RevoluteJoint_SetSpringHertz(b3JointId, float)
-
Set the revolute joint spring stiffness in Hertz
- b3RevoluteJoint_SetTargetAngle(b3JointId, float)
-
Set the revolute joint target angle in radians
- b3SaveRecordingToFile(b3Recording*, byte*)
-
Save the recording buffer to a file. Returns true on success.
- b3ScaleBox(Vector3*, b3Transform*, Vector3, float)
-
This takes a box with a transform and post scale and converts it into a box with the post scale resolved with new half-widths and transform. This accepts non-uniform and negative scale. This is approximate if there is shear.
- b3SegmentDistance(Vector3, Vector3, Vector3, Vector3)
-
Computes the closest points on two line segments.
- b3SetAllocator(delegate* unmanaged[Cdecl]<int, int, void*>, delegate* unmanaged[Cdecl]<void*, void>)
-
Overrides the allocation functions. Must be called during application startup.
- b3SetAssertFcn(delegate* unmanaged[Cdecl]<byte*, byte*, int, int>)
-
Overrides the assertion callback.
- b3SetLengthUnitsPerMeter(float)
-
Sets the number of length units per metre. The default is one.
- b3SetLogFcn(delegate* unmanaged[Cdecl]<byte*, void>)
-
Overrides the logging callback, which Box3D uses to report warnings.
- b3SetStallThreshold(float)
-
Sets the threshold, in seconds, above which a stall is logged.
- b3ShapeCast(b3ShapeCastPairInput*)
-
Perform a linear shape cast of shape B moving and shape A fixed. Determines the hit point, normal, and translation fraction. The query runs in frame A, so the hit point and normal are returned in frame A. Initially touching shapes are a miss.
- b3ShapeCastCapsule(b3Capsule*, b3ShapeCastInput*)
-
Shape cast versus a capsule. Initial overlap is treated as a miss.
- b3ShapeCastCompound(b3CompoundData*, b3ShapeCastInput*)
-
Shape cast versus compound. Initial overlap is treated as a miss.
- b3ShapeCastHeightField(b3HeightFieldData*, b3ShapeCastInput*)
-
Shape cast versus a height field. Initial overlap is treated as a miss.
- b3ShapeCastHull(b3HullData*, b3ShapeCastInput*)
-
Shape cast versus a hull. Initial overlap is treated as a miss.
- b3ShapeCastMesh(b3Mesh*, b3ShapeCastInput*)
-
Shape cast versus a mesh. Initial overlap is treated as a miss.
- b3ShapeCastSphere(b3Sphere*, b3ShapeCastInput*)
-
Shape cast versus a sphere. Initial overlap is treated as a miss.
- b3ShapeDistance(b3DistanceInput*, b3SimplexCache*, b3Simplex*, int)
-
Compute the closest points between two shapes represented as point clouds. b3SimplexCache cache is input/output. On the first call set b3SimplexCache.count to zero. The query runs in frame A, so the witness points and normal are returned in frame A. The underlying GJK algorithm may be debugged by passing in debug simplexes and capacity. You may pass in NULL and 0 for these.
- b3Shape_ApplyWind(b3ShapeId, Vector3, float, float, float, NativeBool)
-
Apply a wind force to the body for this shape using the density of air. This considers the projected area of the shape in the wind direction. This also considers the relative velocity of the shape.
- b3Shape_AreContactEventsEnabled(b3ShapeId)
-
Returns true if contact events are enabled
- b3Shape_AreHitEventsEnabled(b3ShapeId)
-
Returns true if hit events are enabled
- b3Shape_ArePreSolveEventsEnabled(b3ShapeId)
-
Returns true if pre-solve events are enabled
- b3Shape_AreSensorEventsEnabled(b3ShapeId)
-
Returns true if sensor events are enabled
- b3Shape_ComputeMassData(b3ShapeId)
-
Compute the mass data for a shape
- b3Shape_EnableContactEvents(b3ShapeId, NativeBool)
-
Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors.
- b3Shape_EnableHitEvents(b3ShapeId, NativeBool)
-
Enable contact hit events for this shape. Ignored for sensors.
- b3Shape_EnablePreSolveEvents(b3ShapeId, NativeBool)
-
Enable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive and must be carefully handled due to multithreading. Ignored for sensors.
- b3Shape_EnableSensorEvents(b3ShapeId, NativeBool)
-
Enable sensor events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors.
- b3Shape_GetAABB(b3ShapeId)
-
Get the current world AABB
- b3Shape_GetBody(b3ShapeId)
-
Get the id of the body that a shape is attached to
- b3Shape_GetCapsule(b3ShapeId)
-
Get a copy of the shape's capsule. Asserts the type is correct.
- b3Shape_GetClosestPoint(b3ShapeId, Vector3)
-
Get the closest point on a shape to a target point. Target and result are in world space.
- b3Shape_GetContactCapacity(b3ShapeId)
-
Get the maximum capacity required for retrieving all the touching contacts on a shape
- b3Shape_GetContactData(b3ShapeId, b3ContactData*, int)
-
Get the touching contact data for a shape. The provided shapeId will be either shapeIdA or shapeIdB on the contact data.
- b3Shape_GetDensity(b3ShapeId)
-
Get the density of a shape, usually in kg/m^3
- b3Shape_GetFilter(b3ShapeId)
-
Get the shape filter
- b3Shape_GetFriction(b3ShapeId)
-
Get the friction of a shape
- b3Shape_GetHeightField(b3ShapeId)
-
Get the shape's height field. Asserts the type is correct.
- b3Shape_GetHull(b3ShapeId)
-
Get the shape's convex hull. Asserts the type is correct.
- b3Shape_GetMesh(b3ShapeId)
-
Get the shape's mesh. Asserts the type is correct.
- b3Shape_GetMeshMaterialCount(b3ShapeId)
-
Get the number of mesh surface materials.
- b3Shape_GetMeshSurfaceMaterial(b3ShapeId, int)
-
Get a surface material for a mesh shape
- b3Shape_GetName(b3ShapeId)
-
Get the shape name. Returns an empty string if the name isn't set.
- b3Shape_GetRestitution(b3ShapeId)
-
Get the shape restitution
- b3Shape_GetSensorCapacity(b3ShapeId)
-
Get the maximum capacity required for retrieving all the overlapped shapes on a sensor shape. This returns 0 if the provided shape is not a sensor.
- b3Shape_GetSensorData(b3ShapeId, b3ShapeId*, int)
-
Get the overlap data for a sensor shape.
- b3Shape_GetSphere(b3ShapeId)
-
Get a copy of the shape's sphere. Asserts the type is correct.
- b3Shape_GetSurfaceMaterial(b3ShapeId)
-
Get the base shape surface material.
- b3Shape_GetType(b3ShapeId)
-
Get the type of a shape
- b3Shape_GetUserData(b3ShapeId)
-
Get the user data for a shape. This is useful when you get a shape id from an event or query.
- b3Shape_GetWorld(b3ShapeId)
-
Get the world that owns this shape
- b3Shape_IsSensor(b3ShapeId)
-
Returns true if the shape is a sensor
- b3Shape_IsValid(b3ShapeId)
-
Shape identifier validation. Provides validation for up to 64K allocations.
- b3Shape_RayCast(b3ShapeId, Vector3, Vector3)
-
Ray cast a shape directly. The ray runs from origin to origin + translation and the hit point comes back as a world position, so the cast stays precise far from the world origin.
- b3Shape_SetCapsule(b3ShapeId, b3Capsule*)
-
Allows you to change a shape to be a capsule or update the current capsule. This does not modify the mass properties.
- b3Shape_SetDensity(b3ShapeId, float, NativeBool)
-
Set the mass density of a shape, usually in kg/m^3. This will optionally update the mass properties on the parent body.
- b3Shape_SetFilter(b3ShapeId, b3Filter, NativeBool)
-
Set the current filter. This is almost as expensive as recreating the shape.
- b3Shape_SetFriction(b3ShapeId, float)
-
Set the friction on a shape
- b3Shape_SetHull(b3ShapeId, b3HullData*)
-
Allows you to change a shape to be a hull or update the current hull. This does not modify the mass properties.
- b3Shape_SetMesh(b3ShapeId, b3MeshData*, Vector3)
-
Allows you to change a shape to be a mesh or update the current mesh. This does not modify the mass properties.
- b3Shape_SetMeshMaterial(b3ShapeId, b3SurfaceMaterial, int)
-
Set a surface material for a mesh shape.
- b3Shape_SetName(b3ShapeId, byte*)
-
Set the shape name.
- b3Shape_SetRestitution(b3ShapeId, float)
-
Set the shape restitution (bounciness)
- b3Shape_SetSphere(b3ShapeId, b3Sphere*)
-
Allows you to change a shape to be a sphere or update the current sphere. This does not modify the mass properties.
- b3Shape_SetSurfaceMaterial(b3ShapeId, b3SurfaceMaterial)
-
Set the shape base surface material. Does not change per triangle materials.
- b3Shape_SetUserData(b3ShapeId, void*)
-
Set the user data for a shape
- b3Sleep(int)
-
Sleeps the current thread.
- b3SolvePlanes(Vector3, b3CollisionPlane*, int)
-
Solves the position of a mover that satisfies the given collision planes.
- b3SphericalJoint_EnableConeLimit(b3JointId, NativeBool)
-
Enable/disable the spherical joint cone limit
- b3SphericalJoint_EnableMotor(b3JointId, NativeBool)
-
Enable/disable a spherical joint motor
- b3SphericalJoint_EnableSpring(b3JointId, NativeBool)
-
Enable/disable the spherical joint spring
- b3SphericalJoint_EnableTwistLimit(b3JointId, NativeBool)
-
Enable/disable the spherical joint limit
- b3SphericalJoint_GetConeAngle(b3JointId)
-
Get the spherical joint current cone angle in radians.
- b3SphericalJoint_GetConeLimit(b3JointId)
-
Get the spherical joint cone limit in radians
- b3SphericalJoint_GetLowerTwistLimit(b3JointId)
-
Get the spherical joint lower limit in radians
- b3SphericalJoint_GetMaxMotorTorque(b3JointId)
-
Get the spherical joint maximum motor torque, usually in newton-meters
- b3SphericalJoint_GetMotorTorque(b3JointId)
-
Get the spherical joint current motor torque, usually in newton-meters
- b3SphericalJoint_GetMotorVelocity(b3JointId)
-
Get the spherical joint motor velocity in radians per second
- b3SphericalJoint_GetSpringDampingRatio(b3JointId)
-
Get the spherical joint spring damping ratio, non-dimensional
- b3SphericalJoint_GetSpringHertz(b3JointId)
-
Get the spherical joint spring stiffness in Hertz
- b3SphericalJoint_GetTargetRotation(b3JointId)
-
Get the spherical joint spring target rotation
- b3SphericalJoint_GetTwistAngle(b3JointId)
-
Get the spherical joint current twist angle in radians.
- b3SphericalJoint_GetUpperTwistLimit(b3JointId)
-
Get the spherical joint upper limit in radians
- b3SphericalJoint_IsConeLimitEnabled(b3JointId)
-
Is the spherical joint cone limit enabled?
- b3SphericalJoint_IsMotorEnabled(b3JointId)
-
Is the spherical joint motor enabled?
- b3SphericalJoint_IsSpringEnabled(b3JointId)
-
Is the spherical angular spring enabled?
- b3SphericalJoint_IsTwistLimitEnabled(b3JointId)
-
Is the spherical joint limit enabled?
- b3SphericalJoint_SetConeLimit(b3JointId, float)
-
Set the spherical joint limits in radians
- b3SphericalJoint_SetMaxMotorTorque(b3JointId, float)
-
Set the spherical joint maximum motor torque, usually in newton-meters
- b3SphericalJoint_SetMotorVelocity(b3JointId, Vector3)
-
Set the spherical joint motor velocity in radians per second
- b3SphericalJoint_SetSpringDampingRatio(b3JointId, float)
-
Set the spherical joint spring damping ratio, non-dimensional
- b3SphericalJoint_SetSpringHertz(b3JointId, float)
-
Set the spherical joint spring stiffness in Hertz
- b3SphericalJoint_SetTargetRotation(b3JointId, Quaternion)
-
Set the spherical joint spring target rotation
- b3SphericalJoint_SetTwistLimits(b3JointId, float, float)
-
Set the spherical joint limits in radians
- b3Steiner(float, Vector3)
-
Computes the parallel axis theorem term for shifting an inertia tensor.
- b3TimeOfImpact(b3TOIInput*)
-
Compute the upper bound on time before two shapes penetrate. Time is represented as a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate, non-tunneling collisions. If you change the time interval, you should call this function again.
- b3ValidateReplay(void*, int, int)
-
Replay a recording from memory and verify it reproduces the same world-state hashes. Stands up a fresh world, restores the seed snapshot, replays every op, and checks each embedded StateHash record. Returns true if replay completed without id mismatches or hash divergences.
- b3WeldJoint_GetAngularDampingRatio(b3JointId)
-
Get the weld joint angular damping ratio, non-dimensional
- b3WeldJoint_GetAngularHertz(b3JointId)
-
Get the weld joint angular stiffness in Hertz
- b3WeldJoint_GetLinearDampingRatio(b3JointId)
-
Get the weld joint linear damping ratio (non-dimensional)
- b3WeldJoint_GetLinearHertz(b3JointId)
-
Get the weld joint linear stiffness in Hertz
- b3WeldJoint_SetAngularDampingRatio(b3JointId, float)
-
Set weld joint angular damping ratio, non-dimensional
- b3WeldJoint_SetAngularHertz(b3JointId, float)
-
Set the weld joint angular stiffness in Hertz. 0 is rigid.
- b3WeldJoint_SetLinearDampingRatio(b3JointId, float)
-
Set the weld joint linear damping ratio (non-dimensional)
- b3WeldJoint_SetLinearHertz(b3JointId, float)
-
Set the weld joint linear stiffness in Hertz. 0 is rigid.
- b3WheelJoint_EnableSpinMotor(b3JointId, NativeBool)
-
Enable/disable the wheel joint motor.
- b3WheelJoint_EnableSteering(b3JointId, NativeBool)
-
Enable/disable wheel steering. Steering allows the wheel to rotate about the suspension axis.
- b3WheelJoint_EnableSteeringLimit(b3JointId, NativeBool)
-
Enable/disable the wheel joint steering limit.
- b3WheelJoint_EnableSuspension(b3JointId, NativeBool)
-
Enable/disable the wheel joint spring.
- b3WheelJoint_EnableSuspensionLimit(b3JointId, NativeBool)
-
Enable/disable the wheel joint limit.
- b3WheelJoint_GetLowerSteeringLimit(b3JointId)
-
Get the wheel joint lower steering limit in radians.
- b3WheelJoint_GetLowerSuspensionLimit(b3JointId)
-
Get the wheel joint lower limit.
- b3WheelJoint_GetMaxSpinTorque(b3JointId)
-
Get the wheel joint maximum motor torque, usually in newton-meters.
- b3WheelJoint_GetMaxSteeringTorque(b3JointId)
-
Get the wheel joint maximum steering torque in N*m.
- b3WheelJoint_GetSpinMotorSpeed(b3JointId)
-
Get the wheel joint motor speed in radians per second.
- b3WheelJoint_GetSpinSpeed(b3JointId)
-
Get the current spin speed in radians per second.
- b3WheelJoint_GetSpinTorque(b3JointId)
-
Get the wheel joint current motor torque, usually in newton-meters.
- b3WheelJoint_GetSteeringAngle(b3JointId)
-
Get the current steering angle in radians.
- b3WheelJoint_GetSteeringDampingRatio(b3JointId)
-
Get the wheel joint steering damping ratio, non-dimensional.
- b3WheelJoint_GetSteeringHertz(b3JointId)
-
Get the wheel joint steering stiffness in Hertz.
- b3WheelJoint_GetSteeringTorque(b3JointId)
-
Get the current steering torque in N*m.
- b3WheelJoint_GetSuspensionDampingRatio(b3JointId)
-
Get the wheel joint damping ratio, non-dimensional.
- b3WheelJoint_GetSuspensionHertz(b3JointId)
-
Get the wheel joint stiffness in Hertz.
- b3WheelJoint_GetTargetSteeringAngle(b3JointId)
-
Get the wheel joint target steering angle in radians.
- b3WheelJoint_GetUpperSteeringLimit(b3JointId)
-
Get the wheel joint upper steering limit in radians.
- b3WheelJoint_GetUpperSuspensionLimit(b3JointId)
-
Get the wheel joint upper limit.
- b3WheelJoint_IsSpinMotorEnabled(b3JointId)
-
Is the wheel joint motor enabled?
- b3WheelJoint_IsSteeringEnabled(b3JointId)
-
Can the wheel steer?
- b3WheelJoint_IsSteeringLimitEnabled(b3JointId)
-
Is the wheel joint steering limit enabled?
- b3WheelJoint_IsSuspensionEnabled(b3JointId)
-
Is the wheel joint spring enabled?
- b3WheelJoint_IsSuspensionLimitEnabled(b3JointId)
-
Is the wheel joint limit enabled?
- b3WheelJoint_SetMaxSpinTorque(b3JointId, float)
-
Set the wheel joint maximum motor torque, usually in newton-meters.
- b3WheelJoint_SetMaxSteeringTorque(b3JointId, float)
-
Set the wheel joint maximum steering torque in N*m.
- b3WheelJoint_SetSpinMotorSpeed(b3JointId, float)
-
Set the wheel joint motor speed in radians per second.
- b3WheelJoint_SetSteeringDampingRatio(b3JointId, float)
-
Set the wheel joint steering damping ratio, non-dimensional.
- b3WheelJoint_SetSteeringHertz(b3JointId, float)
-
Set the wheel joint steering stiffness in Hertz.
- b3WheelJoint_SetSteeringLimits(b3JointId, float, float)
-
Set the wheel joint steering limits in radians.
- b3WheelJoint_SetSuspensionDampingRatio(b3JointId, float)
-
Set the wheel joint damping ratio, non-dimensional.
- b3WheelJoint_SetSuspensionHertz(b3JointId, float)
-
Set the wheel joint stiffness in Hertz.
- b3WheelJoint_SetSuspensionLimits(b3JointId, float, float)
-
Set the wheel joint limits.
- b3WheelJoint_SetTargetSteeringAngle(b3JointId, float)
-
Set the wheel joint target steering angle in radians.
- b3World_CastMover(b3WorldId, Vector3, b3Capsule*, Vector3, b3QueryFilter, delegate* unmanaged[Cdecl]<b3ShapeId, void*, NativeBool>, void*)
-
Cast a capsule mover through the world. This is a special shape cast that handles sliding along other shapes while reducing clipping. This is not a good source of information about what the mover is touching. Instead use the planes returned by b3World_CollideMover.
- b3World_CastRay(b3WorldId, Vector3, Vector3, b3QueryFilter, delegate* unmanaged[Cdecl]<b3ShapeId, Vector3, Vector3, float, ulong, int, int, void*, float>, void*)
-
Cast a ray into the world to collect shapes in the path of the ray. Your callback function controls whether you get the closest point, any point, or n-points.
- b3World_CastRayClosest(b3WorldId, Vector3, Vector3, b3QueryFilter)
-
Cast a ray into the world to collect the closest hit. This is a convenience function. Ignores initial overlap. This is less general than b3World_CastRay() and does not allow for custom filtering.
- b3World_CastShape(b3WorldId, Vector3, b3ShapeProxy*, Vector3, b3QueryFilter, delegate* unmanaged[Cdecl]<b3ShapeId, Vector3, Vector3, float, ulong, int, int, void*, float>, void*)
-
Cast a shape through the world. Similar to a cast ray except that a shape is cast instead of a point. The proxy points are relative to the origin and the hit points come back as world positions, so the cast stays precise far from the world origin.
- b3World_CollideMover(b3WorldId, Vector3, b3Capsule*, b3QueryFilter, delegate* unmanaged[Cdecl]<b3ShapeId, b3PlaneResult*, int, void*, NativeBool>, void*)
-
Collide a capsule mover with the world, gathering collision planes that can be fed to b3SolvePlanes. Useful for kinematic character movement. The mover and the returned planes are relative to the origin.
- b3World_Draw(b3WorldId, b3DebugDraw*, ulong)
-
Call this to draw shapes and other debug draw data
- b3World_DumpMemoryStats(b3WorldId)
-
Dump memory stats to log.
- b3World_DumpShapeBounds(b3WorldId, b3BodyType)
-
Dump shape bounds to box3d_bounds.txt
- b3World_EnableContinuous(b3WorldId, NativeBool)
-
Enable/disable continuous collision between dynamic and static bodies. Generally you should keep continuous collision enabled to prevent fast moving objects from going through static objects. The performance gain from disabling continuous collision is minor.
- b3World_EnableSleeping(b3WorldId, NativeBool)
-
Enable/disable sleep. If your application does not need sleeping, you can gain some performance by disabling sleep completely at the world level.
- b3World_EnableSpeculative(b3WorldId, NativeBool)
-
This is for internal testing
- b3World_EnableWarmStarting(b3WorldId, NativeBool)
-
Enable/disable constraint warm starting. Advanced feature for testing. Disabling warm starting greatly reduces stability and provides no performance gain.
- b3World_Explode(b3WorldId, b3ExplosionDef*)
-
Apply a radial explosion
- b3World_GetAwakeBodyCount(b3WorldId)
-
Get the number of awake bodies
- b3World_GetBodyEvents(b3WorldId)
-
Get the body events for the current time step. The event data is transient. Do not store a reference to this data.
- b3World_GetBounds(b3WorldId)
-
Get the world's bounds. This is the bounding box that covers the current simulation. May have a small amount of padding.
- b3World_GetContactEvents(b3WorldId)
-
Get contact events for this current time step. The event data is transient. Do not store a reference to this data.
- b3World_GetContactRecycleDistance(b3WorldId)
-
Get the contact point recycling distance. Usually in meters.
- b3World_GetCounters(b3WorldId)
-
Get world counters and sizes
- b3World_GetGravity(b3WorldId)
-
Get the gravity vector
- b3World_GetHitEventThreshold(b3WorldId)
-
Get the hit event speed threshold. Usually in meters per second.
- b3World_GetJointEvents(b3WorldId)
-
Get the joint events for the current time step. The event data is transient. Do not store a reference to this data.
- b3World_GetMaxCapacity(b3WorldId)
-
Get max capacity. This can be used with b3WorldDef to avoid run-time allocations and copies
- b3World_GetMaximumLinearSpeed(b3WorldId)
-
Get the maximum linear speed. Usually in m/s.
- b3World_GetProfile(b3WorldId)
-
Get the current world performance profile
- b3World_GetRestitutionThreshold(b3WorldId)
-
Get the restitution speed threshold. Usually in meters per second.
- b3World_GetSensorEvents(b3WorldId)
-
Get sensor events for the current time step. The event data is transient. Do not store a reference to this data.
- b3World_GetUserData(b3WorldId)
-
Get the user data pointer.
- b3World_GetWorkerCount(b3WorldId)
-
Get the worker count.
- b3World_IsContinuousEnabled(b3WorldId)
-
Is continuous collision enabled?
- b3World_IsSleepingEnabled(b3WorldId)
-
Is body sleeping enabled?
- b3World_IsValid(b3WorldId)
-
World id validation. Provides validation for up to 64K allocations.
- b3World_IsWarmStartingEnabled(b3WorldId)
-
Is constraint warm starting enabled?
- b3World_OverlapAABB(b3WorldId, b3AABB, b3QueryFilter, delegate* unmanaged[Cdecl]<b3ShapeId, void*, NativeBool>, void*)
-
Overlap test for all shapes that potentially overlap the provided AABB
- b3World_OverlapShape(b3WorldId, Vector3, b3ShapeProxy*, b3QueryFilter, delegate* unmanaged[Cdecl]<b3ShapeId, void*, NativeBool>, void*)
-
Overlap test for all shapes that overlap the provided shape proxy. The proxy points are relative to the world origin, which lets the query stay precise far from the world origin.
- b3World_RebuildStaticTree(b3WorldId)
-
This is for internal testing
- b3World_SetContactRecycleDistance(b3WorldId, float)
-
Set the contact point recycling distance. Setting this to zero disables contact point recycling. Usually in meters.
- b3World_SetContactTuning(b3WorldId, float, float, float)
-
Adjust contact tuning parameters
- b3World_SetCustomFilterCallback(b3WorldId, delegate* unmanaged[Cdecl]<b3ShapeId, b3ShapeId, void*, NativeBool>, void*)
-
Register the custom filter callback. This is optional.
- b3World_SetFrictionCallback(b3WorldId, delegate* unmanaged[Cdecl]<float, ulong, float, ulong, float>)
-
Set the friction callback. Passing NULL resets to default.
- b3World_SetGravity(b3WorldId, Vector3)
-
Set the gravity vector for the entire world. Box3D has no concept of an up direction and this is left as a decision for the application. Usually in m/s^2.
- b3World_SetHitEventThreshold(b3WorldId, float)
-
Adjust the hit event threshold. This controls the collision speed needed to generate a b3ContactHitEvent. Usually in meters per second.
- b3World_SetMaximumLinearSpeed(b3WorldId, float)
-
Set the maximum linear speed. Usually in m/s.
- b3World_SetPreSolveCallback(b3WorldId, delegate* unmanaged[Cdecl]<b3ShapeId, b3ShapeId, Vector3, Vector3, void*, NativeBool>, void*)
-
Register the pre-solve callback. This is optional.
- b3World_SetRestitutionCallback(b3WorldId, delegate* unmanaged[Cdecl]<float, ulong, float, ulong, float>)
-
Set the restitution callback. Passing NULL resets to default.
- b3World_SetRestitutionThreshold(b3WorldId, float)
-
Adjust the restitution threshold. It is recommended not to make this value very small because it will prevent bodies from sleeping. Usually in meters per second.
- b3World_SetUserData(b3WorldId, void*)
-
Set the user data pointer.
- b3World_SetWorkerCount(b3WorldId, int)
-
Set the worker count. Must be in the range [1, B3_MAX_WORKERS]
- b3World_StartRecording(b3WorldId, b3Recording*)
-
Begin recording world mutations into the provided buffer. The buffer is reset on each call so a single b3Recording can be reused for multiple sessions.
- b3World_Step(b3WorldId, float, int)
-
Simulate a world for one time step. This performs collision detection, integration, and constraint solution.
- b3World_StopRecording(b3WorldId)
-
End the current recording session. Writes the trailing geometry registry and backpatches the header. The buffer remains valid until the recording is destroyed.
- b3Yield()
-
Yields the current thread, for use inside a busy loop.