Intersects(XMVECTOR, XMVECTOR, XMVECTOR, XMVECTOR, XMVECTOR, float&) method
Test whether a triangle intersects with a ray.
bool Intersects(
XMVECTOR Origin,
XMVECTOR Direction,
XMVECTOR V0,
XMVECTOR V1,
XMVECTOR V2,
[ref] float &Dist
);
Origin
The origin of the ray.Direction
The direction of the ray.V0
A vector defining the triangle.V1
A vector defining the triangle.V2
A vector defining the triangle.Dist [ref]
The distance along the ray where the intersection occurs.
A boolean value indicating whether the triangle intersects with the ray.
Note TriangleTests
::Intersects
is 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.
Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.
Namespace |
DirectX::TriangleTests |
Header |
DirectXCollision.h |