com.azalient.api.a.position
Interface IPathPosition


public interface IPathPosition

This represents the position of a point, P, relative to a pathway. Information includes the nearest point on the path, Q, the distance of Q along the path, and the distance of P from Q.

A pathway is divided into N-1 segments, connecting the N points defining a Bezier curve.


Method Summary
 double absoluteDistanceOutsidePath()
          Returns the absolute distance of P outside the edges of the path
 double absoluteDistanceToPath()
          Return the (absolute, positive) distance from (agent centre) to point on path
 double pathDistance()
          Returns the distance of the nearest point Q along the path, from the start.
 double pathHalfWidth()
          Returns the half-width of the pathway, at point Q
 IPathway pathway()
          Returns the pathway to which this position relates
 double pathWidth()
          Returns the width of the pathway, at point Q
 IXyz pointOnPath()
          Returns the point Q
 IXyz pointOnPath(double distanceAhead, double distanceFromPathEnd)
          Returns a point R, at up to the given distance ahead of Q, but at least the given distance back from the end of the path
 IXyz pointOnSegmentExt(IXyz c)
          Return the nearest point on the segment, or the extrapolation of the segment
 double segDistance()
          Returns the distance of Q along the segment containing Q
 int segi()
          Returns the index of the segment containing Q
 ISegment segment()
          Returns the segment containing the point Q
 void set(IPathPosition that)
          Set this pat position from another
 double signedDistanceToPath()
          Returns the distance from (agent centre) to point on path, -ve = to left, +ve = to right
 IXyz tangent()
          Returns a unit-length tangent to the pathway at Q
 

Method Detail

pathway

IPathway pathway()
Returns the pathway to which this position relates


pathDistance

double pathDistance()
Returns the distance of the nearest point Q along the path, from the start.


segment

ISegment segment()
Returns the segment containing the point Q


segi

int segi()
Returns the index of the segment containing Q


segDistance

double segDistance()
Returns the distance of Q along the segment containing Q


tangent

IXyz tangent()
Returns a unit-length tangent to the pathway at Q


pointOnPath

IXyz pointOnPath()
Returns the point Q


pointOnPath

IXyz pointOnPath(double distanceAhead,
                 double distanceFromPathEnd)
Returns a point R, at up to the given distance ahead of Q, but at least the given distance back from the end of the path


pathWidth

double pathWidth()
Returns the width of the pathway, at point Q


pathHalfWidth

double pathHalfWidth()
Returns the half-width of the pathway, at point Q


signedDistanceToPath

double signedDistanceToPath()
Returns the distance from (agent centre) to point on path, -ve = to left, +ve = to right


absoluteDistanceToPath

double absoluteDistanceToPath()
Return the (absolute, positive) distance from (agent centre) to point on path


pointOnSegmentExt

IXyz pointOnSegmentExt(IXyz c)
Return the nearest point on the segment, or the extrapolation of the segment


set

void set(IPathPosition that)
Set this pat position from another


absoluteDistanceOutsidePath

double absoluteDistanceOutsidePath()
Returns the absolute distance of P outside the edges of the path