@itwin/core-common 4.1.0-dev.6 → 4.1.0-dev.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -1
- package/lib/cjs/BriefcaseTypes.d.ts +13 -1
- package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/ChangedElements.d.ts +2 -0
- package/lib/cjs/ChangedElements.d.ts.map +1 -1
- package/lib/cjs/ChangedElements.js +2 -0
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts +26 -2
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.js +29 -3
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.d.ts +1 -15
- package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +1 -15
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlReader.d.ts +164 -7
- package/lib/cjs/ECSqlReader.d.ts.map +1 -1
- package/lib/cjs/ECSqlReader.js +124 -12
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +2 -2
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/FeatureIndex.d.ts +50 -4
- package/lib/cjs/FeatureIndex.d.ts.map +1 -1
- package/lib/cjs/FeatureIndex.js +44 -4
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureTable.d.ts +48 -25
- package/lib/cjs/FeatureTable.d.ts.map +1 -1
- package/lib/cjs/FeatureTable.js +24 -14
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/IModel.d.ts +1 -1
- package/lib/cjs/IModel.d.ts.map +1 -1
- package/lib/cjs/IModel.js +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IpcAppProps.d.ts +6 -6
- package/lib/cjs/IpcAppProps.d.ts.map +1 -1
- package/lib/cjs/IpcAppProps.js +8 -9
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.d.ts +4 -3
- package/lib/cjs/NativeAppProps.d.ts.map +1 -1
- package/lib/cjs/NativeAppProps.js +5 -4
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/QPoint.d.ts +21 -3
- package/lib/cjs/QPoint.d.ts.map +1 -1
- package/lib/cjs/QPoint.js +25 -3
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/Render.d.ts +27 -35
- package/lib/cjs/Render.d.ts.map +1 -1
- package/lib/cjs/Render.js +4 -67
- package/lib/cjs/Render.js.map +1 -1
- package/lib/cjs/RpcInterface.d.ts.map +1 -1
- package/lib/cjs/RpcInterface.js +25 -24
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/SkyBox.d.ts +3 -3
- package/lib/cjs/SkyBox.d.ts.map +1 -1
- package/lib/cjs/SkyBox.js +3 -3
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/ViewFlags.d.ts +4 -4
- package/lib/cjs/ViewFlags.d.ts.map +1 -1
- package/lib/cjs/ViewFlags.js +4 -4
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.d.ts +429 -5
- package/lib/cjs/ViewProps.d.ts.map +1 -1
- package/lib/cjs/ViewProps.js +16 -0
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.d.ts +6 -6
- package/lib/cjs/geometry/ElementGeometry.js +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.d.ts +4 -0
- package/lib/cjs/ipc/IpcSession.d.ts.map +1 -1
- package/lib/cjs/ipc/IpcSession.js +6 -6
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +4 -2
- package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +6 -4
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.d.ts +2 -0
- package/lib/cjs/rpc/core/RpcInvocation.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +1 -0
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
- package/lib/cjs/tile/IModelTileIO.js +2 -2
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.d.ts +14 -13
- package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +56 -44
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/BriefcaseTypes.d.ts +13 -1
- package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/ChangedElements.d.ts +2 -0
- package/lib/esm/ChangedElements.d.ts.map +1 -1
- package/lib/esm/ChangedElements.js +2 -0
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +26 -2
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.js +29 -3
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.d.ts +1 -15
- package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +1 -15
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlReader.d.ts +164 -7
- package/lib/esm/ECSqlReader.d.ts.map +1 -1
- package/lib/esm/ECSqlReader.js +124 -12
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +2 -2
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/FeatureIndex.d.ts +50 -4
- package/lib/esm/FeatureIndex.d.ts.map +1 -1
- package/lib/esm/FeatureIndex.js +44 -4
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureTable.d.ts +48 -25
- package/lib/esm/FeatureTable.d.ts.map +1 -1
- package/lib/esm/FeatureTable.js +24 -14
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/IModel.d.ts +1 -1
- package/lib/esm/IModel.d.ts.map +1 -1
- package/lib/esm/IModel.js +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IpcAppProps.d.ts +6 -6
- package/lib/esm/IpcAppProps.d.ts.map +1 -1
- package/lib/esm/IpcAppProps.js +7 -8
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/NativeAppProps.d.ts +4 -3
- package/lib/esm/NativeAppProps.d.ts.map +1 -1
- package/lib/esm/NativeAppProps.js +4 -3
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/QPoint.d.ts +21 -3
- package/lib/esm/QPoint.d.ts.map +1 -1
- package/lib/esm/QPoint.js +25 -3
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/Render.d.ts +27 -35
- package/lib/esm/Render.d.ts.map +1 -1
- package/lib/esm/Render.js +3 -64
- package/lib/esm/Render.js.map +1 -1
- package/lib/esm/RpcInterface.d.ts.map +1 -1
- package/lib/esm/RpcInterface.js +25 -24
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/SkyBox.d.ts +3 -3
- package/lib/esm/SkyBox.d.ts.map +1 -1
- package/lib/esm/SkyBox.js +3 -3
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/ViewFlags.d.ts +4 -4
- package/lib/esm/ViewFlags.d.ts.map +1 -1
- package/lib/esm/ViewFlags.js +4 -4
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.d.ts +429 -5
- package/lib/esm/ViewProps.d.ts.map +1 -1
- package/lib/esm/ViewProps.js +15 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.d.ts +6 -6
- package/lib/esm/geometry/ElementGeometry.js +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/ipc/IpcSession.d.ts +4 -0
- package/lib/esm/ipc/IpcSession.d.ts.map +1 -1
- package/lib/esm/ipc/IpcSession.js +5 -5
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.d.ts +4 -2
- package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +6 -4
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.d.ts +2 -0
- package/lib/esm/rpc/core/RpcInvocation.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +1 -0
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.d.ts +2 -2
- package/lib/esm/tile/IModelTileIO.js +2 -2
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.d.ts +14 -13
- package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
- package/lib/esm/tile/TileMetadata.js +57 -45
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package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OAAO,EAAE,CAAC,CAAC;SAjB5D,cAAc;AAsC3B;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,cAAc;CACjD;AA6CD;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAqB;IACtD,OAAQ,KAA0B,CAAC,KAAK,KAAK,SAAS,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAqB;IACtD,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAmBD;;;GAGG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,iDAAU,CAAA;IACV,uDAAa,CAAA;IACb,6CAAQ,CAAA;AACV,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAuQD;;GAEG;AACH,MAAM,CAAN,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,gEAAgE;IAChE,mGAAkB,CAAA;IAClB,0EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,KAA5B,4BAA4B,QAKvC;AAyCD;;;GAGG;AACH,MAAM,CAAN,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,KAAJ,IAAI,QASf","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { GuidString, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AngleProps, ClipVectorProps, LowAndHighXY, LowAndHighXYZ, TransformProps, XYProps, XYZProps, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"./Code\";\r\nimport { EntityProps } from \"./EntityProps\";\r\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\r\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\r\nimport { IModelError, IModelStatus } from \"./IModelError\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\n\r\n/** Properties of a NavigationProperty.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n id: Id64String;\r\n /** The full className of the relationship class. */\r\n relClassName?: string;\r\n}\r\n\r\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementProps extends EntityProps {\r\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\r\n model: Id64String;\r\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\r\n code: CodeProps;\r\n /** The Parent of this element, if defined. */\r\n parent?: RelatedElementProps;\r\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\r\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\r\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\r\n */\r\n federationGuid?: GuidString;\r\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\r\n userLabel?: string;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\r\n jsonProperties?: any;\r\n}\r\n\r\n/** The Id and relationship class of an Element that is somehow related to another Element\r\n * @public\r\n */\r\nexport class RelatedElement implements RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n public readonly id: Id64String;\r\n\r\n /** The full className of the relationship class. */\r\n public readonly relClassName?: string;\r\n\r\n constructor(props: RelatedElementProps) {\r\n this.id = Id64.fromJSON(props.id);\r\n this.relClassName = props.relClassName;\r\n }\r\n\r\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\r\n return json ? new RelatedElement(json) : undefined;\r\n }\r\n\r\n /** Used to *null out* an existing navigation relationship. */\r\n public static readonly none = new RelatedElement({ id: Id64.invalid });\r\n\r\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\r\n public static idFromJson(json: any): Id64String {\r\n if ((typeof json === \"object\") && (\"id\" in json)) {\r\n const r = RelatedElement.fromJSON(json);\r\n if (r === undefined)\r\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\r\n return r.id;\r\n }\r\n return Id64.fromJSON(json);\r\n }\r\n\r\n public toJSON(): RelatedElementProps {\r\n return {\r\n id: this.id,\r\n relClassName: this.relClassName,\r\n };\r\n }\r\n}\r\n\r\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\r\n * @public\r\n */\r\nexport class TypeDefinition extends RelatedElement {\r\n}\r\n\r\n/** Properties of a [GeometricElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElementProps extends ElementProps {\r\n /** The id of the category for this geometric element. */\r\n category: Id64String;\r\n /** The geometry stream properties */\r\n geom?: GeometryStreamProps;\r\n /** How to build the element's GeometryStream. This is used for insert and update only. It is not a persistent property. It will be undefined in the properties returned by functions that read a persistent element. It may be specified as an alternative to `geom` when inserting or updating an element.\r\n * @alpha\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\r\n /** The placement properties */\r\n placement?: PlacementProps;\r\n}\r\n\r\n/** Properties of a [[Placement3d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement3dProps {\r\n origin: XYZProps;\r\n angles: YawPitchRollProps;\r\n bbox?: LowAndHighXYZ;\r\n}\r\n\r\n/** Properties of a [[Placement2d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement2dProps {\r\n origin: XYProps;\r\n angle: AngleProps;\r\n bbox?: LowAndHighXY;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport type PlacementProps = Placement2dProps | Placement3dProps;\r\n\r\n/** determine if this is Placement2dProps\r\n * @public\r\n */\r\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\r\n return (props as Placement2dProps).angle !== undefined;\r\n}\r\n\r\n/** determine if this is Placement3dProps\r\n * @public\r\n */\r\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\r\n return !isPlacement2dProps(props);\r\n}\r\n\r\n/** Properties that define a [GeometricElement3d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement3dProps extends GeometricElementProps {\r\n placement?: Placement3dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [PhysicalElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalElementProps extends GeometricElement3dProps {\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SectionType {\r\n Section = 3,\r\n Detail = 4,\r\n Elevation = 5,\r\n Plan = 6,\r\n}\r\n\r\n/** Properties that define a [SectionDrawing]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingProps extends ElementProps {\r\n /** The type of section used to generate the drawing. Default: Section. */\r\n sectionType?: SectionType;\r\n /** The spatial view from which the section was generated. */\r\n spatialView?: RelatedElementProps;\r\n jsonProperties?: {\r\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\r\n drawingToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\r\n sheetToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\r\n * the sheet graphics when drawn in the context of the spatial view.\r\n * The ClipVector is in spatial coordinates.\r\n */\r\n drawingBoundaryClip?: ClipVectorProps;\r\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\r\n displaySpatialView?: true;\r\n };\r\n}\r\n\r\n/** Properties that define a [SectionDrawingLocation]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\r\n /** The [ViewDefinition]($backend) to which this location refers. */\r\n sectionView?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [GeometricElement2d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement2dProps extends GeometricElementProps {\r\n placement?: Placement2dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [GeometryPart]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryPartProps extends ElementProps {\r\n geom?: GeometryStreamProps;\r\n /** How to build the part's GeometryStream. This is used for insert and update only. It is not a persistent property. It will be undefined in the properties returned by functions that read a persistent element. It may be specified as an alternative to `geom` when inserting or updating an element.\r\n * @alpha\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\r\n bbox?: LowAndHighXYZ;\r\n}\r\n\r\n/** Properties for a [ViewAttachment]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\r\n view: RelatedElementProps;\r\n jsonProperties?: {\r\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\r\n displayPriority?: number;\r\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\r\n clip?: ClipVectorProps;\r\n /** Options for customizing how the view attachment is displayed on the sheet. */\r\n displayOptions?: {\r\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\r\n drawAsRaster?: boolean;\r\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\r\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\r\n */\r\n preserveBackground?: boolean;\r\n };\r\n };\r\n}\r\n\r\n/** Properties of a [Subject]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubjectProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Properties of a [SheetBorderTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetBorderTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n}\r\n\r\n/** Properties of a [SheetTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n border?: Id64String;\r\n}\r\n\r\n/** Properties of a [Sheet]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SheetProps extends ElementProps {\r\n width?: number;\r\n height?: number;\r\n scale?: number;\r\n sheetTemplate?: Id64String;\r\n attachments?: Id64String[];\r\n}\r\n\r\n/** Properties of a [DefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DefinitionElementProps extends ElementProps {\r\n isPrivate?: boolean;\r\n}\r\n\r\n/** Properties of a [TypeDefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\r\n recipe?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [PhysicalType]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\r\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [InformationPartitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface InformationPartitionElementProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\r\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DisplayStyleLoadProps {\r\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\r\n * The element Ids are not required on the frontend for display and can be quite large.\r\n */\r\n omitScheduleScriptElementIds?: boolean;\r\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\r\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\r\n */\r\n compressExcludedElementIds?: boolean;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\r\n * @see [[ElementLoadOptions.renderTimeline]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineLoadProps {\r\n /** If true, the lists of element Ids in the schedule script will be empty.\r\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\r\n */\r\n omitScriptElementIds?: boolean;\r\n}\r\n\r\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\r\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadOptions {\r\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\r\n onlyBaseProperties?: boolean;\r\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\r\n */\r\n wantGeometry?: boolean;\r\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\r\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\r\n */\r\n wantBRepData?: boolean;\r\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\r\n renderTimeline?: RenderTimelineLoadProps;\r\n}\r\n\r\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadProps extends ElementLoadOptions {\r\n id?: Id64String;\r\n /** The properties of the Code of the element to load.\r\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\r\n * TODO: change to Required<CodeProps> in Version 4.0\r\n */\r\n code?: CodeProps;\r\n federationGuid?: GuidString;\r\n}\r\n\r\n/** Properties of an [ElementAspect]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementAspectProps extends EntityProps {\r\n element: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\r\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\r\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\r\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\r\n */\r\n scope: RelatedElementProps;\r\n /** The identifier of the object in the source repository. */\r\n identifier: string;\r\n /** The kind of object within the source repository. */\r\n kind: string;\r\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\r\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\r\n * If present, this value must be guaranteed to change when any of the source object's content changes.\r\n */\r\n version?: string;\r\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\r\n checksum?: string;\r\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\r\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\r\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\r\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\r\n */\r\n jsonProperties?: any;\r\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\r\n source?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSource]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceProps extends ElementProps {\r\n repository?: RelatedElementProps;\r\n connectorName?: string;\r\n connectorVersion?: string;\r\n}\r\n\r\n/** The role that an attached [ExternalSource]($backend) plays.\r\n * @beta\r\n */\r\nexport enum ExternalSourceAttachmentRole {\r\n /** The attached [ExternalSource]($backend) provides context. */\r\n SpecifyContext = 0,\r\n /** The attached [ExternalSource]($backend) models a part of the whole. */\r\n SpecifyPart = 1,\r\n}\r\n\r\n/** Properties of an [ExternalSourceAttachment]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceAttachmentProps extends ElementProps {\r\n attaches?: RelatedElementProps;\r\n role?: ExternalSourceAttachmentRole;\r\n translation?: XYZProps;\r\n yaw?: number;\r\n pitch?: number;\r\n roll?: number;\r\n scale?: XYZProps;\r\n}\r\n\r\n/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChannelRootAspectProps extends ElementAspectProps {\r\n /** The owner of the channel */\r\n owner: string;\r\n}\r\n\r\n/** Properties of a [LineStyle]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LineStyleProps extends DefinitionElementProps {\r\n description?: string;\r\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\r\n data: string;\r\n}\r\n\r\n/** Properties of a [LightLocation]($backend)\r\n * @internal\r\n */\r\nexport interface LightLocationProps extends GeometricElement3dProps {\r\n enabled?: boolean;\r\n}\r\n\r\n/** The *rank* for a Category\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Rank {\r\n /** This category is predefined by the system */\r\n System = 0,\r\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\r\n Domain = 1,\r\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\r\n Application = 2,\r\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\r\n User = 3,\r\n}\r\n\r\n/** Parameters of a [Category]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategoryProps extends DefinitionElementProps {\r\n rank?: Rank;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [SubCategory]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubCategoryProps extends DefinitionElementProps {\r\n appearance?: SubCategoryAppearance.Props;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [UrlLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface UrlLinkProps extends ElementProps {\r\n description?: string;\r\n url?: string;\r\n}\r\n\r\n/** Parameters of a [RepositoryLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RepositoryLinkProps extends UrlLinkProps {\r\n repositoryGuid?: GuidString;\r\n format?: string;\r\n}\r\n\r\n/** The properties of a [SynchronizationConfigLink]($backend)\r\n * @beta\r\n */\r\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\r\n lastSuccessfulRun?: string;\r\n}\r\n\r\n/** Wire format describing a [RenderTimeline]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineProps extends ElementProps {\r\n /** An optional human-readable description of the timeline. */\r\n description?: string;\r\n /** The stringified JSON representation of the instructions for visualizing change over time.\r\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\r\n */\r\n script: string;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ElementProps.js","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAc,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAQnE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,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,kBAAkB,CAAC,KAAqB;IACtD,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAmBD;;;GAGG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,iDAAU,CAAA;IACV,uDAAa,CAAA;IACb,6CAAQ,CAAA;AACV,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAuQD;;GAEG;AACH,MAAM,CAAN,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,gEAAgE;IAChE,mGAAkB,CAAA;IAClB,0EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,KAA5B,4BAA4B,QAKvC;AAyCD;;;GAGG;AACH,MAAM,CAAN,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,KAAJ,IAAI,QASf","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { GuidString, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AngleProps, ClipVectorProps, LowAndHighXY, LowAndHighXYZ, TransformProps, XYProps, XYZProps, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"./Code\";\r\nimport { EntityProps } from \"./EntityProps\";\r\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\r\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\r\nimport { IModelError, IModelStatus } from \"./IModelError\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\n\r\n/** Properties of a NavigationProperty.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n id: Id64String;\r\n /** The full className of the relationship class. */\r\n relClassName?: string;\r\n}\r\n\r\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementProps extends EntityProps {\r\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\r\n model: Id64String;\r\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\r\n code: CodeProps;\r\n /** The Parent of this element, if defined. */\r\n parent?: RelatedElementProps;\r\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\r\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\r\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\r\n */\r\n federationGuid?: GuidString;\r\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\r\n userLabel?: string;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\r\n jsonProperties?: any;\r\n}\r\n\r\n/** The Id and relationship class of an Element that is somehow related to another Element\r\n * @public\r\n */\r\nexport class RelatedElement implements RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n public readonly id: Id64String;\r\n\r\n /** The full className of the relationship class. */\r\n public readonly relClassName?: string;\r\n\r\n constructor(props: RelatedElementProps) {\r\n this.id = Id64.fromJSON(props.id);\r\n this.relClassName = props.relClassName;\r\n }\r\n\r\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\r\n return json ? new RelatedElement(json) : undefined;\r\n }\r\n\r\n /** Used to *null out* an existing navigation relationship. */\r\n public static readonly none = new RelatedElement({ id: Id64.invalid });\r\n\r\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\r\n public static idFromJson(json: any): Id64String {\r\n if ((typeof json === \"object\") && (\"id\" in json)) {\r\n const r = RelatedElement.fromJSON(json);\r\n if (r === undefined)\r\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\r\n return r.id;\r\n }\r\n return Id64.fromJSON(json);\r\n }\r\n\r\n public toJSON(): RelatedElementProps {\r\n return {\r\n id: this.id,\r\n relClassName: this.relClassName,\r\n };\r\n }\r\n}\r\n\r\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\r\n * @public\r\n */\r\nexport class TypeDefinition extends RelatedElement {\r\n}\r\n\r\n/** Properties of a [GeometricElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElementProps extends ElementProps {\r\n /** The id of the category for this geometric element. */\r\n category: Id64String;\r\n /** The geometry stream properties */\r\n geom?: GeometryStreamProps;\r\n /** How to build the element's GeometryStream. This is used for insert and update only. It is not a persistent property. It will be undefined in the properties returned by functions that read a persistent element. It may be specified as an alternative to `geom` when inserting or updating an element.\r\n * @beta\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\r\n /** The placement properties */\r\n placement?: PlacementProps;\r\n}\r\n\r\n/** Properties of a [[Placement3d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement3dProps {\r\n origin: XYZProps;\r\n angles: YawPitchRollProps;\r\n bbox?: LowAndHighXYZ;\r\n}\r\n\r\n/** Properties of a [[Placement2d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement2dProps {\r\n origin: XYProps;\r\n angle: AngleProps;\r\n bbox?: LowAndHighXY;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport type PlacementProps = Placement2dProps | Placement3dProps;\r\n\r\n/** determine if this is Placement2dProps\r\n * @public\r\n */\r\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\r\n return (props as Placement2dProps).angle !== undefined;\r\n}\r\n\r\n/** determine if this is Placement3dProps\r\n * @public\r\n */\r\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\r\n return !isPlacement2dProps(props);\r\n}\r\n\r\n/** Properties that define a [GeometricElement3d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement3dProps extends GeometricElementProps {\r\n placement?: Placement3dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [PhysicalElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalElementProps extends GeometricElement3dProps {\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SectionType {\r\n Section = 3,\r\n Detail = 4,\r\n Elevation = 5,\r\n Plan = 6,\r\n}\r\n\r\n/** Properties that define a [SectionDrawing]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingProps extends ElementProps {\r\n /** The type of section used to generate the drawing. Default: Section. */\r\n sectionType?: SectionType;\r\n /** The spatial view from which the section was generated. */\r\n spatialView?: RelatedElementProps;\r\n jsonProperties?: {\r\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\r\n drawingToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\r\n sheetToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\r\n * the sheet graphics when drawn in the context of the spatial view.\r\n * The ClipVector is in spatial coordinates.\r\n */\r\n drawingBoundaryClip?: ClipVectorProps;\r\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\r\n displaySpatialView?: true;\r\n };\r\n}\r\n\r\n/** Properties that define a [SectionDrawingLocation]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\r\n /** The [ViewDefinition]($backend) to which this location refers. */\r\n sectionView?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [GeometricElement2d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement2dProps extends GeometricElementProps {\r\n placement?: Placement2dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [GeometryPart]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryPartProps extends ElementProps {\r\n geom?: GeometryStreamProps;\r\n /** How to build the part's GeometryStream. This is used for insert and update only. It is not a persistent property. It will be undefined in the properties returned by functions that read a persistent element. It may be specified as an alternative to `geom` when inserting or updating an element.\r\n * @beta\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\r\n bbox?: LowAndHighXYZ;\r\n}\r\n\r\n/** Properties for a [ViewAttachment]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\r\n view: RelatedElementProps;\r\n jsonProperties?: {\r\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\r\n displayPriority?: number;\r\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\r\n clip?: ClipVectorProps;\r\n /** Options for customizing how the view attachment is displayed on the sheet. */\r\n displayOptions?: {\r\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\r\n drawAsRaster?: boolean;\r\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\r\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\r\n */\r\n preserveBackground?: boolean;\r\n };\r\n };\r\n}\r\n\r\n/** Properties of a [Subject]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubjectProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Properties of a [SheetBorderTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetBorderTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n}\r\n\r\n/** Properties of a [SheetTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n border?: Id64String;\r\n}\r\n\r\n/** Properties of a [Sheet]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SheetProps extends ElementProps {\r\n width?: number;\r\n height?: number;\r\n scale?: number;\r\n sheetTemplate?: Id64String;\r\n attachments?: Id64String[];\r\n}\r\n\r\n/** Properties of a [DefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DefinitionElementProps extends ElementProps {\r\n isPrivate?: boolean;\r\n}\r\n\r\n/** Properties of a [TypeDefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\r\n recipe?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [PhysicalType]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\r\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [InformationPartitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface InformationPartitionElementProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\r\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DisplayStyleLoadProps {\r\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\r\n * The element Ids are not required on the frontend for display and can be quite large.\r\n */\r\n omitScheduleScriptElementIds?: boolean;\r\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\r\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\r\n */\r\n compressExcludedElementIds?: boolean;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\r\n * @see [[ElementLoadOptions.renderTimeline]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineLoadProps {\r\n /** If true, the lists of element Ids in the schedule script will be empty.\r\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\r\n */\r\n omitScriptElementIds?: boolean;\r\n}\r\n\r\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\r\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadOptions {\r\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\r\n onlyBaseProperties?: boolean;\r\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\r\n */\r\n wantGeometry?: boolean;\r\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\r\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\r\n */\r\n wantBRepData?: boolean;\r\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\r\n renderTimeline?: RenderTimelineLoadProps;\r\n}\r\n\r\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadProps extends ElementLoadOptions {\r\n id?: Id64String;\r\n /** The properties of the Code of the element to load.\r\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\r\n * TODO: change to Required<CodeProps> in Version 4.0\r\n */\r\n code?: CodeProps;\r\n federationGuid?: GuidString;\r\n}\r\n\r\n/** Properties of an [ElementAspect]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementAspectProps extends EntityProps {\r\n element: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\r\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\r\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\r\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\r\n */\r\n scope: RelatedElementProps;\r\n /** The identifier of the object in the source repository. */\r\n identifier: string;\r\n /** The kind of object within the source repository. */\r\n kind: string;\r\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\r\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\r\n * If present, this value must be guaranteed to change when any of the source object's content changes.\r\n */\r\n version?: string;\r\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\r\n checksum?: string;\r\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\r\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\r\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\r\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\r\n */\r\n jsonProperties?: any;\r\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\r\n source?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSource]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceProps extends ElementProps {\r\n repository?: RelatedElementProps;\r\n connectorName?: string;\r\n connectorVersion?: string;\r\n}\r\n\r\n/** The role that an attached [ExternalSource]($backend) plays.\r\n * @beta\r\n */\r\nexport enum ExternalSourceAttachmentRole {\r\n /** The attached [ExternalSource]($backend) provides context. */\r\n SpecifyContext = 0,\r\n /** The attached [ExternalSource]($backend) models a part of the whole. */\r\n SpecifyPart = 1,\r\n}\r\n\r\n/** Properties of an [ExternalSourceAttachment]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceAttachmentProps extends ElementProps {\r\n attaches?: RelatedElementProps;\r\n role?: ExternalSourceAttachmentRole;\r\n translation?: XYZProps;\r\n yaw?: number;\r\n pitch?: number;\r\n roll?: number;\r\n scale?: XYZProps;\r\n}\r\n\r\n/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChannelRootAspectProps extends ElementAspectProps {\r\n /** The owner of the channel */\r\n owner: string;\r\n}\r\n\r\n/** Properties of a [LineStyle]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LineStyleProps extends DefinitionElementProps {\r\n description?: string;\r\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\r\n data: string;\r\n}\r\n\r\n/** Properties of a [LightLocation]($backend)\r\n * @internal\r\n */\r\nexport interface LightLocationProps extends GeometricElement3dProps {\r\n enabled?: boolean;\r\n}\r\n\r\n/** The *rank* for a Category\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Rank {\r\n /** This category is predefined by the system */\r\n System = 0,\r\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\r\n Domain = 1,\r\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\r\n Application = 2,\r\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\r\n User = 3,\r\n}\r\n\r\n/** Parameters of a [Category]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategoryProps extends DefinitionElementProps {\r\n rank?: Rank;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [SubCategory]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubCategoryProps extends DefinitionElementProps {\r\n appearance?: SubCategoryAppearance.Props;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [UrlLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface UrlLinkProps extends ElementProps {\r\n description?: string;\r\n url?: string;\r\n}\r\n\r\n/** Parameters of a [RepositoryLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RepositoryLinkProps extends UrlLinkProps {\r\n repositoryGuid?: GuidString;\r\n format?: string;\r\n}\r\n\r\n/** The properties of a [SynchronizationConfigLink]($backend)\r\n * @beta\r\n */\r\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\r\n lastSuccessfulRun?: string;\r\n}\r\n\r\n/** Wire format describing a [RenderTimeline]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineProps extends ElementProps {\r\n /** An optional human-readable description of the timeline. */\r\n description?: string;\r\n /** The stringified JSON representation of the instructions for visualizing change over time.\r\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\r\n */\r\n script: string;\r\n}\r\n"]}
|
|
@@ -2,39 +2,85 @@
|
|
|
2
2
|
* @module Rendering
|
|
3
3
|
*/
|
|
4
4
|
import { ColorDef } from "./ColorDef";
|
|
5
|
-
/**
|
|
5
|
+
/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).
|
|
6
|
+
* The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].
|
|
7
|
+
* @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater
|
|
8
|
+
* than zero, all of them must have a transparency greater than zero.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
6
11
|
export declare class NonUniformColor {
|
|
12
|
+
/** An array of 32-bit [[ColorDef]] values in `tbgr` format, indexed by [[indices]]. */
|
|
7
13
|
readonly colors: Uint32Array;
|
|
14
|
+
/** For each vertex, an index into [[colors]] indicating the color of that vertex. */
|
|
8
15
|
readonly indices: Uint16Array;
|
|
16
|
+
/** If `true`, indicates none of the [[colors]] have a transparency greater than zero; otherwise, all of
|
|
17
|
+
* the colors have a transparency greater than zero.
|
|
18
|
+
*/
|
|
9
19
|
readonly isOpaque: boolean;
|
|
20
|
+
/** Constructor.
|
|
21
|
+
* @param colors See [[colors]].
|
|
22
|
+
* @param indices See [[indices]]
|
|
23
|
+
* @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.
|
|
24
|
+
*/
|
|
10
25
|
constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean);
|
|
11
26
|
}
|
|
12
|
-
/**
|
|
27
|
+
/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).
|
|
28
|
+
* This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
13
31
|
export declare class ColorIndex {
|
|
14
32
|
private _color;
|
|
33
|
+
/** Whether the color(s) in this index have transparency. */
|
|
15
34
|
get hasAlpha(): boolean;
|
|
35
|
+
/** Whether this index specifies a single uniform color for the entire mesh or polyline. */
|
|
16
36
|
get isUniform(): boolean;
|
|
37
|
+
/** The number of colors in this index. */
|
|
17
38
|
get numColors(): number;
|
|
39
|
+
/** Construct a default index specifying a uniform white color. */
|
|
18
40
|
constructor();
|
|
41
|
+
/** Reset this index to specify a uniform white color. */
|
|
19
42
|
reset(): void;
|
|
43
|
+
/** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */
|
|
20
44
|
get uniform(): ColorDef | undefined;
|
|
45
|
+
/** Set the specified color to be applied to all vertices. */
|
|
21
46
|
initUniform(color: ColorDef | number): void;
|
|
47
|
+
/** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */
|
|
22
48
|
get nonUniform(): NonUniformColor | undefined;
|
|
49
|
+
/** Set the per-vertex colors.
|
|
50
|
+
* @param colors See [[NonUniformColor.colors]].
|
|
51
|
+
* @param indices See [[NonUniformColor.indices]].
|
|
52
|
+
* @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.
|
|
53
|
+
*/
|
|
23
54
|
initNonUniform(colors: Uint32Array, indices: number[], hasAlpha: boolean): void;
|
|
24
55
|
}
|
|
25
|
-
/**
|
|
56
|
+
/** Describes the type of a [[FeatureIndex]].
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
26
59
|
export declare enum FeatureIndexType {
|
|
60
|
+
/** Indicates that the index contains no features. */
|
|
27
61
|
Empty = 0,
|
|
62
|
+
/** Indicates that the index contains exactly one feature. */
|
|
28
63
|
Uniform = 1,
|
|
64
|
+
/** Indicates that the index contains more than one feature. */
|
|
29
65
|
NonUniform = 2
|
|
30
66
|
}
|
|
31
|
-
/**
|
|
67
|
+
/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).
|
|
68
|
+
* The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.
|
|
69
|
+
* The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
32
72
|
export declare class FeatureIndex {
|
|
73
|
+
/** Describes the quantity (zero, one, or more than one) of features in this index. */
|
|
33
74
|
type: FeatureIndexType;
|
|
75
|
+
/** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */
|
|
34
76
|
featureID: number;
|
|
77
|
+
/** If [[type]] is [[FeatureIndexType.NonUniform]], the per-vertex feature Ids, indexed by the mesh or polyline's vertex indices. */
|
|
35
78
|
featureIDs?: Uint32Array;
|
|
79
|
+
/** True if [[type]] is [[FeatureIndexType.Uniform]]. */
|
|
36
80
|
get isUniform(): boolean;
|
|
81
|
+
/** True if [[type]] is [[FeatureIndexType.Empty]]. */
|
|
37
82
|
get isEmpty(): boolean;
|
|
83
|
+
/** Reset to an empty index. */
|
|
38
84
|
reset(): void;
|
|
39
85
|
}
|
|
40
86
|
//# sourceMappingURL=FeatureIndex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureIndex.d.ts","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"FeatureIndex.d.ts","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;GAKG;AACH,qBAAa,eAAe;IAC1B,uFAAuF;IACvF,SAAgB,MAAM,EAAE,WAAW,CAAC;IACpC,qFAAqF;IACrF,SAAgB,OAAO,EAAE,WAAW,CAAC;IACrC;;OAEG;IACH,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAElC;;;;OAIG;gBACgB,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO;CAK7E;AAED;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAA6B;IAE3C,4DAA4D;IAC5D,IAAW,QAAQ,YAAoC;IACvD,2FAA2F;IAC3F,IAAW,SAAS,YAA8C;IAClE,0CAA0C;IAC1C,IAAW,SAAS,IAAI,MAAM,CAAgE;IAE9F,kEAAkE;;IAGlE,yDAAyD;IAClD,KAAK;IAEZ,oHAAoH;IACpH,IAAW,OAAO,IAAI,QAAQ,GAAG,SAAS,CAEzC;IAED,6DAA6D;IACtD,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM;IAI3C,4FAA4F;IAC5F,IAAW,UAAU,IAAI,eAAe,GAAG,SAAS,CAEnD;IAED;;;;OAIG;IACI,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO;CAGhF;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,qDAAqD;IACrD,KAAK,IAAA;IACL,6DAA6D;IAC7D,OAAO,IAAA;IACP,+DAA+D;IAC/D,UAAU,IAAA;CACX;AAED;;;;GAIG;AACH,qBAAa,YAAY;IACvB,sFAAsF;IAC/E,IAAI,EAAE,gBAAgB,CAA0B;IAEvD,iFAAiF;IAC1E,SAAS,EAAE,MAAM,CAAK;IAC7B,oIAAoI;IAC7H,UAAU,CAAC,EAAE,WAAW,CAAC;IAEhC,wDAAwD;IACxD,IAAW,SAAS,IAAI,OAAO,CAAmD;IAElF,sDAAsD;IACtD,IAAW,OAAO,IAAI,OAAO,CAAiD;IAE9E,+BAA+B;IACxB,KAAK,IAAI,IAAI;CAKrB"}
|
package/lib/esm/FeatureIndex.js
CHANGED
|
@@ -6,49 +6,89 @@
|
|
|
6
6
|
* @module Rendering
|
|
7
7
|
*/
|
|
8
8
|
import { ColorDef } from "./ColorDef";
|
|
9
|
-
/**
|
|
9
|
+
/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).
|
|
10
|
+
* The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].
|
|
11
|
+
* @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater
|
|
12
|
+
* than zero, all of them must have a transparency greater than zero.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
10
15
|
export class NonUniformColor {
|
|
16
|
+
/** Constructor.
|
|
17
|
+
* @param colors See [[colors]].
|
|
18
|
+
* @param indices See [[indices]]
|
|
19
|
+
* @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.
|
|
20
|
+
*/
|
|
11
21
|
constructor(colors, indices, hasAlpha) {
|
|
12
22
|
this.colors = new Uint32Array(colors.buffer);
|
|
13
23
|
this.indices = Uint16Array.from(indices);
|
|
14
24
|
this.isOpaque = !hasAlpha;
|
|
15
25
|
}
|
|
16
26
|
}
|
|
17
|
-
/**
|
|
27
|
+
/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).
|
|
28
|
+
* This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
18
31
|
export class ColorIndex {
|
|
32
|
+
/** Whether the color(s) in this index have transparency. */
|
|
19
33
|
get hasAlpha() { return !this._color.isOpaque; }
|
|
34
|
+
/** Whether this index specifies a single uniform color for the entire mesh or polyline. */
|
|
20
35
|
get isUniform() { return this._color instanceof ColorDef; }
|
|
36
|
+
/** The number of colors in this index. */
|
|
21
37
|
get numColors() { return this.isUniform ? 1 : this.nonUniform.colors.length; }
|
|
38
|
+
/** Construct a default index specifying a uniform white color. */
|
|
22
39
|
constructor() { this._color = ColorDef.white; }
|
|
40
|
+
/** Reset this index to specify a uniform white color. */
|
|
23
41
|
reset() { this._color = ColorDef.white; }
|
|
42
|
+
/** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */
|
|
24
43
|
get uniform() {
|
|
25
44
|
return this.isUniform ? this._color : undefined;
|
|
26
45
|
}
|
|
46
|
+
/** Set the specified color to be applied to all vertices. */
|
|
27
47
|
initUniform(color) {
|
|
28
48
|
this._color = typeof color === "number" ? ColorDef.fromJSON(color) : color;
|
|
29
49
|
}
|
|
50
|
+
/** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */
|
|
30
51
|
get nonUniform() {
|
|
31
52
|
return !this.isUniform ? this._color : undefined;
|
|
32
53
|
}
|
|
54
|
+
/** Set the per-vertex colors.
|
|
55
|
+
* @param colors See [[NonUniformColor.colors]].
|
|
56
|
+
* @param indices See [[NonUniformColor.indices]].
|
|
57
|
+
* @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.
|
|
58
|
+
*/
|
|
33
59
|
initNonUniform(colors, indices, hasAlpha) {
|
|
34
60
|
this._color = new NonUniformColor(colors, indices, hasAlpha);
|
|
35
61
|
}
|
|
36
62
|
}
|
|
37
|
-
/**
|
|
63
|
+
/** Describes the type of a [[FeatureIndex]].
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
38
66
|
export var FeatureIndexType;
|
|
39
67
|
(function (FeatureIndexType) {
|
|
68
|
+
/** Indicates that the index contains no features. */
|
|
40
69
|
FeatureIndexType[FeatureIndexType["Empty"] = 0] = "Empty";
|
|
70
|
+
/** Indicates that the index contains exactly one feature. */
|
|
41
71
|
FeatureIndexType[FeatureIndexType["Uniform"] = 1] = "Uniform";
|
|
72
|
+
/** Indicates that the index contains more than one feature. */
|
|
42
73
|
FeatureIndexType[FeatureIndexType["NonUniform"] = 2] = "NonUniform";
|
|
43
74
|
})(FeatureIndexType || (FeatureIndexType = {}));
|
|
44
|
-
/**
|
|
75
|
+
/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).
|
|
76
|
+
* The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.
|
|
77
|
+
* The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
45
80
|
export class FeatureIndex {
|
|
46
81
|
constructor() {
|
|
82
|
+
/** Describes the quantity (zero, one, or more than one) of features in this index. */
|
|
47
83
|
this.type = FeatureIndexType.Empty;
|
|
84
|
+
/** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */
|
|
48
85
|
this.featureID = 0;
|
|
49
86
|
}
|
|
87
|
+
/** True if [[type]] is [[FeatureIndexType.Uniform]]. */
|
|
50
88
|
get isUniform() { return FeatureIndexType.Uniform === this.type; }
|
|
89
|
+
/** True if [[type]] is [[FeatureIndexType.Empty]]. */
|
|
51
90
|
get isEmpty() { return FeatureIndexType.Empty === this.type; }
|
|
91
|
+
/** Reset to an empty index. */
|
|
52
92
|
reset() {
|
|
53
93
|
this.type = FeatureIndexType.Empty;
|
|
54
94
|
this.featureID = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureIndex.js","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"FeatureIndex.js","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAU1B;;;;OAIG;IACH,YAAmB,MAAmB,EAAE,OAAiB,EAAE,QAAiB;QAC1E,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,CAAC,QAAQ,CAAC;IAC5B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,UAAU;IAGrB,4DAA4D;IAC5D,IAAW,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvD,2FAA2F;IAC3F,IAAW,SAAS,KAAK,OAAO,IAAI,CAAC,MAAM,YAAY,QAAQ,CAAC,CAAC,CAAC;IAClE,0CAA0C;IAC1C,IAAW,SAAS,KAAa,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAE9F,kEAAkE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D,IAAW,SAAS,KAAc,OAAO,gBAAgB,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAElF,sDAAsD;IACtD,IAAW,OAAO,KAAc,OAAO,gBAAgB,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,KAAK;QACV,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].\r\n * @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater\r\n * than zero, all of them must have a transparency greater than zero.\r\n * @public\r\n */\r\nexport class NonUniformColor {\r\n /** An array of 32-bit [[ColorDef]] values in `tbgr` format, indexed by [[indices]]. */\r\n public readonly colors: Uint32Array;\r\n /** For each vertex, an index into [[colors]] indicating the color of that vertex. */\r\n public readonly indices: Uint16Array;\r\n /** If `true`, indicates none of the [[colors]] have a transparency greater than zero; otherwise, all of\r\n * the colors have a transparency greater than zero.\r\n */\r\n public readonly isOpaque: boolean;\r\n\r\n /** Constructor.\r\n * @param colors See [[colors]].\r\n * @param indices See [[indices]]\r\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\r\n */\r\n public constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\r\n this.colors = new Uint32Array(colors.buffer);\r\n this.indices = Uint16Array.from(indices);\r\n this.isOpaque = !hasAlpha;\r\n }\r\n}\r\n\r\n/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.\r\n * @public\r\n */\r\nexport class ColorIndex {\r\n private _color: ColorDef | NonUniformColor;\r\n\r\n /** Whether the color(s) in this index have transparency. */\r\n public get hasAlpha() { return !this._color.isOpaque; }\r\n /** Whether this index specifies a single uniform color for the entire mesh or polyline. */\r\n public get isUniform() { return this._color instanceof ColorDef; }\r\n /** The number of colors in this index. */\r\n public get numColors(): number { return this.isUniform ? 1 : this.nonUniform!.colors.length; }\r\n\r\n /** Construct a default index specifying a uniform white color. */\r\n public constructor() { this._color = ColorDef.white; }\r\n\r\n /** Reset this index to specify a uniform white color. */\r\n public reset() { this._color = ColorDef.white; }\r\n\r\n /** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */\r\n public get uniform(): ColorDef | undefined {\r\n return this.isUniform ? this._color as ColorDef : undefined;\r\n }\r\n\r\n /** Set the specified color to be applied to all vertices. */\r\n public initUniform(color: ColorDef | number) {\r\n this._color = typeof color === \"number\" ? ColorDef.fromJSON(color) : color;\r\n }\r\n\r\n /** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */\r\n public get nonUniform(): NonUniformColor | undefined {\r\n return !this.isUniform ? this._color as NonUniformColor : undefined;\r\n }\r\n\r\n /** Set the per-vertex colors.\r\n * @param colors See [[NonUniformColor.colors]].\r\n * @param indices See [[NonUniformColor.indices]].\r\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\r\n */\r\n public initNonUniform(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\r\n this._color = new NonUniformColor(colors, indices, hasAlpha);\r\n }\r\n}\r\n\r\n/** Describes the type of a [[FeatureIndex]].\r\n * @public\r\n */\r\nexport enum FeatureIndexType {\r\n /** Indicates that the index contains no features. */\r\n Empty,\r\n /** Indicates that the index contains exactly one feature. */\r\n Uniform,\r\n /** Indicates that the index contains more than one feature. */\r\n NonUniform,\r\n}\r\n\r\n/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.\r\n * The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].\r\n * @public\r\n */\r\nexport class FeatureIndex {\r\n /** Describes the quantity (zero, one, or more than one) of features in this index. */\r\n public type: FeatureIndexType = FeatureIndexType.Empty;\r\n\r\n /** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */\r\n public featureID: number = 0;\r\n /** If [[type]] is [[FeatureIndexType.NonUniform]], the per-vertex feature Ids, indexed by the mesh or polyline's vertex indices. */\r\n public featureIDs?: Uint32Array;\r\n\r\n /** True if [[type]] is [[FeatureIndexType.Uniform]]. */\r\n public get isUniform(): boolean { return FeatureIndexType.Uniform === this.type; }\r\n\r\n /** True if [[type]] is [[FeatureIndexType.Empty]]. */\r\n public get isEmpty(): boolean { return FeatureIndexType.Empty === this.type; }\r\n\r\n /** Reset to an empty index. */\r\n public reset(): void {\r\n this.type = FeatureIndexType.Empty;\r\n this.featureID = 0;\r\n this.featureIDs = undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -27,11 +27,8 @@ export declare class Feature {
|
|
|
27
27
|
*/
|
|
28
28
|
compare(rhs: Feature): number;
|
|
29
29
|
}
|
|
30
|
-
/** A [[Feature]] with a modelId identifying the model containing the feature.
|
|
31
|
-
*
|
|
32
|
-
* Prior to the introduction of MultiModelPackedFeatureTable, every (Packed)FeatureTable was associated with exactly one model.
|
|
33
|
-
* Now, each feature in a table may be associated with a different model.
|
|
34
|
-
* @internal
|
|
30
|
+
/** A [[Feature]] with a modelId identifying the model containing the feature, obtained from a [[RenderFeatureTable]].
|
|
31
|
+
* @public
|
|
35
32
|
*/
|
|
36
33
|
export interface ModelFeature {
|
|
37
34
|
modelId: Id64String;
|
|
@@ -39,27 +36,43 @@ export interface ModelFeature {
|
|
|
39
36
|
subCategoryId: Id64String;
|
|
40
37
|
geometryClass: GeometryClass;
|
|
41
38
|
}
|
|
42
|
-
/** @
|
|
39
|
+
/** @public */
|
|
43
40
|
export declare namespace ModelFeature {
|
|
41
|
+
/** Create a ModelFeature of [[GeometryClass.Primary]] with all invalid Ids.
|
|
42
|
+
* This is primarily useful for creating a `result` argument for [[RenderFeatureTable.findFeature]] and [[RenderFeatureTable.getFeature]].
|
|
43
|
+
*/
|
|
44
44
|
function create(): ModelFeature;
|
|
45
|
+
/** Returns `true` if any of `feature`'s properties differ from the defaults (invalid Ids and [[GeometryClass.Primary]]). */
|
|
45
46
|
function isDefined(feature: ModelFeature): boolean;
|
|
47
|
+
/** @alpha */
|
|
46
48
|
function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature;
|
|
47
49
|
}
|
|
48
|
-
/**
|
|
50
|
+
/** Represents a [[Feature]] within a [[RenderFeatureTable]]. This representation is optimized for use on the GPU.
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
49
53
|
export interface PackedFeature {
|
|
50
54
|
modelId: Id64.Uint32Pair;
|
|
51
55
|
elementId: Id64.Uint32Pair;
|
|
52
56
|
subCategoryId: Id64.Uint32Pair;
|
|
53
57
|
geometryClass: GeometryClass;
|
|
58
|
+
/** @alpha */
|
|
54
59
|
animationNodeId: number;
|
|
55
60
|
}
|
|
56
|
-
/**
|
|
61
|
+
/** Represents a [[PackedFeature]] obtained from a [[RenderFeatureTable]], including the index of that feature within the table.
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
57
64
|
export interface PackedFeatureWithIndex extends PackedFeature {
|
|
58
65
|
index: number;
|
|
59
66
|
}
|
|
60
|
-
/** @
|
|
67
|
+
/** @public */
|
|
61
68
|
export declare namespace PackedFeature {
|
|
69
|
+
/** Create a PackedFeature of [[GeometryClass.Primary]] with all invalid Ids.
|
|
70
|
+
* This is primarily useful for creating a `result` argument for [[RenderFeatureTable.getPackedFeature]].
|
|
71
|
+
*/
|
|
62
72
|
function create(): PackedFeature;
|
|
73
|
+
/** Create a PackedFeatureWithIndex of [[GeometryClass.Primary]] with all invalid Ids and an index of zero.
|
|
74
|
+
* This is primarily useful for creating a reusable `output` argument for [[RenderFeatureTable.iterable]].
|
|
75
|
+
*/
|
|
63
76
|
function createWithIndex(): PackedFeatureWithIndex;
|
|
64
77
|
}
|
|
65
78
|
/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.
|
|
@@ -115,11 +128,15 @@ export declare class FeatureTable extends IndexMap<Feature> {
|
|
|
115
128
|
insertWithIndex(feature: Feature, index: number): void;
|
|
116
129
|
/** @internal */
|
|
117
130
|
getArray(): Array<IndexedValue<Feature>>;
|
|
131
|
+
/** Convert this feature table to a representation that can be supplied to [RenderSystem.createBatch]($frontend). */
|
|
132
|
+
pack(): RenderFeatureTable;
|
|
118
133
|
}
|
|
119
|
-
/** @
|
|
134
|
+
/** @alpha */
|
|
120
135
|
export type ComputeNodeId = (feature: PackedFeatureWithIndex) => number;
|
|
121
|
-
/**
|
|
122
|
-
*
|
|
136
|
+
/** Representation of a [[FeatureTable]] suitable for use with [RenderSystem.createBatch]($frontend).
|
|
137
|
+
* The [[Feature]]s are represented as [[PackedFeature]]s. The feature table may contain features from multiple [Model]($backend)s.
|
|
138
|
+
* @see [[FeatureTable.pack]] to produce a RenderFeatureTable.
|
|
139
|
+
* @public
|
|
123
140
|
*/
|
|
124
141
|
export interface RenderFeatureTable {
|
|
125
142
|
/** The "model Id" of the tile tree containing the tile from which this feature table originated.
|
|
@@ -127,26 +144,34 @@ export interface RenderFeatureTable {
|
|
|
127
144
|
* persistent models batched together.
|
|
128
145
|
*/
|
|
129
146
|
readonly batchModelId: Id64String;
|
|
130
|
-
/**
|
|
147
|
+
/** A split representation of [[batchModelId]], to avoid having to constantly having to parse the string. */
|
|
131
148
|
readonly batchModelIdPair: Id64.Uint32Pair;
|
|
132
149
|
/** The number of features in the table; equivalently, one more than the largest feature index. */
|
|
133
150
|
readonly numFeatures: number;
|
|
134
|
-
/**
|
|
151
|
+
/** The number of bytes consumed by the feature table, strictly for diagnostic purposes. */
|
|
135
152
|
readonly byteLength: number;
|
|
136
153
|
readonly type: BatchType;
|
|
137
|
-
/**
|
|
154
|
+
/** @alpha */
|
|
155
|
+
animationNodeIds?: UintArray;
|
|
156
|
+
/** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */
|
|
138
157
|
getFeature(featureIndex: number, result: ModelFeature): ModelFeature;
|
|
139
|
-
/** Find the specified
|
|
158
|
+
/** Find the feature at the specified index. Returns undefined if featureIndex >= [[numFeatures]]. */
|
|
140
159
|
findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;
|
|
141
|
-
/** Find the Id of the element
|
|
160
|
+
/** Find the Id of the element associated with the feature at the specified index. */
|
|
142
161
|
findElementId(featureIndex: number): Id64String | undefined;
|
|
143
|
-
/** Get the Id of the element
|
|
162
|
+
/** Get the Id of the element associated with the feature at the specified index as a pair of 32-bit integers.
|
|
163
|
+
* The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].
|
|
164
|
+
*/
|
|
144
165
|
getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;
|
|
145
|
-
/** Get the feature at the specified index.
|
|
166
|
+
/** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */
|
|
146
167
|
getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;
|
|
147
|
-
/** Get an object that provides iteration over all features
|
|
168
|
+
/** Get an object that provides ordered iteration over all features.
|
|
169
|
+
* @note The `output` object is reused (mutated in place) as the current value on each iteration.
|
|
170
|
+
*/
|
|
148
171
|
iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;
|
|
172
|
+
/** @alpha */
|
|
149
173
|
populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void;
|
|
174
|
+
/** @alpha */
|
|
150
175
|
getAnimationNodeId(featureIndex: number): number;
|
|
151
176
|
}
|
|
152
177
|
/**
|
|
@@ -161,11 +186,8 @@ export declare class PackedFeatureTable implements RenderFeatureTable {
|
|
|
161
186
|
readonly numFeatures: number;
|
|
162
187
|
readonly anyDefined: boolean;
|
|
163
188
|
readonly type: BatchType;
|
|
164
|
-
|
|
189
|
+
animationNodeIds?: UintArray;
|
|
165
190
|
get byteLength(): number;
|
|
166
|
-
get animationNodeIds(): Readonly<UintArray> | undefined;
|
|
167
|
-
/** @internal for use by MultiModelPackedFeatureTable */
|
|
168
|
-
setAnimationNodeIds(nodeIds: UintArray | undefined): void;
|
|
169
191
|
/** Construct a PackedFeatureTable from the packed binary data.
|
|
170
192
|
* This is used internally when deserializing Tiles in iMdl format.
|
|
171
193
|
* @internal
|
|
@@ -240,7 +262,8 @@ export declare class MultiModelPackedFeatureTable implements RenderFeatureTable
|
|
|
240
262
|
get batchModelIdPair(): Id64.Uint32Pair;
|
|
241
263
|
get numFeatures(): number;
|
|
242
264
|
get type(): BatchType;
|
|
243
|
-
get animationNodeIds():
|
|
265
|
+
get animationNodeIds(): UintArray | undefined;
|
|
266
|
+
set animationNodeIds(ids: UintArray | undefined);
|
|
244
267
|
get byteLength(): number;
|
|
245
268
|
getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;
|
|
246
269
|
getFeature(featureIndex: number, result: ModelFeature): ModelFeature;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureTable.d.ts","sourceRoot":"","sources":["../../src/FeatureTable.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACmC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAC5F,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CA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