# Module cavalier_contours::polyline

Expand description

This module has all the types and functions associated with polylines, polyline vertexes, and polyline segments.

## Modules§

• Internal polyline modules made public for visualization, benchmarking, and testing purposes.

## Traits§

• Trait representing a creatable source of polyline data. This trait acts as a mutable polyline source and also exposes associated functions for construction. This trait is used when new polylines need to be returned from a function.
• Trait for visiting polyline intersects.
• Trait for visiting polyline segments (two consecutive vertexes).
• Trait representing a readonly source of polyline data. This trait has all the methods and operations that can be performed on a readonly polyline.
• Trait representing a mutable source of polyline data. This trait has all the methods and operations that can be performed on a mutable polyline.
• Trait for visiting polyline vertexes.

## Functions§

• Finds the intersects between two polyline segments.
• Get the arc radius and center of an arc polyline segment defined by `v1` to `v2`. Behavior undefined (may panic or return without error) if v1.bulge is zero.
• Computes the axis aligned bounding box of a polyline segment defined by `v1` to `v2`.
• Find the closest point on a polyline segment defined by `v1` to `v2` to `point` given. If there are multiple closest points then one is chosen (which is chosen is not defined).
• Computes a fast approximate axis aligned bounding box of a polyline segment defined by `v1` to `v2`.
• Calculate the path length of the polyline segment defined by `v1` to `v2`.
• Find the midpoint for the polyline segment defined by `v1` to `v2`.
• Splits a polyline segment defined by `v1` to `v2` at the `point_on_seg` given. Assumes the `point_on_seg` lies on the segment.
• Find the tangent direction vector on a polyline segment defined by `v1` to `v2` at `point_on_seg`.