Skip to main content

flywave-3dtile-datasource.raycasttraverse

Home > @flywave/flywave-3dtile-datasource > raycastTraverse

raycastTraverse() function​

Finds all intersections when traversing the tile hierarchy

This function performs hierarchical raycasting against the tile hierarchy, finding all intersections by traversing bounding volumes and testing actual scene content.

Signature:

export declare function raycastTraverse(renderer: TilesRenderer, tile: ITile, raycaster: Raycaster, intersects: TileIntersection[], localRay?: Ray | null): void;

Parameters​

Parameter

Type

Description

renderer

TilesRenderer

The tiles renderer instance

tile

ITile

The root tile to start traversal from

raycaster

Raycaster

The raycaster to use

intersects

TileIntersection[]

Array to store intersections

localRay

Ray | null

(Optional) Pre-calculated local ray (optional)

Returns:



void