Calculates coordinates of the hit points for a block of rays from the single origin.
IppStatus ipprHitPoint3DEpsS0_32f_M(const IppPoint3D_32f originEye, const Ipp32f* const pDirection[3], const Ipp32f* pDistance, const Ipp32s* pMask, Ipp32f* pSurfHit[3], int len, Ipp32f eps);
originEye |
Coordinate of the origin point of rays. All rays have the same origin. |
pDirection |
Pointer to the array of pointers to separate coordinates (x, y, z) planes of the ray's directions. |
pDistance |
Pointer to the generalized distance from origin to intersection point. |
pMask |
Pointer to the array of masks. |
pSurfHit |
Pointer to the array of pointers to a separate coordinates (x, y, z) planes of the intersection points. |
len |
Number of rays in the block. |
eps |
Tolerance value. |
The function ipprHitPoint3DEpsS0 is declared in the ippr.h file. For an array of rays from the single origin originEye this function calculates the explicit coordinates of the intersection points where the pMask[ i] is greater than or equal to 0. The array of mask is the array of indexes of the triangles that intersect with the ray.
The tolerance value eps help to avoid the numerical imprecision in the intersection defining.
For example, for reflected rays value eps = 0.999f, and for refracted and transparency rays value eps = 1.001f.
pSurfHit[i][0] = originEye[0] + pDirection [i][0] * eps * pDistance[i][0]
pSurfHit[i][1] = originEye[0] + pDirection [i][1] * eps * pDistance[i][1]
pSurfHit[i][2] = originEye[0] + pDirection [i][2] * eps * pDistance[i][2]
where i = 0..(len - 1).
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.