@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
43 lines (42 loc) • 1.69 kB
TypeScript
import { CoreEntitySelectionState } from '../../engine/nodes/sop/utils/group/GroupCommon';
import { CoreObjectType, ObjectContent } from './ObjectContent';
export declare enum GroupOperation {
SET = "replace existing",
UNION = "add to existing",
SUBTRACT = "subtract from existing",
INTERSECT = "intersect with existing"
}
export declare const GROUP_OPERATIONS: GroupOperation[];
export interface GroupData {
name: string;
entitiesCount: number;
}
type GroupsDataForType = GroupData[];
export type GroupCollectionData = Record<string, GroupsDataForType>;
export declare enum EntityGroupType {
POINT = "point",
OBJECT = "object",
EDGE = "edge",
FACE = "face"
}
export interface UpdateGroupOptions {
type: EntityGroupType;
groupName: string;
operation: GroupOperation;
invert: boolean;
}
export type GroupsDictionary = Record<string, Record<string, number[]>>;
export declare class EntityGroupCollection {
private _object;
constructor(_object: ObjectContent<CoreObjectType>);
attributesDictionary(): GroupsDictionary;
static attributesDictionary<T extends CoreObjectType>(object: ObjectContent<T>): GroupsDictionary;
private static _createAttributesDictionaryIfNone;
findOrCreateGroup(type: EntityGroupType, groupName: string): number[];
deleteGroup(type: EntityGroupType, groupName: string): void;
static data<T extends CoreObjectType>(object: ObjectContent<T>): GroupCollectionData;
indicesSet(type: EntityGroupType, groupName: string, target: Set<number>): void;
private selectedIndices;
updateGroup(options: UpdateGroupOptions, selectionStates: CoreEntitySelectionState): void;
}
export {};