w0rm/elm-physics/4.0.0

NOTE: the latest version is 6.2.0

Physics.Debug

A list of utilities that may be useful for debugging issues with elm-physics itself.

getContacts : World data -> List (Point3d Meters WorldCoordinates)

Get the contact points in the world.

getCenterOfMass : Body data -> Point3d Meters BodyCoordinates

Get the center of mass of the body.

type alias FaceNormal =
{ normal : Direction3d BodyCoordinates
, point : Point3d Meters BodyCoordinates
}

A face normal consists of a normal vector for a face and a reference point on the face.

These are both expressed within the local body coordinate system.

getFaceNormals : Body data -> List FaceNormal

Get the face normals of the body.

type alias UniqueEdge =
{ direction : Direction3d BodyCoordinates
, point : Point3d Meters BodyCoordinates
}

A unique edge consists of a unit direction vector that runs parallel to an edge of a face.

A vertex point of the body is also provided for context.

These are both expressed within the local body coordinate system.

getUniqueEdges : Body data -> List UniqueEdge

Get the unique edges of the body.