Oh, yeah, I am feelin' stupid as it goes.. I never included the JointLibrary.lib into my application, it was throwing up all over the place.
But here is the only problem that I have.
- Code: Select all
void test(int n){
Vector3 pos(0,0,29.5);
Quaternion rot(Quaternion::IDENTITY);
dMatrixConverter matrix(pos, rot);
//dVector minLinearLimits (0.0f, 0.0f, 0.0f, 0.0f);
//dVector maxLinearLimits (0.0f, 0.0f, 0.0f, 0.0f);
//dVector minAngulaLimits (-0.5f * 3.1416f, 0.0f, 0.0f, 0.0f);
//dVector maxAngulaLimits ( 0.5f * 3.1416f, 0.0f, 0.0f, 0.0f);
//NewtonUserJoint* joint;
//joint=CreateCustomJoint6DOF(&matrix.dmatrix[0][0],&matrix.values[0],
// mBodies[n].getCollision(),mBodies[n-1].getCollision());
// set the hinge Limits
//CustomJoint6DOF_SetLinearLimits (joint, &minLinearLimits[0], &maxLinearLimits[0]);
//CustomJoint6DOF_SetAngularLimits (joint, &minAngulaLimits[0], &maxAngulaLimits[0]);
CustomBreakableJoint bjoint;
bjoint = CustomBreakableJoint(matrix.dmatrix,mBodies[n].getCollision(),
mBodies[n-1].getCollision(),100,100);
}
Error 1 error C2512: 'CustomBreakableJoint' : no appropriate default constructor available c:\ogresdk\samples\newton\newton\world.h 214 game
in the World.h:
Body* mBodies;
in the Body.h file:
NewtonBody* mBody;
NewtonBody* getCollision(){return mBody;}
From the tutorial I got the standard joint to work, I have a light pole... Since I am lazy, I just made it horizontal instead of verticle. The pole pivots on the position as it should and looks nice. (I did this to make sure it all was working as the tutorial shows it)
The only thing I can think of is that I am not sending something to it correctly formating something, but I cant figure it out yet.
My problem with the second part is probably more of a semantics issue. My converter uses a dMatrix as described in the dMath.h file, and it all appears to work fine. Only question that I have about that is this:
- Code: Select all
dmatrix=dMatrix(dQuaternion(rot.x,rot.y,rot.z,rot.w),dVector(pos.x,pos.y,pos.z));
I just wanted to know if it was x,y,z,w, and not w,x,y,z. That would not cause my error, but it would produce some strange results down the road.
I am not using OgreNewt, just Ogre and Newton. As opposed to everyone in the world, I have to know how everything works. Kind of in my personality.