|
STIR 6.4.0
|

Files | |
| file | line_distances.h |
| A few functions to compute distances between lines etc. | |
Functions | |
| template<class coordT> | |
| coordT | stir::coordinate_between_2_lines (CartesianCoordinate3D< coordT > &result, const LORAs2Points< coordT > &line0, const LORAs2Points< coordT > &line1) |
| find a point half-way between 2 lines and their distance | |
| template<class coordT> | |
| coordT | stir::distance_between_line_and_point (const LORAs2Points< coordT > &line, const CartesianCoordinate3D< coordT > &r1) |
| find the distance between a point and a line | |
| template<class coordT> | |
| void | stir::project_point_on_a_line (const CartesianCoordinate3D< coordT > &p1, const CartesianCoordinate3D< coordT > &p2, CartesianCoordinate3D< coordT > &r1) |
| Project a point on a line. | |
Functions to compute distances between lines etc.
|
inline |
find a point half-way between 2 lines and their distance
The point is found by minimising the distance with both lines.
If the lines are parallel, the point returned is still valid, although it is of course not unique in practice.
References coordinate_between_2_lines(), inner_product(), and square().
Referenced by coordinate_between_2_lines().
|
inline |
Project a point on a line.
References inner_product(), and project_point_on_a_line().
Referenced by project_point_on_a_line().