Classes | |
class | Point3D |
class | Segment3D |
class | Vector3D |
class | Matrix3D |
Functions | |
bool | intersection (const Carthesian::Point3D &p1, const Carthesian::Point3D &p2, const Carthesian::Point3D &p3, const Carthesian::Point3D &p4, Carthesian::Point3D &pa, Carthesian::Point3D &pb, double &mua, double &mub) |
Calculate the line segment PaPb that is the shortest route between the segments P1P2 and P3P4. Calculate the line segment PaPb that is the shortest route between two lines P1P2 and P3P4. Calculate also the values of mua and mub where Pa = P1 + mua (P2 - P1) Pb = P3 + mub (P4 - P3) source : http://paulbourke.net/geometry/lineline3d. | |
bool | intersection (const Carthesian::Segment3D &p1p2, const Carthesian::Segment3D &p3p4, Carthesian::Segment3D &papb, double &mua, double &mub) |
Calculate the line segment PaPb that is the shortest route between the segments P1P2 and P3P4. Calculate the line segment PaPb that is the shortest route between two lines P1P2 and P3P4. Calculate also the values of mua and mub where Pa = P1 + mua (P2 - P1) Pb = P3 + mub (P4 - P3) source : http://paulbourke.net/geometry/lineline3d. | |
double | angle (const Carthesian::Vector3D &v1, const Carthesian::Vector3D &v2) |
compute the angle in radians between 2 vectors | |
double | dotproduct (const Carthesian::Vector3D &v1, const Carthesian::Vector3D &v2) |
compute the scalar product between 2 vectors | |
void | dotproduct (const Carthesian::Matrix3D &m, const Carthesian::Vector3D &v, Carthesian::Vector3D &vout) |
compute the dot product between a matrix and a vector | |
Carthesian::Vector3D | dotproduct (const Carthesian::Matrix3D &m, const Carthesian::Vector3D &v) |
compute the dot product between a matrix and a vector | |
void | crossproduct (const Carthesian::Vector3D &v1, const Carthesian::Vector3D &v2, Carthesian::Vector3D &vout) |
compute the cross product between 2 vectors | |
Carthesian::Vector3D | crossproduct (const Carthesian::Vector3D &v1, const Carthesian::Vector3D &v2) |
compute the cross product between 2 vectors | |
void | rotation_matrix (const Carthesian::Vector3D &axis, const double theta, Carthesian::Matrix3D &matrix) |
construct the rotation matrix of an angle theta in radians using the vector axis as rotation axis Uses the Rodrigues' Rotation Formula set in http://mathworld.wolfram.com/RodriguesRotationFormula.html | |
void | rotate (const Carthesian::Vector3D &v, const Carthesian::Vector3D &axis, const double theta, Carthesian::Vector3D &vout) |
construct the vector issued of the rotation of v by an angle theta in radians using the vector axis as rotation axis Uses the Rodrigues' Rotation Formula set in http://mathworld.wolfram.com/RodriguesRotationFormula.html | |
Carthesian::Vector3D | rotate (const Carthesian::Vector3D &v, const Carthesian::Vector3D &axis, const double theta) |
construct the vector issued of the rotation of v by an angle theta in radians using the vector axis as rotation axis Uses the Rodrigues' Rotation Formula set in http://mathworld.wolfram.com/RodriguesRotationFormula.html |
Carthesian geometry kernel
double Carthesian::angle | ( | const Carthesian::Vector3D & | v1, | |
const Carthesian::Vector3D & | v2 | |||
) |
compute the angle in radians between 2 vectors
v1 | first vector | |
v2 | second vector |
References crossproduct(), dotproduct(), and Carthesian::Vector3D::norm().
Carthesian::Vector3D Carthesian::crossproduct | ( | const Carthesian::Vector3D & | v1, | |
const Carthesian::Vector3D & | v2 | |||
) |
compute the cross product between 2 vectors
v1 | first vector | |
v2 | second vector |
References crossproduct().
void Carthesian::crossproduct | ( | const Carthesian::Vector3D & | v1, | |
const Carthesian::Vector3D & | v2, | |||
Carthesian::Vector3D & | vout | |||
) |
compute the cross product between 2 vectors
v1 | [IN] first vector | |
v2 | [IN] second vector | |
vout | [OUT] the cross product vector |
References Carthesian::Vector3D::set().
Referenced by angle(), crossproduct(), and Viewing::earth_to_sat_from_range().
double Carthesian::dotproduct | ( | const Carthesian::Vector3D & | v1, | |
const Carthesian::Vector3D & | v2 | |||
) |
compute the scalar product between 2 vectors
v1 | first vector | |
v2 | second vector |
Referenced by angle(), dotproduct(), and rotate().
void Carthesian::dotproduct | ( | const Carthesian::Matrix3D & | m, | |
const Carthesian::Vector3D & | v, | |||
Carthesian::Vector3D & | vout | |||
) |
compute the dot product between a matrix and a vector
m | [IN] a matrix | |
v | [IN] a vector | |
vout | [OUT] resulting vector |
References Carthesian::Vector3D::set().
Carthesian::Vector3D Carthesian::dotproduct | ( | const Carthesian::Matrix3D & | m, | |
const Carthesian::Vector3D & | v | |||
) |
compute the dot product between a matrix and a vector
m | a matrix | |
v | a vector |
References dotproduct().
bool Carthesian::intersection | ( | const Carthesian::Segment3D & | p1p2, | |
const Carthesian::Segment3D & | p3p4, | |||
Carthesian::Segment3D & | papb, | |||
double & | mua, | |||
double & | mub | |||
) |
Calculate the line segment PaPb that is the shortest route between the segments P1P2 and P3P4. Calculate the line segment PaPb that is the shortest route between two lines P1P2 and P3P4. Calculate also the values of mua and mub where Pa = P1 + mua (P2 - P1) Pb = P3 + mub (P4 - P3) source : http://paulbourke.net/geometry/lineline3d.
p1p2 | [IN] first segment | |
p3p4 | [IN] 2nd segment start point | |
papb | [OUT] intersection segment | |
mua | [OUT] ratio as Pa = P1 + mua (P2 - P1) | |
mub | [OUT] ratio as Pb = P3 + mub (P4 - P3) |
References intersection(), Carthesian::Segment3D::p1, and Carthesian::Segment3D::p2.
bool Carthesian::intersection | ( | const Carthesian::Point3D & | p1, | |
const Carthesian::Point3D & | p2, | |||
const Carthesian::Point3D & | p3, | |||
const Carthesian::Point3D & | p4, | |||
Carthesian::Point3D & | pa, | |||
Carthesian::Point3D & | pb, | |||
double & | mua, | |||
double & | mub | |||
) |
Calculate the line segment PaPb that is the shortest route between the segments P1P2 and P3P4. Calculate the line segment PaPb that is the shortest route between two lines P1P2 and P3P4. Calculate also the values of mua and mub where Pa = P1 + mua (P2 - P1) Pb = P3 + mub (P4 - P3) source : http://paulbourke.net/geometry/lineline3d.
p1 | [IN] first segment start point | |
p2 | [IN] first segment end point | |
p3 | [IN] 2nd segment start point | |
p4 | [IN] 2nd segment end point | |
pa | [OUT] intersection point on P1P2 | |
pb | [OUT] intersection point on P3P4 | |
mua | [OUT] ratio as Pa = P1 + mua (P2 - P1) | |
mub | [OUT] ratio as Pb = P3 + mub (P4 - P3) |
Referenced by intersection().
Carthesian::Vector3D Carthesian::rotate | ( | const Carthesian::Vector3D & | v, | |
const Carthesian::Vector3D & | axis, | |||
const double | theta | |||
) |
construct the vector issued of the rotation of v by an angle theta in radians using the vector axis as rotation axis Uses the Rodrigues' Rotation Formula set in http://mathworld.wolfram.com/RodriguesRotationFormula.html
v1 | vector to rotate | |
axis | vector used as rotation axis | |
theta | rotation angle in radians |
References rotate().
void Carthesian::rotate | ( | const Carthesian::Vector3D & | v, | |
const Carthesian::Vector3D & | axis, | |||
const double | theta, | |||
Carthesian::Vector3D & | vout | |||
) |
construct the vector issued of the rotation of v by an angle theta in radians using the vector axis as rotation axis Uses the Rodrigues' Rotation Formula set in http://mathworld.wolfram.com/RodriguesRotationFormula.html
v | [IN] vector to rotate | |
axis | [IN] vector used as rotation axis | |
theta | [IN] rotation angle in radians | |
vout | [OUT] vector issued of the rotation |
References dotproduct(), and rotation_matrix().
Referenced by Viewing::earth_to_sat_from_range(), and rotate().
void Carthesian::rotation_matrix | ( | const Carthesian::Vector3D & | axis, | |
const double | theta, | |||
Carthesian::Matrix3D & | matrix | |||
) |
construct the rotation matrix of an angle theta in radians using the vector axis as rotation axis Uses the Rodrigues' Rotation Formula set in http://mathworld.wolfram.com/RodriguesRotationFormula.html
axis | [IN] vector used as rotation axis | |
theta | [IN] rotation angle in radians | |
matrix | [OUT] rotation matrix |
Referenced by rotate().