terry-bit-io / elm-physics / Physics.Constraint


type alias Constraint =
Internal.Constraint.Protected

Constraint allows to limit the freedom of movement of two bodies with relation to each other.

pointToPoint : Point3d Length.Meters Physics.Coordinates.BodyCoordinates -> Point3d Length.Meters Physics.Coordinates.BodyCoordinates -> Constraint

Connect a point on the first body with a point on the second body. This doesn’t limit the freedom of rotation of two bodies. Points are defined within the bodies’ local coordinate systems.

hinge : Axis3d Length.Meters Physics.Coordinates.BodyCoordinates -> Axis3d Length.Meters Physics.Coordinates.BodyCoordinates -> Constraint

Keep two bodies connected with each other and limit the freedom of rotation. Useful for e.g. connecting a window to a window frame, or to connect a wheel to a car.

distance : Length -> Constraint

Keep the centers of two bodies at the constant distance from each other.

lock : Frame3d Length.Meters Physics.Coordinates.BodyCoordinates {} -> Frame3d Length.Meters Physics.Coordinates.BodyCoordinates {} -> Constraint

Keep two bodies connected with each other and remove all degrees of freedom between bodies.