CastShadowSO

Calculates the vectors of direction for shadow rays.

Syntax

IppStatus ipprCastShadowSO_32f( IppPoint3D_32f pOrigin, const Ipp32f* pSurfDotIn, const Ipp32f* const pSurfNorm[3], const Ipp32f* const pSurfHit[3], Ipp32s* pMask, Ipp32f* pDotRay, Ipp32f* pDirection[3], int len);

Parameters

pOrigin

Pointer to coordinate of the origin.

pSurfDotIn

Pointer to the array of dot products of incident rays and normals at the intersections points.

pSurfNorm

Pointer to the array of pointers to separate coordinates (x, y, z) planes of normals at intersections point.

pSurfHit

Pointer to the array of pointers to separate coordinates (x, y, z) planes of the intersection points.

pMask

Pointer to the array of masks.

pDotRay

Pointer to the array of dot products of shadow rays and normals.

pDirection

Pointer to the array of pointers to separate coordinates (x, y, z) planes of the destination vector, they should not be normalized.

len

Number of rays.

Description

The function ipprCastShadowSO is declared in the ippr.h file. This function calculates the array of direction vectors pDirection of the shadow rays that is the absolute values of dot products of the shadow rays and normals in the points where the pMask is greater than or equal to 0. If the dot product of incident ray and normal, and dot product of shadow ray and normal have different signs, the corresponding values of pMask are set to -1. Shadow rays are computed by two points: the origin pOrigin and the intersection with the surface pSurfHit.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if pDirection pointer is NULL.

Submit feedback on this help topic

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