Skip to content
Snippets Groups Projects
Commit aa1faf01 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Fix wrong arrow circle orientation when specifying normal -Z

parent 70100a63
No related branches found
No related tags found
1 merge request!328Fix/arrow circle ori
......@@ -107,9 +107,9 @@ namespace armarx::viz
float angle = std::acos(naturalDir.dot(dir));
if (cross.squaredNorm() < 1.0e-12f)
{
// Directions are almost colinear ==> Do no rotation
// Directions are almost colinear ==> Angle is either 0 or 180 deg
cross = Eigen::Vector3f::UnitX();
angle = 0.0f;
// Keep angle
}
Eigen::Vector3f axis = cross.normalized();
Eigen::Quaternionf ori(Eigen::AngleAxisf(angle, axis));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment