Skip to main content

Crate euclidean

Crate euclidean 

Source

Functions§

arbitrary_orthogonal_frame
Construct an orthogonal frame of reference in $R^3$ from a single vector.
find_best_ortho_index
Find the index of a vector to use for a basis of a set of points. The first vector is assumed to be $(p_1 - p_0)$, the second is $(p_i - p_0)$ where $p_i$ is the most orthogonal vector relative to $(p_1 - p_0)$.
find_planar_orthonormal_basis
Find an orthonormal basis for a planar set of points in some dimension. The order of the return elements is, origin, first basis, second basis.
interior_polygon_point
Find an arbitrary point that is guaranteed to lie on the inside of the simple polygon described by its ordered vertex sequence.
line_line_intersection
Tries to find the intersection between two lines in 3D. Returns the intersection as a distance from origin1. i.e. the intersection point is origin1 + t * ray1 where t is the return value.
line_segment_intersection
Computes the intersection of a line and a segment.
orthogonal_vec_from_basis
orthogonal_vector
Robustly obtain a vector orthogonal to an input vector.
osculating_circle
Find the center of the osculating circle of 3 unaligned points. returns the center of the osculating circle.
point_line_distance
point_segment_distance
Measure the shortest distance from a point to a segment defined by two endpoints.
project_onto_line
project_onto_line_distance
Projects a point onto a line and returns a signed distance from the origin of the line to the projected point.
project_onto_open_poly_line
Find the point closest to an input point amongst all segments of a polyline.
project_point_onto_plane
Orthogonally project a point onto a plane.
project_point_onto_segment
Find the closest point on a segment to an input point.
project_point_onto_triangle
Project a point onto a triangle. Meaning the shortest distance from any point in the triangle to the input point.
segment_segment_distance
Computes the closest distance of two segments (not lines).
segment_segment_intersection
Computes the intersection of 2 segments.
segment_segment_intersection_tolerance
Like segment_segment_intersection but it allows specifying a tolerance value for the end points. i.e. if the intersection occurs near either endpoint, such as in the vertex joining 2 sides of a triangle, it won’t be considered an intersection. Use positive epsilons to make the test stricter and negative to make it more permissive.
segment_segment_shortest_points
Find the two points closest to each other on two segments.
triangle_aabb_intersection_test
Performs triangle-AABB intersection test using SAT in $R^3$.