Calculates the smooth surface normals.
IppStatus ipprSurfSmoothNormal_32f(const Ipp32f* pVertNorm, const Ipp32s* pIndexNorm, const Ipp32s* pTrngl, const Ipp32f* const pHit[2], Ipp32f* pSurfNorm[3], int len, IpprIndexType ippInd);
pVertNorm |
Pointer to the vertex normals. | ||||
pIndexNorm |
Pointer to the normals' indexes. | ||||
pTrngl |
Pointer to the triangles' indexes. | ||||
pHit |
Pointer to the array of pointers to the local surface parameter (u, v) planes at the hit point if the intersection is found. | ||||
pSurfNorm |
Pointer to the array of pointers to separate coordinate (x, y, z) planes of surface normals at intersections points. | ||||
len |
Number of rays in the block. | ||||
ippInd |
Specifies the type of indexing;
the following values are possible:
|
The function ipprSurfSmoothNormal is declared in the ippr.h file. This function calculates the surface's smooth normals in the points of intersection of rays with triangles. The function used the linear interpolation of per vertex normal in the intersection point according to the following formulas (in vector representation):
If for triangle ABC, aN, bN, cN are per vertex normals, and u, v are barycentric coordinates, then
uN = aN *u + (1- u) *cN;
vN = bN *v + (1- v) *cN;
uvN = aN *u + bN *v + (1-(u + v )) *cN
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.