irrBullet 0.1.8 - Bullet physics wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

Thanks for a highly detailed response. :)
Do you have a clue when will you be releasing 1.7? So i can decide whether to wait and work on other features for now or implement raytracing the way you suggested
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

ent1ty:

I'm not certain when I'll be releasing 0.1.7. It could be a month, or it could be three months. It depends how much I'll be implementing for this release.

Since there are a few major implementations under way, it'll probably be about two months. But keep an eye out for an earlier release.


I suggest you go ahead and implement the ray casting as I suggested, and then you can easily replace it with the new code when you change to 0.1.7.

- Josiah
Josiah Hartzell
Image
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

cobra wrote:ent1ty:

I'm not certain when I'll be releasing 0.1.7. It could be a month, or it could be three months. It depends how much I'll be implementing for this release.

Since there are a few major implementations under way, it'll probably be about two months. But keep an eye out for an earlier release.


I suggest you go ahead and implement the ray casting as I suggested, and then you can easily replace it with the new code when you change to 0.1.7.

- Josiah
sounds cool. i will definitely wait for that (i'm using irrbullet!). it's ok to be late as long as it's stable and no nasty bug. 8)
xtheagonyscenex
Posts: 131
Joined: Fri Jun 03, 2005 7:26 pm

error

Post by xtheagonyscenex »

hi i am getting this error after hours trying to get bullet working

Code: Select all

1>Compiling...
1>main.cpp
1>c:\program files\game stuff\irrbullet-0.1.65\source\common.h(18) : warning C4099: 'btWheelInfo' : type name first seen using 'struct' now seen using 'class'
1>        c:\program files\game stuff\irrbullet-0.1.65\source\bheaders\bullet\bulletdynamics\vehicle\btwheelinfo.h(38) : see declaration of 'btWheelInfo'
1>c:\program files\game stuff\irrbullet-0.1.65\source\bulletworld.h(103) : error C2143: syntax error : missing ';' before '*'
1>c:\program files\game stuff\irrbullet-0.1.65\source\bulletworld.h(103) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\game stuff\irrbullet-0.1.65\source\bulletworld.h(103) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\game stuff\irrbullet-0.1.65\source\bulletworld.h(103) : warning C4183: 'addSoftBody': missing return type; assumed to be a member function returning 'int'
1>c:\program files\game stuff\irrbullet-0.1.65\source\raycastvehicle.h(40) : warning C4099: 'SWheelInfo' : type name first seen using 'class' now seen using 'struct'
1>        c:\program files\game stuff\irrbullet-0.1.65\source\common.h(15) : see declaration of 'SWheelInfo'
1>Build log was saved at "file://c:\Program Files\Game Stuff\room\room___Win32_Debug\BuildLog.htm"
1>room - 3 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
i have irrbullet .1.65
irrlicht.1.7.1

and i have the libs in this order

Code: Select all

#pragma comment(lib, "libbulletdynamics.lib")
#pragma comment(lib, "libbulletsoftbody.lib")
#pragma comment(lib, "libGIMPACTUtils.lib")


#pragma comment(lib, "libbulletmath.lib")
#pragma comment(lib, "libbulletcollision.lib")
im not new but im not pro thanks. :roll:

they claim that there is errors in the softbody.h file idk
i believe i have everything directory wise set up right?
maybe im doing something wrong .... i can just set all the includes an libs and tinker?
do i have to compile the whole source first? very confused.... :?:
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
Tihtinen
Posts: 76
Joined: Fri Jan 08, 2010 3:12 pm
Location: Finland

Post by Tihtinen »

Nevermind, I got it working but I left my problem here for reference. Most likely the problem was that the libirrBullet.a was compiled with an older gcc version. That's what I also thought several hours ago so I compiled it by myself, but forgot to clean the old object files :oops:

=====================
ORIGINAL POST (SOLVED)
=====================
I can't get this to link, I tried 0.1.6 and 0.1.6.5. And yes, I've checked many many times that the libraries are in correct order

Included libs (screenshot from Code::Blocks)
Image

Code: Select all

..\..\lib\Release\libirrBullet.a(sphereshape.o)||In function `_ZN12ISphereShape11createShapeEb':|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|20|undefined reference to `___gxx_personality_sj0'|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|21|undefined reference to `__Unwind_SjLj_Register'|
..\..\lib\Release\libirrBullet.a(sphereshape.o)||In function `_ZN12ISphereShape11createShapeEb':|
C:\Programming\Library\irrBullet\source\collisionshape.h|81|undefined reference to `__Unwind_SjLj_Unregister'|
..\..\lib\Release\libirrBullet.a(sphereshape.o)||In function `_ZN12ISphereShape11createShapeEb':|
C:\Programming\Library\irrBullet\source\..\include\bheaders\Bullet\BulletCollision\CollisionShapes\btSphereShape.h|27|undefined reference to `__Unwind_SjLj_Resume'|
..\..\lib\Release\libirrBullet.a(sphereshape.o)||In function `_ZN12ISphereShapeC1EPN3irr5scene10ISceneNodeEfb':|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|10|undefined reference to `___gxx_personality_sj0'|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|10|undefined reference to `__Unwind_SjLj_Register'|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|16|undefined reference to `__Unwind_SjLj_Unregister'|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|16|undefined reference to `__Unwind_SjLj_Resume'|
..\..\lib\Release\libirrBullet.a(sphereshape.o)||In function `_ZN12ISphereShapeC2EPN3irr5scene10ISceneNodeEfb':|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|10|undefined reference to `___gxx_personality_sj0'|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|10|undefined reference to `__Unwind_SjLj_Register'|
C:\Programming\Library\irrBullet\source\sphereshape.cpp|16|undefined reference to `__Unwind_SjLj_Unregister'|
AND SO ON...
EDIT: Yes, I am aware these sound like stl errors (or something like that?) so I even tried to compile the library myself (and succeeded) but I can't get even that to link :/
===============================
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

xtheagonyscenex:

Did you compile irrBullet using MSVC and then link against that, too? Link that before you link the Bullet libs.

Also, try including irrbullet.h without adding the irrBullet files to your project.
Add search directories for:

irrbullet/source
irrbullet/source/bheaders
irrbullet/source/bheaders/Bullet
Josiah Hartzell
Image
xtheagonyscenex
Posts: 131
Joined: Fri Jun 03, 2005 7:26 pm

Post by xtheagonyscenex »

no i idnt comile irrbullet not quite sure how?
and yes im just trying to ingetrate irrbullet i get those errors just from including the irrbullet.h header file i dont even have any irrbulllet specific coode in my project yet.....
confused so i should comple my own library or irrbullet? how do i do that?
and i am using vc studio 2005
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
xtheagonyscenex
Posts: 131
Joined: Fri Jun 03, 2005 7:26 pm

Post by xtheagonyscenex »

ok fooled around with the includes and reextracted 1.6.5 and now i just have one?

Code: Select all

1>Compiling...
1>main.cpp
1>c:\program files\game stuff\irrbullet-0.1.65\source\common.h(18) : warning C4099: 'btWheelInfo' : type name first seen using 'struct' now seen using 'class'
1>        c:\program files\game stuff\irrbullet-0.1.65\source\bheaders\bullet\bulletdynamics\vehicle\btwheelinfo.h(38) : see declaration of 'btWheelInfo'
1>c:\program files\game stuff\irrbullet-0.1.65\source\softbody.h(12) : fatal error C1083: Cannot open include file: 'map.h': No such file or directory
1>Build log was saved at "file://c:\Program Files\Game Stuff\room\room___Win32_Debug\BuildLog.htm"
1>room - 1 error(s), 1 warning(s)
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
Tihtinen
Posts: 76
Joined: Fri Jan 08, 2010 3:12 pm
Location: Finland

Post by Tihtinen »

xtheagonyscenex wrote:ok fooled around with the includes and reextracted 1.6.5 and now i just have one?

Code: Select all

1>Compiling...
1>main.cpp
1>c:\program files\game stuff\irrbullet-0.1.65\source\common.h(18) : warning C4099: 'btWheelInfo' : type name first seen using 'struct' now seen using 'class'
1>        c:\program files\game stuff\irrbullet-0.1.65\source\bheaders\bullet\bulletdynamics\vehicle\btwheelinfo.h(38) : see declaration of 'btWheelInfo'
1>c:\program files\game stuff\irrbullet-0.1.65\source\softbody.h(12) : fatal error C1083: Cannot open include file: 'map.h': No such file or directory
1>Build log was saved at "file://c:\Program Files\Game Stuff\room\room___Win32_Debug\BuildLog.htm"
1>room - 1 error(s), 1 warning(s)
I checked those lines and yes, they actually contain errors (but it seems some compilers are just more tolerant than others). Try modifying the headers directly:

1. common.h( 18 ): Change the forward declaration from "class btWheelInfo" to "struct btWheelInfo" (as it is actually a struct, not a class)
2. softbody.h( 12 ): Change "#include <map.h>" to just #include <map> (C++ style)

I suggest the author to fix these as well in the next version.
xtheagonyscenex
Posts: 131
Joined: Fri Jun 03, 2005 7:26 pm

Post by xtheagonyscenex »

thnx it works! :D
now i just have to figure out how it works lol im not sure how to change to struct as the file says it is a struct not a class?
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

xtheagonyscenex:

I did indeed accidentally declare it as a class.

Line 18 in common.h, in the forward declaration just change "class" to "struct" for btWheelInfo.


Also, the include for map.h I fixed a couple months ago for 0.1.7.

Good luck. Glad it works for you now.
Josiah Hartzell
Image
xtheagonyscenex
Posts: 131
Joined: Fri Jun 03, 2005 7:26 pm

Post by xtheagonyscenex »

do u have any tutorials for implementing into existing code? or basic starting the engine? i can play around with effects i dont quite understand the examples... :oops:
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

xtheagonyscenex:

No, I don't. Sorry.

That's left up to the developer to integrate physics into his/her existing engine. All cases are different.
Josiah Hartzell
Image
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

Ehm... I must say, i'm experiencing some strange behavior, if i remove rigid body from a node, and then try to set a parent for the node.

i.e.

Code: Select all

Body->includeNodeOnRemoval(false);
Body->remove();
Body= 0;
Node->setPosition(AttachPoint);
Node->setParent(camera);
Node->setRotation(irr::core::vector3df(0));
If i don't create a body for the node, everything works as expected, so it must be something with irrBullet. Strange behavior means, that it moves with it's parent, but doesn't rotate with it's parent plus the child node get's some funny random rotation and position. Also, this whole thing happens only sometimes. Usually, if i run the game, and then wait a bit, and only then execute this code ^^, it doesn't happen.

Or maybe i'm just missing something else, that needs to be done, when removing only body and not the node?
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

Entity:
Interesting find.

We'll have to talk it over IRC so that I can get more details while debugging it myself. See you soon.
Josiah Hartzell
Image
Post Reply