Physics.Hipmunk.Joint
 Portability portable (needs FFI) Stability beta Maintainer felipe.lessa@gmail.com
 Contents Joints
Description
Joints that constrain bodies.
Synopsis
data Joint
data JointType
= Pin {
 anchor1 :: Position anchor2 :: Position
}
| Slide {
 anchor1 :: Position anchor2 :: Position minDist :: CpFloat maxDist :: CpFloat
}
| Pivot {
 pivot :: Position
}
| Groove {
 groove1 :: (Position, Position) pivot2 :: Position
}
newJoint :: Body -> Body -> JointType -> IO Joint
Joints
 data Joint Source
A joint represents a constrain between two bodies. Don't forget to add the bodies and the joint to the space.
Instances
 Eq Joint Ord Joint Entity Joint
 data JointType Source
There are currently four types of joints. When appending a number to a property, we hint that it refer to one of the bodies that the joint is contraining (e.g. anchor2 is the position of the anchor on the second body in its coordinates).
Constructors
PinA pin joint connects the bodies with a solid pin. The anchor points are kept at a fixed distance.
 anchor1 :: Position anchor2 :: Position
SlideA slide joint is similar to a pin joint, however it has a minimum and a maximum distance.
 anchor1 :: Position anchor2 :: Position minDist :: CpFloat maxDist :: CpFloat
PivotA pivot joint allows the bodies to pivot around a single point in world's coordinates. Both should be already in place.
 pivot :: Position
GrooveA groove joint attaches a point on the second body to a groove in the first one.
 groove1 :: (Position, Position) pivot2 :: Position
Instances
 Eq JointType Ord JointType Show JointType
 newJoint :: Body -> Body -> JointType -> IO Joint Source
newJoint b1 b2 type connects the two bodies b1 and b2 with a joint of the given type. Note that you should add the Joint to a space.
Produced by Haddock version 2.3.0