Calculates parameters of intersection of rays with the scene triangles.
IppStatus ipprIntersectMO_32f(const Ipp32f* const pOrigin[3], const Ipp32f* const pDirection[3], Ipp32f* pDistance, Ipp32f* pHit[2], Ipp32s* pTrngl, const IpprIntersectContext* pContext, IppiSize blockSize);
pOrigin |
Array of pointers to the coordinates of origin point of rays (input). |
pDirection |
Array of pointers to the vectors of directions (input). |
pDistance |
Pointer to the array of distance between the hit point and origin of the rays (input). |
pHit |
Array of pointers to the local surface parameters (u, v) at the hit point if the intersection is found (output). |
pTrngl |
Pointer to the triangle index if the intersection is found. If not it is set to -1 (input/output). |
pContext |
Pointer to the intersection context. |
blockSize |
Total number of the rays. |
The function ipprIntersectMO is declared in the ippr.h file. This function calculates the parameters of the intersection between rays and scene triangles. Only rays for which value pTrngl[i][j] is greater than -1 are considered. Rays are specified by coordinates of their origin pOrigin and vectors of their directions pDirection. The parameter blockSize specifies the number of rays. The parameters of the intersection are the distance pDistance from the rays origin to the intersection point with the scene triangle, barycentric coordinates pHit of the intersection point, index pTrngl of the triangle that is closest to the ray's origin. For each ray the function calculates the intersections only with first triangle that are positioned at the distance not greater than initial value of pDistance.
To calculate the explicit coordinates of the intersection points, use the function ipprHitPoint3DEpsMO.
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error condition if one of the specified pointers is NULL. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.