KrisLibrary  1.0.0
Classes | Functions
Rotation.h File Reference

Utility functions for converting between different rotation representations and computing derivatives. More...

#include <KrisLibrary/math/matrix.h>
#include <KrisLibrary/math3d/primitives.h>
#include <KrisLibrary/math3d/rotation.h>

Go to the source code of this file.

Classes

struct  DirectionCosines
 9-D rotation parameterization that lays out the columns of the rotation matrix in a single vector. More...
 

Functions

bool GetRotationCenter (const RigidTransform &T, Vector3 &p)
 
void GetMinimalRotation (const Vector3 &x, const Vector3 &y, Matrix3 &R)
 
void GetMinimalRotationToPlane (const Vector3 &x, const Vector3 &y, Matrix3 &R)
 
void MatrixDerivative (const Matrix3 &R, const Vector3 &z, Matrix3 &dR)
 Derivative dR of the rotation matrix R of a frame as it rotates about the axis z. More...
 
void DirectionCosinesDerivative (const Vector &R, const Vector3 &z, Vector &dR)
 
void MomentDerivative (const Matrix3 &R, const Vector3 &z, Vector3 &dm)
 
void MomentDerivative (const MomentRotation &m, const Vector3 &z, Vector3 &dm)
 Same as above, but specifies R with the moment m.
 
void MomentDerivative (const Vector3 &m, const Matrix3 &R, const Vector3 &z, Vector3 &dm)
 Same as above, but both m and R are provided.
 
void QuaternionDerivative (const Matrix3 &R, const Vector3 &z, Quaternion &dq)
 
bool EulerAngleDerivative (const Vector3 &theta, const Vector3 &z, int u, int v, int w, Vector3 &dtheta)
 Calculates the derivative of the euler angle representation of R as it rotates around the axis z. More...
 
void AngularVelocityEulerAngle (const Vector3 &theta, const Vector3 &dtheta, int u, int v, int w, Vector3 &z)
 Calculates the angular velocity z of the rotation described by theta given its time derivatives dtheta. More...
 
void EulerAngleMoments (const Vector3 &theta, int u, int v, int w, Matrix3 &A)
 
Real MatrixAbsoluteAngle (const Matrix3 &R)
 Returns the absolute angle of the rotation R. More...
 
Real MatrixAngleAboutAxis (const Matrix3 &R, const Vector3 &a)
 Returns the angle that R makes about the axis a. More...
 
Real MatrixAngleDerivative (const Matrix3 &R, const Vector3 &z)
 Derivative dtheta/dz, the change in the absolute angle of rotation R as it rotates about the axis z. More...
 
void MatrixDerivative2 (const Matrix3 &R, const Vector3 &w, const Vector3 &a, Matrix3 &ddR)
 Second derivative ddR of the rotation matrix R of a frame as it rotates with velocity w, acceleration a about the axis z. More...
 
void ForwardDifferenceAngularVelocity (const Matrix3 &R0, const Matrix3 &R1, Real h, Vector3 &z)
 Computes the angular velocity z at time 0, given current rotation and rotation at next time step. More...
 
void CenteredDifferenceAngularVelocity (const Matrix3 &R_1, const Matrix3 &R0, const Matrix3 &R1, Real h, Vector3 &z)
 Computes the angular velocity z at time 0, given current rotation, and rotations at previous/next time steps. More...
 
void CenteredDifferenceAngularAccel (const Matrix3 &R_1, const Matrix3 &R0, const Matrix3 &R1, Real h, Vector3 &a)
 Computes the angular acceleration a at time 0, given current rotation, and rotations at previous/next time steps. More...
 
Real AxisRotationMagnitude (const Matrix3 &R, const Vector3 &a)
 Computes the "amount" of rotation about the axis a that thegiven rotation matrix R performs. Specifically, finds the angle theta such that e^[theta*a] minimizes the angular distance to R. More...
 
void NormalizeRotation (Matrix3 &R)
 For a not-quite rotation matrix R, replaces it with the closest rotation matrix. I.e., find an orthogonal matrix that minimizes the distance to R.
 

Detailed Description

Utility functions for converting between different rotation representations and computing derivatives.