ClipPrimitive Class
- ClipPrimitive is a base class for clipping implementations that use
- A ClipPlaneSet designated "clipPlanes"
- an "invisible" flag
- When constructed directly, objects of type ClipPrimitive (directly, not through a derived class) will have just planes
- Derived classes (e.g. ClipShape) carry additional data of a swept shape.
- ClipPrimitive can be constructed with no planes.
- Derived class is responsible for filling the plane sets.
- At discretion of derived classes, plane construction can be done at construction time or "on demand when" queries call
ensurePlaneSets ()
- ClipPrimitive can be constructed with planes (and no derived class).
Extended by
Methods
Name |
Description |
|
constructor(planeSet?: UnionOfConvexClipPlaneSets, isInvisible: boolean = false): ClipPrimitive Protected |
|
|
arePlanesDefined(): boolean |
Returns true if the planes are present. |
|
classifyPointContainment(points: Point3d[], ignoreInvisibleSetting: boolean): ClipPlaneContainment |
Quick test of whether the given points fall completely inside or outside. |
|
clone(): ClipPrimitive |
Return a deep clone |
|
containsZClip(): boolean |
Return true if any plane of the primary clipPlanes has (a) non-zero z component in its normal vector and (b) finite distance from origin. |
|
ensurePlaneSets(): void |
* trigger (if needed) computation of plane sets (if applicable) in the derived class. |
|
fetchClipPlanesRef(): UnionOfConvexClipPlaneSets | undefined |
Get a reference to the UnionOfConvexClipPlaneSets . |
|
multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean |
Multiply all ClipPlanes DPoint4d by matrix. |
|
pointInside(point: Point3d, onTolerance: number = Geometry.smallMetricDistanceSquared): boolean |
Return true if the point lies inside/on this polygon (or not inside/on if this polygon is a mask). |
|
setInvisible(invisible: boolean): void |
Sets both the clip plane set and the mask set visibility |
|
toJSON(): any |
Emit json form of the clip planes |
|
transformInPlace(transform: Transform): boolean |
Apply a transform to the clipper (e.g. |
|
createCapture(planes: UnionOfConvexClipPlaneSets | ConvexClipPlaneSet | undefined, isInvisible: boolean = false): ClipPrimitive Static |
Create a ClipPrimitive, capturing the supplied plane set as the clip planes. |
|
fromJSON(json: any): ClipPrimitive | undefined Static |
Promote json object form to class instance |
|
fromJSONClipPrimitive(json: any): ClipPrimitive | undefined Static |
Specific converter producing the base class ClipPrimitive. |
|
Properties
Name |
Type |
Description |
|
_clipPlanes Protected |
undefined | UnionOfConvexClipPlaneSets |
The (union of) convex regions. |
|
_invisible Protected |
boolean |
If true, pointInside inverts the sense of the pointInside for the _clipPlanes |
|
invisible Accessor ReadOnly |
boolean |
Ask if this primitive is a hole. |
|
Defined in
Last Updated:
05 June, 2020