Azt kerdezed, hogy a vektor strukturat hogyan lehet Matrix-a alakitani?
A legbiztonsagosabb, ha a struktura tartalmat bepakolod egy tombbe, es azt adod meg a Matrix konstrucktoranak:
Code:
// tar[I] adott
float tmp[] = { tar[I].x, tar[I].y, tar[I].x };
Matrix A(tmp, 3,1);
Ha nagyon figyelsz, megadhatod a Matrix konstruktoranak tar[ i ]-t is, de ha kesobb valtoztatsz a strukturan, nagyokat szivhatsz vele. (vagy packed strukturakent kell bejelenteni a vektor tipust : http://sig9.com/articles/gcc-packed-structures 😀 )
legutóbbi hsz