Click or drag to resize
AB4D logo

DXRayHitTestResult Class

DXRayHitTestResult class provides result of a ray hit test.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXHitTestResult
    Ab3d.DirectXDXRayHitTestResult
      Ab3d.DirectXDXRayHitTestWpfModel3DResult
      Ab3d.DirectXDXRayInstancedHitTestResult

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public class DXRayHitTestResult : DXHitTestResult

The DXRayHitTestResult type exposes the following members.

Constructors
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