Body API additions for raycast vehicle simulation
w0rm opened this issue · 2 comments
w0rm commented
The goal here is to extend elm-physics API so that simulations like raycast vehicle could be built in external Elm packages.
Some functions are already implemented in the raycast vehicle PR and could be extracted and merged individually.
- Get the linear velocity of a point on a body
velocityAt : Point3d Meters WorldCoordinates -> Body data -> Vector3d MetersPerSecond WorldCoordinates
- Get body mass
mass : Body data -> Maybe Mass
- Place a body in a frame
placeIn : Frame3d Meters WorldCoordinates { defines : BodyCoordinates } -> Body data -> Body data
- Transform vector with body inversed inertia tensor (function name TBD, alternatively the whole inertia could become its own module with useful functions)
tbd : Body data -> Vector3d units1 WorldCoordinates -> Vector3d units2 WorldCoordinates
w0rm commented
Should we make body.placeIn
work with left handed frame3d ?
w0rm commented
Decided to not introduce placeIn
for now until we figure the best way to handle right handedness