vim-webgl-component
Version:
A demonstration app built on top of the vim-webgl-viewer
88 lines (87 loc) • 3.34 kB
TypeScript
/**
* @module viw-webgl-component
*/
import * as VIM from 'vim-webgl-viewer/';
import { ComponentSettings } from '../settings/settings';
import { ComponentCamera } from './camera';
/**
* Manages the isolation mechanic in the vim component.
*/
export declare class Isolation {
private _viewer;
private _settings;
private _isolation;
private _lastIsolation;
private _camera;
private _references;
private _onChanged;
/** Signal dispatched when the isolation set changes. */
get onChanged(): import("ste-simple-events").ISimpleEvent<string>;
constructor(viewer: VIM.Viewer, camera: ComponentCamera, settings: ComponentSettings);
/**
* Applies relevant settings to isolation.
* @param settings The settings to be applied to isolation.
*/
applySettings(settings: ComponentSettings): void;
/**
* Sets the reference objects for a given VIM.
* @param vim The VIM for which reference objects are being set.
* @param reference An array of reference objects or the string 'always' to indicate permanent reference.
*/
setReference(vim: VIM.Vim, reference: VIM.Object3D[] | 'always'): void;
/**
* Retrieves the reference objects set for a given VIM.
* @param vim The VIM for which reference objects are being retrieved.
* @returns The reference objects set for the specified VIM.
*/
getReference(vim: VIM.Vim): "always" | Set<VIM.Object3D>;
/**
* Clears all reference objects set for VIMs.
*/
clearReferences(): void;
/**
* Returns true if there are currently objects isolated.
* @returns True if there are currently objects isolated; otherwise, false.
*/
any(): boolean;
/**
* Returns the current array of isolated objects.
* @returns The array of objects currently isolated, or undefined if no objects are isolated.
*/
current(): VIM.Object3D[];
/**
* Isolates the objects in the given array and shows the rest as ghost.
* @param objects An array of objects to isolate.
* @param source The source of isolation.
* @returns True if isolation occurs; otherwise, false.
*/
isolate(objects: VIM.Object3D[], source: string): boolean;
/**
* Toggles current isolation based on selection.
* @param source The source of isolation.
*/
toggleIsolation(source: string): void;
/**
* Removes the given objects from the isolation set.
* @param objects An array of objects to be removed from isolation.
* @param source The source of the removal operation.
*/
hide(objects: VIM.Object3D[], source: string): void;
/**
* Adds the given objects to the isolation set.
* @param objects An array of objects to be added to isolation.
* @param source The source of the addition operation.
*/
show(objects: VIM.Object3D[], source: string): void;
/**
* Clears the current isolation.
* @param source The source of the isolation clearing operation.
*/
clear(source: string): void;
/**
* Show all objects and quit isolation mode.
*/
private _showAll;
getMaterial(settings: ComponentSettings, isolate: boolean): VIM.THREE.Material;
private _isolate;
}