1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Differential geometry queries for paths.
//!
//! Once you can sample a path's position, these opt-in traits let you query
//! how the path is oriented and bending at any point:
//!
//! - [`Tangent`] - unit tangent vector at any arc-length
//! - [`Heading`] - planar heading angle (radians) at any arc-length
//! - [`Curved`] - curvature (scalar in 2D, vector in 3D) at any arc-length
//! - [`FrenetFrame`] - full Frenet–Serret frame (T, N[, B]) at any arc-length
use crate::;
/// Query the unit tangent vector at any point along a path.
///
/// The returned vector is unit-length and points in the direction of
/// increasing arc-length.
/// Query the planar heading angle at any point along a path.
///
/// Heading is meaningful only for 2D paths, where it represents the angle
/// (in radians, counter-clockwise from the positive x-axis) of the tangent.
/// Query the curvature at any point along a path.
///
/// In 2D the curvature is a signed scalar (positive for left turns, negative
/// for right turns). In 3D it is a curvature vector (`κ · N`).
/// Query the full Frenet frame (T, N[, B]) at any point along a path.
///
/// In 2D the frame consists of the tangent and normal. In 3D it additionally
/// includes the binormal.