#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/lu.hpp>
#include "Point.h"
#include "Connection.h"
Go to the source code of this file.
#define verbose 1 |
Calculate the Tait-Bryant (Euler Z-Y-X) angles between two vectors by
intersect
parallel
anti-parallel
References angle3D_axis(), axisAngleMat3DH(), cross3D(), matTaitBryant(), norm_2(), normalize(), and TOL.
References angle3D2_axis(), and toBoost3().
Find the angle between vectors a and b about the axis n.
References cross3D(), d2r, norm_2(), normalize(), octant(), and TOL.
Referenced by angle3D2_axis(), and DH_Link< DataType, dim >::calcDenavitHartenbergParam().
References angle3D3_axis(), and toBoost3().
References cross3D(), d2r, norm_2(), normalize(), and TOL.
Referenced by angle3D3_axis(), and DH_Link< DataType, dim >::calcDenavitHartenbergParam().
References angle3D_axis(), and toBoost3().
Find the angle between vectors a and b about the axis n.
References d2r, norm_2(), normalize(), and TOL.
Referenced by angle3D2(), and angle3D_axis().
References axisAngleMat3D(), and toBoost3().
Form a 3x3 rotation matrix from axis - angle representation.
Referenced by axisAngleMat3D().
References axisAngleMat3DH(), and toBoost3().
Form a homogeneous rotation matrix from axis - angle representation.
References d2r.
Referenced by angle3D2(), and axisAngleMat3DH().
void calcVelMVP | ( | MType | Tnet, | |
std::vector< BPType > & | origins, | |||
std::vector< BPType > & | axis, | |||
std::vector< BPType > & | angVel, | |||
std::vector< BPType > & | linVel, | |||
std::vector< BPType > & | in, | |||
std::vector< BPType > & | out | |||
) |
References SkewSymmetric().
int checkTag | ( | std::vector< int > | tag | ) |
Referenced by DH_Link< DataType, dim >::print().
Calculate the cross product of two 2D vectors; return the resulting scalar.
References norm_2().
References norm_2(), octant(), toBoost3(), and TOL.
Calculate the cross product of two 3D vectors; return the resulting vector.
Referenced by angle3D2(), angle3D2_axis(), angle3D3_axis(), DH_Link< DataType, dim >::calcDenavitHartenbergParam(), Joint< DataType, dim >::Joint(), main(), Surface< DataType >::measure(), Surface< DataType >::nearestFacet(), and Surface< DataType >::pressureForce().
Retrun the Denavit-Hartenberg matrix given:
link | length (radius) | |
link | twist (alpha) | |
link | offset (depth) | |
joint | angle (theta) |
References d2r.
Referenced by DH_Link< DataType, dim >::calcDenavitHartenbergMat().
Sperical Wrist currently works in a Euler Z-X-Z convention.
References d2r.
Referenced by DH_Link< DataType, dim >::calcDenavitHartenbergMat().
Calculate the determinant of a 3x3 matrix; return the result.
Referenced by intersection_line2facet().
void dist3D_Line_to_Line | ( | PType | L0P0, | |
PType | L0P1, | |||
PType | L1P0, | |||
PType | L1P1, | |||
PType & | L0I, | |||
PType & | L1I, | |||
PType & | CN, | |||
DataType & | dist, | |||
int & | lcase | |||
) |
References dist3D_Line_to_Line(), and toBoost3().
void dist3D_Line_to_Line | ( | BPType | L0P0, | |
BPType | L0P1, | |||
BPType | L1P0, | |||
BPType | L1P1, | |||
BPType & | L0I, | |||
BPType & | L1I, | |||
BPType & | CN, | |||
DataType & | dist, | |||
int & | lcase | |||
) |
dist3D_Line_to_Line(): get the 3D minimum distance between 2 lines
Input: two 3D lines L0 := L0P1 - L0P0 and L1 := L1P1 - L1P0
Return: the shortest distance between L0 and L1, intersection points, and common normal
http://geomalgorithms.com/a07-_distance.html
http://www.geometrictools.com/Documentation/DistanceLine3Line3.pdf
compute the line parameters of the two closest points
get the difference of the two closest points
determine lcase
coincident lines
parallel lines
instersecting lines
skew lines
References norm_2(), normalize(), and TOL.
Referenced by DH_Link< DataType, dim >::calcDenavitHartenbergParam(), and dist3D_Line_to_Line().
References distance_point_to_line3D(), and toBoost3().
References norm_2(), normalize(), and projectScalar().
Referenced by distance_point_to_line3D(), and intersection_line2facet().
bool fexists | ( | const char * | filename | ) |
Referenced by MotionSolver< DataType, dim >::logLoads().
Return the transformation matrix to express stationary frame F in the coordinates of a moving frame M.
http://en.m.wikipedia.org/wiki/Kinematics
Calculate the inner product of two 3D vectors; return the resulting scalar.
Referenced by Surface< DataType >::measure().
PType intersection_line2facet | ( | PType | I_a, | |
PType | I_b, | |||
int & | nump, | |||
int & | numc, | |||
ads::FixedArray< 3, DataType > * | verts, | |||
ads::FixedArray< 3, int > * | conns, | |||
int & | flag | |||
) |
References determinant3(), distance_point_to_line3D(), InvertMatrix(), norm_2(), toBoost3(), toCPT3(), and TOL.
Referenced by Assembly< DataType, dim >::surfacePoint().
Invert a matrix by LU decomposition; return the result.
Referenced by intersection_line2facet().
Tait-Bryant (Euler Z-Y-X) angles from a 3x3 or homogeneous rotation matrix.
Referenced by angle3D2().
Multiply two vectors element wise of two 3D vectors; return the resulting vector.
References toBoost3().
Referenced by Spline< DataType, dim >::AddSplineNode(), angle3D2(), angle3D2_axis(), angle3D3_axis(), angle3D_axis(), DH_Link< DataType, dim >::calcDenavitHartenbergParam(), cross(), cross3D(), dist3D_Line_to_Line(), distance_point_to_line3D(), intersection_line2facet(), Loft< DataType >::makeUnique(), Curve< DataType, dim >::makeUnique(), Surface< DataType >::measure(), Curve< DataType, dim >::measure(), Surface< DataType >::nearestFacet(), normalize(), projectScalar(), Surface< DataType >::read(), SplineCurve< DataType, dim >::read(), Loft< DataType >::read(), Curve< DataType, dim >::read(), and Surface< DataType >::validFacet().
References normalize(), toBoost3(), and toCPT3().
Normalized a vector; return the result.
Referenced by angle3D2(), angle3D2_axis(), angle3D3_axis(), angle3D_axis(), DH_Link< DataType, dim >::calcDenavitHartenbergParam(), dist3D_Line_to_Line(), distance_point_to_line3D(), Joint< DataType, dim >::Joint(), Spline< DataType, dim >::linear(), normalize(), Assembly< DataType, dim >::surfacePoint(), and Surface< DataType >::updateAxis().
void numVelMVP | ( | MType | Tnet0, | |
MType | Tnet1, | |||
std::vector< PType > & | in, | |||
std::vector< PType > & | out, | |||
DataType | dt | |||
) |
void numVelMVP | ( | MType | Tnet0, | |
MType | Tnet1, | |||
std::vector< BPType > & | in, | |||
std::vector< BPType > & | out, | |||
DataType | dt | |||
) |
Referenced by Surface< DataType >::updatePart(), and Loft< DataType >::updatePart().
References octant(), and toBoost3().
Check if two vectors are in the same octant; return 1 if they are 0 otherwise.
References sgn().
int octant | ( | PType | a | ) | [inline] |
References octant(), and toBoost3().
int octant | ( | BPType | a | ) | [inline] |
Return which ocatnt a vectors is in.
References sgn().
Referenced by angle3D2_axis(), cross3D(), Surface< DataType >::nearestFacet(), and octant().
References octant2(), and toBoost3().
References sgn().
Referenced by DH_Link< DataType, dim >::calcDenavitHartenbergParam(), and octant2().
Return the position of a point in a stationary frame F in the coordinates of a moving frame M.
http://en.m.wikipedia.org/wiki/Kinematics
void printID | ( | std::vector< int > | tag | ) |
Referenced by Assembly< DataType, dim >::AddPart(), Assembly< DataType, dim >::AddSubAssembly(), main(), and trimID().
Referenced by Loft< DataType >::GenLoft(), and Surface< DataType >::updateAxis().
Retrun the projection of one 3D vector, u, onto another, v.
Referenced by DH_Link< DataType, dim >::calcDenavitHartenbergParam(), and project().
References projectScalar(), and toBoost3().
References norm_2().
Referenced by distance_point_to_line3D(), Surface< DataType >::logLoad(), and projectScalar().
reflection about a plane through the origin with normal n = (a,b,c)
References reflMat3D(), and toBoost3().
Form a homogeneous reflection matrix from vector.
Referenced by Loft< DataType >::read(), and reflMat3D().
Rotate a 3D vector by a 3D extrinsic angles (degrees); return the resulting vector.
References d2r.
References rotMat3D(), and toBoost3().
Form a homogeneous rotation matrix from Tait-Braynt (Euler Z-X-Y) angles.
References d2r.
Referenced by Loft< DataType >::GenLoft(), and rotMat3D().
References scalMat3D(), and toBoost3().
Form a homogeneous scaling matrix from vector.
Referenced by Loft< DataType >::GenLoft(), and scalMat3D().
int sgn2 | ( | DataType | a | ) | [inline] |
Referenced by calcVelMVP().
std::string stringID | ( | std::vector< int > | tag | ) |
Referenced by Assembly< DataType, dim >::AddPart(), Assembly< DataType, dim >::AddSubAssembly(), Assembly< DataType, dim >::Checkpointing(), DH_Link< DataType, dim >::DH_Link(), main(), Assembly< DataType, dim >::print(), Assembly< DataType, dim >::printSummary(), and Assembly< DataType, dim >::Restart().
Referenced by angle3D2_axis(), angle3D3_axis(), angle3D_axis(), axisAngleMat3D(), axisAngleMat3DH(), cross3D(), dist3D_Line_to_Line(), distance_point_to_line3D(), Spline< DataType, dim >::Eq(), intersection_line2facet(), Spline< DataType, dim >::linear(), norm_2(), normalize(), octant(), octant2(), project(), projectScalar(), reflMat3D(), rotMat3D(), scalMat3D(), and tranMat3D().
Referenced by Spline< DataType, dim >::Eq(), intersection_line2facet(), Spline< DataType, dim >::linear(), normalize(), prodMP(), and project().
References toBoost3(), and tranMat3D().
Form a homogeneous translation matrix from vector.
Referenced by Loft< DataType >::GenLoft(), and tranMat3D().
void trimID | ( | std::vector< int > & | tag | ) |
References printID().