Table of Contents

Struct RaycastHit

Namespace
NwcIO.Model.Spatial
Assembly
NwcIO.dll

Detailed result of a 3D raycast intersection against geometry in the scene.

public readonly record struct RaycastHit : IEquatable<RaycastHit>

Implements

Inherited Members

Constructors

RaycastHit(double, Vector3d, Vector3d, NwcMesh, int)

Detailed result of a 3D raycast intersection against geometry in the scene.

public RaycastHit(double Distance, Vector3d Point, Vector3d Normal, NwcMesh Mesh, int TriangleIndex)

Parameters

Distance double

Distance from ray origin to the intersection point along the ray direction.

Point Vector3d

World coordinates of the 3D intersection point.

Normal Vector3d

Outward surface normal at the hit location.

Mesh NwcMesh

The NwcIO.Model.NwcMesh containing the intersected triangle.

TriangleIndex int

Zero-based index of the triangle within the mesh.

Properties

Distance

Distance from ray origin to the intersection point along the ray direction.

public double Distance { get; init; }

Property Value

double

Mesh

The NwcIO.Model.NwcMesh containing the intersected triangle.

public NwcMesh Mesh { get; init; }

Property Value

NwcMesh

Normal

Outward surface normal at the hit location.

public Vector3d Normal { get; init; }

Property Value

Vector3d

Point

World coordinates of the 3D intersection point.

public Vector3d Point { get; init; }

Property Value

Vector3d

TriangleIndex

Zero-based index of the triangle within the mesh.

public int TriangleIndex { get; init; }

Property Value

int