# Struct Cursor

Represents a single point on the polyline represented by the PathInterpolator.

The cursor is a lightweight structure which can be used to move backwards and forwards along a PathInterpolator.

If the PathInterpolator changes (e.g. has its path swapped out), then this cursor is invalidated and cannot be used anymore.

## Public Methods

Moves to the closest intersection of the line segment (origin + direction*range.x, origin + direction*range.y).

Move to the specified segment and move a fraction of the way to the next segment.

Moves the agent along the path, stopping to rotate on the spot when the path changes direction.

## Public Static Methods

Integrates exp(-|x|/smoothingDistance)/(2*smoothingDistance) from **a** to **b**.

Integrates (x - a)*exp(-x/smoothingDistance)/(2*smoothingDistance) from **a** to **b**.

## Public Variables

A vector parallel to the local curvature.

Traversed distance from the start of the path.

Last point in the path.

Fraction of the way along the current segment.

Current position.

Remaining distance until the end of the path.

Current segment.

Tangent of the curve at the current position.

True if this instance has a path set.