Hi,
I currently have a 4x4 matrix class in C++ and I store each value as a float:
Matrix4d::Matrix4d(const float& m00, const float& m01, const float& m02, const float& m03,
const float& m10, const float& m11, const float& m12, const float& m13,
const float& m20, const float& m21, const float& m22, const float& m23,
const float& m30, const float& m31, const float& m32, const float& m33)
{
_m00 = m00;
_m01 = m01;
_m02 = m02;
_m03 = m03;
_m10 = m10;
_m11 = m11;
_m12 = m12;
_m13 = m13;
_m20 = m20;
_m21 = m21;
_m22 = m22;
_m23 = m23;
_m30 = m30;
_m31 = m31;
_m32 = m32;
_m33 = m33;
}
My question is, how can I return a float array of this data? I have no problem creating the array in the class for example:
float arrayToReturn[16] = { m00, m01, m02, m03, ... m33 };
However I can not return this value from the class. I've read about returning a pointer to the array, but have had no luck with it.
Thanks in advanced. - James