Intersection

The attributes of this Intersection used to record the result of calculation.

Core Interface

The attributes of this Intersection used to record the result of calculation.

interface Intersection {
object: Object3D;
point: Vector3;
distance: number;
primitiveIndex: number;
distanceToRay?: number;
index?: number;
face?: Face3;
uv?: Vector2;
faceIndex?: number;
instanceIndex?: number;
}

Properties

object: Object3D
point: Vector3
distance: number
primitiveIndex: number

primitive of the intersection for indexed geometry, it related to index buffer for non-index geometry, it is related to position buffer

distanceToRay?: number
index?: number

use primitiveIndex instead only exist when hit points or lines the value maybe confused, not recommended to use

face?: Face3
uv?: Vector2
faceIndex?: number

use primitiveIndex instead only exist when hit mesh

instanceIndex?: number