IntersectMultipleSO

Calculates the parameters of intersection of rays with the specified number of scene triangles.

Syntax

IppStatus ipprIntersectMultipleSO_32f(IppPoint3D_32f originEye, const Ipp32f* const pDirection[3], Ipp32f* pDistance, Ipp32f* pHit[2], Ipp32s* pTrngl, IpprVolume blockVolume, const IpprIntersectContext* pContext);

Parameters

originEye

Coordinate of the origin point of rays (input).

pDirection

2D array of pointers to the vectors of directions (input).

pDistance

Pointer to the 3D array of distances between the hit point and the origin of the rays (input).

pHit

3D array of pointers to the local surface parameters (u, v) at the hit point if the intersection is found (output).

pTrngl

(input/output) Pointer to the 3D array of triangle indexes if the intersection is found. If not - it is set to -1 (input/output).

blockVolume

blockVolume.width * blockVolume.height is a total number of the rays, blockVolume.depth - is the specified number of the scene triangles.

pContext

Pointer to the intersection context.

Description

The function ipprIntersectMultipleSO is declared in the ippr.h file. This function computes 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 origins originEye and vectors of their directions pDirection. The parameter blockVolume specifies the number of rays(width*height) and the number of the closest triangles to ray origin that is defined by the depth. The parameters of the intersection are the distances pDistance from the rays origin to the intersection point with the scene triangles, barycentric coordinates pHit of the intersection points, and indexes pTrngl of the triangles.

For each ray the function computes the intersection only with the first of depth triangles that are positioned at the distance not greater than the initial value of pDistance.

The number of triangles that are intersected by the ray in the scene can be less than or equal to depth. You can find the actual number of triangles intersected by the ray: in the array pTrngl only indexes that are greater than or equal to 0 corresponds to the intersected triangles.

To calculate the explicit coordinates of the intersection points, use the function ipprHitPoint3DEpsS0.

Return Values

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.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.