Struct Cursor

Public

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

AssertValid ()
Public
GetRemainingPath (buffer)

Appends the remaining path between position and endPoint to buffer.

Public
MoveToCircleIntersection2D< T > (circleCenter3D, radius, transform)
Public
MoveToClosestPoint (point)

Move as close as possible to the specified point.

Public
MoveToLocallyClosestPoint (point, allowForwards=true, allowBackwards=true)
Public
MoveToSegment (index, fractionAlongSegment)

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

Public
NextSegment ()
Public
PrevSegment ()
Public

Public Static Methods

StartOfPath (interpolator)

A cursor at the start of the polyline represented by the interpolator.

Public Static

Public Variables

distance

Traversed distance from the start of the path.

Public
endPoint

Last point in the path.

Public
position

Current position.

Public
remainingDistance

Remaining distance until the end of the path.

Public
segmentCount
Public
segmentIndex

Current segment.

Public
tangent

Tangent of the curve at the current position.

Public
valid

True if this instance has a path set.

Public

Private/Protected Members

currentDistance
Private
currentSegmentLength
Private
distanceToSegmentStart
Private
interpolator
Private
version
Private