| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Box3D.Types
Description
Low-level bindings to the enums and configuration structs of
box3d/types.h needed to create and configure worlds, bodies and shapes.
The *Def structs carry an internalValue magic that Box3D uses to detect
an initialised definition, so always start from the matching
default* constructor and tweak the fields you need before use. Every C
bool maps to CBool (one byte), and opaque callback / userData pointers
are kept as until the callback layer lands.Ptr ()
Synopsis
- newtype BodyType = BodyType CInt
- pattern StaticBody :: BodyType
- pattern KinematicBody :: BodyType
- pattern DynamicBody :: BodyType
- newtype ShapeType = ShapeType CInt
- pattern CapsuleShape :: ShapeType
- pattern CompoundShape :: ShapeType
- pattern HeightShape :: ShapeType
- pattern HullShape :: ShapeType
- pattern MeshShape :: ShapeType
- pattern SphereShape :: ShapeType
- newtype JointType = JointType CInt
- pattern ParallelJoint :: JointType
- pattern DistanceJoint :: JointType
- pattern FilterJoint :: JointType
- pattern MotorJoint :: JointType
- pattern PrismaticJoint :: JointType
- pattern RevoluteJoint :: JointType
- pattern SphericalJoint :: JointType
- pattern WeldJoint :: JointType
- pattern WheelJoint :: JointType
- data Capacity = Capacity {}
- data MotionLocks = MotionLocks {}
- data Filter = Filter {}
- data SurfaceMaterial = SurfaceMaterial {}
- data Sphere = Sphere {}
- data Capsule = Capsule {}
- data WorldDef = WorldDef {
- worldDefGravity :: Vec3
- worldDefRestitutionThreshold :: Float
- worldDefHitEventThreshold :: Float
- worldDefContactHertz :: Float
- worldDefContactDampingRatio :: Float
- worldDefContactSpeed :: Float
- worldDefMaximumLinearSpeed :: Float
- worldDefFrictionCallback :: FunPtr FrictionCallback
- worldDefRestitutionCallback :: FunPtr RestitutionCallback
- worldDefEnableSleep :: CBool
- worldDefEnableContinuous :: CBool
- worldDefWorkerCount :: Word32
- worldDefEnqueueTask :: FunPtr EnqueueTaskCallback
- worldDefFinishTask :: FunPtr FinishTaskCallback
- worldDefUserTaskContext :: Ptr ()
- worldDefUserData :: Ptr ()
- worldDefCreateDebugShape :: FunPtr CreateDebugShapeCallback
- worldDefDestroyDebugShape :: FunPtr DestroyDebugShapeCallback
- worldDefUserDebugShapeContext :: Ptr ()
- worldDefCapacity :: Capacity
- worldDefInternalValue :: CInt
- data EnqueueTaskCallback
- data FinishTaskCallback
- data BodyDef = BodyDef {
- bodyDefType :: BodyType
- bodyDefPosition :: Pos
- bodyDefRotation :: Quat
- bodyDefLinearVelocity :: Vec3
- bodyDefAngularVelocity :: Vec3
- bodyDefLinearDamping :: Float
- bodyDefAngularDamping :: Float
- bodyDefGravityScale :: Float
- bodyDefSleepThreshold :: Float
- bodyDefName :: CString
- bodyDefUserData :: Ptr ()
- bodyDefMotionLocks :: MotionLocks
- bodyDefEnableSleep :: CBool
- bodyDefIsAwake :: CBool
- bodyDefIsBullet :: CBool
- bodyDefIsEnabled :: CBool
- bodyDefAllowFastRotation :: CBool
- bodyDefEnableContactRecycling :: CBool
- bodyDefInternalValue :: CInt
- data ShapeDef = ShapeDef {
- shapeDefUserData :: Ptr ()
- shapeDefMaterials :: Ptr SurfaceMaterial
- shapeDefMaterialCount :: CInt
- shapeDefBaseMaterial :: SurfaceMaterial
- shapeDefDensity :: Float
- shapeDefExplosionScale :: Float
- shapeDefFilter :: Filter
- shapeDefEnableCustomFiltering :: CBool
- shapeDefIsSensor :: CBool
- shapeDefEnableSensorEvents :: CBool
- shapeDefEnableContactEvents :: CBool
- shapeDefEnableHitEvents :: CBool
- shapeDefEnablePreSolveEvents :: CBool
- shapeDefInvokeContactCreation :: CBool
- shapeDefUpdateBodyMass :: CBool
- shapeDefInternalValue :: CInt
- data ExplosionDef = ExplosionDef {}
- defaultExplosionDef :: IO ExplosionDef
- data QueryFilter = QueryFilter {}
- defaultQueryFilter :: IO QueryFilter
- data MassData = MassData {}
- data RayCastInput = RayCastInput {}
- data CastOutput = CastOutput {}
- type WorldCastOutput = CastOutput
- data RayResult = RayResult {}
- data TreeStats = TreeStats {}
- data Sweep = Sweep {}
- data PlaneResult = PlaneResult {}
- dynamicTreeByteCount :: Int
- data BodyEvents = BodyEvents {}
- data BodyMoveEvent = BodyMoveEvent {}
- data SensorEvents = SensorEvents {}
- data SensorBeginTouchEvent = SensorBeginTouchEvent {}
- data SensorEndTouchEvent = SensorEndTouchEvent {}
- data ContactEvents = ContactEvents {}
- data ContactBeginTouchEvent = ContactBeginTouchEvent {}
- data ContactEndTouchEvent = ContactEndTouchEvent {}
- data ContactHitEvent = ContactHitEvent {}
- data JointEvents = JointEvents {}
- data JointEvent = JointEvent {}
- defaultWorldDef :: IO WorldDef
- defaultBodyDef :: IO BodyDef
- defaultShapeDef :: IO ShapeDef
- defaultFilter :: IO Filter
- defaultSurfaceMaterial :: IO SurfaceMaterial
- data JointDef = JointDef {
- jointDefUserData :: Ptr ()
- jointDefBodyIdA :: BodyId
- jointDefBodyIdB :: BodyId
- jointDefLocalFrameA :: Transform
- jointDefLocalFrameB :: Transform
- jointDefForceThreshold :: Float
- jointDefTorqueThreshold :: Float
- jointDefConstraintHertz :: Float
- jointDefConstraintDampingRatio :: Float
- jointDefDrawScale :: Float
- jointDefCollideConnected :: CBool
- jointDefInternalValue :: CInt
- data DistanceJointDef = DistanceJointDef {
- distanceJointDefBase :: JointDef
- distanceJointDefLength :: Float
- distanceJointDefEnableSpring :: CBool
- distanceJointDefLowerSpringForce :: Float
- distanceJointDefUpperSpringForce :: Float
- distanceJointDefHertz :: Float
- distanceJointDefDampingRatio :: Float
- distanceJointDefEnableLimit :: CBool
- distanceJointDefMinLength :: Float
- distanceJointDefMaxLength :: Float
- distanceJointDefEnableMotor :: CBool
- distanceJointDefMaxMotorForce :: Float
- distanceJointDefMotorSpeed :: Float
- defaultDistanceJointDef :: IO DistanceJointDef
- data MotorJointDef = MotorJointDef {
- motorJointDefBase :: JointDef
- motorJointDefLinearVelocity :: Vec3
- motorJointDefMaxVelocityForce :: Float
- motorJointDefAngularVelocity :: Vec3
- motorJointDefMaxVelocityTorque :: Float
- motorJointDefLinearHertz :: Float
- motorJointDefLinearDampingRatio :: Float
- motorJointDefMaxSpringForce :: Float
- motorJointDefAngularHertz :: Float
- motorJointDefAngularDampingRatio :: Float
- motorJointDefMaxSpringTorque :: Float
- defaultMotorJointDef :: IO MotorJointDef
- data ParallelJointDef = ParallelJointDef {}
- defaultParallelJointDef :: IO ParallelJointDef
- data PrismaticJointDef = PrismaticJointDef {
- prismaticJointDefBase :: JointDef
- prismaticJointDefEnableSpring :: CBool
- prismaticJointDefHertz :: Float
- prismaticJointDefDampingRatio :: Float
- prismaticJointDefTargetTranslation :: Float
- prismaticJointDefEnableLimit :: CBool
- prismaticJointDefLowerTranslation :: Float
- prismaticJointDefUpperTranslation :: Float
- prismaticJointDefEnableMotor :: CBool
- prismaticJointDefMaxMotorForce :: Float
- prismaticJointDefMotorSpeed :: Float
- defaultPrismaticJointDef :: IO PrismaticJointDef
- data RevoluteJointDef = RevoluteJointDef {
- revoluteJointDefBase :: JointDef
- revoluteJointDefTargetAngle :: Float
- revoluteJointDefEnableSpring :: CBool
- revoluteJointDefHertz :: Float
- revoluteJointDefDampingRatio :: Float
- revoluteJointDefEnableLimit :: CBool
- revoluteJointDefLowerAngle :: Float
- revoluteJointDefUpperAngle :: Float
- revoluteJointDefEnableMotor :: CBool
- revoluteJointDefMaxMotorTorque :: Float
- revoluteJointDefMotorSpeed :: Float
- defaultRevoluteJointDef :: IO RevoluteJointDef
- data SphericalJointDef = SphericalJointDef {
- sphericalJointDefBase :: JointDef
- sphericalJointDefEnableSpring :: CBool
- sphericalJointDefHertz :: Float
- sphericalJointDefDampingRatio :: Float
- sphericalJointDefTargetRotation :: Quat
- sphericalJointDefEnableConeLimit :: CBool
- sphericalJointDefConeAngle :: Float
- sphericalJointDefEnableTwistLimit :: CBool
- sphericalJointDefLowerTwistAngle :: Float
- sphericalJointDefUpperTwistAngle :: Float
- sphericalJointDefEnableMotor :: CBool
- sphericalJointDefMaxMotorTorque :: Float
- sphericalJointDefMotorVelocity :: Vec3
- defaultSphericalJointDef :: IO SphericalJointDef
- data WeldJointDef = WeldJointDef {}
- defaultWeldJointDef :: IO WeldJointDef
- data WheelJointDef = WheelJointDef {
- wheelJointDefBase :: JointDef
- wheelJointDefEnableSuspensionSpring :: CBool
- wheelJointDefSuspensionHertz :: Float
- wheelJointDefSuspensionDampingRatio :: Float
- wheelJointDefEnableSuspensionLimit :: CBool
- wheelJointDefLowerSuspensionLimit :: Float
- wheelJointDefUpperSuspensionLimit :: Float
- wheelJointDefEnableSpinMotor :: CBool
- wheelJointDefMaxSpinTorque :: Float
- wheelJointDefSpinSpeed :: Float
- wheelJointDefEnableSteering :: CBool
- wheelJointDefSteeringHertz :: Float
- wheelJointDefSteeringDampingRatio :: Float
- wheelJointDefTargetSteeringAngle :: Float
- wheelJointDefMaxSteeringTorque :: Float
- wheelJointDefEnableSteeringLimit :: CBool
- wheelJointDefLowerSteeringLimit :: Float
- wheelJointDefUpperSteeringLimit :: Float
- defaultWheelJointDef :: IO WheelJointDef
- data FilterJointDef = FilterJointDef {}
- defaultFilterJointDef :: IO FilterJointDef
Enums
The body simulation type.
Instances
| Storable BodyType Source # | |
| Show BodyType Source # | |
| Eq BodyType Source # | |
pattern StaticBody :: BodyType Source #
pattern KinematicBody :: BodyType Source #
pattern DynamicBody :: BodyType Source #
Shape geometry type.
Instances
| Storable ShapeType Source # | |
Defined in Box3D.Types | |
| Show ShapeType Source # | |
| Eq ShapeType Source # | |
pattern CapsuleShape :: ShapeType Source #
pattern CompoundShape :: ShapeType Source #
pattern HeightShape :: ShapeType Source #
pattern SphereShape :: ShapeType Source #
Joint type.
Instances
| Storable JointType Source # | |
Defined in Box3D.Types | |
| Show JointType Source # | |
| Eq JointType Source # | |
pattern ParallelJoint :: JointType Source #
pattern DistanceJoint :: JointType Source #
pattern FilterJoint :: JointType Source #
pattern MotorJoint :: JointType Source #
pattern PrismaticJoint :: JointType Source #
pattern RevoluteJoint :: JointType Source #
pattern SphericalJoint :: JointType Source #
pattern WheelJoint :: JointType Source #
Small structs
Optional world capacities used to avoid run-time allocations.
Constructors
| Capacity | |
Instances
| Storable Capacity Source # | |
| Show Capacity Source # | |
| Eq Capacity Source # | |
data MotionLocks Source #
Per-axis translation and rotation locks for a body.
Constructors
| MotionLocks | |
Instances
| Storable MotionLocks Source # | |
Defined in Box3D.Types Methods sizeOf :: MotionLocks -> Int # alignment :: MotionLocks -> Int # peekElemOff :: Ptr MotionLocks -> Int -> IO MotionLocks # pokeElemOff :: Ptr MotionLocks -> Int -> MotionLocks -> IO () # peekByteOff :: Ptr b -> Int -> IO MotionLocks # pokeByteOff :: Ptr b -> Int -> MotionLocks -> IO () # peek :: Ptr MotionLocks -> IO MotionLocks # poke :: Ptr MotionLocks -> MotionLocks -> IO () # | |
| Show MotionLocks Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> MotionLocks -> ShowS # show :: MotionLocks -> String # showList :: [MotionLocks] -> ShowS # | |
| Eq MotionLocks Source # | |
Defined in Box3D.Types | |
Collision filtering data.
Constructors
| Filter | |
Fields | |
Instances
| Storable Filter Source # | |
| Show Filter Source # | |
| Eq Filter Source # | |
data SurfaceMaterial Source #
Per-surface material properties.
Constructors
| SurfaceMaterial | |
Instances
| Storable SurfaceMaterial Source # | |
Defined in Box3D.Types Methods sizeOf :: SurfaceMaterial -> Int # alignment :: SurfaceMaterial -> Int # peekElemOff :: Ptr SurfaceMaterial -> Int -> IO SurfaceMaterial # pokeElemOff :: Ptr SurfaceMaterial -> Int -> SurfaceMaterial -> IO () # peekByteOff :: Ptr b -> Int -> IO SurfaceMaterial # pokeByteOff :: Ptr b -> Int -> SurfaceMaterial -> IO () # peek :: Ptr SurfaceMaterial -> IO SurfaceMaterial # poke :: Ptr SurfaceMaterial -> SurfaceMaterial -> IO () # | |
| Show SurfaceMaterial Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> SurfaceMaterial -> ShowS # show :: SurfaceMaterial -> String # showList :: [SurfaceMaterial] -> ShowS # | |
| Eq SurfaceMaterial Source # | |
Defined in Box3D.Types Methods (==) :: SurfaceMaterial -> SurfaceMaterial -> Bool # (/=) :: SurfaceMaterial -> SurfaceMaterial -> Bool # | |
A sphere with a local center offset.
Constructors
| Sphere | |
Fields
| |
Instances
| Storable Sphere Source # | |
| Show Sphere Source # | |
| Eq Sphere Source # | |
A capsule: an extruded sphere between two hemisphere centers.
Constructors
| Capsule | |
Fields
| |
Instances
| Storable Capsule Source # | |
| Show Capsule Source # | |
| Eq Capsule Source # | |
Definitions
World creation definition. Initialise with defaultWorldDef.
Constructors
Instances
| Storable WorldDef Source # | |
| Show WorldDef Source # | |
| Eq WorldDef Source # | |
data EnqueueTaskCallback Source #
Phantom tags for the task-system callbacks stored on WorldDef. These
typedefs never appear in API signatures, so Box3D.Tags carries no tag for
them; produce values with withThreadPoolTaskSystem.
data FinishTaskCallback Source #
Rigid body creation definition. Initialise with defaultBodyDef.
Constructors
Instances
| Storable BodyDef Source # | |
| Show BodyDef Source # | |
| Eq BodyDef Source # | |
Shape creation definition. Initialise with defaultShapeDef.
Constructors
| ShapeDef | |
Fields
| |
Instances
| Storable ShapeDef Source # | |
| Show ShapeDef Source # | |
| Eq ShapeDef Source # | |
data ExplosionDef Source #
Explosion parameters for explode. Initialise with
defaultExplosionDef.
Constructors
| ExplosionDef | |
Instances
| Storable ExplosionDef Source # | |
Defined in Box3D.Types Methods sizeOf :: ExplosionDef -> Int # alignment :: ExplosionDef -> Int # peekElemOff :: Ptr ExplosionDef -> Int -> IO ExplosionDef # pokeElemOff :: Ptr ExplosionDef -> Int -> ExplosionDef -> IO () # peekByteOff :: Ptr b -> Int -> IO ExplosionDef # pokeByteOff :: Ptr b -> Int -> ExplosionDef -> IO () # peek :: Ptr ExplosionDef -> IO ExplosionDef # poke :: Ptr ExplosionDef -> ExplosionDef -> IO () # | |
| Show ExplosionDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> ExplosionDef -> ShowS # show :: ExplosionDef -> String # showList :: [ExplosionDef] -> ShowS # | |
| Eq ExplosionDef Source # | |
Defined in Box3D.Types | |
defaultExplosionDef :: IO ExplosionDef Source #
A fully-initialised explosion definition.
Queries and casts
data QueryFilter Source #
Filter for world queries: which shape categories to accept. The optional
id / name pair tags the query in a recording; a nullPtr name means
untagged.
Constructors
| QueryFilter | |
Fields | |
Instances
| Storable QueryFilter Source # | |
Defined in Box3D.Types Methods sizeOf :: QueryFilter -> Int # alignment :: QueryFilter -> Int # peekElemOff :: Ptr QueryFilter -> Int -> IO QueryFilter # pokeElemOff :: Ptr QueryFilter -> Int -> QueryFilter -> IO () # peekByteOff :: Ptr b -> Int -> IO QueryFilter # pokeByteOff :: Ptr b -> Int -> QueryFilter -> IO () # peek :: Ptr QueryFilter -> IO QueryFilter # poke :: Ptr QueryFilter -> QueryFilter -> IO () # | |
| Show QueryFilter Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> QueryFilter -> ShowS # show :: QueryFilter -> String # showList :: [QueryFilter] -> ShowS # | |
| Eq QueryFilter Source # | |
Defined in Box3D.Types | |
defaultQueryFilter :: IO QueryFilter Source #
A fully-initialised query filter (accept everything, untagged).
The mass, centroid and inertia tensor of a shape or body.
Constructors
| MassData | |
Fields | |
Instances
| Storable MassData Source # | |
| Show MassData Source # | |
| Eq MassData Source # | |
data RayCastInput Source #
Low-level ray-cast input in the local frame of the target shape.
Constructors
| RayCastInput | |
Fields | |
Instances
| Storable RayCastInput Source # | |
Defined in Box3D.Types Methods sizeOf :: RayCastInput -> Int # alignment :: RayCastInput -> Int # peekElemOff :: Ptr RayCastInput -> Int -> IO RayCastInput # pokeElemOff :: Ptr RayCastInput -> Int -> RayCastInput -> IO () # peekByteOff :: Ptr b -> Int -> IO RayCastInput # pokeByteOff :: Ptr b -> Int -> RayCastInput -> IO () # peek :: Ptr RayCastInput -> IO RayCastInput # poke :: Ptr RayCastInput -> RayCastInput -> IO () # | |
| Show RayCastInput Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> RayCastInput -> ShowS # show :: RayCastInput -> String # showList :: [RayCastInput] -> ShowS # | |
| Eq RayCastInput Source # | |
Defined in Box3D.Types | |
data CastOutput Source #
Low-level ray or shape-cast output, in the frame of the input. A zero fraction and normal signal initial overlap. The triangle/child/material indices are -1 when not applicable.
Constructors
| CastOutput | |
Instances
| Storable CastOutput Source # | |
Defined in Box3D.Types Methods sizeOf :: CastOutput -> Int # alignment :: CastOutput -> Int # peekElemOff :: Ptr CastOutput -> Int -> IO CastOutput # pokeElemOff :: Ptr CastOutput -> Int -> CastOutput -> IO () # peekByteOff :: Ptr b -> Int -> IO CastOutput # pokeByteOff :: Ptr b -> Int -> CastOutput -> IO () # peek :: Ptr CastOutput -> IO CastOutput # poke :: Ptr CastOutput -> CastOutput -> IO () # | |
| Show CastOutput Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> CastOutput -> ShowS # show :: CastOutput -> String # showList :: [CastOutput] -> ShowS # | |
| Eq CastOutput Source # | |
Defined in Box3D.Types | |
type WorldCastOutput = CastOutput Source #
World-space cast output. In single-precision builds (the default) this is
the same struct as CastOutput.
The closest hit of a world ray cast (castRayClosest).
Constructors
| RayResult | |
Instances
| Storable RayResult Source # | |
Defined in Box3D.Types | |
| Show RayResult Source # | |
| Eq RayResult Source # | |
Broad-phase traversal counters for a query. Diagnostic.
Constructors
| TreeStats | |
Fields | |
Instances
| Storable TreeStats Source # | |
Defined in Box3D.Types | |
| Show TreeStats Source # | |
| Eq TreeStats Source # | |
The motion of a body between two configurations, for TOI computation.
Constructors
| Sweep | |
Instances
| Storable Sweep Source # | |
| Show Sweep Source # | |
| Eq Sweep Source # | |
data PlaneResult Source #
One collision plane from collideMover, relative to the
query origin.
Constructors
| PlaneResult | |
Fields | |
Instances
| Storable PlaneResult Source # | |
Defined in Box3D.Types Methods sizeOf :: PlaneResult -> Int # alignment :: PlaneResult -> Int # peekElemOff :: Ptr PlaneResult -> Int -> IO PlaneResult # pokeElemOff :: Ptr PlaneResult -> Int -> PlaneResult -> IO () # peekByteOff :: Ptr b -> Int -> IO PlaneResult # pokeByteOff :: Ptr b -> Int -> PlaneResult -> IO () # peek :: Ptr PlaneResult -> IO PlaneResult # poke :: Ptr PlaneResult -> PlaneResult -> IO () # | |
| Show PlaneResult Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> PlaneResult -> ShowS # show :: PlaneResult -> String # showList :: [PlaneResult] -> ShowS # | |
| Eq PlaneResult Source # | |
Defined in Box3D.Types | |
dynamicTreeByteCount :: Int Source #
The size of the (opaque) b3DynamicTree struct, for allocating one to
initialise with create.
Events
data BodyEvents Source #
Body events buffer: a C-owned array of BodyMoveEvent valid until the
next step. Marshalled to a list by Box3D.Events.
Constructors
| BodyEvents | |
Fields | |
Instances
| Storable BodyEvents Source # | |
Defined in Box3D.Types Methods sizeOf :: BodyEvents -> Int # alignment :: BodyEvents -> Int # peekElemOff :: Ptr BodyEvents -> Int -> IO BodyEvents # pokeElemOff :: Ptr BodyEvents -> Int -> BodyEvents -> IO () # peekByteOff :: Ptr b -> Int -> IO BodyEvents # pokeByteOff :: Ptr b -> Int -> BodyEvents -> IO () # peek :: Ptr BodyEvents -> IO BodyEvents # poke :: Ptr BodyEvents -> BodyEvents -> IO () # | |
| Show BodyEvents Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> BodyEvents -> ShowS # show :: BodyEvents -> String # showList :: [BodyEvents] -> ShowS # | |
| Eq BodyEvents Source # | |
Defined in Box3D.Types | |
data BodyMoveEvent Source #
A body move event: the new transform of a body that moved this step.
Read after step and before the next step (see Box3D.Events).
Constructors
| BodyMoveEvent | |
Fields | |
Instances
| Storable BodyMoveEvent Source # | |
Defined in Box3D.Types Methods sizeOf :: BodyMoveEvent -> Int # alignment :: BodyMoveEvent -> Int # peekElemOff :: Ptr BodyMoveEvent -> Int -> IO BodyMoveEvent # pokeElemOff :: Ptr BodyMoveEvent -> Int -> BodyMoveEvent -> IO () # peekByteOff :: Ptr b -> Int -> IO BodyMoveEvent # pokeByteOff :: Ptr b -> Int -> BodyMoveEvent -> IO () # peek :: Ptr BodyMoveEvent -> IO BodyMoveEvent # poke :: Ptr BodyMoveEvent -> BodyMoveEvent -> IO () # | |
| Show BodyMoveEvent Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> BodyMoveEvent -> ShowS # show :: BodyMoveEvent -> String # showList :: [BodyMoveEvent] -> ShowS # | |
| Eq BodyMoveEvent Source # | |
Defined in Box3D.Types Methods (==) :: BodyMoveEvent -> BodyMoveEvent -> Bool # (/=) :: BodyMoveEvent -> BodyMoveEvent -> Bool # | |
data SensorEvents Source #
Sensor events buffer: C-owned begin/end arrays valid until the next
step. Marshalled to lists by Box3D.Events.
Constructors
| SensorEvents | |
Instances
| Storable SensorEvents Source # | |
Defined in Box3D.Types Methods sizeOf :: SensorEvents -> Int # alignment :: SensorEvents -> Int # peekElemOff :: Ptr SensorEvents -> Int -> IO SensorEvents # pokeElemOff :: Ptr SensorEvents -> Int -> SensorEvents -> IO () # peekByteOff :: Ptr b -> Int -> IO SensorEvents # pokeByteOff :: Ptr b -> Int -> SensorEvents -> IO () # peek :: Ptr SensorEvents -> IO SensorEvents # poke :: Ptr SensorEvents -> SensorEvents -> IO () # | |
| Show SensorEvents Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> SensorEvents -> ShowS # show :: SensorEvents -> String # showList :: [SensorEvents] -> ShowS # | |
| Eq SensorEvents Source # | |
Defined in Box3D.Types | |
data SensorBeginTouchEvent Source #
A shape started overlapping a sensor shape.
Constructors
| SensorBeginTouchEvent | |
Instances
| Storable SensorBeginTouchEvent Source # | |
Defined in Box3D.Types Methods sizeOf :: SensorBeginTouchEvent -> Int # alignment :: SensorBeginTouchEvent -> Int # peekElemOff :: Ptr SensorBeginTouchEvent -> Int -> IO SensorBeginTouchEvent # pokeElemOff :: Ptr SensorBeginTouchEvent -> Int -> SensorBeginTouchEvent -> IO () # peekByteOff :: Ptr b -> Int -> IO SensorBeginTouchEvent # pokeByteOff :: Ptr b -> Int -> SensorBeginTouchEvent -> IO () # peek :: Ptr SensorBeginTouchEvent -> IO SensorBeginTouchEvent # poke :: Ptr SensorBeginTouchEvent -> SensorBeginTouchEvent -> IO () # | |
| Show SensorBeginTouchEvent Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> SensorBeginTouchEvent -> ShowS # show :: SensorBeginTouchEvent -> String # showList :: [SensorBeginTouchEvent] -> ShowS # | |
| Eq SensorBeginTouchEvent Source # | |
Defined in Box3D.Types Methods (==) :: SensorBeginTouchEvent -> SensorBeginTouchEvent -> Bool # (/=) :: SensorBeginTouchEvent -> SensorBeginTouchEvent -> Bool # | |
data SensorEndTouchEvent Source #
A shape stopped overlapping a sensor shape. Either shape may already be
destroyed; check with Box3D.Shape.isValid.
Constructors
| SensorEndTouchEvent | |
Instances
| Storable SensorEndTouchEvent Source # | |
Defined in Box3D.Types Methods sizeOf :: SensorEndTouchEvent -> Int # alignment :: SensorEndTouchEvent -> Int # peekElemOff :: Ptr SensorEndTouchEvent -> Int -> IO SensorEndTouchEvent # pokeElemOff :: Ptr SensorEndTouchEvent -> Int -> SensorEndTouchEvent -> IO () # peekByteOff :: Ptr b -> Int -> IO SensorEndTouchEvent # pokeByteOff :: Ptr b -> Int -> SensorEndTouchEvent -> IO () # peek :: Ptr SensorEndTouchEvent -> IO SensorEndTouchEvent # poke :: Ptr SensorEndTouchEvent -> SensorEndTouchEvent -> IO () # | |
| Show SensorEndTouchEvent Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> SensorEndTouchEvent -> ShowS # show :: SensorEndTouchEvent -> String # showList :: [SensorEndTouchEvent] -> ShowS # | |
| Eq SensorEndTouchEvent Source # | |
Defined in Box3D.Types Methods (==) :: SensorEndTouchEvent -> SensorEndTouchEvent -> Bool # (/=) :: SensorEndTouchEvent -> SensorEndTouchEvent -> Bool # | |
data ContactEvents Source #
Contact events buffer: C-owned beginendhit arrays valid until the next
step. Marshalled to lists by Box3D.Events.
Constructors
| ContactEvents | |
Instances
| Storable ContactEvents Source # | |
Defined in Box3D.Types Methods sizeOf :: ContactEvents -> Int # alignment :: ContactEvents -> Int # peekElemOff :: Ptr ContactEvents -> Int -> IO ContactEvents # pokeElemOff :: Ptr ContactEvents -> Int -> ContactEvents -> IO () # peekByteOff :: Ptr b -> Int -> IO ContactEvents # pokeByteOff :: Ptr b -> Int -> ContactEvents -> IO () # peek :: Ptr ContactEvents -> IO ContactEvents # poke :: Ptr ContactEvents -> ContactEvents -> IO () # | |
| Show ContactEvents Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> ContactEvents -> ShowS # show :: ContactEvents -> String # showList :: [ContactEvents] -> ShowS # | |
| Eq ContactEvents Source # | |
Defined in Box3D.Types Methods (==) :: ContactEvents -> ContactEvents -> Bool # (/=) :: ContactEvents -> ContactEvents -> Bool # | |
data ContactBeginTouchEvent Source #
Two shapes began touching.
Constructors
| ContactBeginTouchEvent | |
Instances
| Storable ContactBeginTouchEvent Source # | |
Defined in Box3D.Types Methods sizeOf :: ContactBeginTouchEvent -> Int # alignment :: ContactBeginTouchEvent -> Int # peekElemOff :: Ptr ContactBeginTouchEvent -> Int -> IO ContactBeginTouchEvent # pokeElemOff :: Ptr ContactBeginTouchEvent -> Int -> ContactBeginTouchEvent -> IO () # peekByteOff :: Ptr b -> Int -> IO ContactBeginTouchEvent # pokeByteOff :: Ptr b -> Int -> ContactBeginTouchEvent -> IO () # peek :: Ptr ContactBeginTouchEvent -> IO ContactBeginTouchEvent # poke :: Ptr ContactBeginTouchEvent -> ContactBeginTouchEvent -> IO () # | |
| Show ContactBeginTouchEvent Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> ContactBeginTouchEvent -> ShowS # show :: ContactBeginTouchEvent -> String # showList :: [ContactBeginTouchEvent] -> ShowS # | |
| Eq ContactBeginTouchEvent Source # | |
Defined in Box3D.Types Methods (==) :: ContactBeginTouchEvent -> ContactBeginTouchEvent -> Bool # (/=) :: ContactBeginTouchEvent -> ContactBeginTouchEvent -> Bool # | |
data ContactEndTouchEvent Source #
Two shapes stopped touching. The shapes and the contact may already be
destroyed; check with the respective isValid.
Constructors
| ContactEndTouchEvent | |
Instances
| Storable ContactEndTouchEvent Source # | |
Defined in Box3D.Types Methods sizeOf :: ContactEndTouchEvent -> Int # alignment :: ContactEndTouchEvent -> Int # peekElemOff :: Ptr ContactEndTouchEvent -> Int -> IO ContactEndTouchEvent # pokeElemOff :: Ptr ContactEndTouchEvent -> Int -> ContactEndTouchEvent -> IO () # peekByteOff :: Ptr b -> Int -> IO ContactEndTouchEvent # pokeByteOff :: Ptr b -> Int -> ContactEndTouchEvent -> IO () # peek :: Ptr ContactEndTouchEvent -> IO ContactEndTouchEvent # poke :: Ptr ContactEndTouchEvent -> ContactEndTouchEvent -> IO () # | |
| Show ContactEndTouchEvent Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> ContactEndTouchEvent -> ShowS # show :: ContactEndTouchEvent -> String # showList :: [ContactEndTouchEvent] -> ShowS # | |
| Eq ContactEndTouchEvent Source # | |
Defined in Box3D.Types Methods (==) :: ContactEndTouchEvent -> ContactEndTouchEvent -> Bool # (/=) :: ContactEndTouchEvent -> ContactEndTouchEvent -> Bool # | |
data ContactHitEvent Source #
Two shapes collided faster than the hit speed threshold
(worldDefHitEventThreshold; hit events must be enabled per shape).
Constructors
| ContactHitEvent | |
Instances
| Storable ContactHitEvent Source # | |
Defined in Box3D.Types Methods sizeOf :: ContactHitEvent -> Int # alignment :: ContactHitEvent -> Int # peekElemOff :: Ptr ContactHitEvent -> Int -> IO ContactHitEvent # pokeElemOff :: Ptr ContactHitEvent -> Int -> ContactHitEvent -> IO () # peekByteOff :: Ptr b -> Int -> IO ContactHitEvent # pokeByteOff :: Ptr b -> Int -> ContactHitEvent -> IO () # peek :: Ptr ContactHitEvent -> IO ContactHitEvent # poke :: Ptr ContactHitEvent -> ContactHitEvent -> IO () # | |
| Show ContactHitEvent Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> ContactHitEvent -> ShowS # show :: ContactHitEvent -> String # showList :: [ContactHitEvent] -> ShowS # | |
| Eq ContactHitEvent Source # | |
Defined in Box3D.Types Methods (==) :: ContactHitEvent -> ContactHitEvent -> Bool # (/=) :: ContactHitEvent -> ContactHitEvent -> Bool # | |
data JointEvents Source #
Joint events buffer: a C-owned array of JointEvent valid until the next
step. Marshalled to a list by Box3D.Events.
Constructors
| JointEvents | |
Fields | |
Instances
| Storable JointEvents Source # | |
Defined in Box3D.Types Methods sizeOf :: JointEvents -> Int # alignment :: JointEvents -> Int # peekElemOff :: Ptr JointEvents -> Int -> IO JointEvents # pokeElemOff :: Ptr JointEvents -> Int -> JointEvents -> IO () # peekByteOff :: Ptr b -> Int -> IO JointEvents # pokeByteOff :: Ptr b -> Int -> JointEvents -> IO () # peek :: Ptr JointEvents -> IO JointEvents # poke :: Ptr JointEvents -> JointEvents -> IO () # | |
| Show JointEvents Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> JointEvents -> ShowS # show :: JointEvents -> String # showList :: [JointEvents] -> ShowS # | |
| Eq JointEvents Source # | |
Defined in Box3D.Types | |
data JointEvent Source #
A joint exceeded its force/torque event threshold this step.
Constructors
| JointEvent | |
Fields
| |
Instances
| Storable JointEvent Source # | |
Defined in Box3D.Types Methods sizeOf :: JointEvent -> Int # alignment :: JointEvent -> Int # peekElemOff :: Ptr JointEvent -> Int -> IO JointEvent # pokeElemOff :: Ptr JointEvent -> Int -> JointEvent -> IO () # peekByteOff :: Ptr b -> Int -> IO JointEvent # pokeByteOff :: Ptr b -> Int -> JointEvent -> IO () # peek :: Ptr JointEvent -> IO JointEvent # poke :: Ptr JointEvent -> JointEvent -> IO () # | |
| Show JointEvent Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> JointEvent -> ShowS # show :: JointEvent -> String # showList :: [JointEvent] -> ShowS # | |
| Eq JointEvent Source # | |
Defined in Box3D.Types | |
Default definitions
defaultWorldDef :: IO WorldDef Source #
A fully-initialised world definition.
defaultBodyDef :: IO BodyDef Source #
A fully-initialised body definition.
defaultShapeDef :: IO ShapeDef Source #
A fully-initialised shape definition.
defaultFilter :: IO Filter Source #
A fully-initialised collision filter.
defaultSurfaceMaterial :: IO SurfaceMaterial Source #
A fully-initialised surface material.
Joint definitions
The shared base of every joint definition.
Constructors
Instances
| Storable JointDef Source # | |
| Show JointDef Source # | |
| Eq JointDef Source # | |
data DistanceJointDef Source #
Distance joint definition. Initialise with defaultDistanceJointDef.
Constructors
Instances
| Storable DistanceJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: DistanceJointDef -> Int # alignment :: DistanceJointDef -> Int # peekElemOff :: Ptr DistanceJointDef -> Int -> IO DistanceJointDef # pokeElemOff :: Ptr DistanceJointDef -> Int -> DistanceJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO DistanceJointDef # pokeByteOff :: Ptr b -> Int -> DistanceJointDef -> IO () # peek :: Ptr DistanceJointDef -> IO DistanceJointDef # poke :: Ptr DistanceJointDef -> DistanceJointDef -> IO () # | |
| Show DistanceJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> DistanceJointDef -> ShowS # show :: DistanceJointDef -> String # showList :: [DistanceJointDef] -> ShowS # | |
| Eq DistanceJointDef Source # | |
Defined in Box3D.Types Methods (==) :: DistanceJointDef -> DistanceJointDef -> Bool # (/=) :: DistanceJointDef -> DistanceJointDef -> Bool # | |
defaultDistanceJointDef :: IO DistanceJointDef Source #
A fully-initialised DistanceJointDef.
data MotorJointDef Source #
Motor joint definition. Initialise with defaultMotorJointDef.
Constructors
Instances
| Storable MotorJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: MotorJointDef -> Int # alignment :: MotorJointDef -> Int # peekElemOff :: Ptr MotorJointDef -> Int -> IO MotorJointDef # pokeElemOff :: Ptr MotorJointDef -> Int -> MotorJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO MotorJointDef # pokeByteOff :: Ptr b -> Int -> MotorJointDef -> IO () # peek :: Ptr MotorJointDef -> IO MotorJointDef # poke :: Ptr MotorJointDef -> MotorJointDef -> IO () # | |
| Show MotorJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> MotorJointDef -> ShowS # show :: MotorJointDef -> String # showList :: [MotorJointDef] -> ShowS # | |
| Eq MotorJointDef Source # | |
Defined in Box3D.Types Methods (==) :: MotorJointDef -> MotorJointDef -> Bool # (/=) :: MotorJointDef -> MotorJointDef -> Bool # | |
defaultMotorJointDef :: IO MotorJointDef Source #
A fully-initialised MotorJointDef.
data ParallelJointDef Source #
Parallel joint definition. Initialise with defaultParallelJointDef.
Constructors
| ParallelJointDef | |
Instances
| Storable ParallelJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: ParallelJointDef -> Int # alignment :: ParallelJointDef -> Int # peekElemOff :: Ptr ParallelJointDef -> Int -> IO ParallelJointDef # pokeElemOff :: Ptr ParallelJointDef -> Int -> ParallelJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO ParallelJointDef # pokeByteOff :: Ptr b -> Int -> ParallelJointDef -> IO () # peek :: Ptr ParallelJointDef -> IO ParallelJointDef # poke :: Ptr ParallelJointDef -> ParallelJointDef -> IO () # | |
| Show ParallelJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> ParallelJointDef -> ShowS # show :: ParallelJointDef -> String # showList :: [ParallelJointDef] -> ShowS # | |
| Eq ParallelJointDef Source # | |
Defined in Box3D.Types Methods (==) :: ParallelJointDef -> ParallelJointDef -> Bool # (/=) :: ParallelJointDef -> ParallelJointDef -> Bool # | |
defaultParallelJointDef :: IO ParallelJointDef Source #
A fully-initialised ParallelJointDef.
data PrismaticJointDef Source #
Prismatic joint definition. Initialise with defaultPrismaticJointDef.
Constructors
Instances
| Storable PrismaticJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: PrismaticJointDef -> Int # alignment :: PrismaticJointDef -> Int # peekElemOff :: Ptr PrismaticJointDef -> Int -> IO PrismaticJointDef # pokeElemOff :: Ptr PrismaticJointDef -> Int -> PrismaticJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO PrismaticJointDef # pokeByteOff :: Ptr b -> Int -> PrismaticJointDef -> IO () # peek :: Ptr PrismaticJointDef -> IO PrismaticJointDef # poke :: Ptr PrismaticJointDef -> PrismaticJointDef -> IO () # | |
| Show PrismaticJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> PrismaticJointDef -> ShowS # show :: PrismaticJointDef -> String # showList :: [PrismaticJointDef] -> ShowS # | |
| Eq PrismaticJointDef Source # | |
Defined in Box3D.Types Methods (==) :: PrismaticJointDef -> PrismaticJointDef -> Bool # (/=) :: PrismaticJointDef -> PrismaticJointDef -> Bool # | |
defaultPrismaticJointDef :: IO PrismaticJointDef Source #
A fully-initialised PrismaticJointDef.
data RevoluteJointDef Source #
Revolute joint definition. Initialise with defaultRevoluteJointDef.
Constructors
Instances
| Storable RevoluteJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: RevoluteJointDef -> Int # alignment :: RevoluteJointDef -> Int # peekElemOff :: Ptr RevoluteJointDef -> Int -> IO RevoluteJointDef # pokeElemOff :: Ptr RevoluteJointDef -> Int -> RevoluteJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO RevoluteJointDef # pokeByteOff :: Ptr b -> Int -> RevoluteJointDef -> IO () # peek :: Ptr RevoluteJointDef -> IO RevoluteJointDef # poke :: Ptr RevoluteJointDef -> RevoluteJointDef -> IO () # | |
| Show RevoluteJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> RevoluteJointDef -> ShowS # show :: RevoluteJointDef -> String # showList :: [RevoluteJointDef] -> ShowS # | |
| Eq RevoluteJointDef Source # | |
Defined in Box3D.Types Methods (==) :: RevoluteJointDef -> RevoluteJointDef -> Bool # (/=) :: RevoluteJointDef -> RevoluteJointDef -> Bool # | |
defaultRevoluteJointDef :: IO RevoluteJointDef Source #
A fully-initialised RevoluteJointDef.
data SphericalJointDef Source #
Spherical joint definition. Initialise with defaultSphericalJointDef.
Constructors
Instances
| Storable SphericalJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: SphericalJointDef -> Int # alignment :: SphericalJointDef -> Int # peekElemOff :: Ptr SphericalJointDef -> Int -> IO SphericalJointDef # pokeElemOff :: Ptr SphericalJointDef -> Int -> SphericalJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO SphericalJointDef # pokeByteOff :: Ptr b -> Int -> SphericalJointDef -> IO () # peek :: Ptr SphericalJointDef -> IO SphericalJointDef # poke :: Ptr SphericalJointDef -> SphericalJointDef -> IO () # | |
| Show SphericalJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> SphericalJointDef -> ShowS # show :: SphericalJointDef -> String # showList :: [SphericalJointDef] -> ShowS # | |
| Eq SphericalJointDef Source # | |
Defined in Box3D.Types Methods (==) :: SphericalJointDef -> SphericalJointDef -> Bool # (/=) :: SphericalJointDef -> SphericalJointDef -> Bool # | |
defaultSphericalJointDef :: IO SphericalJointDef Source #
A fully-initialised SphericalJointDef.
data WeldJointDef Source #
Weld joint definition. Initialise with defaultWeldJointDef.
Constructors
| WeldJointDef | |
Instances
| Storable WeldJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: WeldJointDef -> Int # alignment :: WeldJointDef -> Int # peekElemOff :: Ptr WeldJointDef -> Int -> IO WeldJointDef # pokeElemOff :: Ptr WeldJointDef -> Int -> WeldJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO WeldJointDef # pokeByteOff :: Ptr b -> Int -> WeldJointDef -> IO () # peek :: Ptr WeldJointDef -> IO WeldJointDef # poke :: Ptr WeldJointDef -> WeldJointDef -> IO () # | |
| Show WeldJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> WeldJointDef -> ShowS # show :: WeldJointDef -> String # showList :: [WeldJointDef] -> ShowS # | |
| Eq WeldJointDef Source # | |
Defined in Box3D.Types | |
defaultWeldJointDef :: IO WeldJointDef Source #
A fully-initialised WeldJointDef.
data WheelJointDef Source #
Wheel joint definition. Initialise with defaultWheelJointDef.
Constructors
Instances
| Storable WheelJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: WheelJointDef -> Int # alignment :: WheelJointDef -> Int # peekElemOff :: Ptr WheelJointDef -> Int -> IO WheelJointDef # pokeElemOff :: Ptr WheelJointDef -> Int -> WheelJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO WheelJointDef # pokeByteOff :: Ptr b -> Int -> WheelJointDef -> IO () # peek :: Ptr WheelJointDef -> IO WheelJointDef # poke :: Ptr WheelJointDef -> WheelJointDef -> IO () # | |
| Show WheelJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> WheelJointDef -> ShowS # show :: WheelJointDef -> String # showList :: [WheelJointDef] -> ShowS # | |
| Eq WheelJointDef Source # | |
Defined in Box3D.Types Methods (==) :: WheelJointDef -> WheelJointDef -> Bool # (/=) :: WheelJointDef -> WheelJointDef -> Bool # | |
defaultWheelJointDef :: IO WheelJointDef Source #
A fully-initialised WheelJointDef.
data FilterJointDef Source #
Filter joint definition. Initialise with defaultFilterJointDef.
Constructors
| FilterJointDef | |
Fields | |
Instances
| Storable FilterJointDef Source # | |
Defined in Box3D.Types Methods sizeOf :: FilterJointDef -> Int # alignment :: FilterJointDef -> Int # peekElemOff :: Ptr FilterJointDef -> Int -> IO FilterJointDef # pokeElemOff :: Ptr FilterJointDef -> Int -> FilterJointDef -> IO () # peekByteOff :: Ptr b -> Int -> IO FilterJointDef # pokeByteOff :: Ptr b -> Int -> FilterJointDef -> IO () # peek :: Ptr FilterJointDef -> IO FilterJointDef # poke :: Ptr FilterJointDef -> FilterJointDef -> IO () # | |
| Show FilterJointDef Source # | |
Defined in Box3D.Types Methods showsPrec :: Int -> FilterJointDef -> ShowS # show :: FilterJointDef -> String # showList :: [FilterJointDef] -> ShowS # | |
| Eq FilterJointDef Source # | |
Defined in Box3D.Types Methods (==) :: FilterJointDef -> FilterJointDef -> Bool # (/=) :: FilterJointDef -> FilterJointDef -> Bool # | |
defaultFilterJointDef :: IO FilterJointDef Source #
A fully-initialised FilterJointDef.