Initializes the structure IpprTriangleAccel.
IppStatus ipprTriangleAccelInit(IpprTriangleAccel* pTrnglAccel, const Ipp32f* pVertexCoord, const int* pTrnglIndex, int lenTrngl);
pTrnglAccel |
Pointer to the structure IpprTriangleAccel. |
pVertexCoord |
Pointer to the array of vertex coordinates. |
pTrnglIndex |
Pointer to the triangle's indexes. |
lenTrngl |
Number of the triangles in the mesh |
The function ipprTriangleAccelInit is declared in the ippr.h file.
This function initialize the structure pTrnglAccel in the external buffer. This structure is specifying by the number of triangles lenTrngl, their indexes pTrnglIndex, and vertex coordinates pVertexCoord. The size of the external buffer should be computed by calling the function ipprTriangleAccelGetSize beforehand.
This structure is used by the functions ipprIntersectMO, ipprIntersectEyeSO, and ipprIntersectAnySO to accelerate the searching the intersections of the rays with triangles.
The code example demonstrates how to use this function.
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.