ModelClipGroups Class
Describes how to clip groups of models in the context of a ViewDefinition3d or ViewState3d.
Each group will be clipped by the ClipVector associated with the group to which it belongs.
A model belongs to the first group in the list for which ModelClipGroup.includesModel()
returns true
.
A catch-all group can be defined by a ModelClipGroup with an undefined
array of model Ids; any model whose Id does not appear in any group's list would belong to this group. If a catch-all group exists, it should appear last in the list.
A group of models can be exempted from clipping by a ModelClipGroup with an undefined
ClipVector.
@note A ModelClipGroups obtained from a ViewDetails3d should not be modified directly. Clone it instead and modify the clone.
@see modelClipGroups to define the clip groups for a ViewDefinition3d or ViewState3d.
Methods
Name | Description | |
---|---|---|
constructor(groups: ModelClipGroup[][]): ModelClipGroups | Create a new ModelClipGroups. | |
clone(): ModelClipGroups | Create a deep copy of this ModelClipGroups. | |
findGroup(modelId: string): undefined | ModelClipGroup | Find the first group to which the specified model Id belongs, if any. | |
findGroupIndex(modelId: string): number | Returns the array index of the group to which the specified model belongs, or -1 if the model belongs to no group. | |
getClipForModel(modelId: string): undefined | ClipVector | Find the clip that should be applied to the specified model. | |
toJSON(): ModelClipGroupProps[] | Convert to JSON representation. | |
fromJSON(props: ModelClipGroupProps[]): ModelClipGroups Static | Create from JSON representation. |
Properties
Name | Type | Description | |
---|---|---|---|
groups Readonly | ModelClipGroup[] | The groups of models and their associated clips. |
Defined in
Last Updated: 28 October, 2024