| Method | Defined by | ||
|---|---|---|---|
|
bspline(u:Number, a:Array, b:Array, s:Point):Point
[static]
Computes a point along a B-spline.
| Geometry | ||
|
bsplineCoeff(p:Array, a:Array, b:Array):void
[static]
Computes the co-efficients for a B-spline.
| Geometry | ||
|
convexHull(p:Array, len:uint):Array
[static]
Computes the convex hull for a set of points.
| Geometry | ||
|
cubic(u:Number, a:Point, c1:Point, c2:Point, c3:Point, p:Point):Point
[static]
Computes a point along a cubic Bezier curve.
| Geometry | ||
|
cubicCoeff(a:Point, b:Point, c:Point, d:Point, c1:Point, c2:Point, c3:Point):void
[static]
Computes the co-efficients for a cubic Bezier curve.
| Geometry | ||
|
intersectLineRect(a1x:Number, a1y:Number, a2x:Number, a2y:Number, r:Rectangle, p0:Point, p1:Point):int
[static]
Compute the intersection of a line and a rectangle.
| Geometry | ||
|
intersectLines(a1x:Number, a1y:Number, a2x:Number, a2y:Number, b1x:Number, b1y:Number, b2x:Number, b2y:Number, intersect:Point):int
[static]
Compute the intersection of two line segments.
| Geometry | ||
| Constant | Defined by | ||
|---|---|---|---|
| COINCIDENT : int = -1 [static] Indicates intersection between shapes
| Geometry | ||
| NO_INTERSECTION : int = 0 [static] Indicates no intersection between shapes
| Geometry | ||
| PARALLEL : int = -2 [static] Indicates two lines are parallel
| Geometry | ||
| bspline | () | method |
public static function bspline(u:Number, a:Array, b:Array, s:Point):PointComputes a point along a B-spline.
Parametersu:Number — the interpolation fraction along the curve (between 0 and 1)
|
|
a:Array — an array of x-components of the B-spline co-efficients
|
|
b:Array — an array of y-components of the B-spline co-efficients
|
|
s:Point — point in which to store the calculated point on the curve
|
Point |
| bsplineCoeff | () | method |
public static function bsplineCoeff(p:Array, a:Array, b:Array):voidComputes the co-efficients for a B-spline.
Parametersp:Array — the control points of the spline as an array of x,y values
|
|
a:Array — an array for storing the x-components of co-efficients
|
|
b:Array — an array for storing the y-components of co-efficients
|
| convexHull | () | method |
public static function convexHull(p:Array, len:uint):ArrayComputes the convex hull for a set of points.
Parametersp:Array — the input points, as a flat array of x,y values
|
|
len:uint — the number of points to include in the hull
|
Array — the convex hull, as a flat array of x,y values
|
| cubic | () | method |
public static function cubic(u:Number, a:Point, c1:Point, c2:Point, c3:Point, p:Point):PointComputes a point along a cubic Bezier curve.
Parametersu:Number — the interpolation fraction along the curve (between 0 and 1)
|
|
a:Point — the starting point of the curve
|
|
c1:Point — the zero-order Bezier co-efficients
|
|
c2:Point — the first-order Bezier co-efficients
|
|
c3:Point — the second-order Bezier co-efficients
|
|
p:Point — point in which to store the calculated point on the curve
|
Point |
| cubicCoeff | () | method |
public static function cubicCoeff(a:Point, b:Point, c:Point, d:Point, c1:Point, c2:Point, c3:Point):voidComputes the co-efficients for a cubic Bezier curve.
Parametersa:Point — the starting point of the curve
|
|
b:Point — the first control point of the curve
|
|
c:Point — the second control point of the curve
|
|
d:Point — the ending point of the curve
|
|
c1:Point — point in which to store the zero-order co-efficients
|
|
c2:Point — point in which to store the first-order co-efficients
|
|
c3:Point — point in which to store the second-order co-efficients
|
| intersectLineRect | () | method |
public static function intersectLineRect(a1x:Number, a1y:Number, a2x:Number, a2y:Number, r:Rectangle, p0:Point, p1:Point):intCompute the intersection of a line and a rectangle.
Parametersa1x:Number — the first endpoint of the line
|
|
a1y:Number — the second endpoint of the line
|
|
a2x:Number — the rectangle
|
|
a2y:Number — a length 2 or greater array of points in which to store
the results
|
|
r:Rectangle |
|
p0:Point |
|
p1:Point |
int — the intersection code. This is either the number of
intersections or one of { |
| intersectLines | () | method |
public static function intersectLines(a1x:Number, a1y:Number, a2x:Number, a2y:Number, b1x:Number, b1y:Number, b2x:Number, b2y:Number, intersect:Point):intCompute the intersection of two line segments.
Parametersa1x:Number — the x-coordinate of the 1st endpoint of the 1st line
|
|
a1y:Number — the y-coordinate of the 1st endpoint of the 1st line
|
|
a2x:Number — the x-coordinate of the 2nd endpoint of the 1st line
|
|
a2y:Number — the y-coordinate of the 2nd endpoint of the 1st line
|
|
b1x:Number — the x-coordinate of the 1st endpoint of the 2nd line
|
|
b1y:Number — the y-coordinate of the 1st endpoint of the 2nd line
|
|
b2x:Number — the x-coordinate of the 2nd endpoint of the 2nd line
|
|
b2y:Number — the y-coordinate of the 2nd endpoint of the 2nd line
|
|
intersect:Point — a Point in which to store the intersection point
|
int — the intersection code. This is either the number of
intersections or one of { |
| COINCIDENT | constant |
public static const COINCIDENT:int = -1Indicates intersection between shapes
| NO_INTERSECTION | constant |
public static const NO_INTERSECTION:int = 0Indicates no intersection between shapes
| PARALLEL | constant |
public static const PARALLEL:int = -2Indicates two lines are parallel