Merely a typed container for two Points.
public var start:Point
public var stop:Point
public function LineSegment(start:Point, stop:Point)
Parameters
public function equals(o:Object):Boolean
Parameters
Returns
protected function getIntersection(line:LineSegment, returnPoint:Boolean):*
Internal method that calculates whether the other line intersects
and returns either the intersected point or merely the intersection
type.
Parameters
Returns
public function getIntersectionPoint(line:LineSegment):Point
Return the point at which the other line intersects us.
Parameters
Returns
public function getIntersectionType(line:LineSegment):int
Tests if the given line intersects this line. This method rotates both lines so that the
start point of this line is on the left, at (0, 0). If the lines do intersect, it then
returns INTERSECTION_NORTH if the end point of line
is north of this line,
INTERSECTION_SOUTH otherwise.
Intersections are inclusive. If one or both points lands on this line, interects will not
return DOES_NOT_INTERSECT.
Parameters
Returns
public function getLength():Number
Get the length of this line.
Returns
public function isIntersected(line:LineSegment):Boolean
Parameters
Returns
public static const DOES_NOT_INTERSECT:int = 3
public static const INTERSECTION_NORTH:int = 1
public static const INTERSECTION_SOUTH:int = 2
Copyright © 2007-2009 Three Rings Design, Inc.