Populates an <Int32Array> with the dimensions of all the MIP slices. If you start with 256w and 256h, then the <Int32Array> contains the following values: 128, 128, 64, 64, 32, 32, 16, 16, 8, 8, 4, 4, 2, 2, 1, 1. These values correspond to MIP maps with the following dimensions: 128×128, 64×64, 32×32, 16×16, 8×8, 4×4, 2×2, 1×1.
int32 Compute2DMipDimensions( int32 p_nWidth, int32 p_nHeight, Int32Array dst )
Parameter Type | Parameter Name | Documentation |
---|---|---|
int32 | p_nWidth | The 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. |
int32 | p_nHeight | The 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> | dst | A pointer to an <Int32Array> that stores the computed MIP dimensions. |
None published. Please look for an example in the Scenome Scripting Language code base.