HiliteSet Class
A set of hilited elements for an IModelConnection, by element id. Hilited elements are displayed with a customizable hilite effect within a Viewport. The set exposes 3 types of elements in 3 separate collections: GeometricElement, GeometricModel, and SubCategory. The models and subcategories can be hilited independently or as an intersection of the two sets, as specified by modelSubCategoryMode.
Technically, the hilite effect is applied to Features, not Elements. An element's geometry stream can contain multiple features belonging to different subcategories.
Because Javascript lacks efficient support for 64-bit integers, the Ids are stored as pairs of 32-bit integers via Id64.Uint32Set.
@note Typically, elements are hilited by virtue of their presence in the IModelConnection's SelectionSet. The HiliteSet allows additional elements to be displayed with the hilite effect without adding them to the SelectionSet. If you add elements to the HiliteSet directly, you are also responsible for removing them as appropriate.
@see - hilited for the HiliteSet associated with an iModel.
- Hilite.Settings for customization of the hilite effect.
Methods
Name | Description | |
---|---|---|
constructor(iModel: IModelConnection, syncWithSelectionSet: booleantrue): HiliteSet | Construct a HiliteSet | |
clear(): void | Remove all elements from the hilited set. | |
setHilite(arg: Id64Arg, onOff: boolean): void | Toggle the hilited state of one or more elements. |
Properties
Name | Type | Description | |
---|---|---|---|
elements Accessor ReadOnly | Id64.Uint32Set | The set of hilited elements. | |
iModel | IModelConnection | The iModel containing the entities to be hilited. | |
isEmpty Accessor ReadOnly | boolean | Returns true if nothing is hilited. | |
models Readonly | Id64.Uint32Set | The set of hilited GeometricModelStates. | |
modelSubCategoryMode Accessor | ModelSubCategoryHiliteMode | Controls how the sets of hilited models and subcategories interact with one another. | |
onModelSubCategoryModeChanged Readonly | BeEvent<(newMode: ModelSubCategoryHiliteMode) => void> | Event raised just before changing the value of modelSubCategoryMode. | |
subcategories Readonly | Id64.Uint32Set | The set of hilited subcategories. | |
wantSyncWithSelectionSet Accessor | boolean | Control whether the hilited elements will be synchronized with the contents of the SelectionSet. |
Defined in
- core/frontend/src/SelectionSet.ts Line 197
Last Updated: 17 December, 2024