gpu-curtains
    Preparing search index...

    Defines the returned values when an intersection between the ray and a projected mesh has been found.

    interface Intersection {
        object: ProjectedMesh;
        distance: number;
        localPoint: Vec3;
        point: Vec3;
        triangle: Vec3[];
        triangleIndex: number;
        uv?: Vec2;
        normal?: Vec3;
    }
    Index

    Properties

    Intersected projected mesh.

    distance: number

    Distance from the ray origin to the intersection point.

    localPoint: Vec3

    Coordinate of the intersection point in object local space.

    point: Vec3

    Coordinate of the intersection point in world space.

    triangle: Vec3[]

    The triangle (as an array of Vec3 vertices) inside which lies the intersection point.

    triangleIndex: number

    Index of the triangle in the projected mesh geometry position or index array.

    uv?: Vec2

    Interpolated uv coordinates of the intersection point.

    normal?: Vec3

    Interpolated normal of the intersection point, in object local space.