Test whether a triangle intersects with a ray.
bool Intersects(
XMVECTOR Origin,
XMVECTOR Direction,
XMVECTOR V0,
GXMVECTOR V1,
XMVECTOR V2,
float &Dist
)
Origin
Type: XMVECTOR
[in] The origin of the ray.
Direction
Type: XMVECTOR
[in] The direction of the ray.
V0
Type: XMVECTOR
[in] A vector defining the triangle.
V1
Type: GXMVECTOR
[in] A vector defining the triangle.
V2
Type: XMVECTOR
[in] A vector defining the triangle.
Dist
Type: float
[out] The distance along the ray where the intersection occurs.
Type: bool
A boolean value indicating whether the triangle intersects with the ray.
Note
TriangleTests::Intersectsis new for DirectXMath. This functionality is not available in XNAMath 2.x. Similar functionality for XNAMath can be found in the DirectX SDK Collision sample.
Header: Declared in directxcollision.h.