Home | History | Annotate | Download | only in ceres

Lines Matching refs:quaternion

79 // Convert a value in combined axis-angle representation to a quaternion.
82 // and quaternion is a 4-tuple that will contain the resulting quaternion.
86 void AngleAxisToQuaternion(const T* angle_axis, T* quaternion);
88 // Convert a quaternion to the equivalent combined axis-angle representation.
89 // The value quaternion must be a unit quaternion - it is not normalized first,
95 void QuaternionToAngleAxis(const T* quaternion, T* angle_axis);
132 // The choice of rotation is such that the quaternion [1 0 0 0] goes to an
133 // identity matrix and for small a, b, c the quaternion [1 a b c] goes to
146 // No normalization of the quaternion is performed, i.e.
167 // Rotates a point pt by a quaternion q:
171 // Assumes the quaternion is unit norm. This assumption allows us to
173 // formula below. If you pass in a quaternion with |q|^2 = 2 then you
174 // WILL NOT get back 2 times the result you get for a unit quaternion.
183 // zw = z * w, where * is the Quaternion product between 4 vectors.
223 inline void AngleAxisToQuaternion(const T* angle_axis, T* quaternion) {
234 quaternion[0] = cos(half_theta);
235 quaternion[1] = a0 * k;
236 quaternion[2] = a1 * k;
237 quaternion[3] = a2 * k;
244 quaternion[0] = T(1.0);
245 quaternion[1] = a0 * k;
246 quaternion[2] = a1 * k;
247 quaternion[3] = a2 * k;
252 inline void QuaternionToAngleAxis(const T* quaternion, T* angle_axis) {
253 const T& q1 = quaternion[1];
254 const T& q2 = quaternion[2];
255 const T& q3 = quaternion[3];
262 const T& cos_theta = quaternion[0];