matrix error in newton exemple

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
WWW
Posts: 26
Joined: Thu Oct 04, 2007 1:41 pm

matrix error in newton exemple

Post by WWW »

Hi ,
Im trying to compile a newton exemple but i got an error like this:
irr::core::CMatrix4<T>::M' : cannot access private member declared in class 'irr::core::CMatrix4<T>
here is the function with the error:

Code: Select all

void setMeshTransformEvent(const NewtonBody* body, const float* matrix)
{
	// copy the matrix into an irrlicht matrix4
	matrix4 mat;
	memcpy(mat.M, matrix, sizeof(float)*16);

	// Retrieve the user data attached to the newton body
	ISceneNode *tmp = ((NewtonCube *)NewtonBodyGetUserData(body))->node;
	if (tmp)
	{
		// Position the node
		tmp->setPosition(mat.getTranslation());
		tmp->setRotation(mat.getRotationDegrees());
	}
}
How can i solve that?Im using irrlicht 1.4 beta
Thanx
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

In your memcpy replace mat.M with mat.pointer(), M is private now.
Post Reply