ConvexClipPlaneSet Class
A ConvexClipPlaneSet is a collection of ClipPlanes, often used for bounding regions of space.
Implements
Methods
Name | Description | |
---|---|---|
addPlaneToConvexSet(plane: ClipPlane | undefined): void | Add a plane to the convex set. | |
addZClipPlanes(invisible: boolean, zLow?: number, zHigh?: number): void | Add planes for z-direction clip between low and high z levels. | |
announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean | Find fractional parts of the arc that are within this ClipPlaneSet, and announce each as * announce(fraction, fraction, curve) |
|
announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: (fraction0: number, fraction1: number) => void): boolean | Find the parts of the line segment (if any) that is within the convex clip volume. | |
classifyPointContainment(points: Point3d[], onIsOutside: boolean): ClipPlaneContainment | Returns 1, 2, or 3 based on whether point array is strongly inside, ambiguous, or strongly outside respectively. | |
clipConvexPolygonInPlace(xyz: GrowableXYZArray, work: GrowableXYZArray, tolerance: number = Geometry.smallMetricDistance): void | Clip a polygon to the inside of the convex set. | |
clipPointsOnOrInside(points: Point3d[], inOrOn: Point3d[], out: Point3d[]): void | test many points. | |
clipUnboundedSegment(pointA: Point3d, pointB: Point3d, announce?: (fraction0: number, fraction1: number) => void): boolean | Find the parts of the (unbounded) line segment (if any) that is within the convex clip volume. | |
clone(result?: ConvexClipPlaneSet): ConvexClipPlaneSet | Deep clone of all planes. | |
computePlanePlanePlaneIntersections(points: Point3d[] | undefined, rangeToExtend: Range3d | undefined, transform?: Transform, testContainment: boolean = true): number | Compute intersections among all combinations of 3 planes in the convex set. | |
hasIntersectionWithRay(ray: Ray3d, result?: Range1d): boolean | Test if there is any intersection with a ray defined by origin and direction. | |
isAlmostEqual(other: ConvexClipPlaneSet): boolean | Return true if all members are almostEqual to corresponding members of other. | |
isPointInside(point: Point3d): boolean | Return true if point satisfies point.isPointInside for all planes |
|
isPointOnOrInside(point: Point3d, tolerance: number): boolean | Return true if point satisfies point.isPointOnOrInside for all planes |
|
isSphereInside(centerPoint: Point3d, radius: number): boolean | Test if a sphere is completely inside the convex set. | |
multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean | Multiply all the ClipPlanes DPoint4d by matrix. | |
negateAllPlanes(): void | negate all planes of the set. | |
polygonClip(input: GrowableXYZArray | Point3d[], output: GrowableXYZArray, work: GrowableXYZArray, planeToSkip?: ClipPlane): void | Clip a polygon to the planes of the clip plane set. | |
reloadSweptPolygon(points: Point3d[], sweepDirection: Vector3d, sideSelect: number): number | * Define new planes in this ConvexClipPlaneSet so it clips to the inside of a polygon. | |
setInvisible(invisible: boolean): void | Set the invisible property on each plane of the convex set. |
|
toJSON(): any | Return an array containing all the planes of the convex set. | |
transformInPlace(transform: Transform): void | transform each plane in place. | |
createEmpty(result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static | create an empty ConvexClipPlaneSet |
|
createPlanes(planes: ClipPlane[], result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static | create from an array of planes. | |
createRange3dPlanes(range: Range3d, lowX: boolean = true, highX: boolean = true, lowY: boolean = true, highY: boolean = true, lowZ: boolean = true, highZ: boolean = true): ConvexClipPlaneSet Static | Create new convex set using selected planes of a Range3d. | |
createSweptPolyline(points: Point3d[], upVector: Vector3d, tiltAngle: Angle): ConvexClipPlaneSet | undefined Static | * Create a convex clip set for a polygon swept with possible tilt angle. | |
createXYBox(x0: number, y0: number, x1: number, y1: number, result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static | Create a convex clip plane set that clips to x0 <= x <= x1 and y0 <= y <= y1 . |
|
createXYPolyLine(points: Point3d[], interior: boolean[], leftIsInside: boolean, result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static | Create a convex set containing a half space for each edge between points of a polyline. | |
createXYPolyLineInsideLeft(points: Point3d[], result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static | Create a convexClipPlaneSet with planes whose "inside" normal is to the left of each segment. | |
fromJSON(json: any, result?: ConvexClipPlaneSet): ConvexClipPlaneSet Static | Extract clip planes from a json array [ clipPlane, clipPlane ] . |
|
setPlaneAndXYLoopCCW(points: GrowableXYZArray, planeOfPolygon: ClipPlane, frustum: ConvexClipPlaneSet): void Static | (re)set a plane and ConvexClipPlaneSet for a convex array, such as a convex facet used for xy clip. |
Properties
Name | Type | Description | |
---|---|---|---|
hugeVal Static | 1e+37 | Value acting as "at infinity" for coordinates along a ray. | |
planes Accessor ReadOnly | ClipPlane[] | Return the (reference to the) array of ClipPlane |
Defined in
Last Updated: 08 January, 2020