ffi library
just_jolt's native API, for native platforms only (it imports
dart:ffi):
- Jolt, to start Jolt before anything else;
- the generated bindings: just_jolt's C helpers (
jj_*, seesrc/jj/jj.h) and the part of joltc that Dart uses directly (shapes and the body interface,JPH_*).
Classes
- JJ_BodySettings
- How a body is made.
- JJ_CharacterContact
- A character's contact.
- JJ_CharacterSettings
- How a character (Jolt's CharacterVirtual) is made. Its capsule stands on its position: the bottom of the capsule is at the position.
- JJ_CharacterState
- What a character is doing after a step.
- JJ_Event
- A buffered event.
- JJ_Hit
- A query hit.
- JJ_JointSettings
- A joint between two bodies (body B may be the world). Anchors and axes are in world space, as the bodies are when the joint is made.
- JJ_WorldSettings
- How a world is made.
- Jolt
- Jolt Physics in this process: whether its native library is in the build, and its one job system.
- JPH_AABox
- JPH_Activation
- JPH_ActiveEdgeMode
- JPH_AllowedDOFs
- JPH_BackFaceMode
- JPH_Body
- JPH_BodyCreationSettings
- JPH_BodyInterface
- JPH_BodyManager_ShapeColor
- JPH_BodyType
- JPH_BoxShape
- JPH_BoxShapeSettings
- JPH_BroadPhaseLayerFilter
- JPH_CapsuleShape
- JPH_CapsuleShapeSettings
- JPH_CollectFacesMode
- JPH_CollidePointResult
- JPH_CollisionCollectorType
- JPH_CollisionGroup
- JPH_CompoundShapeSettings
- JPH_ConstraintSpace
- JPH_ConstraintSubType
- JPH_ConstraintType
- JPH_ConvexHullShape
- JPH_ConvexHullShapeSettings
- JPH_CylinderShape
- JPH_CylinderShapeSettings
- JPH_DebugRenderer
- JPH_DebugRenderer_CastShadow
- JPH_DebugRenderer_DrawMode
- JPH_EmptyShape
- JPH_EmptyShapeSettings
- JPH_GroundState
- JPH_GroupFilter
- JPH_HeightFieldShape
- JPH_HeightFieldShapeSettings
- JPH_IndexedTriangle
- JPH_MassProperties
- JPH_Mat4
- JPH_Mesh_Shape_BuildQuality
- JPH_MeshShape
- JPH_MeshShapeSettings
- JPH_MotionQuality
- JPH_MotionType
- JPH_MotorState
- JPH_ObjectLayerFilter
- JPH_OffsetCenterOfMassShape
- JPH_OffsetCenterOfMassShapeSettings
- JPH_OverrideMassProperties
- JPH_PhysicsMaterial
- JPH_PhysicsSystem
- JPH_PhysicsUpdateError
- Enums
- JPH_Quat
- JPH_RayCastResult
- JPH_RayCastSettings
- JPH_RotatedTranslatedShape
- JPH_RotatedTranslatedShapeSettings
- JPH_ScaledShape
- JPH_ScaledShapeSettings
- JPH_Shape
- JPH_ShapeFilter
- JPH_ShapeSettings
- JPH_ShapeSubType
- JPH_ShapeType
- JPH_SixDOFConstraintAxis
- JPH_SoftBodyBendType
- JPH_SoftBodyConstraintColor
- Defines how to color soft body constraints
- JPH_SphereShape
- JPH_SphereShapeSettings
- JPH_SpringMode
- JPH_StaticCompoundShape
- JPH_StaticCompoundShapeSettings
- JPH_SupportingFace
- JPH_SwingType
- JPH_TrackSide
- JPH_TransmissionMode
- JPH_Triangle
- JPH_ValidateResult
- JPH_Vec3
- JPH_Vec4
Constants
- addresses → const _SymbolAddresses
- JJ_COMBINE_AVERAGE → const int
- JJ_COMBINE_DEFAULT → const int
- JJ_COMBINE_MAX → const int
- JJ_COMBINE_MIN → const int
- JJ_DEBUG_LINE_FLOATS → const int
- JJ_EVENT_BODY_ACTIVATED → const int
- JJ_EVENT_BODY_DEACTIVATED → const int
- JJ_EVENT_CONTACT_BEGIN → const int
- JJ_EVENT_CONTACT_END → const int
- JJ_EVENT_CONTACT_STAY → const int
- JJ_EVENT_SENSOR_BEGIN → const int
- JJ_EVENT_SENSOR_END → const int
- JJ_GROUND_IN_AIR → const int
- JJ_GROUND_NOT_SUPPORTED → const int
- JJ_GROUND_ON_GROUND → const int
- JJ_GROUND_ON_STEEP_GROUND → const int
- JJ_JOINT_DISTANCE → const int
- JJ_JOINT_FIXED → const int
- JJ_JOINT_HINGE → const int
- JJ_JOINT_POINT → const int
- JJ_JOINT_SIX_DOF → const int
- JJ_JOINT_SLIDER → const int
- JJ_LAYER_COUNT → const int
- JJ_MOTION_DYNAMIC → const int
- JJ_MOTION_KINEMATIC → const int
- JJ_MOTION_STATIC → const int
- JJ_MOTOR_OFF → const int
- JJ_MOTOR_POSITION → const int
- JJ_MOTOR_VELOCITY → const int
- JJ_QUERY_ALL_HITS → const int
- JJ_QUERY_NO_CHARACTERS → const int
- JJ_QUERY_SENSORS → const int
- JJ_TRANSFORM_FLOATS → const int
Functions
-
jj_body_create(
int world, Pointer< JPH_Shape> shape, Pointer<JJ_BodySettings> settings) → int -
Makes a body of
shape(a joltc shape; the body takes its own reference) and adds it to the world. Returns 0 when it cannot be made: a dead world, a full world, a layer out of range, or a shape that must be static (a mesh or height field) on a dynamic body. -
jj_body_destroy(
int body) → void - Removes and destroys a body, and every joint holding it.
-
jj_body_set_layer(
int body, int layer) → void - Moves a body to another layer.
-
jj_body_valid(
int body) → bool - Whether body is alive.
-
jj_character_contacts(
int character, Pointer< JJ_CharacterContact> out, int capacity) → int - Writes up to capacity of the character's contacts from its last update; returns how many.
-
jj_character_create(
int world, Pointer< JJ_CharacterSettings> settings, Pointer<Float> position) → int - Makes a character with its feet at position (three floats). Returns 0 for a dead world, a layer out of range, a radius that is not above 0, or a negative halfHeight.
-
jj_character_destroy(
int character) → void - Destroys a character and its inner body.
-
jj_character_inner_body(
int character) → int - The character's body (see JJ_CharacterSettings.innerBody), or 0.
-
jj_character_set_position(
int character, Pointer< Float> position) → void - Teleports the character; its velocity is kept.
-
jj_character_state(
int character, Pointer< JJ_CharacterState> out) → void - The character's state without moving it.
-
jj_character_step(
int character, double dt, Pointer< Float> velocity, Pointer<Float> gravity, Pointer<Float> stepDown, Pointer<Float> stepUp, Pointer<JJ_CharacterState> out) → void - Sets the character's velocity, then moves it by one update: CharacterVirtual::ExtendedUpdate, which slides along walls, sticks to the floor (stepDown, pointing down) and climbs stairs (stepUp, pointing up). A zero stepDown or stepUp turns that part off.
-
jj_character_valid(
int character) → bool - Whether character is alive.
-
jj_debug_lines(
int world, int flags, Pointer< Float> out, int capacity) → int - Draws the world's bodies (and joints when flags & 1) as lines, writing up to capacity of them, JJ_DEBUG_LINE_FLOATS floats each. Returns how many there are in all (more than capacity: call again with more room), or -1 when the library has no debug renderer.
-
jj_destroy_all(
) → void - Destroys every world, with its bodies, joints and characters. Used on hot restart, when Dart state is gone but the native library stays loaded. Shapes Dart still holds are not touched.
-
jj_drain_events(
int world, Pointer< JJ_Event> out, int capacity) → int - Moves up to capacity buffered events into out, oldest first. Returns how many; call again while it equals capacity.
-
jj_get_active_transforms(
int world, Pointer< Int64> outBodies, Pointer<Float> out, int capacity) → int - Writes the bodies that are moving (awake, not static), and those that fell asleep since the last call, JJ_TRANSFORM_FLOATS floats each. Characters' bodies are left out. Returns how many were written; when capacity is too small, writes nothing and returns minus the number needed.
-
jj_get_transforms(
int world, Pointer< Int64> bodies, int count, Pointer<Float> out) → int - Writes JJ_TRANSFORM_FLOATS floats per body; dead handles write zeros. Returns count, or 0 for a dead world.
-
jj_has_debug_renderer(
) → bool - Whether the library was built with the debug renderer (dev flavour).
-
jj_init(
int workerThreads) → bool - Initialises Jolt and the process-wide job system. Safe to call again; the first call picks the thread count. workerThreads < 0 means "cores minus one".
-
jj_joint_create(
int world, int bodyA, int bodyB, Pointer< JJ_JointSettings> settings) → int - Joins bodyA to bodyB, or to the world when bodyB is 0. Returns 0 when either body is dead or they are in different worlds.
-
jj_joint_destroy(
int joint) → void - Removes and destroys a joint.
-
jj_joint_set_enabled(
int joint, bool enabled) → void - Turns a joint off (its bodies move as if it were not there) or back on.
-
jj_joint_set_motor(
int joint, int state, double target) → void - Hinge and slider: JJ_MOTOR_* and its target (velocity or position).
-
jj_joint_valid(
int joint) → bool - Whether joint is alive.
-
jj_joint_value(
int joint) → double - Hinge: angle (radians). Slider: position (metres). Others: 0.
-
jj_live_worlds(
) → int - Number of live worlds (for tests and leak checks).
-
jj_overlap(
int world, Pointer< JPH_Shape> shape, Pointer<Float> pose, int layerMask, int ignoreBody, int flags, Pointer<JJ_Hit> out, int capacity) → int -
The bodies
shapeat pose overlaps, one hit each (the deepest point). -
jj_pending_events(
int world) → int - How many events are buffered, waiting for jj_drain_events.
-
jj_raycast(
int world, Pointer< Float> origin, Pointer<Float> direction, int layerMask, int ignoreBody, int flags, Pointer<JJ_Hit> out, int capacity) → int - Casts a ray from origin along direction (whose length is the ray's). Hits bodies on layers in layerMask, except ignoreBody. Writes up to capacity hits, nearest first; returns how many.
-
jj_shape_cast(
int world, Pointer< JPH_Shape> shape, Pointer<Float> pose, Pointer<Float> direction, int layerMask, int ignoreBody, int flags, Pointer<JJ_Hit> out, int capacity) → int -
Sweeps
shapefrom pose (px py pz qx qy qz qw) along direction. -
jj_shape_release(
Pointer< Void> shape) → void - Releases one reference to a joltc shape. Thread-safe: NativeFinalizer calls it from any thread.
-
jj_version(
) → int - Jolt's version as (major << 16) | (minor << 8) | patch.
-
jj_world_body_count(
int world) → int - How many bodies the world holds, characters' inner bodies included; 0 for a dead world.
-
jj_world_create(
Pointer< JJ_WorldSettings> settings) → int - Makes a world and returns its handle; 0 when jj_init has not run, settings is null, or no more worlds fit.
-
jj_world_destroy(
int world) → void - Destroys a world with its bodies, joints and characters.
-
jj_world_finalize(
Pointer< Void> token) → void - NativeFinalizer callback: the token is the world handle.
-
jj_world_handle_tag(
int world) → int - The upper 32 bits every body, joint and character handle of this world has; 0 for a dead world.
-
jj_world_joltc(
int world) → Pointer< JPH_PhysicsSystem> - joltc's view of the world, for its plain API (the body interface); null for a dead world.
-
jj_world_optimize(
int world) → void - Rebuilds the broad phase; worth it after adding many static bodies.
-
jj_world_set_gravity(
int world, Pointer< Float> gravity) → void - Sets the world's gravity: three floats, m/s^2.
-
jj_world_step(
int world, double dt, int collisionSteps) → int - Steps the world, then refreshes each character's ground velocity. Returns Jolt's EPhysicsUpdateError bits (0 = fine), or -1 for a dead world.
-
jj_world_valid(
int world) → bool - Whether world is alive.
-
JPH_BodyInterface_ActivateBodies(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_BodyID> bodyIDs, int count) → void -
JPH_BodyInterface_ActivateBodiesInAABox(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_AABox> box, Pointer<JPH_BroadPhaseLayerFilter> broadPhaseLayerFilter, Pointer<JPH_ObjectLayerFilter> objectLayerFilter) → void -
JPH_BodyInterface_ActivateBody(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → void -
JPH_BodyInterface_AddAngularImpulse(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> angularImpulse) → void -
JPH_BodyInterface_AddBody(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID, int activationMode) → void -
JPH_BodyInterface_AddForce(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> force) → void -
JPH_BodyInterface_AddForce2(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> force, Pointer<JPH_Vec3> point) → void -
JPH_BodyInterface_AddForceAndTorque(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> force, Pointer<JPH_Vec3> torque) → void -
JPH_BodyInterface_AddImpulse(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> impulse) → void -
JPH_BodyInterface_AddImpulse2(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> impulse, Pointer<JPH_Vec3> point) → void -
JPH_BodyInterface_AddLinearAndAngularVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> linearVelocity, Pointer<JPH_Vec3> angularVelocity) → void -
JPH_BodyInterface_AddLinearVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> linearVelocity) → void -
JPH_BodyInterface_AddTorque(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> torque) → void -
JPH_BodyInterface_ApplyBuoyancyImpulse(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> surfacePosition, Pointer<JPH_Vec3> surfaceNormal, double buoyancy, double linearDrag, double angularDrag, Pointer<JPH_Vec3> fluidVelocity, Pointer<JPH_Vec3> gravity, double deltaTime) → bool -
JPH_BodyInterface_AssignBodyID(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_Body> body) → bool -
JPH_BodyInterface_AssignBodyID2(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_Body> body, int bodyID) → bool -
JPH_BodyInterface_CreateAndAddBody(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_BodyCreationSettings> settings, int activationMode) → int -
JPH_BodyInterface_CreateBody(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_BodyCreationSettings> settings) → Pointer<JPH_Body> -
JPH_BodyInterface_CreateBodyWithID(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID, Pointer<JPH_BodyCreationSettings> settings) → Pointer<JPH_Body> -
JPH_BodyInterface_CreateBodyWithoutID(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_BodyCreationSettings> settings) → Pointer<JPH_Body> -
JPH_BodyInterface_DeactivateBodies(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_BodyID> bodyIDs, int count) → void -
JPH_BodyInterface_DeactivateBody(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → void -
JPH_BodyInterface_DestroyBody(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → void - BodyInterface
-
JPH_BodyInterface_DestroyBodyWithoutID(
Pointer< JPH_BodyInterface> bodyInterface, Pointer<JPH_Body> body) → void -
JPH_BodyInterface_GetAngularVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> angularVelocity) → void -
JPH_BodyInterface_GetBodyType(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → int -
JPH_BodyInterface_GetCenterOfMassPosition(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID, Pointer<JPH_Vec3> position) → void -
JPH_BodyInterface_GetCenterOfMassTransform(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_RMat4> result) → void -
JPH_BodyInterface_GetCollisionGroup(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_CollisionGroup> result) → void -
JPH_BodyInterface_GetFriction(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → double -
JPH_BodyInterface_GetGravityFactor(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → double -
JPH_BodyInterface_GetInverseInertia(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_RMat4> result) → void -
JPH_BodyInterface_GetLinearAndAngularVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> linearVelocity, Pointer<JPH_Vec3> angularVelocity) → void -
JPH_BodyInterface_GetLinearVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID, Pointer<JPH_Vec3> velocity) → void -
JPH_BodyInterface_GetMaterial(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, int subShapeID) → Pointer<JPH_PhysicsMaterial> -
JPH_BodyInterface_GetMotionQuality(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → int -
JPH_BodyInterface_GetMotionType(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → int -
JPH_BodyInterface_GetObjectLayer(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → int -
JPH_BodyInterface_GetPointVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> point, Pointer<JPH_Vec3> velocity) → void -
JPH_BodyInterface_GetPosition(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> result) → void -
JPH_BodyInterface_GetPositionAndRotation(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> position, Pointer<JPH_Quat> rotation) → void -
JPH_BodyInterface_GetRestitution(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → double -
JPH_BodyInterface_GetRotation(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Quat> result) → void -
JPH_BodyInterface_GetShape(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → Pointer<JPH_Shape> -
JPH_BodyInterface_GetUseManifoldReduction(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → bool -
JPH_BodyInterface_GetUserData(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → int -
JPH_BodyInterface_GetWorldTransform(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_RMat4> result) → void -
JPH_BodyInterface_InvalidateContactCache(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → void -
JPH_BodyInterface_IsActive(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → bool -
JPH_BodyInterface_IsAdded(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → bool -
JPH_BodyInterface_IsSensor(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId) → bool -
JPH_BodyInterface_MoveKinematic(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> targetPosition, Pointer<JPH_Quat> targetRotation, double deltaTime) → void -
JPH_BodyInterface_NotifyShapeChanged(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> previousCenterOfMass, bool updateMassProperties, int activationMode) → void -
JPH_BodyInterface_RemoveAndDestroyBody(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → void -
JPH_BodyInterface_RemoveBody(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → void -
JPH_BodyInterface_ResetSleepTimer(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → void -
JPH_BodyInterface_SetAngularVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> angularVelocity) → void -
JPH_BodyInterface_SetCollisionGroup(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_CollisionGroup> group) → void -
JPH_BodyInterface_SetFriction(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID, double friction) → void -
JPH_BodyInterface_SetGravityFactor(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, double value) → void -
JPH_BodyInterface_SetIsSensor(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, bool value) → void -
JPH_BodyInterface_SetLinearAndAngularVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> linearVelocity, Pointer<JPH_Vec3> angularVelocity) → void -
JPH_BodyInterface_SetLinearVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID, Pointer<JPH_Vec3> velocity) → void -
JPH_BodyInterface_SetMotionQuality(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, int quality) → void -
JPH_BodyInterface_SetMotionType(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID, int motionType, int activationMode) → void -
JPH_BodyInterface_SetObjectLayer(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, int layer) → void -
JPH_BodyInterface_SetPosition(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> position, int activationMode) → void -
JPH_BodyInterface_SetPositionAndRotation(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> position, Pointer<JPH_Quat> rotation, int activationMode) → void -
JPH_BodyInterface_SetPositionAndRotationWhenChanged(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> position, Pointer<JPH_Quat> rotation, int activationMode) → void -
JPH_BodyInterface_SetPositionRotationAndVelocity(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Vec3> position, Pointer<JPH_Quat> rotation, Pointer<JPH_Vec3> linearVelocity, Pointer<JPH_Vec3> angularVelocity) → void -
JPH_BodyInterface_SetRestitution(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID, double restitution) → void -
JPH_BodyInterface_SetRotation(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Quat> rotation, int activationMode) → void -
JPH_BodyInterface_SetShape(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, Pointer<JPH_Shape> shape, bool updateMassProperties, int activationMode) → void -
JPH_BodyInterface_SetUseManifoldReduction(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, bool value) → void -
JPH_BodyInterface_SetUserData(
Pointer< JPH_BodyInterface> bodyInterface, int bodyId, int inUserData) → void -
JPH_BodyInterface_UnassignBodyID(
Pointer< JPH_BodyInterface> bodyInterface, int bodyID) → Pointer<JPH_Body> -
JPH_BoxShape_Create(
Pointer< JPH_Vec3> halfExtent, double convexRadius) → Pointer<JPH_BoxShape> -
JPH_BoxShape_GetConvexRadius(
Pointer< JPH_BoxShape> shape) → double -
JPH_BoxShape_GetHalfExtent(
Pointer< JPH_BoxShape> shape, Pointer<JPH_Vec3> halfExtent) → void -
JPH_BoxShapeSettings_Create(
Pointer< JPH_Vec3> halfExtent, double convexRadius) → Pointer<JPH_BoxShapeSettings> - BoxShape
-
JPH_BoxShapeSettings_CreateShape(
Pointer< JPH_BoxShapeSettings> settings) → Pointer<JPH_BoxShape> -
JPH_CapsuleShape_Create(
double halfHeightOfCylinder, double radius) → Pointer< JPH_CapsuleShape> -
JPH_CapsuleShape_GetHalfHeightOfCylinder(
Pointer< JPH_CapsuleShape> shape) → double -
JPH_CapsuleShape_GetRadius(
Pointer< JPH_CapsuleShape> shape) → double -
JPH_CapsuleShapeSettings_Create(
double halfHeightOfCylinder, double radius) → Pointer< JPH_CapsuleShapeSettings> - CapsuleShape
-
JPH_CapsuleShapeSettings_CreateShape(
Pointer< JPH_CapsuleShapeSettings> settings) → Pointer<JPH_CapsuleShape> -
JPH_CompoundShapeSettings_AddShape2(
Pointer< JPH_CompoundShapeSettings> settings, Pointer<JPH_Vec3> position, Pointer<JPH_Quat> rotation, Pointer<JPH_Shape> shape, int userData) → void -
JPH_ConvexHullShape_GetFaceVertices(
Pointer< JPH_ConvexHullShape> shape, int faceIndex, int maxVertices, Pointer<JPH_BodyID> vertices) → int -
JPH_ConvexHullShape_GetNumFaces(
Pointer< JPH_ConvexHullShape> shape) → int -
JPH_ConvexHullShape_GetNumPoints(
Pointer< JPH_ConvexHullShape> shape) → int -
JPH_ConvexHullShape_GetNumVerticesInFace(
Pointer< JPH_ConvexHullShape> shape, int faceIndex) → int -
JPH_ConvexHullShape_GetPoint(
Pointer< JPH_ConvexHullShape> shape, int index, Pointer<JPH_Vec3> result) → void -
JPH_ConvexHullShapeSettings_Create(
Pointer< JPH_Vec3> points, int pointsCount, double maxConvexRadius) → Pointer<JPH_ConvexHullShapeSettings> - ConvexHullShape
-
JPH_ConvexHullShapeSettings_CreateShape(
Pointer< JPH_ConvexHullShapeSettings> settings) → Pointer<JPH_ConvexHullShape> -
JPH_CylinderShape_Create(
double halfHeight, double radius) → Pointer< JPH_CylinderShape> -
JPH_CylinderShape_GetHalfHeight(
Pointer< JPH_CylinderShape> shape) → double -
JPH_CylinderShape_GetRadius(
Pointer< JPH_CylinderShape> shape) → double -
JPH_CylinderShapeSettings_Create(
double halfHeight, double radius, double convexRadius) → Pointer< JPH_CylinderShapeSettings> - CylinderShape
-
JPH_CylinderShapeSettings_CreateShape(
Pointer< JPH_CylinderShapeSettings> settings) → Pointer<JPH_CylinderShape> -
JPH_EmptyShapeSettings_Create(
Pointer< JPH_Vec3> centerOfMass) → Pointer<JPH_EmptyShapeSettings> - EmptyShape
-
JPH_EmptyShapeSettings_CreateShape(
Pointer< JPH_EmptyShapeSettings> settings) → Pointer<JPH_EmptyShape> -
JPH_HeightFieldShape_GetBlockSize(
Pointer< JPH_HeightFieldShape> shape) → int -
JPH_HeightFieldShape_GetMaterial(
Pointer< JPH_HeightFieldShape> shape, int x, int y) → Pointer<JPH_PhysicsMaterial> -
JPH_HeightFieldShape_GetMaxHeightValue(
Pointer< JPH_HeightFieldShape> shape) → double -
JPH_HeightFieldShape_GetMinHeightValue(
Pointer< JPH_HeightFieldShape> shape) → double -
JPH_HeightFieldShape_GetPosition(
Pointer< JPH_HeightFieldShape> shape, int x, int y, Pointer<JPH_Vec3> result) → void -
JPH_HeightFieldShape_GetSampleCount(
Pointer< JPH_HeightFieldShape> shape) → int -
JPH_HeightFieldShape_IsNoCollision(
Pointer< JPH_HeightFieldShape> shape, int x, int y) → bool -
JPH_HeightFieldShape_ProjectOntoSurface(
Pointer< JPH_HeightFieldShape> shape, Pointer<JPH_Vec3> localPosition, Pointer<JPH_Vec3> outSurfacePosition, Pointer<JPH_BodyID> outSubShapeID) → bool -
JPH_HeightFieldShapeSettings_CalculateBitsPerSampleForError(
Pointer< JPH_HeightFieldShapeSettings> settings, double maxError) → int -
JPH_HeightFieldShapeSettings_Create(
Pointer< Float> samples, Pointer<JPH_Vec3> offset, Pointer<JPH_Vec3> scale, int sampleCount, Pointer<Uint8> materialIndices) → Pointer<JPH_HeightFieldShapeSettings> - HeightFieldShape
-
JPH_HeightFieldShapeSettings_CreateShape(
Pointer< JPH_HeightFieldShapeSettings> settings) → Pointer<JPH_HeightFieldShape> -
JPH_HeightFieldShapeSettings_DetermineMinAndMaxSample(
Pointer< JPH_HeightFieldShapeSettings> settings, Pointer<Float> pOutMinValue, Pointer<Float> pOutMaxValue, Pointer<Float> pOutQuantizationScale) → void -
JPH_HeightFieldShapeSettings_GetActiveEdgeCosThresholdAngle(
Pointer< JPH_HeightFieldShapeSettings> settings) → double -
JPH_HeightFieldShapeSettings_GetBitsPerSample(
Pointer< JPH_HeightFieldShapeSettings> settings) → int -
JPH_HeightFieldShapeSettings_GetBlockSize(
Pointer< JPH_HeightFieldShapeSettings> settings) → int -
JPH_HeightFieldShapeSettings_GetMaxHeightValue(
Pointer< JPH_HeightFieldShapeSettings> settings) → double -
JPH_HeightFieldShapeSettings_GetMinHeightValue(
Pointer< JPH_HeightFieldShapeSettings> settings) → double -
JPH_HeightFieldShapeSettings_GetOffset(
Pointer< JPH_HeightFieldShapeSettings> shape, Pointer<JPH_Vec3> result) → void -
JPH_HeightFieldShapeSettings_GetSampleCount(
Pointer< JPH_HeightFieldShapeSettings> settings) → int -
JPH_HeightFieldShapeSettings_GetScale(
Pointer< JPH_HeightFieldShapeSettings> shape, Pointer<JPH_Vec3> result) → void -
JPH_HeightFieldShapeSettings_SetActiveEdgeCosThresholdAngle(
Pointer< JPH_HeightFieldShapeSettings> settings, double value) → void -
JPH_HeightFieldShapeSettings_SetBitsPerSample(
Pointer< JPH_HeightFieldShapeSettings> settings, int value) → void -
JPH_HeightFieldShapeSettings_SetBlockSize(
Pointer< JPH_HeightFieldShapeSettings> settings, int value) → void -
JPH_HeightFieldShapeSettings_SetMaxHeightValue(
Pointer< JPH_HeightFieldShapeSettings> settings, double value) → void -
JPH_HeightFieldShapeSettings_SetMinHeightValue(
Pointer< JPH_HeightFieldShapeSettings> settings, double value) → void -
JPH_HeightFieldShapeSettings_SetOffset(
Pointer< JPH_HeightFieldShapeSettings> settings, Pointer<JPH_Vec3> value) → void -
JPH_HeightFieldShapeSettings_SetSampleCount(
Pointer< JPH_HeightFieldShapeSettings> settings, int value) → void -
JPH_HeightFieldShapeSettings_SetScale(
Pointer< JPH_HeightFieldShapeSettings> settings, Pointer<JPH_Vec3> value) → void -
JPH_MeshShape_GetTriangleUserData(
Pointer< JPH_MeshShape> shape, int id) → int -
JPH_MeshShapeSettings_Create(
Pointer< JPH_Triangle> triangles, int triangleCount) → Pointer<JPH_MeshShapeSettings> - MeshShape
-
JPH_MeshShapeSettings_Create2(
Pointer< JPH_Vec3> vertices, int verticesCount, Pointer<JPH_IndexedTriangle> triangles, int triangleCount) → Pointer<JPH_MeshShapeSettings> -
JPH_MeshShapeSettings_CreateShape(
Pointer< JPH_MeshShapeSettings> settings) → Pointer<JPH_MeshShape> -
JPH_MeshShapeSettings_GetActiveEdgeCosThresholdAngle(
Pointer< JPH_MeshShapeSettings> settings) → double -
JPH_MeshShapeSettings_GetBuildQuality(
Pointer< JPH_MeshShapeSettings> settings) → int -
JPH_MeshShapeSettings_GetMaxTrianglesPerLeaf(
Pointer< JPH_MeshShapeSettings> settings) → int -
JPH_MeshShapeSettings_GetPerTriangleUserData(
Pointer< JPH_MeshShapeSettings> settings) → bool -
JPH_MeshShapeSettings_Sanitize(
Pointer< JPH_MeshShapeSettings> settings) → void -
JPH_MeshShapeSettings_SetActiveEdgeCosThresholdAngle(
Pointer< JPH_MeshShapeSettings> settings, double value) → void -
JPH_MeshShapeSettings_SetBuildQuality(
Pointer< JPH_MeshShapeSettings> settings, int value) → void -
JPH_MeshShapeSettings_SetMaxTrianglesPerLeaf(
Pointer< JPH_MeshShapeSettings> settings, int value) → void -
JPH_MeshShapeSettings_SetPerTriangleUserData(
Pointer< JPH_MeshShapeSettings> settings, bool value) → void -
JPH_OffsetCenterOfMassShape_Create(
Pointer< JPH_Vec3> offset, Pointer<JPH_Shape> shape) → Pointer<JPH_OffsetCenterOfMassShape> -
JPH_OffsetCenterOfMassShape_GetOffset(
Pointer< JPH_OffsetCenterOfMassShape> shape, Pointer<JPH_Vec3> result) → void -
JPH_OffsetCenterOfMassShapeSettings_Create(
Pointer< JPH_Vec3> offset, Pointer<JPH_ShapeSettings> shapeSettings) → Pointer<JPH_OffsetCenterOfMassShapeSettings> - OffsetCenterOfMassShape
-
JPH_OffsetCenterOfMassShapeSettings_Create2(
Pointer< JPH_Vec3> offset, Pointer<JPH_Shape> shape) → Pointer<JPH_OffsetCenterOfMassShapeSettings> -
JPH_OffsetCenterOfMassShapeSettings_CreateShape(
Pointer< JPH_OffsetCenterOfMassShapeSettings> settings) → Pointer<JPH_OffsetCenterOfMassShape> -
JPH_PhysicsSystem_GetBodyInterface(
Pointer< JPH_PhysicsSystem> system) → Pointer<JPH_BodyInterface> -
JPH_PhysicsSystem_GetBodyInterfaceNoLock(
Pointer< JPH_PhysicsSystem> system) → Pointer<JPH_BodyInterface> -
JPH_RotatedTranslatedShape_Create(
Pointer< JPH_Vec3> position, Pointer<JPH_Quat> rotation, Pointer<JPH_Shape> shape) → Pointer<JPH_RotatedTranslatedShape> -
JPH_RotatedTranslatedShape_GetPosition(
Pointer< JPH_RotatedTranslatedShape> shape, Pointer<JPH_Vec3> position) → void -
JPH_RotatedTranslatedShape_GetRotation(
Pointer< JPH_RotatedTranslatedShape> shape, Pointer<JPH_Quat> rotation) → void -
JPH_RotatedTranslatedShapeSettings_Create(
Pointer< JPH_Vec3> position, Pointer<JPH_Quat> rotation, Pointer<JPH_ShapeSettings> shapeSettings) → Pointer<JPH_RotatedTranslatedShapeSettings> - RotatedTranslatedShape
-
JPH_RotatedTranslatedShapeSettings_Create2(
Pointer< JPH_Vec3> position, Pointer<JPH_Quat> rotation, Pointer<JPH_Shape> shape) → Pointer<JPH_RotatedTranslatedShapeSettings> -
JPH_RotatedTranslatedShapeSettings_CreateShape(
Pointer< JPH_RotatedTranslatedShapeSettings> settings) → Pointer<JPH_RotatedTranslatedShape> -
JPH_ScaledShape_Create(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> scale) → Pointer<JPH_ScaledShape> -
JPH_ScaledShape_GetScale(
Pointer< JPH_ScaledShape> shape, Pointer<JPH_Vec3> result) → void -
JPH_ScaledShapeSettings_Create(
Pointer< JPH_ShapeSettings> shapeSettings, Pointer<JPH_Vec3> scale) → Pointer<JPH_ScaledShapeSettings> - ScaledShape
-
JPH_ScaledShapeSettings_Create2(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> scale) → Pointer<JPH_ScaledShapeSettings> -
JPH_ScaledShapeSettings_CreateShape(
Pointer< JPH_ScaledShapeSettings> settings) → Pointer<JPH_ScaledShape> -
JPH_Shape_CastRay(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> origin, Pointer<JPH_Vec3> direction, Pointer<JPH_RayCastResult> hit) → bool -
JPH_Shape_CastRay2(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> origin, Pointer<JPH_Vec3> direction, Pointer<JPH_RayCastSettings> rayCastSettings, int collectorType, Pointer<JPH_CastRayResultCallback> callback, Pointer<Void> userData, Pointer<JPH_ShapeFilter> shapeFilter) → bool -
JPH_Shape_CollidePoint(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> point, Pointer<JPH_ShapeFilter> shapeFilter) → bool -
JPH_Shape_CollidePoint2(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> point, int collectorType, Pointer<JPH_CollidePointResultCallback> callback, Pointer<Void> userData, Pointer<JPH_ShapeFilter> shapeFilter) → bool -
JPH_Shape_Destroy(
Pointer< JPH_Shape> shape) → void -
JPH_Shape_Draw(
Pointer< JPH_Shape> shape, Pointer<JPH_DebugRenderer> renderer, Pointer<JPH_RMat4> centerOfMassTransform, Pointer<JPH_Vec3> scale, int color, bool useMaterialColors, bool drawWireframe) → void - Shape
-
JPH_Shape_GetCenterOfMass(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> result) → void -
JPH_Shape_GetInnerRadius(
Pointer< JPH_Shape> shape) → double -
JPH_Shape_GetLeafShape(
Pointer< JPH_Shape> shape, int subShapeID, Pointer<JPH_BodyID> remainder) → Pointer<JPH_Shape> -
JPH_Shape_GetLocalBounds(
Pointer< JPH_Shape> shape, Pointer<JPH_AABox> result) → void -
JPH_Shape_GetMassProperties(
Pointer< JPH_Shape> shape, Pointer<JPH_MassProperties> result) → void -
JPH_Shape_GetMaterial(
Pointer< JPH_Shape> shape, int subShapeID) → Pointer<JPH_PhysicsMaterial> -
JPH_Shape_GetSubShapeIDBitsRecursive(
Pointer< JPH_Shape> shape) → int -
JPH_Shape_GetSubType(
Pointer< JPH_Shape> shape) → int -
JPH_Shape_GetSupportingFace(
Pointer< JPH_Shape> shape, int subShapeID, Pointer<JPH_Vec3> direction, Pointer<JPH_Vec3> scale, Pointer<JPH_RMat4> centerOfMassTransform, Pointer<JPH_SupportingFace> outVertices) → void -
JPH_Shape_GetSurfaceNormal(
Pointer< JPH_Shape> shape, int subShapeID, Pointer<JPH_Vec3> localPosition, Pointer<JPH_Vec3> normal) → void -
JPH_Shape_GetType(
Pointer< JPH_Shape> shape) → int -
JPH_Shape_GetUserData(
Pointer< JPH_Shape> shape) → int -
JPH_Shape_GetVolume(
Pointer< JPH_Shape> shape) → double -
JPH_Shape_GetWorldSpaceBounds(
Pointer< JPH_Shape> shape, Pointer<JPH_RMat4> centerOfMassTransform, Pointer<JPH_Vec3> scale, Pointer<JPH_AABox> result) → void -
JPH_Shape_IsValidScale(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> scale) → bool -
JPH_Shape_MakeScaleValid(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> scale, Pointer<JPH_Vec3> result) → void -
JPH_Shape_MustBeStatic(
Pointer< JPH_Shape> shape) → bool -
JPH_Shape_ScaleShape(
Pointer< JPH_Shape> shape, Pointer<JPH_Vec3> scale) → Pointer<JPH_Shape> -
JPH_Shape_SetUserData(
Pointer< JPH_Shape> shape, int userData) → void -
JPH_ShapeSettings_Destroy(
Pointer< JPH_ShapeSettings> settings) → void - ShapeSettings
-
JPH_SphereShape_Create(
double radius) → Pointer< JPH_SphereShape> -
JPH_SphereShape_GetRadius(
Pointer< JPH_SphereShape> shape) → double -
JPH_SphereShapeSettings_Create(
double radius) → Pointer< JPH_SphereShapeSettings> - SphereShape
-
JPH_SphereShapeSettings_CreateShape(
Pointer< JPH_SphereShapeSettings> settings) → Pointer<JPH_SphereShape> -
JPH_SphereShapeSettings_GetRadius(
Pointer< JPH_SphereShapeSettings> settings) → double -
JPH_SphereShapeSettings_SetRadius(
Pointer< JPH_SphereShapeSettings> settings, double radius) → void -
JPH_StaticCompoundShape_Create(
Pointer< JPH_StaticCompoundShapeSettings> settings) → Pointer<JPH_StaticCompoundShape> -
JPH_StaticCompoundShapeSettings_Create(
) → Pointer< JPH_StaticCompoundShapeSettings> - StaticCompoundShape
Typedefs
- DartJPH_BodyID = int
- DartJPH_CollisionGroupID = int
- DartJPH_CollisionSubGroupID = int
- DartJPH_Color = int
- DartJPH_ObjectLayer = int
- DartJPH_SubShapeID = int
- JPH_BodyID = Uint32
-
JPH_CastRayResultCallback
= NativeFunction<
Void Function(Pointer< Void> context, Pointer<JPH_RayCastResult> result)> -
JPH_CollidePointResultCallback
= NativeFunction<
Void Function(Pointer< Void> context, Pointer<JPH_CollidePointResult> result)> - JPH_CollisionGroupID = Uint32
- JPH_CollisionSubGroupID = Uint32
- JPH_Color = Uint32
- JPH_ObjectLayer = Uint32
- JPH_RMat4 = JPH_Mat4
- JPH_RVec3 = JPH_Vec3
- JPH_SubShapeID = Uint32