ClipVector Class
Class holding an array structure of shapes defined by ClipPrimitive
- The
ClipVectordefines an intersection of the memberClipPrimitiveregions. - In the most common usage, one of the
ClipPrimitivewill be an outer region, and all others are holes with marker flag indicating that they outside of each hole is live.
Methods
| Name | Description | |
|---|---|---|
| appendClone(clip: ClipPrimitive): void | Append a deep copy of the given ClipPrimitive to this ClipVector. | |
| appendReference(clip: ClipPrimitive): void | Append a reference of the given ClipPrimitive to this ClipVector. | |
| appendShape(shape: Point3d[], zLow?: number, zHigh?: number, transform?: Transform, isMask: boolean = false, invisible: boolean = false): boolean | Create and append a new ClipPrimitive to the array given a shape as an array of points. | |
| classifyPointContainment(points: Point3d[], ignoreMasks: boolean = false): ClipPlaneContainment | Determines whether the given points fall inside or outside this set of ClipShapes. | |
| classifyRangeContainment(range: Range3d, ignoreMasks: boolean): ClipPlaneContainment | Determines whether a 3D range lies inside or outside this set of ClipShapes. | |
| clear(): void | Empties out the array of ClipShapes. | |
| clone(result?: ClipVector): ClipVector | Create a deep copy of another ClipVector | |
| extractBoundaryLoops(loopPoints: Point3d[][], transform?: Transform): number[] | A simple way of packaging this ClipVector's ClipShape points into a multidimensional array, while also taking into account each ClipPrimitive's individual transforms. |
|
| isAnyLineStringPointInside(points: Point3d[]): boolean | For an array of points (making up a LineString), tests whether the segment between each point lies inside the ClipVector. | |
| isLineStringCompletelyContained(points: Point3d[]): boolean | For an array of points that make up a LineString, develops a line segment between each point pair, and returns true if all segments lie inside this ClipVector. |
|
| multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean | Multiply all ClipPlanes DPoint4d by matrix. | |
| parseClipPlanes(): void | For every clip, parse the member point array into the member clip plane object (only for clipPlanes member, not the mask) | |
| pointInside(point: Point3d, onTolerance: number = Geometry.smallMetricDistanceSquared): boolean | Returns true if the given point lies inside all of this ClipVector's ClipShapes (by rule of intersection). | |
| setInvisible(invisible: boolean): void | Sets this ClipVector and all of its members to the visibility specified. | |
| sumSizes(intervals: Segment1d[], begin: number, end: number): number | Note: Line segments are used to represent 1 dimensional intervals here, rather than segments. | |
| toJSON(): any | Parse this ClipVector into a JSON object. | |
| transformInPlace(transform: Transform): boolean | Transforms this ClipVector to a new coordinate-system. | |
| create(clips: ClipPrimitive[], result?: ClipVector): ClipVector Static | Create a ClipVector from (clones of) an array of ClipPrimitives | |
| createCapture(clips: ClipPrimitive[], result?: ClipVector): ClipVector Static | Create a ClipVector from an array of ClipPrimitives (or derived classes) (capture the pointers) | |
| createEmpty(result?: ClipVector): ClipVector Static | Create a ClipVector with an empty set of ClipShapes. | |
| fromJSON(json: any, result?: ClipVector): ClipVector Static | Parse a JSON object into a new ClipVector. |
Properties
| Name | Type | Description | |
|---|---|---|---|
| boundingRange | Range3d | range acting as first filter. | |
| clips Accessor ReadOnly | ClipPrimitive[] | Returns a reference to the array of ClipShapes. | |
| isValid Accessor ReadOnly | boolean | Returns true if this ClipVector contains a ClipPrimitive. |
Defined in
Last Updated: 08 January, 2020