Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_math_geom.h
| Show First 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | double closest_to_line_v2_db(double r_close[2], | ||||
| const double l2[2]); | const double l2[2]); | ||||
| /** | /** | ||||
| * Find closest point to p on line through (`l1`, `l2`) and return lambda, | * Find closest point to p on line through (`l1`, `l2`) and return lambda, | ||||
| * where (0 <= lambda <= 1) when `p` is in the line segment (`l1`, `l2`). | * where (0 <= lambda <= 1) when `p` is in the line segment (`l1`, `l2`). | ||||
| */ | */ | ||||
| float closest_to_line_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3]); | float closest_to_line_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3]); | ||||
| /** | /** | ||||
| * Point closest to v1 on line v2-v3 in 2D. | * Point closest to v1 on line v2-v3 in 2D. | ||||
| * | |||||
| * \return A value in [0, 1] that corresponds to the position of #r_close on the line segment. | |||||
| */ | */ | ||||
| void closest_to_line_segment_v2(float r_close[2], | float closest_to_line_segment_v2(float r_close[2], | ||||
| const float p[2], | const float p[2], | ||||
| const float l1[2], | const float l1[2], | ||||
| const float l2[2]); | const float l2[2]); | ||||
HooglyBooglyUnsubmitted Not Done Inline Actions
HooglyBoogly: - Add a `\return` item to the docstring
- This could be a separate commit
- Might it make sense… | |||||
| /** | /** | ||||
| * Point closest to v1 on line v2-v3 in 3D. | * Point closest to v1 on line v2-v3 in 3D. | ||||
| * | |||||
| * \return A value in [0, 1] that corresponds to the position of #r_close on the line segment. | |||||
| */ | */ | ||||
| void closest_to_line_segment_v3(float r_close[3], | float closest_to_line_segment_v3(float r_close[3], | ||||
| const float p[3], | const float p[3], | ||||
| const float l1[3], | const float l1[3], | ||||
| const float l2[3]); | const float l2[3]); | ||||
| void closest_to_plane_normalized_v3(float r_close[3], const float plane[4], const float pt[3]); | void closest_to_plane_normalized_v3(float r_close[3], const float plane[4], const float pt[3]); | ||||
| /** | /** | ||||
| * Find the closest point on a plane. | * Find the closest point on a plane. | ||||
| * | * | ||||
| * \param r_close: Return coordinate | * \param r_close: Return coordinate | ||||
| * \param plane: The plane to test against. | * \param plane: The plane to test against. | ||||
| * \param pt: The point to find the nearest of | * \param pt: The point to find the nearest of | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 1,060 Lines • Show Last 20 Lines | |||||