Ray |
public class RayHitTestResult : HitTestResult
The RayHitTestResult type exposes the following members.
Name | Description | |
---|---|---|
RayHitTestResult(Vector3, Single) | Constructor | |
RayHitTestResult(Vector3, SceneNode, Single) | Constructor |
Name | Description | |
---|---|---|
ToString | (Overrides ObjectToString) |
Name | Description | |
---|---|---|
DistanceToRayOrigin | Distance to the ray's origin (usually distance to Camera's position). | |
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. |