@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
25 lines (24 loc) • 1.35 kB
TypeScript
import { QuadHalfEdge } from './QuadHalfEdge';
import { QuadNode } from './QuadNode';
import { Number4 } from '../../../../../types/GlobalTypes';
import { NeighbourIndex } from './QuadGraphCommon';
import { PrimitiveGraph } from '../../../entities/primitive/PrimitiveGraph';
export interface NeighbourData {
quadNode?: QuadNode | null;
neighbourIndex: NeighbourIndex | null;
}
export declare class QuadGraph extends PrimitiveGraph {
protected _quadsById: Map<number, QuadNode>;
protected _edgesByIndex: Map<number, Map<number, QuadHalfEdge>>;
protected _halfEdgeByHalfEdge: Map<QuadHalfEdge, QuadHalfEdge | undefined>;
protected _halfEdgeByQuadId: Map<number, Map<number, QuadHalfEdge>>;
protected _quadIdsByPointIndex: Map<number, Set<number>>;
addQuad(quadId: number, quadIndices: Number4): QuadNode;
quadNode(quadId: number): QuadNode | undefined;
quadIdsByPointIndex(pointIndex: number): Set<number> | undefined;
neighbourData(quadId: number, sideIndex: NeighbourIndex, target: NeighbourData): void;
neighbourIdsSharingEdge(quadId: number, target: number[]): void;
neighbourIdsSharingPoint(quadId: number, target: number[]): void;
neighbourIndex(quadId: number, neighbourIndex: number, withSharedEdge: boolean): number;
neighboursCount(quadId: number, withSharedEdge: boolean): number;
}