Constructor
Variables
dx:Float
The delta-value of X end position of the Segment relative to starting position.
Please use Segment.setPoints to modify this value.
dy:Float
The delta-value of Y end position of the Segment relative to starting position.
Please use Segment.setPoints to modify this value.
invLenSq:Float
Inverse of the Segments squared length.
Please use Segment.setPoints to modify this value.
Methods
inlinedistanceSq(p:Point):Float
Returns squared distance to the Segment as an infinite line to the Point p.
inlinelineIntersection(r:Ray, ?pt:Point):Null<Point>
Tests if Segments intersects given Ray r.
Parameters:
pt | Optional Point instance to which intersection point is written. If not provided, returns new Point instance. |
|---|
Returns:
A Point with intersection position or null if Segment and Ray do not intersect.
inlineproject(p:Point, ?out:Point):Point
Projects Point p onto Segment. Returns position of intersection between Segment and line perpendicular to it going through Point p.
Parameters:
p | Point to project onto this Segment. |
|---|---|
out | Optional Point instance to which projection point is written. If not provided, returns new Point instance. |
Returns:
A Point with projection position.
