my own little private matrix
Posted: Tue Oct 09, 2007 3:31 pm
OK, I was playing with newton and Irrlicht and came accross an interesteing error. First, I am looking at the BSPCollision file available HERE
The code:
The error:
I got to looking at the doc and sure enough the M is a private member. This leads me to ask: What is the proper way to access the matrix array from outside the class?
The code:
Code: Select all
// copy the matrix into an irrlicht matrix4
matrix4 mat;
memcpy(mat.M, matrix, sizeof(float)*16);
Code: Select all
error C2248: 'irr::core::CMatrix4<T>::M' : cannot access private member declared in class 'irr::core::CMatrix4<T>'
I got to looking at the doc and sure enough the M is a private member. This leads me to ask: What is the proper way to access the matrix array from outside the class?