Compute1DMipDimensions Data Member Function

Populates an <Int32Array> with the dimensions of all the MIP slices. If you start with 256w and 1h, then the <Int32Array> contains the following values: 128, 1, 64, 1, 32, 1, 16, 1, 8, 1, 4, 1, 2, 1, 1, 1. These values correspond to MIP maps with the following dimensions: 128×1, 64×1, 32×1, 16×1, 8×1, 4×1, 2×1, 1×1.

Prototype

int32 Compute1DMipDimensions( int32 p_nWidth, int32 p_nHeight, Int32Array dst )

Parameters

Parameter Type Parameter Name Documentation
int32p_nWidthThe width of the <Image> object for which you wish to compute MIP dimensions. Note that this value should be the largest width the image will ever have, and should be equivalent to the width of the image in an image editing program.
int32p_nHeightThe height of the <Image> object for which you wish to compute MIP dimensions. Note that this value should be the largest height the image will ever have, and should be equivalent to the height of the image in an image editing program.
<Int32Array>dstA pointer to an <Int32Array> that stores the computed MIP dimensions.

Examples

Copy Text To Clipboard

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