Blender  V3.3
Functions | Variables
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <cmath>

Go to the source code of this file.

Functions

static bool FuzzyZero (double x)
 
static double Clamp (const double x, const double min, const double max)
 
static Eigen::Matrix3d CreateMatrix (double xx, double xy, double xz, double yx, double yy, double yz, double zx, double zy, double zz)
 
static Eigen::Matrix3d RotationMatrix (double sine, double cosine, int axis)
 
static Eigen::Matrix3d RotationMatrix (double angle, int axis)
 
static double EulerAngleFromMatrix (const Eigen::Matrix3d &R, int axis)
 
static double safe_acos (double f)
 
static Eigen::Vector3d normalize (const Eigen::Vector3d &v)
 
static double angle (const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
 
static double ComputeTwist (const Eigen::Matrix3d &R)
 
static Eigen::Matrix3d ComputeTwistMatrix (double tau)
 
static void RemoveTwist (Eigen::Matrix3d &R)
 
static Eigen::Vector3d SphericalRangeParameters (const Eigen::Matrix3d &R)
 
static Eigen::Matrix3d ComputeSwingMatrix (double ax, double az)
 
static Eigen::Vector3d MatrixToAxisAngle (const Eigen::Matrix3d &R)
 
static bool EllipseClamp (double &ax, double &az, double *amin, double *amax)
 

Variables

static const double IK_EPSILON = 1e-20
 

Function Documentation

◆ angle()

static double angle ( const Eigen::Vector3d &  v1,
const Eigen::Vector3d &  v2 
)
inlinestatic

Definition at line 112 of file IK_Math.h.

References safe_acos(), v1, and v2.

Referenced by RotationMatrix().

◆ Clamp()

static double Clamp ( const double  x,
const double  min,
const double  max 
)
inlinestatic

Definition at line 28 of file IK_Math.h.

References max, min, and x.

◆ ComputeSwingMatrix()

static Eigen::Matrix3d ComputeSwingMatrix ( double  ax,
double  az 
)
inlinestatic

Definition at line 167 of file IK_Math.h.

References sqrt().

Referenced by IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().

◆ ComputeTwist()

static double ComputeTwist ( const Eigen::Matrix3d &  R)
inlinestatic

Definition at line 117 of file IK_Math.h.

References KDL::atan2(), and R.

Referenced by RemoveTwist(), and SphericalRangeParameters().

◆ ComputeTwistMatrix()

static Eigen::Matrix3d ComputeTwistMatrix ( double  tau)
inlinestatic

◆ CreateMatrix()

static Eigen::Matrix3d CreateMatrix ( double  xx,
double  xy,
double  xz,
double  yx,
double  yy,
double  yz,
double  zx,
double  zy,
double  zz 
)
inlinestatic

◆ EllipseClamp()

static bool EllipseClamp ( double ax,
double az,
double amin,
double amax 
)
inlinestatic

Definition at line 192 of file IK_Math.h.

References FuzzyZero(), sqrt(), x, and z.

Referenced by IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().

◆ EulerAngleFromMatrix()

static double EulerAngleFromMatrix ( const Eigen::Matrix3d &  R,
int  axis 
)
inlinestatic

Definition at line 71 of file IK_Math.h.

References KDL::atan2(), IK_EPSILON, R, sqrt(), and t.

◆ FuzzyZero()

static bool FuzzyZero ( double  x)
inlinestatic

◆ MatrixToAxisAngle()

static Eigen::Vector3d MatrixToAxisAngle ( const Eigen::Matrix3d &  R)
inlinestatic

Definition at line 179 of file IK_Math.h.

References Freestyle::c, FuzzyZero(), l, R, and safe_acos().

Referenced by IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().

◆ normalize()

static Eigen::Vector3d normalize ( const Eigen::Vector3d &  v)
inlinestatic

Definition at line 104 of file IK_Math.h.

References FuzzyZero(), len, and v.

◆ RemoveTwist()

static void RemoveTwist ( Eigen::Matrix3d &  R)
inlinestatic

◆ RotationMatrix() [1/2]

static Eigen::Matrix3d RotationMatrix ( double  angle,
int  axis 
)
inlinestatic

Definition at line 66 of file IK_Math.h.

References angle(), KDL::cos(), RotationMatrix(), and KDL::sin().

◆ RotationMatrix() [2/2]

static Eigen::Matrix3d RotationMatrix ( double  sine,
double  cosine,
int  axis 
)
inlinestatic

◆ safe_acos()

static double safe_acos ( double  f)
inlinestatic

Definition at line 93 of file IK_Math.h.

References KDL::acos(), and M_PI.

Referenced by angle(), and MatrixToAxisAngle().

◆ SphericalRangeParameters()

static Eigen::Vector3d SphericalRangeParameters ( const Eigen::Matrix3d &  R)
inlinestatic

Definition at line 145 of file IK_Math.h.

References ComputeTwist(), fabs(), IK_EPSILON, R, and sqrt().

Referenced by IK_QSphericalSegment::UpdateAngle(), and IK_QSwingSegment::UpdateAngle().

Variable Documentation

◆ IK_EPSILON

const double IK_EPSILON = 1e-20
static

Definition at line 21 of file IK_Math.h.

Referenced by EulerAngleFromMatrix(), FuzzyZero(), and SphericalRangeParameters().