Skip to content

@simversus/yjvisDocs


@simversus/yjvis / Raycaster

Class: Raycaster

Constructors

new Raycaster()

new Raycaster(): Raycaster

Returns

Raycaster

Defined in

scene/Raycaster.ts:23

Methods

intersectBox()

intersectBox(box, worldMatrix?): IntersectResult

Parameters

box: Box

worldMatrix?: Mat4

Returns

IntersectResult

Defined in

scene/Raycaster.ts:95


intersectModels()

intersectModels(models): IntersectResult[]

射线与模型相交检测

Parameters

models: Model | Model[]

Returns

IntersectResult[]

Defined in

scene/Raycaster.ts:62


intersectPlane()

intersectPlane(plane): IntersectResult

Parameters

plane: Plane

Returns

IntersectResult

Defined in

scene/Raycaster.ts:79


setFromCamera()

setFromCamera(camera, coords): void

通过相机设置起点和方向

Parameters

camera: Camera

coords: Number2

像素坐标

Returns

void

Defined in

scene/Raycaster.ts:33