PackRegionWithColorArray Data Member Function

Deep copies the data from the source array object to a region of the destination <Image> object. The source array remains unchanged and the <Image> object and array object retain unique ownership of their underlying memory. This function can be regarded as a bounds-checked version of memcpy(). This class is often used in concert with ImageTopologyHelper, which has numerous high-level functions for creating coordinate ranges that can be submitted to this function. For example: ImageTopologyHelper.GetCubemapBackFaceCoordinates() returns the byte coordinates of the 'back' face of a cubemap. Non-zero indicates success, zero indicates failure.

Prototype

int32 PackRegionWithColorArray( ColorArray p_oSource, Image p_oDest, int32 p_nStartIndex, int32 p_nCountOfBytes )

Parameters

Parameter Type Parameter Name Documentation
<ColorArray>p_oSourceThe source array object.
<Image>p_oDestThe destination <Image> object.
int32p_nStartIndexThe start index, in byte coordinates, of the region of the <Image> object to populate with values from the source array object.
int32p_nCountOfBytesThe number of bytes to copy from the source array to the destination <Image> object.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.