Page 1 of 1

my own little private matrix

Posted: Tue Oct 09, 2007 3:31 pm
by Beroc
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:

Code: Select all

	// copy the matrix into an irrlicht matrix4
	matrix4 mat;
	memcpy(mat.M, matrix, sizeof(float)*16);
The error:

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?

Posted: Tue Oct 09, 2007 4:17 pm
by rogerborg
mat.pointer()