| 1353 | | } |
| 1354 | | |
| 1355 | | |
| 1356 | | void ur_makeVec3Blk( UThread* ut, UCell* res, UCell* blkCell ) |
| 1357 | | { |
| 1358 | | int len; |
| 1359 | | UCell* it; |
| 1360 | | UCell* end; |
| 1361 | | UBlock* blk = ur_block( blkCell ); |
| 1362 | | |
| 1363 | | len = 0; |
| 1364 | | |
| 1365 | | UR_ITER_BLOCK( it, end, blk, blkCell ); |
| 1366 | | while( it != end ) |
| 1367 | | { |
| 1368 | | if( ur_is(it, UT_DECIMAL) ) |
| 1369 | | res->vec3.xyz[ len++ ] = (float) ur_decimal(it); |
| 1370 | | else if( ur_is(it, UT_INT) ) |
| 1371 | | res->vec3.xyz[ len++ ] = (float) ur_int(it); |
| 1372 | | if( len == 3 ) |
| 1373 | | break; |
| 1374 | | ++it; |
| 1375 | | } |
| 1376 | | |
| 1377 | | ur_initType( res, UT_VEC3 ); |
| 1378 | | while( len != 3 ) |
| 1379 | | res->vec3.xyz[ len++ ] = 0.0; |