| Name |
Description |
|
| constructor(lowX: number = Range2d._EXTREME_POSITIVE, lowY: number = Range2d._EXTREME_POSITIVE, highX: number = Range2d._EXTREME_NEGATIVE, highY: number = Range2d._EXTREME_NEGATIVE): Range2d |
|
|
| clone(result?: Range2d): Range2d |
return a clone of this range (or copy to optional result) |
|
| containsPoint(point: Readonly<WritableXAndY>): boolean |
Test if a point is within the range. |
|
| containsRange(other: Readonly<WritableLowAndHighXY>): boolean |
Test of other range is within this range |
|
| containsXY(x: number, y: number): boolean |
Test if a point given as x,y is within the range. |
|
| corners3d(asLoop: boolean = false, z: number = 0): Point3d[] |
Return an array with the 4 corners. |
|
| diagonal(result?: Vector2d): Vector2d |
return the diagonal vector. |
|
| diagonalFractionToPoint(fraction: number, result?: Point2d): Point2d |
return the point at the specified fraction along the diagonal vector. |
|
| distanceToPoint(point: Readonly<WritableXAndY>): number |
Return 0 if the point is within the range, otherwise the distance to the closest face or corner |
|
| distanceToRange(other: Readonly<WritableLowAndHighXY>): number |
Return 0 if the point is within the range, otherwise the distance to the closest face or corner |
|
| expandInPlace(delta: number): void |
move all limits by a fixed amount. |
|
| extendPoint(point: Readonly<WritableXAndY>): void |
Expand this range to include a point. |
|
| extendRange(other: Readonly<WritableLowAndHighXY>): void |
Expand this range to include a range. |
|
| extendTransformedXY(transform: Transform, x: number, y: number): void |
Expand this range to include a point given by x,y |
|
| extendXY(x: number, y: number): void |
Expand this range to include a point given by x,y |
|
| fractionToPoint(fractionX: number, fractionY: number, result?: Point2d): Point2d |
return a point given by fractional positions on the XY axes. |
|
| freeze(): Readonly<Range2d> |
Freeze this instance (and its members) so it is read-only |
|
| intersect(other: Readonly<WritableLowAndHighXY>, result?: Range2d): Range2d |
Return the intersection of ranges. |
|
| intersectsRange(other: Readonly<WritableLowAndHighXY>): boolean |
Test if there is any intersection with other range |
|
| isAlmostEqual(other: Range2d): boolean |
Returns true if this and other have equal low and high parts, or both are null ranges. |
|
| maxAbs(): number |
Largest absolute value among any coordinates in the box corners. |
|
| scaleAboutCenterInPlace(scaleFactor: number): void |
move low and high points by scaleFactor around the center point. |
|
| setFrom(other: Readonly<WritableLowAndHighXY>): void |
copy all content from any other that has low and high xy data. |
|
| setFromJSON(json: Range2dProps): void |
treat any array of numbers as numbers to be inserted !!! |
|
| setNull(): void |
reset the low and high to null range state. |
|
| setXY(x: number, y: number): void |
Set low and hight to a single xy value. |
|
| toFloat64Array(): Float64Array |
Flatten the low and high coordinates of this instance into an array of 4 doubles |
|
| toJSON(): Range2dProps |
return json array with two points as produced by Point2d.toJSON |
|
| union(other: Readonly<WritableLowAndHighXY>, result?: Range2d): Range2d |
Return the union of ranges. |
|
| worldToLocal(point: Point2d, result?: Point2d): undefined | Point2d |
Return fractional coordinates of point within the range. |
|
| xLength(): number |
Length of the box in the x direction |
|
| yLength(): number |
Length of the box in the y direction |
|
| createArray<T extends Range2d<T>>(points: Point2d[], result?: T): T Static |
Create a range around an array of points. |
|
| createFrom<T extends Range2d<T>>(other: Readonly<WritableLowAndHighXY>, result?: T): T Static |
create a new Range2d from any other that has low and high xy data. |
|
| createNull<T extends Range2d<T>>(result?: T): T Static |
create a range with no content. |
|
| createXY<T extends Range2d<T>>(x: number, y: number, result?: T): T Static |
Create a single point box |
|
| createXYXY<T extends Range2d<T>>(xA: number, yA: number, xB: number, yB: number, result?: T): T Static |
Create a box with 2 pairs of xy candidates. |
|
| createXYXYOrCorrectToNull<T extends Range2d<T>>(xA: number, yA: number, xB: number, yB: number, result?: T): T Static |
Create a box with 2 pairs of xy candidates. |
|
| createXYXYXY<T extends Range2d<T>>(xA: number, yA: number, xB: number, yB: number, xC: number, yC: number, result?: T): T Static |
Create a box with 3 pairs of xy candidates. |
|
| fromArrayBuffer<T extends Range2d<T>>(buffer: ArrayBuffer): T Static |
Construct a Range2d from an un-typed array. |
|
| fromFloat64Array<T extends Range2d<T>>(f64: Float64Array): T Static |
Construct a Range2d from an array of double-precision values |
|
| fromJSON<T extends Range2d<T>>(json?: Range2dProps): T Static |
Use setFromJSON to parse json into a new Range2d instance. |
|
| isNull(range: Readonly<WritableLowAndHighXY>): boolean Static |
Test if the box has high strictly less than low for any of x,y, condition. |
|
| toFloat64Array(val: Readonly<WritableLowAndHighXY>): Float64Array Static |
Flatten the low and high coordinates of any json object with low.x .. |
|