Crate rolt

Source
Expand description

Safe Rust wrapper around Jolt Physics using JoltC.

These bindings are best-effort and incomplete. The joltc-sys crate contains the unsafe bindings that this crate uses and covers a lot more of Jolt’s API.

These bindings target Jolt Physics 5.0.0. You can view the C++ documentation for this version of Jolt Physics here:

https://jrouwe.github.io/JoltPhysicsDocs/5.0.0/

Structs§

Body
See also: Jolt’s Body class.
BodyFilterImpl
Holds an implementation of the BodyFilter trait or the manual vtable equivalent.
BodyId
An ID that can be used to access a body using BodyInterface.
BodyInterface
See also: Jolt’s BodyInterface class.
BroadPhaseLayer
Represents a broad phase layer.
BroadPhaseLayerFilterImpl
Holds an implementation of the BroadPhaseLayerFilter trait or the manual vtable equivalent.
BroadPhaseLayerInterfaceImpl
Holds an implementation of the BroadPhaseLayerInterface trait or the manual vtable equivalent.
Color
Represents an sRGB color with alpha.
DVec3
A 3-dimensional vector.
Mat4
A 4x4 column major matrix.
NarrowPhaseQuery
See also: Jolt’s NarrowPhaseQuery class.
ObjectLayer
Represents an object layer, which is internally either a u16 or a u32.
ObjectLayerFilterImpl
Holds an implementation of the ObjectLayerFilter trait or the manual vtable equivalent.
ObjectLayerPairFilterImpl
Holds an implementation of the ObjectLayerPairFilter trait or the manual vtable equivalent.
ObjectVsBroadPhaseLayerFilterImpl
Holds an implementation of the ObjectVsBroadPhaseLayerFilter trait or the manual vtable equivalent.
PhysicsSystem
The root of everything for a physics simulation.
Quat
A quaternion representing an orientation.
RRayCast
See also: Jolt’s RRayCast class.
RayCastArgs
Arguments for NarrowPhaseQuery::cast_ray.
RayCastResult
The result of calling NarrowPhaseQuery::cast_ray.
Ref
Rust equivalent to Jolt’s RefConst
Vec3
A 3-dimensional vector.
Vec4
A 4-dimensional vector.

Traits§

BodyFilter
See also: Jolt’s BodyFilter class.
BroadPhaseLayerFilter
See also: Jolt’s BroadPhaseLayerFilter class.
BroadPhaseLayerInterface
See also: Jolt’s BroadPhaseLayerInterface class.
FromJolt
Trait for converting a value from its corresponding [joltc-sys] type.
IntoJolt
Trait for converting a value into its corresponding [joltc-sys] type.
IntoRolt
Convenience trait for FromJolt.
ObjectLayerFilter
See also: Jolt’s ObjectLayerFilter class.
ObjectLayerPairFilter
See also: Jolt’s ObjectLayerPairFilter class.
ObjectVsBroadPhaseLayerFilter
See also: Jolt’s ObjectVsBroadPhaseLayerFilter class.
RefTarget
Rust version of Jolt’s RefTarget CRTP.

Functions§

factory_delete
Deletes the globally registered factory.
factory_init
Creates a new global factory. Required for initialization and used by Jolt’s serialization.
register_default_allocator
JPH::RegisterDefaultAllocator
register_types
JPH::RegisterTypes
unregister_types
JPH::UnregisterTypes

Type Aliases§

RVec3
Represents a world-space vector, which can use either f32 or f64.
Real
The type used for representing world space values.