omni::extras::fillOutArray
Defined in omni/extras/OutArrayUtils.h
-
template<typename T, typename Callable, typename SizeType>
omni::core::Result omni::extras::fillOutArray(T *outArray, SizeType *outArrayCount, SizeType requiredCount, Callable &&fillFn) Fills the array given by outArray by calling fillFn.
fillFn’s signature is void(T* outArray, uint32_t outArrayCount).
If outArrayCount is
nullptr
, kResultInvalidArgument is returned.If outArray is
nullptr
, *outArrayCount is populated with requiredAccount.If *outArrayCount is less than requiredCount, kResultInsufficientBuffer is returned.
If the checks above pass, outArray is filled by the given function. *outArrayCount is updated to requiredCount.