IntersectEyeSO

Calculates intersection of the primary ray with the geometry of scene.

Syntax

IppStatus ipprIntersectEyeSO_32f(IppPoint3D_32f originEye, const Ipp32f* const pDirection[3], Ipp32f* pDistance, Ipp32f* pHit[2], int* pTrngl, const IpprIntersectContext* pContext , IppiSize blockSize);

Parameters

originEye

Coordinate of the 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.

Description

The function ipprIntersectEyeSO is declared in the ippr.h file. This function calculates the parameters of the intersection of the primary ray with the geometry of scene. Only rays for which value pTrngl[i][j] is greater than -1 are considered. The parameters are the distance between the origin point and point of intersection with the triangle of scene, barycentric coordinates of the intersection point, and index of the closest to the origin triangle. The function calculates the intersections only with first triangles that are positioned at the distance not greater than initial value of pDistance.

The code example demonstrates how to use this function.

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.