Tumle v1.4 irrlicht/newton
still getting stack error, problems with old physics code...
heya, I still can't get any of your examples to run, I get that same exact stack error I had before at runtime. Also, I upgraded an old physics demo I had written back in 2005 with newton to the newest newton, 1.53, and now that is busted, and I get a null reference exeption when I try to use a tree collision. Im on Vista, with VS 2005 express. has anybody else had any luck at all with this platform using IN? I'm pretty much stumped for the moment....
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
strange...
I didn't have any trouble when i tried compiling an example in VC++.
Have you tried to use NewtonBodyGetMassMatrix in a smaller context like:
You could also try to initialize the floats individually and check if they where created before calling NewtonBodyGetMassMatrix, like so:
I don't know why that would work better, but maybe
I didn't have any trouble when i tried compiling an example in VC++.
Have you tried to use NewtonBodyGetMassMatrix in a smaller context like:
Code: Select all
NewtonWorld *nWorld = NewtonCreate(NULL, NULL);
NewtonCollision *collision = NewtonCreateBox(nWorld, 10, 10, 10, NULL);
NewtonBody *body = NewtonCreateBody(nWorld, collision);
NewtonReleaseCollision(nWorld, collision);
NewtonBodySetMassMatrix(body, 10, 1, 1, 1);
float mass, Ixx, Iyy, Izz;
NewtonBodyGetMassMatrix(body, &mass, &Ixx, &Iyy, &Izz);
Code: Select all
float mass = 1;
float Ixx = 1;
float Iyy = 1;
float Izz = 1;
if(mass && Ixx && Iyy && Izz && body)
NewtonBodyGetMassMatrix(body, &mass, &Ixx, &Iyy, &Izz);
Code: Select all
void _cdecl CPhysicsManager::newtonForceAndTorqueCallback(const NewtonBody* body)
I tried the second thing you suggest, but no dice. The variables initialize perfectly it seems... I stepped through the function in debug, and everything looked good, it doesnt throw the error until the closing brace at the end of the function, so something must occur during that function that corrupts the stack, but I have no idea what.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Izz isn't used in the force and torque callback, so in stead of:
Try this:
This doesn't solve the problem, but it might be usefull as a workaround.
Code: Select all
float mass, Ixx, Iyy, Izz;
NewtonBodyGetMassMatrix(body, &mass, &Ixx, &Iyy, &Izz);
Code: Select all
f32 mass = pNode->getMass();
OK, no runtime error anymore, but nothing is visible now. If I comment out the pmgr->update(); in the render loop, I see the two nodes, but they are stationary of course. This leads me to think that they are probably transformed offscreen instantly due to some sort of problem.
I dunno what it is, but newton 1.53 and irr1.3+ do NOT seem to play nice on my box, with your code, OR Irrnewt, or even my own updated code from 2005.....
this sucks....
I dunno what it is, but newton 1.53 and irr1.3+ do NOT seem to play nice on my box, with your code, OR Irrnewt, or even my own updated code from 2005.....
this sucks....
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
IN is renamed to Tumle (tumble in danish), and i've updated a few things, among others, the update timestep should now be correct. See http://www.jonlt.frac.dk/tumle/changes.txt for more info
Not all, Level.exe, Controllable.exe and Camera.exe. Firstly they ran slow as hell, now they just crash my PC I get PAGE_FAULT_IN_NONPAGED_AREA error. This should be caused by irrlicht i gues, usualy faulty driver or hardware causes it so irrlicht might be guilty. However, other irrlicht projects run ok.
Also while implementing timestep thingy into my own project i experienced same lag but it was caused by very stupid ( ) main loop control. Maybe your examles has problems there too, but im too lazy to check
And one more thing. Could you add visual studio project files plz?
Also while implementing timestep thingy into my own project i experienced same lag but it was caused by very stupid ( ) main loop control. Maybe your examles has problems there too, but im too lazy to check
And one more thing. Could you add visual studio project files plz?
tumle Newton Physics engine
Hello JonLT,
I tried to use "tumle" code for linking newton to irrlicht; seams very interesting and simple to use, but..
when I run the "hello world" program integrated in code blocks, I got the following message:
Linking console executable: Irrlicht.exe
main_1.obj : error LNK2019: unresolved external symbol "class tumle::IPhysicsManager * __cdecl tumle::createPhysicsManager(class irr::IrrlichtDevice *)" (?createPhysicsManager@tumle@@YAPAVIPhysicsManager@1@PAVIrrlichtDevice@irr@@@Z) referenced in function _main
Irrlicht.exe : fatal error LNK1120: 1 unresolved externals
Process terminated with status 1 (0 minutes, 0 seconds)
I linked the source file with all the stuff in the build options, but always the same message, do you have an idea what goes wrong ?
thanks for your help
Robert
I tried to use "tumle" code for linking newton to irrlicht; seams very interesting and simple to use, but..
when I run the "hello world" program integrated in code blocks, I got the following message:
Linking console executable: Irrlicht.exe
main_1.obj : error LNK2019: unresolved external symbol "class tumle::IPhysicsManager * __cdecl tumle::createPhysicsManager(class irr::IrrlichtDevice *)" (?createPhysicsManager@tumle@@YAPAVIPhysicsManager@1@PAVIrrlichtDevice@irr@@@Z) referenced in function _main
Irrlicht.exe : fatal error LNK1120: 1 unresolved externals
Process terminated with status 1 (0 minutes, 0 seconds)
I linked the source file with all the stuff in the build options, but always the same message, do you have an idea what goes wrong ?
thanks for your help
Robert
i m error
i use 1.3.1 newton 1.53 and vc 6.0 thank you
________
Percodan Rehab Advice
Code: Select all
c:\documents and settings\numxyz\desktop\tumle\include\icamerafpsphysicsnode.h(24) : error C2555: 'tumle::ICameraFPSPhysicsNode::getIrrlichtNode' : overriding virtual function differs from 'tumle::IPhysicsNode::getIrrlichtNode' only by return type o
r calling convention
c:\documents and settings\numxyz\desktop\tumle\include\iphysicsnode.h(19) : see declaration of 'IPhysicsNode'
________
Percodan Rehab Advice
Last edited by koller202 on Thu Feb 17, 2011 1:17 am, edited 1 time in total.