Click or drag to resize
AB4D logo

DXRayHitTestResult Fields

The DXRayHitTestResult type exposes the following members.

Fields
 NameDescription
Public fieldDistanceToRayOrigin Distance to the ray's origin.
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