Closed panzergame closed 7 years ago
Yeah, there's no convenient function for that, and I agree that be nice to have.
For now you'd have to do:
memcpy(&a[0], &vec[0], sizeof(a));
In this commit : https://github.com/UPBGE/blender/commit/77dee105559d552e3a4d5835cba9af5765d2fb30 I implemented some operator to copy to a C array and to get a constant C array pointer.
Is these functions safe with SIMD ?
Yes, looks safe to me.
I'm trying to use mathfu in this project: https://github.com/UPBGE/blender, but i could not find a simple way to copy data from a vector or matrix to a C array. The current library we use has a function named
getValue
which is used as below:But i can't found a way to do similar work using VectorPack and Vector::Pack.
So, what is the simple way to copy the vector content to an array assuming this array could not be replaced by VectorPack ?