mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 03:22:39 +08:00
4aac1be3f6
* stash * add ray_mesh * stash * ceche geometric info at runtime * add ray_mesh & ray_model * remove redundant data * tweaks * renaming
36 lines
699 B
TypeScript
36 lines
699 B
TypeScript
export enum ERaycastMode {
|
|
ALL,
|
|
CLOSEST,
|
|
ANY,
|
|
}
|
|
|
|
export interface IRaySubMeshResult {
|
|
distance: number;
|
|
vertexIndex0: number;
|
|
vertexIndex1: number;
|
|
vertexIndex2: number;
|
|
}
|
|
|
|
export interface IRaySubMeshOptions {
|
|
/**
|
|
* @zh
|
|
* 检测模式:[0,1,2]=>[ALL,CLOSEST,ANY]
|
|
*/
|
|
mode: ERaycastMode;
|
|
/**
|
|
* @zh
|
|
* 检测的最大距离
|
|
*/
|
|
distance: number;
|
|
result?: IRaySubMeshResult[];
|
|
doubleSided?: boolean;
|
|
doNotZeroMin?: boolean;
|
|
}
|
|
|
|
export interface IRayMeshOptions extends IRaySubMeshOptions {
|
|
subIndices?: number[];
|
|
}
|
|
|
|
export interface IRayModelOptions extends IRayMeshOptions {
|
|
doNotTransformRay?: boolean;
|
|
} |