Class GridStringPulling

Public

Simplifies a path on a grid graph using a string pulling algorithm.

This is based on a paper called "Toward a String-Pulling Approach to Path Smoothing on Grid Graphs", with some optimizations as well as fixes for some edge cases that the paper didn't handle.

The result is conceptually similar to the well known funnel string pulling algorithm for navmesh graphs but it uses a different algorithm.

This class is used by the FunnelModifier on grid graphs.

Inner Types

Public Static Methods

Calculate (pathNodes, nodeStartIndex, nodeEndIndex, startPoint, endPoint, traversalCost=null, filter=null, maxCorners=…)

Simplifies a path on a grid graph using a string pulling algorithm.

Public Static
IntersectionLength (nodeCenter, segmentStart, segmentEnd)

Intersection length of the given segment with a square of size Int3.Precision centered at nodeCenter.

Public Static

Private/Protected Members

Cross (lhs, rhs)
Private Static
Dot (a, b)
Private Static
FixedPrecisionScale
Private Static
FromFixedPrecision (p)
Private Static
LinecastCost (trace, segmentStart, segmentEnd, gg, traversalCost)

Cost of moving across all the nodes in the list, along the given segment.

Private Static
Perpendicular (v)
Private Static
PredicateFailMode
Private
RightOrColinear (a, b, p)
Private Static
Side2D (a, b, p)

Returns which side of the line a - b that p lies on.

Private Static
TestIntersectionLength ()
Internal Static
ToFixedPrecision (p)
Private Static
directionToCorners

Z | |.

Private Static
marker1
Private Static
marker2
Private Static
marker3
Private Static
marker4
Private Static
marker5
Private Static
marker6
Private Static
marker7
Private Static