GeometryStreamIterator Class
GeometryStreamIterator is a helper class for iterating a GeometryStreamProps. A GeometricElement's GeometryStream must be specifically requested using ElementLoadProps.wantGeometry. Each GeometryStreamIteratorEntry returned by the iterator represents exactly one geometric primitive in the stream.
Implements
- IterableIterator<GeometryStreamIteratorEntry>
Methods
Name | Description | |
---|---|---|
constructor(geometryStream: GeometryStreamProps, categoryOrGeometryParams?: string | GeometryParams, localToWorld?: Transform): GeometryStreamIterator | Construct a new GeometryStreamIterator given a GeometryStreamProps from either a GeometricElement3d, GeometricElement2d, or GeometryPart. | |
[iterator](): IterableIterator<GeometryStreamIteratorEntry> | ||
next(): IteratorResult<GeometryStreamIteratorEntry, any> | Advance to next displayable geometric entry while updating the current GeometryParams from appearance related entries. | |
partToWorld(): undefined | Transform | Get the transform that if applied to a GeometryPart's GeometryStream entries would return them in world coordinates. | |
fromGeometricElement2d(element: Pick<GeometricElement2dProps, "geom" | "placement" | "category">): GeometryStreamIterator Static | Create a new GeometryStream iterator for a GeometricElement2d. | |
fromGeometricElement3d(element: Pick<GeometricElement3dProps, "geom" | "placement" | "category">): GeometryStreamIterator Static | Create a new GeometryStream iterator for a GeometricElement3d. | |
fromGeometryPart(geomPart: Pick<GeometryPartProps, "geom">, geomParams?: GeometryParams, partTransform?: Transform): GeometryStreamIterator Static | Create a new GeometryStream iterator for a GeometryPart. |
Properties
Name | Type | Description | |
---|---|---|---|
flags Readonly | GeometryStreamFlags | Flags applied to the entire geometry stream. | |
geometryStream | GeometryStreamProps | GeometryStream entries |
Defined in
Last Updated: 30 November, 2023