@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
38 lines (37 loc) • 1.27 kB
TypeScript
import { BaseSopOperation } from './_Base';
import { CoreGroup } from '../../../core/geometry/Group';
import { InputCloneMode } from '../../../engine/poly/InputCloneMode';
import { Vector3 } from 'three';
import { DefaultOperationParams } from '../../../core/operations/_Base';
export declare enum RaySopMode {
PROJECT_RAY = "project rays",
MIN_DIST = "minimum distance"
}
export declare const RAY_SOP_MODES: RaySopMode[];
interface RaySopParams extends DefaultOperationParams {
mode: number;
useNormals: boolean;
direction: Vector3;
transformPoints: boolean;
transferFaceNormals: boolean;
transferUVs: boolean;
addDistAttribute: boolean;
}
export declare class RaySopOperation extends BaseSopOperation {
static readonly DEFAULT_PARAMS: RaySopParams;
static readonly INPUT_CLONED_STATE: InputCloneMode[];
static type(): Readonly<'ray'>;
private _matDoubleSideTmpSetter;
private _raycaster;
cook(inputCoreGroups: CoreGroup[], params: RaySopParams): CoreGroup;
private _pointPos;
private _pointNormal;
private _hitPointInfo;
private _triangle;
private _faceNormal;
private _ray;
private _computeWithProjectRay;
private _computeWithMinDist;
private _addDistAttribute;
}
export {};