NOTE: the latest version is 2.0.3
Conversion functions for Frame3d.
Frame3d
Convert a Frame3d to a Mat4. The resulting matrix can be thought of in a couple of ways:
Mat4
The first bullet implies that something like
Frame3d.xyz |> Frame3d.translateBy displacement |> Frame3d.rotateAround axis angle |> Frame3d.mirrorAcross plane |> Frame3d.toMat4
gives you a transformation matrix that is equivalent to applying the given displacement, then the given rotation, then the given mirror. The second bullet means that, for example,
Point3d.placeIn frame
is equivalent to
Point3d.transformBy (Frame3d.toMat4 frame)
and
Point3d.relativeTo frame
Point3d.transformBy <| Matrix4.inverseOrthonormal (Frame3d.toMat4 frame)
Convert a
Frame3dto aMat4. The resulting matrix can be thought of in a couple of ways:The first bullet implies that something like
gives you a transformation matrix that is equivalent to applying the given displacement, then the given rotation, then the given mirror. The second bullet means that, for example,
is equivalent to
and
is equivalent to