[solved] double precision issue

madMAx4
Posts: 27
Joined: Fri Apr 20, 2007 7:29 pm
Location: Germany

[solved] double precision issue

Post by madMAx4 »

Hi,

i am trying to use double precision.
so i defined BT_USE_DOUBLE_PRECISION 1 in btScalar.h and at the top of my project header.
when i try to compile my project with g++-3.4.6 i get the following errors:

Code: Select all

/tmp/cc2VwyqF.o: In function `main':
/mnt/kk/devel/opengl/test04.cpp:218: undefined reference to `btRigidBody::btRigidBody(double, btMotionState*, btCollisionShape*, btVector3 const&, double, double, double, double)'
/mnt/kk/devel/opengl/test04.cpp:295: undefined reference to `btRigidBody::btRigidBody(double, btMotionState*, btCollisionShape*, btVector3 const&, double, double, double, double)'
/tmp/cc2VwyqF.o: In function `setInertia(btRigidBody*)':
/mnt/kk/devel/opengl/test04.cpp:487: undefined reference to `btRigidBody::setMassProps(double, btVector3 const&)'
and here line 218 for example:

Code: Select all

	bter = new btRigidBody(
						btScalar(0.),
						motionstate,
						//new btBoxShape(btVector3(20,2,20)),
						gshter,
						btVector3(0., 0., 0.),
						btScalar(0.),
						btScalar(0.),
						btScalar(1.),
						btScalar(0.)
					);
the library compiles just fine.

maybe i forgot something?
Last edited by madMAx4 on Mon Apr 23, 2007 12:28 pm, edited 1 time in total.
madMAx4
Posts: 27
Joined: Fri Apr 20, 2007 7:29 pm
Location: Germany

Post by madMAx4 »

problem was solved by using g++-4.1.1 and recompiling the whole thing.
now DoublePrecisionDemo works well but

Code: Select all

new btGIMPACTMeshData();
segfaults.

i better go back to single precision and do some workaround for my fast moving bullets and rockets.
gunner10
Posts: 13
Joined: Mon Dec 11, 2006 6:30 pm

Post by gunner10 »

When I made the changes for double precision I did not test all of the Extras in that mode, which is what GIMPACT is part of. That was something I think Erwin was going to look at later.