Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames UnitQuaternion to QuatRotation #210

Merged
merged 2 commits into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MeshCat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using GeometryBasics: GeometryBasics,
widths

using CoordinateTransformations
using Rotations: rotation_between, Rotation, RotMatrix, UnitQuaternion
using Rotations: rotation_between, Rotation, RotMatrix, QuatRotation
using Colors: Color, Colorant, RGB, RGBA, alpha, hex, red, green, blue
using StaticArrays: StaticVector, SVector, SDiagonal, SMatrix
using Parameters: @with_kw
Expand Down
2 changes: 1 addition & 1 deletion src/arrow_visualizer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function settransform!(vis::ArrowVisualizer, base::Point{3}, vec::Vec{3};
rotation = if vec_length > eps(T)
rotation_between(SVector(0., 0., 1.), vec)
else
one(UnitQuaternion{Float64})
one(QuatRotation{Float64})
end |> LinearMap

vis_tform = Translation(base) ∘ rotation
Expand Down
6 changes: 3 additions & 3 deletions src/atframe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ function getclip!(animation::Animation, path::Path)
end

js_quaternion(m::AbstractMatrix) = js_quaternion(RotMatrix(SMatrix{3, 3, eltype(m)}(m)))
js_quaternion(q::UnitQuaternion) = [q.x, q.y, q.z, q.w]
js_quaternion(::UniformScaling) = js_quaternion(UnitQuaternion(1., 0., 0., 0.))
js_quaternion(r::Rotation) = js_quaternion(UnitQuaternion(r))
js_quaternion(q::QuatRotation) = [q.q.v1, q.q.v2, q.q.v3, q.q.s]
ferrolho marked this conversation as resolved.
Show resolved Hide resolved
js_quaternion(::UniformScaling) = js_quaternion(QuatRotation(1., 0., 0., 0.))
js_quaternion(r::Rotation) = js_quaternion(QuatRotation(r))
js_quaternion(tform::Transformation) = js_quaternion(transform_deriv(tform, SVector(0., 0, 0)))

function js_scaling(tform::AbstractAffineMap)
Expand Down