Click or drag to resize
Ab4d.SharpEngine logo

RayHitTestResult Class

RayHitTestResult class provides result of a ray hit test.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public class RayHitTestResult : HitTestResult

The RayHitTestResult type exposes the following members.

Constructors
Methods
 NameDescription
Public methodToString
(Overrides ObjectToString)
Top
Fields
 NameDescription
Public fieldDistanceToRayOrigin Distance to the ray's origin (usually distance to Camera's position).
Public fieldHitPosition Vector3 that specifies hit position.
Public fieldIsBackFacing When false, then the ray hit the front facing triangle (triangle's normal is facing in the opposite direction as the ray). When true, then back facing triangle was hit. The triangle's normal is calculated as normal = Vector3.Cross(p1 - p2, p1 - p3) where p1, p2 and p3 are triangle positions based on the triangle indices.
Public fieldTriangleIndex Index of the hit triangle. TriangleIndex can be converted into an index in the TriangleIndices collection or in indexBuffer with multiplying the TriangleIndex by 3.
Top
See Also