Assume that I am new to AS3 and FlasCC and try to port some legacy C++ code to Flash. What I have is some number-crunching routine that takes an array of type double
(the array is of fixed size). The C++ prototype is, say:
double doNumberCrunching(double input[512]);
Now I would like to build an SWC and later call doNumberCrunching()
from AS3. SWIG generates the AS3 interface as:
doNumberCrunching(var _input:*):Number;
However, I have no idea how to feed it with Vector.<Number>(512)
without working on raw bytes.
My question is: how to solve it neatly? Do you know a cheap way to access double*
underlying the Vector.<Number>
? Or something even better?