|
RwCameraForAllClumpsInFrustum
is used to determine which clumps lie wholly or partially within
the specified camera's view frustum and then to execute each of
those clump's callback function (see RpClumpSetCallBack). The enumeration
may be terminated at any time by returning NULL from the clump
callback.
- Note:
- The view frustum is only defined by the last render, so this
function must be called after a scene has been rendered.
The results of calling function can be thought of as equivalent to
the following scheme:-
- RwCameraForAllSectorsInFrustum
to iterate through the current set of frustum sectors
- RpWorldSectorForAllAtomics to
iterate over all atomics in a sector.
- RpAtomicGetClump to get the
RpClump that contains a
particular atomic. At this stage, a quick check can be made that
the clump hasn't already been counted.
- RwCameraFrustumTestSphere to finally
check whether the clump's atomic is definitely inside the camera
frustum.
- Execute the clump's callback function.
Variations on this scheme may be used for other situations, such as
operating just on the atomics contained in the frustum.
The world plugin must be attached before using this
function.
- Parameters:
-
camera |
Pointer to the camera. |
data |
User data pointer to pass to each clump callback |
- Returns:
- Returns pointer to the specified camera if successful or NULL
if there is an error.
- See also:
- RwCameraForAllSectorsInFrustum
, RpClumpSetCallBack , RpClumpGetCallBack , RpWorldPluginAttach
|