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
Distancedouble-
Distance from ray origin to the intersection point along the ray direction.
PointVector3d-
World coordinates of the 3D intersection point.
NormalVector3d-
Outward surface normal at the hit location.
MeshNwcMesh-
The NwcIO.Model.NwcMesh containing the intersected triangle.
TriangleIndexint-
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
Mesh
The NwcIO.Model.NwcMesh containing the intersected triangle.
public NwcMesh Mesh { get; init; }Property Value
Normal
Outward surface normal at the hit location.
public Vector3d Normal { get; init; }Property Value
Point
World coordinates of the 3D intersection point.
public Vector3d Point { get; init; }Property Value
TriangleIndex
Zero-based index of the triangle within the mesh.
public int TriangleIndex { get; init; }