DXRay |
public class DXRayHitTestResult : DXHitTestResult
The DXRayHitTestResult type exposes the following members.
Name | Description | |
---|---|---|
DXRayHitTestResult(Vector3, Single) | Constructor | |
DXRayHitTestResult(Vector3, SceneNode, Single) | Constructor |
Name | Description | |
---|---|---|
DistanceToRayOrigin | Distance to the ray's origin. | |
HitPosition | Vector3 that specifies hit position. | |
IsBackFacing | 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. | |
TriangleIndex | 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. |