Packs an array of vectors into an array of scalars, using the dimension as the offset for packing. All Scenome API vectors are four components. Passing a vector dimension of 2 to this function results in a scalar array with the [0]th and [1]th component of each vector packed into the scalar array.
int32 PackVectorsInScalarArray( Uint8Iterator first, Uint8Iterator last, Uint8Iterator dst, int32 p_nComponents )
Parameter Type | Parameter Name | Documentation |
---|---|---|
<Uint8Iterator> | first | An iterator to the start of the range of vectors you wish to pack into a scalar array. |
<Uint8Iterator> | last | An iterator to the end of the range of vectors you wish to pack into a scalar array. |
<Uint8Iterator> | dst | An iterator to the start of the range of scalars that will store the packed vector components. |
int32 | p_nComponents | The number of components of each vector to pack into the scalar array. Must be 2, 3, or 4. |
None published. Please look for an example in the Scenome Scripting Language code base.