utDataAssign

untyped data assign

void
utDataAssign
pure
(
T...
)
(
,
void* buffer
,
in T vals
)
if (
is(typeof(flatData!real(vals)))
)
in { assert (buffer !is null); assert (elem.comp == getFlatLength(vals)); }

Examples

1 float[] buf = [ 1.1, 2.2, 3.3, 4.4, 5.5, 6.6 ];
2 
3 struct vec3 { double[3] dd; alias dd this; }
4 
5 utDataAssign( ElemInfo( 3, DataType.FLOAT ), cast(void*)(buf.ptr+1), vec3([8,9,10]) );
6 
7 assert( eq( buf, [1.1,8,9,10,5.5,6.6] ) );

Meta