38 #ifndef FCL_CCD_SCREWMOTION_INL_H
39 #define FCL_CCD_SCREWMOTION_INL_H
74 tf1.translation() = T1;
77 tf2.translation() = T2;
88 : tf1(tf1_), tf2(tf2_), tf(tf1)
99 tf.linear() = absoluteRotation(dt).toRotationMatrix();
102 tf.translation() = p + axis * (dt * linear_vel) + delta_rot * (tf1.translation() - p);
108 template <
typename S>
112 return mb_visitor.
visit(*
this);
116 template <
typename S>
120 return mb_visitor.
visit(*
this);
124 template <
typename S>
131 template <
typename S>
144 - (hat_axis * hat_axis).eval() * (cos_model - 1)
147 TaylorModel<S> a(this->getTimeInterval()), b(this->getTimeInterval()), c(this->getTimeInterval());
153 tm = delta_R * tf1.linear().eval();
154 tv = delta_R * tf1.translation().eval() + delta_T;
158 template <
typename S>
161 const AngleAxis<S> aa(tf2.linear() * tf1.linear().transpose());
164 angular_vel = aa.angle();
168 angular_vel = -angular_vel;
172 if(angular_vel < 1e-10)
175 axis = tf2.translation() - tf1.translation();
176 linear_vel = axis.norm();
177 p = tf1.translation();
181 Vector3<S> o = tf2.translation() - tf1.translation();
182 p = (tf1.translation() + tf2.translation() + axis.cross(o) * (1.0 / tan(angular_vel / 2.0))) * 0.5;
183 linear_vel = o.dot(axis);
188 template <
typename S>
195 template <
typename S>
204 template <
typename S>
211 template <
typename S>
218 template <
typename S>
225 template <
typename S>