/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2026, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a // license agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// import { Box3, Object3D } from "three"; import { IInfo, IModel } from "@inweb/viewer-core"; import { IHighlighter, IHighlightStyle } from "./Highlighter.types"; /** * Basic model implementation. */ export interface IModelImpl extends IModel { scene: Object3D; highlighter?: IHighlighter; initialize(): void; getUnits(): string; getUnitScale(): number; getUnitString(): string; getPrecision(): number; getInfo(): IInfo; getExtents(target: Box3): Box3; getObjects(): Object3D[]; getVisibleObjects(): Object3D[]; getObjectsByHandles(handles: string[]): Object3D[]; getHandles(): string[]; getHandlesByObjects(objects: Object3D[]): string[]; /** * Highlights the specified objects. * * An object is highlighted in one style: highlighting it again replaces its style, and * {@link unhighlight} removes it. The viewer selection highlights objects in the default style. * * @param handles - The list of object handles. * @param style - Name of a highlight style added by {@link setHighlightStyle}. Omitted, the objects are * highlighted in the default style, set by the highlight options of the viewer. Objects are not * highlighted in an unknown style. Models that do not support highlight styles ignore the style. */ highlight(handles: string[], style?: string): this; /** * Adds a named highlight style, or changes it. The objects highlighted in this style are redrawn with * the new settings. * * A model holds up to 8 highlight styles, the default one included; a new style beyond that is * ignored. Styles cannot be removed, so set the same names again to change them. The default style is * named `default` and is changed by the highlight options of the viewer. Models that do not support * highlight styles ignore this method. * * @param name - Style name. * @param style - Style settings. Unset settings take their default values, not the values set before. */ setHighlightStyle(name: string, style: IHighlightStyle): this; }