my own little private matrix

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Beroc
Posts: 18
Joined: Fri Sep 28, 2007 3:25 pm

my own little private matrix

Post 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?
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

mat.pointer()
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply