| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Box3D.Id
Description
Low-level bindings to box3d/id.h: opaque handles to Box3D objects.
The C API passes these as integer-only structs of at most 8 bytes by value.
On the 64-bit ABIs this package supports (x86-64 SysV and Win64, AArch64)
such a struct travels in a general-purpose register exactly like a
uint32_t/uint64_t, so the handles are newtypes over words and cross the
FFI directly, with no shim. The payload is the raw struct bytes and carries
no stable meaning; the constructors are exported only so foreign imports can
see through the newtypes. A zero word is the null id, which is also what
zero-initialisation produces on the C side. Struct sizes are pinned by
_Static_asserts in cbits/box3d_shim.c.
ContactId is 12 bytes and does not fit a word, so it keeps a struct-shaped
representation; nothing passes it by value yet.
Documentation
Handle to a world instance.
Instances
| Storable WorldId Source # | |
| Show WorldId Source # | |
| Eq WorldId Source # | |
Handle to a body instance.
Instances
| HasUserData BodyId Source # | |
Defined in Box3D.UserData | |
| Storable BodyId Source # | |
| Show BodyId Source # | |
| Eq BodyId Source # | |
Handle to a shape instance.
Instances
| HasUserData ShapeId Source # | |
Defined in Box3D.UserData | |
| Storable ShapeId Source # | |
| Show ShapeId Source # | |
| Eq ShapeId Source # | |
Handle to a joint instance.
Instances
| HasUserData JointId Source # | |
Defined in Box3D.UserData | |
| Storable JointId Source # | |
| Show JointId Source # | |
| Eq JointId Source # | |
Handle to a contact instance.
Instances
| Storable ContactId Source # | |
Defined in Box3D.Id | |
| Show ContactId Source # | |
| Eq ContactId Source # | |
nullBodyId :: BodyId Source #