RwForAllClumpsInScene(RwScene *scene,
RwClump *(*func) (RwClump *clump));
RwForAllClumpsInSceneInt(RwScene
*scene,
RwClump *(*func) (RwClump *clump, RwInt32 arg), RwInt32 arg);
RwForAllClumpsInSceneReal(RwScene
*scene,
RwClump *(*func) (RwClump *clump, RwReal arg), RwReal arg);
RwForAllClumpsInScenePointer(RwScene
*scene,
RwClump *(*func) (RwClump *clump, void *arg), void *arg);
Description
Applies a call-back function to all clumps in the scene. If any invocation of the call-back function sets RenderWares error status, iteration is terminated. The call-back function can either be a RenderWare API function or a user-defined function. In the latter case, the call-back function should call RwSetUserError() if it fails for any reason.
The difference between RwForAllClumpsInScene() and its variations listed above is that for RwForAllClumpsInScene() the call-back function takes only one argument (a clump pointer), whereas in the case of its variations, the call-back function takes an additional, user-supplied argument (arg) that can be of type RwInt32, RwReal or void * respectively.
Arguments
scene Pointer to the scene.
func Pointer to the call-back function.
arg A user-supplied argument to be passed to the call-back function
Return Value
The argument scene if successful, and NULL otherwise.
Comments
If the return type of the call-back function is not RwClump *, then the pointer to the call-back function should be cast to the expected type, i.e., a pointer to a function whose return type is RwClump *. For example, in the case of a call-back function named foo whose return type is int, the following C expression should be used:
(RwClump*(*)())foo
See Also