Skip to content

@orillusion/core


Interface: MeshRaycastOptions ​

Defined in: src/io/raycast/MeshRaycast.ts:26

Options for MeshRaycast.intersect. Distances are world space.

Properties ​

near? ​

optional near?: number

Defined in: src/io/raycast/MeshRaycast.ts:28

Ignore hits closer than this. Default 0.


far? ​

optional far?: number

Defined in: src/io/raycast/MeshRaycast.ts:30

Ignore hits farther than this. Default Infinity.


cull? ​

optional cull?: boolean | MeshBVHCull

Defined in: src/io/raycast/MeshRaycast.ts:35

Faces to ignore, as they appear in the world (a mirroring transform flips the local winding; that is accounted for). Default 'none'.


useBVH? ​

optional useBVH?: RaycastBVHMode

Defined in: src/io/raycast/MeshRaycast.ts:37

Default 'auto'.


all? ​

optional all?: boolean

Defined in: src/io/raycast/MeshRaycast.ts:39

Report every hit instead of only the closest. Default false.


deformation? ​

optional deformation?: RaycastDeformation

Defined in: src/io/raycast/MeshRaycast.ts:41

How skinned / morphed renderers are handled by intersectRenderer. Default 'cpu'.


accept? ​

optional accept?: (hit, frontFace) => boolean

Defined in: src/io/raycast/MeshRaycast.ts:46

Per-hit predicate, given the local hit and whether it is a front face in world space. Rejected hits do not hide hits behind them.

Parameters ​

hit ​

MeshBVHHit

frontFace ​

boolean

Returns ​

boolean