OpenPath class final
A path through points, measured by distance along it: where it is at
s metres, which way it runs there, and which way is right.
A road is not a list of points. A racing game asks "where is the car
eighty metres on" and "which way is the road pointing there", and a
list of points answers neither without the arithmetic every such game
wrote for itself: which segment, how far into it, and a heading that
does not snap at every corner. Distances are cumulative lengths of the
straight pieces between points; smooth the points first (a
CatmullRom sampled finely) for a smooth road.
Right is the tangent crossed with up, so a path over flat ground has its right on the ground. Beyond either end the path goes straight on.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pointAt(
double s, [Vector3? out]) → Vector3 -
Where the path is
smetres along it, intooutif given. -
rightAt(
double s, [Vector3? out]) → Vector3 -
Which way is right of the path at
s, a unit vector on the plane square to up, intooutif given. -
tangentAt(
double s, [Vector3? out]) → Vector3 -
Which way the path runs at
s, a unit vector, intooutif given. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited