import { StyleConditionInput, StyleShowInput, StyleEulerInput, StyleMaterialResolver, StyleMeshFactory, StyleVec3Input } from './style-appearance-types'; import { PartEffectHost } from './part-effect-host'; import { ColorInput } from '../utils/color-input'; import { Material } from 'three'; /** 高亮用材质:与 {@link StyleAppearance.material} 相同,不含内嵌 color/opacity */ export type HighlightMaterial = Material | StyleMaterialResolver; /** 条件命中后的外观;`color` / `opacity` 与 `material` 同级,语义同 setStyle */ export interface HighlightAppearance { material?: HighlightMaterial; color?: ColorInput; opacity?: number; mesh?: StyleMeshFactory; translation?: StyleVec3Input; scale?: StyleVec3Input; rotation?: StyleEulerInput; origin?: StyleVec3Input; } export type HighlightCondition = [StyleConditionInput, HighlightAppearance]; /** * 高亮配置:语义与 setStyle 相似,多一个 name 用于命名分组 * * 与 setStyle 的关键差异:`conditions` 中**所有**命中的条目都会各自生效, * 分别创建独立的 MeshCollector 与 split mesh 实例,视觉上叠加。 */ export interface HighlightOptions { name: string; show?: StyleShowInput; conditions?: HighlightCondition[]; /** 若指定,仅在这些 feature id 与属性数据的交集中应用 */ featureIds?: number[]; /** 顶点属性索引,0 → `_FEATURE_ID_0`,1 → `_FEATURE_ID_1`;默认 0 */ featureIdAttribute?: number; /** @deprecated 请使用 featureIds + featureIdAttribute: 0 */ oids?: number[]; /** @deprecated 请使用 featureIds + featureIdAttribute: 1 */ pids?: number[]; } /** @deprecated 请使用 HighlightOptions */ export type HighlightByPidsOptions = HighlightOptions; export interface ResolvedHighlightOptions { name: string; show?: StyleShowInput; conditions?: HighlightCondition[]; featureIds: number[]; featureIdAttribute: number; } /** * 构件高亮辅助器 * 与 setStyle 相同的 show / conditions / 位姿语义,多组命名高亮 */ export declare class PartHighlightHelper { private context; private highlightGroups; private highlightConfigByName; private originalMaterialByMesh; private originalTransformByMesh; private meshChangeHandlers; private highlightCollectors; constructor(context: PartEffectHost); private getMaps; private buildAppearanceGroupsForAttribute; private collectUnionShowHideForAttribute; private collectUsedFeatureIdAttributes; private clearCollectorsAndRestoreMeshes; private reapplyAll; highlight(options: HighlightOptions): void; /** @deprecated 请使用 highlight({ ...options, featureIdAttribute: 1 }) */ highlightByPids(options: HighlightByPidsOptions): void; getHighlightByName(name: string): HighlightOptions | undefined; /** @deprecated 请使用 getHighlightByName */ getHighlightByPidName(name: string): HighlightOptions | undefined; getHighlightMatrixByName(name: string): number[] | undefined; cancelHighlight(name: string): void; /** @deprecated 请使用 cancelHighlight */ cancelHighlightByPid(name: string): void; cancelAllHighlight(): void; /** @deprecated 请使用 cancelAllHighlight */ cancelAllHighlightByPid(): void; refreshHiddenIdsOnly(): void; /** @deprecated 请使用 refreshHiddenIdsOnly */ refreshHiddenPidsOnly(): void; onTilesLoadEnd(): void; dispose(): void; } //# sourceMappingURL=PartHighlightHelper.d.ts.map