 |
HitTesterHitTest(Ray, PositionNormalTextureVertex, Int32, Int32, Int32, Boolean, Boolean) Method |
Hit test a ray against the mesh with specified vertex and index buffer.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntaxpublic static RayHitTestResult? HitTest(
in Ray? localRay,
PositionNormalTextureVertex[]? vertexBufferArray,
int[]? indexBufferArray,
int startTriangleIndicesIndex,
int triangleIndicesCount,
bool hitOnlyFrontFacingTriangles,
bool getOnlyNextHitTest
)
Parameters
- localRay Ray
- ray transformed to local coordinate system
- vertexBufferArray PositionNormalTextureVertex
- vertex buffer as array of PositionNormalTexture
- indexBufferArray Int32
- index buffer
- startTriangleIndicesIndex Int32
- index in the TriangleIndices array where the hit testing will begin
- triangleIndicesCount Int32
- number of TriangleIndices that will be checked
- hitOnlyFrontFacingTriangles Boolean
- When true then only triangles that have normals (calculated from triangle positions) oriented in the opposite direction as the ray are returned (because ray is usually created from the camera's position this returns only triangles that are facing the camera).
- getOnlyNextHitTest Boolean
- when true, then the next hit result is returned; when false all hit results are get and only the closest to the ray origin is returned.
Return Value
RayHitTestResultDXRayHitTestResult when ray hits the mesh otherwise null is returned
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.HitTester.HitTest(Ab4d.SharpEngine.Common.Ray@,Ab4d.SharpEngine.Common.PositionNormalTextureVertex[],System.Int32[],System.Int32,System.Int32,System.Boolean,System.Boolean)"]
See Also