3D Rotation Matrix
An $3 \times 3$ rotation matrix storing the rotation. This is a simple wrapper for a StaticArrays SMatrix{3,3,T}
. A rotation matrix $R$ should have the property $I = R R^\top$, but this isn't enforced by the constructor. On the other hand, all the types below are guaranteed to be "proper" rotations for all input parameters (equivalently: parity conserving, in $SO(3)$, $\det(R) = 1$, or a rotation without reflection).
RotMatrix3
example
julia> t = 1.2
1.2
julia> m1 = [cos(t) -sin(t) 0;sin(t) cos(t) 0;0 0 1]
3×3 Matrix{Float64}: 0.362358 -0.932039 0.0 0.932039 0.362358 0.0 0.0 0.0 1.0
julia> RotMatrix{3}(m1) # construct from matrix
3×3 RotMatrix3{Float64} with indices SOneTo(3)×SOneTo(3): 0.362358 -0.932039 0.0 0.932039 0.362358 0.0 0.0 0.0 1.0
julia> m2 = RotZ(t) # Other rotation type
3×3 RotZ{Float64} with indices SOneTo(3)×SOneTo(3)(1.2): 0.362358 -0.932039 0.0 0.932039 0.362358 0.0 0.0 0.0 1.0
julia> RotMatrix{3}(m2) # convert m2 to RotMatrix
3×3 RotMatrix3{Float64} with indices SOneTo(3)×SOneTo(3): 0.362358 -0.932039 0.0 0.932039 0.362358 0.0 0.0 0.0 1.0
julia> RotMatrix(m2) # Type parameter can be omitted.
3×3 RotMatrix3{Float64} with indices SOneTo(3)×SOneTo(3): 0.362358 -0.932039 0.0 0.932039 0.362358 0.0 0.0 0.0 1.0