OpenSim::WrapMath Class Reference
This class provides basic math functions and constants for wrapping surfaces.
More...
#include <WrapMath.h>
List of all members.
Static Public Member Functions |
static bool | IntersectLines (SimTK::Vec3 &p1, SimTK::Vec3 &p2, SimTK::Vec3 &p3, SimTK::Vec3 &p4, SimTK::Vec3 &pInt1, double &s, SimTK::Vec3 &pInt2, double &t) |
| Compute the intersection between a line (p1->p2) and another line (p3->p4).
|
static bool | IntersectLineSegPlane (SimTK::Vec3 &pt1, SimTK::Vec3 &pt2, SimTK::Vec3 &plane, double d, SimTK::Vec3 &inter) |
static void | ConvertAxisAngleToQuaternion (const SimTK::Vec3 &axis, double angle, double quat[4]) |
static void | GetClosestPointOnLineToPoint (SimTK::Vec3 &pt, SimTK::Vec3 &linePt, SimTK::Vec3 &line, SimTK::Vec3 &closestPt, double &t) |
static void | Make3x3DirCosMatrix (double angle, double mat[][3]) |
static void | ConvertAxisAngleTo4x4DirCosMatrix (const SimTK::Vec3 &axis, double angle, double mat[][4]) |
static double | CalcDistanceSquaredBetweenPoints (SimTK::Vec3 &point1, SimTK::Vec3 &point2) |
static double | CalcDistanceSquaredPointToLine (SimTK::Vec3 &point, SimTK::Vec3 &linePt, SimTK::Vec3 &line) |
static void | RotateMatrixAxisAngle (double matrix[][4], const SimTK::Vec3 &axis, double angle) |
static void | ConvertQuaternionToMatrix (const double quat[4], double matrix[][4]) |
static void | RotateMatrixQuaternion (double matrix[][4], const double quat[4]) |
Detailed Description
This class provides basic math functions and constants for wrapping surfaces.
Member Function Documentation
double WrapMath::CalcDistanceSquaredBetweenPoints |
( |
SimTK::Vec3 & |
point1, |
|
|
SimTK::Vec3 & |
point2 | |
|
) |
| | [static] |
double WrapMath::CalcDistanceSquaredPointToLine |
( |
SimTK::Vec3 & |
point, |
|
|
SimTK::Vec3 & |
linePt, |
|
|
SimTK::Vec3 & |
line | |
|
) |
| | [static] |
void WrapMath::ConvertAxisAngleTo4x4DirCosMatrix |
( |
const SimTK::Vec3 & |
axis, |
|
|
double |
angle, |
|
|
double |
mat[][4] | |
|
) |
| | [static] |
void WrapMath::ConvertAxisAngleToQuaternion |
( |
const SimTK::Vec3 & |
axis, |
|
|
double |
angle, |
|
|
double |
quat[4] | |
|
) |
| | [static] |
void WrapMath::ConvertQuaternionToMatrix |
( |
const double |
quat[4], |
|
|
double |
matrix[][4] | |
|
) |
| | [static] |
void WrapMath::GetClosestPointOnLineToPoint |
( |
SimTK::Vec3 & |
pt, |
|
|
SimTK::Vec3 & |
linePt, |
|
|
SimTK::Vec3 & |
line, |
|
|
SimTK::Vec3 & |
closestPt, |
|
|
double & |
t | |
|
) |
| | [static] |
bool WrapMath::IntersectLines |
( |
SimTK::Vec3 & |
p1, |
|
|
SimTK::Vec3 & |
p2, |
|
|
SimTK::Vec3 & |
p3, |
|
|
SimTK::Vec3 & |
p4, |
|
|
SimTK::Vec3 & |
pInt1, |
|
|
double & |
s, |
|
|
SimTK::Vec3 & |
pInt2, |
|
|
double & |
t | |
|
) |
| | [static] |
Compute the intersection between a line (p1->p2) and another line (p3->p4).
If the lines do not intersect, this function returns the closest point on each line to the other line.
- Parameters:
-
| p1 | first point on first line |
| p2 | second point on first line |
| p3 | first point on second line |
| p4 | second point on second line |
| pInt1 | point on first line that is closest to second line |
| s | parameterized distance along first line from p1 to pInt1 |
| pInt2 | point on second line that is closest to first line |
| t | parameterized distance along second line from p3 to pInt2 |
- Returns:
- false if lines are parallel, true otherwise
bool WrapMath::IntersectLineSegPlane |
( |
SimTK::Vec3 & |
pt1, |
|
|
SimTK::Vec3 & |
pt2, |
|
|
SimTK::Vec3 & |
plane, |
|
|
double |
d, |
|
|
SimTK::Vec3 & |
inter | |
|
) |
| | [static] |
void WrapMath::Make3x3DirCosMatrix |
( |
double |
angle, |
|
|
double |
mat[][3] | |
|
) |
| | [static] |
void WrapMath::RotateMatrixAxisAngle |
( |
double |
matrix[][4], |
|
|
const SimTK::Vec3 & |
axis, |
|
|
double |
angle | |
|
) |
| | [static] |
void WrapMath::RotateMatrixQuaternion |
( |
double |
matrix[][4], |
|
|
const double |
quat[4] | |
|
) |
| | [static] |
The documentation for this class was generated from the following files:
- OpenSim/Simulation/Wrap/WrapMath.h
- OpenSim/Simulation/Wrap/WrapMath.cpp