irrBullet 0.1.8 - Bullet physics wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
pepeshka
Posts: 29
Joined: Wed Jul 02, 2008 8:42 pm

Re: irrBullet 0.1.71 - Bullet physics wrapper

Post by pepeshka »

This is a killer project, it was a snap to throw together a demo to play with.

Is there a good way to make an object a 'child' of another, much the way parent/children work in Irrlicht? For example, if I wanted a character object to board a boat, could I make it the child of the boat, so that any forces applied to it are applied to the child as well? If I just place the object on the boat, it seems like it'll fall off. I'm putting together a demo to test this out, just curious if there's a suggested method.
zerochen
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Re: irrBullet 0.1.71 - Bullet physics wrapper

Post by zerochen »

hi

from the faq file:

1.3
Q: Is it possible to have other objects as children of a rigid
body?
A: Yes. This should not be confused with the compound shape,
which allows multiple shapes to be added into one shape.
The method used in the game irrBullet was created for uses a base
class that handles the child objects of a main rigid body and
keeps them together with Bullet constraints.
Because each game might need a different way to handle child
objects, irrBullet doesn't have an interface for this. It should
be implemented by the game developer to fit his/her game's needs.
See section 1.11 in this FAQ list about constraints for more
information on how to use Bullet constraints.
1.4
kaka
Posts: 12
Joined: Thu Mar 15, 2012 9:08 pm

Re: irrBullet 0.1.71 - Bullet physics wrapper

Post by kaka »

hello there guys. I'm having linker problems :cry:
i get the code working when i add the bullet libraries by following their tutorial on the site and getting their helloworld program to work. The linker errors happen when i add the wrapper. I know its going to be a stupid error but i cant figure it out :oops:

error:

Code: Select all

>helloworldexample.obj : error LNK2019: unresolved external symbol "public: __thiscall CExampleFramework::CExampleFramework(void)" (??0CExampleFramework@@QAE@XZ) referenced in function "public: __thiscall CHelloWorldExample::CHelloWorldExample(void)" (??0CHelloWorldExample@@QAE@XZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: void __thiscall irrBulletWorld::removeCollisionObject(class ICollisionObject * const,bool)" (?removeCollisionObject@irrBulletWorld@@QAEXQAVICollisionObject@@_N@Z) referenced in function "public: virtual bool __thiscall CHelloWorldExample::OnEvent(struct irr::SEvent const &)" (?OnEvent@CHelloWorldExample@@UAE_NABUSEvent@irr@@@Z)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: class ICollisionObject * __thiscall irrBulletWorld::getCollisionObjectByIndex(unsigned int)const " (?getCollisionObjectByIndex@irrBulletWorld@@QBEPAVICollisionObject@@I@Z) referenced in function "public: virtual bool __thiscall CHelloWorldExample::OnEvent(struct irr::SEvent const &)" (?OnEvent@CHelloWorldExample@@UAE_NABUSEvent@irr@@@Z)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: class IRigidBody * __thiscall CExampleFramework::shootSphere(class irr::core::vector3d<float> const &,float)const " (?shootSphere@CExampleFramework@@QBEQAVIRigidBody@@ABV?$vector3d@M@core@irr@@M@Z) referenced in function "public: virtual bool __thiscall CHelloWorldExample::OnEvent(struct irr::SEvent const &)" (?OnEvent@CHelloWorldExample@@UAE_NABUSEvent@irr@@@Z)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: class IRigidBody * __thiscall CExampleFramework::shootCube(class irr::core::vector3d<float> const &,float,class irr::core::string<char,class irr::core::irrAllocator<char> >)const " (?shootCube@CExampleFramework@@QBEQAVIRigidBody@@ABV?$vector3d@M@core@irr@@MV?$string@DV?$irrAllocator@D@core@irr@@@45@@Z) referenced in function "public: virtual bool __thiscall CHelloWorldExample::OnEvent(struct irr::SEvent const &)" (?OnEvent@CHelloWorldExample@@UAE_NABUSEvent@irr@@@Z)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: void __thiscall irrBulletWorld::debugDrawProperties(bool,class irr::video::SColor const &)" (?debugDrawProperties@irrBulletWorld@@QAEX_NABVSColor@video@irr@@@Z) referenced in function "public: virtual void __thiscall CHelloWorldExample::runExample(void)" (?runExample@CHelloWorldExample@@UAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: void __thiscall irrBulletWorld::debugDrawWorld(bool)" (?debugDrawWorld@irrBulletWorld@@QAEX_N@Z) referenced in function "public: virtual void __thiscall CHelloWorldExample::runExample(void)" (?runExample@CHelloWorldExample@@UAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall irrBulletWorld::stepSimulation(float,unsigned int,float)" (?stepSimulation@irrBulletWorld@@QAEIMIM@Z) referenced in function "public: virtual void __thiscall CHelloWorldExample::runExample(void)" (?runExample@CHelloWorldExample@@UAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: void __thiscall irrBulletWorld::setGravity(class irr::core::vector3d<float> const &)" (?setGravity@irrBulletWorld@@QAEXABV?$vector3d@M@core@irr@@@Z) referenced in function "public: virtual void __thiscall CHelloWorldExample::runExample(void)" (?runExample@CHelloWorldExample@@UAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: void __thiscall irrBulletWorld::setDebugMode(unsigned int)" (?setDebugMode@irrBulletWorld@@QAEXI@Z) referenced in function "public: virtual void __thiscall CHelloWorldExample::runExample(void)" (?runExample@CHelloWorldExample@@UAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "class irrBulletWorld * __cdecl createIrrBulletWorld(class irr::IrrlichtDevice * const,bool,bool)" (?createIrrBulletWorld@@YAPAVirrBulletWorld@@QAVIrrlichtDevice@irr@@_N1@Z) referenced in function "public: virtual void __thiscall CHelloWorldExample::runExample(void)" (?runExample@CHelloWorldExample@@UAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: __thiscall irrBulletWorld::~irrBulletWorld(void)" (??1irrBulletWorld@@QAE@XZ) referenced in function "public: void * __thiscall irrBulletWorld::`scalar deleting destructor'(unsigned int)" (??_GirrBulletWorld@@QAEPAXI@Z)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: class IRigidBody * __thiscall CExampleFramework::addCube(class irr::core::vector3d<float> const &,class irr::core::vector3d<float> const &,float,class irr::core::string<char,class irr::core::irrAllocator<char> >)const " (?addCube@CExampleFramework@@QBEQAVIRigidBody@@ABV?$vector3d@M@core@irr@@0MV?$string@DV?$irrAllocator@D@core@irr@@@45@@Z) referenced in function "public: void __thiscall CHelloWorldExample::createBoxes(void)" (?createBoxes@CHelloWorldExample@@QAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: class IRigidBody * __thiscall irrBulletWorld::addRigidBody(class ICollisionShape * const)" (?addRigidBody@irrBulletWorld@@QAEPAVIRigidBody@@QAVICollisionShape@@@Z) referenced in function "public: void __thiscall CHelloWorldExample::createGround(void)" (?createGround@CHelloWorldExample@@QAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: __thiscall IBoxShape::IBoxShape(class irr::scene::ISceneNode * const,float,bool)" (??0IBoxShape@@QAE@QAVISceneNode@scene@irr@@M_N@Z) referenced in function "public: void __thiscall CHelloWorldExample::createGround(void)" (?createGround@CHelloWorldExample@@QAEXXZ)
1>helloworldexample.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CExampleFramework::~CExampleFramework(void)" (??1CExampleFramework@@UAE@XZ) referenced in function "public: virtual __thiscall CHelloWorldExample::~CHelloWorldExample(void)" (??1CHelloWorldExample@@UAE@XZ)
1>D:\Uni\Game Development\Projects\experiment bullet wrapper\Debug\experiment bullet wrapper.exe : fatal error LNK1120: 16 unresolved externals
Also i'm trying to get the helloworld example to work

***edit***

i managed to reduce the link errors from 16 to 1.I'm nearly there!

Code: Select all

1>BulletCollision.lib(btBoxShape.obj) : error LNK2005: "public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z) already defined in irrBullet.lib(boxshape.obj)
1>BulletCollision.lib(btPolyhedralConvexShape.obj) : error LNK2005: "public: virtual __thiscall btPolyhedralConvexShape::~btPolyhedralConvexShape(void)" (??1btPolyhedralConvexShape@@UAE@XZ) already defined in irrBullet.lib(boxshape.obj)
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>irrBullet.lib(softbody.obj) : error LNK2001: unresolved external symbol "public: void __thiscall btSoftBody::appendAnchor(int,class btRigidBody *,bool)" (?appendAnchor@btSoftBody@@QAEXHPAVbtRigidBody@@_N@Z)
1>D:\Uni\Game Development\Projects\Colliding with bullet\Release\Colliding with bullet.exe : fatal error LNK1120: 1 unresolved externals
this is the order lib files:
irrBullet.lib
BulletDynamics.lib
BulletSoftBody.lib
LinearMath.lib
BulletCollision.lib
irrlicht.lib
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Re: irrBullet 0.1.71 - Bullet physics wrapper

Post by cobra »

irrBullet 0.1.8 has been released.

Please go to http://www.skyreignsoftware.com/product/irrbullet to download it.

- Josiah
Josiah Hartzell
Image
qidaozhilong2
Posts: 17
Joined: Sun Apr 01, 2012 3:51 pm

Re: irrBullet 0.1.71 - Bullet physics wrapper

Post by qidaozhilong2 »

Nice Job.
and i extremely expected the RagDoll demo.
Maybe the next release you will add.
RdR
Competition winner
Posts: 273
Joined: Tue Mar 29, 2011 2:58 pm
Contact:

Re: irrBullet 0.1.71 - Bullet physics wrapper

Post by RdR »

cobra wrote:irrBullet 0.1.8 has been released.

Please go to http://www.skyreignsoftware.com/product/irrbullet to download it.

- Josiah
What are the main changes between 0.1.71 and 0.1.8 ? Recommend to update from 0.1.71?
Also a archive package would be nice (for non Windows users).

Btw, your website still says "Version: 0.1.71" :wink:
qidaozhilong2
Posts: 17
Joined: Sun Apr 01, 2012 3:51 pm

Re: irrBullet 0.1.71 - Bullet physics wrapper

Post by qidaozhilong2 »

RdR wrote:
cobra wrote:irrBullet 0.1.8 has been released.

Please go to http://www.skyreignsoftware.com/product/irrbullet to download it.

- Josiah
What are the main changes between 0.1.71 and 0.1.8 ? Recommend to update from 0.1.71?
Also a archive package would be nice (for non Windows users).

Btw, your website still says "Version: 0.1.71" :wink:
I have downloaded, the package name is "IrrBulletSDK-0.1.8.exe"
The file "VersionInfo.txt":
"
irrBullet Version: 0.1.8

Compatibilities:
Bullet Version: 2.75-2.77 (2.77 included)
Irrlicht Version: 1.6.1, 1.7, 1.7.1, 1.7.3
"

and all the changes in file "ChangeLog.txt"
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Re: irrBullet 0.1.71 - Bullet physics wrapper

Post by cobra »

RdR wrote:
cobra wrote:irrBullet 0.1.8 has been released.

Please go to http://www.skyreignsoftware.com/product/irrbullet to download it.

- Josiah
What are the main changes between 0.1.71 and 0.1.8 ? Recommend to update from 0.1.71?
Also a archive package would be nice (for non Windows users).

Btw, your website still says "Version: 0.1.71" :wink:
Hi RdR,

Please go to http://www.skyreignsoftware.com/resourc ... -whats-new to see what has changed in irrBullet 0.1.8. I certainly recommend updating from 0.1.71.

I am soon going to release an archive for non-Windows users, but I first wanted to see how users responded to the new self-extractor.

The reason for that is because I am going to include a finishing page in the installer that shows beginners how to start using irrBullet, what to read, and where
everything is located, which will hopefully lower the learning curve a bit for newcomers.

Thanks for telling me about it displaying the old version. I'll update the website right now. :)


@qidaozhilong2:

I will add a ragdoll demo in the future when I have more time. :)

- Josiah
Josiah Hartzell
Image
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: irrBullet 0.1.8 - Bullet physics wrapper

Post by jorgerosa »

Cobra, thanks for share it with us! Your work is really awesome! I´ll try this asap! :D
Found an internal issue: "(...)irrBullet logo and USA flag texture to media folder(...)" ... USA flag !!?... c´mon..... :mrgreen: :wink:
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Re: irrBullet 0.1.8 - Bullet physics wrapper

Post by cobra »

Thanks Jorge. :)

The archive version of the SDK is now available at Sourceforge.
Josiah Hartzell
Image
qidaozhilong2
Posts: 17
Joined: Sun Apr 01, 2012 3:51 pm

Re: irrBullet 0.1.8 - Bullet physics wrapper

Post by qidaozhilong2 »

cobra,
I've added an CAPSULE like your demo.
If only addCapsuleSceneNode(), i can see that capsule.
But, if i add this capsule shape to world like "world->addRigidBody(shape);", then the capsule is disappear.
I dont know what's the problem. :(
"
IRigidBody* addCapsule(const vector3df &pos,
const vector3df &scale,
f32 mass,
stringc textureFile)
{
ISceneNode *capsule = smgr->addCapsuleSceneNode(1.0f, 3.0f, 8, 4);
//ISceneNode *capsule = smgr->addRagdollSceneNode();
capsule->setScale(scale);
capsule->setPosition(pos);
capsule->setMaterialFlag(EMF_LIGHTING, true);
capsule->setMaterialFlag(EMF_NORMALIZE_NORMALS, true);
capsule->setMaterialTexture(0, driver->getTexture(textureFile.c_str()));

//capsule->setMaterialFlag(EMF_WIREFRAME, drawWireFrame);

ICollisionShape *shape = new ICapsuleShape(capsule, mass, false);

//shape->setMargin(0.01);

IRigidBody *body;
//body = world->addRigidBody(shape);

return body;
}
"
"
void ICapsuleShape::createShape(bool overrideMargin)
{
node->updateAbsolutePosition();
const aabbox3df& box = node->getBoundingBox();
const f32 radius = box.MaxEdge.X+ f32((overrideMargin) ? 0.04:0.0);
const f32 height = box.MaxEdge.Y;
const f32 scale = f32(node->getScale().X);

//__android_log_print(ANDROID_LOG_INFO, "createShape", "%f,%f,%f", radius, height, scale);

if(node->getType() == ESNT_CAPSULE)
{
shape = new btCapsuleShape(scale*radius, scale*height);
}

setLocalScaling(node->getScale(), ESP_COLLISIONSHAPE);
calculateLocalInertia(getMass(), vector3df(0.0f,0.0f,0.0f));
}
"
hetter
Posts: 1
Joined: Tue Mar 06, 2012 7:45 am

Re: irrBullet 0.1.8 - Bullet physics wrapper

Post by hetter »

oh cobra, your project is so cool!

btw,you forget to add the new source codes to msvc project........
qidaozhilong2
Posts: 17
Joined: Sun Apr 01, 2012 3:51 pm

Re: irrBullet 0.1.8 - Bullet physics wrapper

Post by qidaozhilong2 »

I also agree with @hetter.
But, so many interesting projects died as no time to work.(I've seen many)

Maybe some Open Source Projects could develop their project to 2 branchs.
One for completely open source and new features added.
The other one for business is more stable.

So,
people can still do something they like, and these awesome projects will not halt or die.
.::|AK|::.
Posts: 3
Joined: Wed May 09, 2012 11:50 am

Re: irrBullet 0.1.8 - Bullet physics wrapper

Post by .::|AK|::. »

Hey,

Well listen up, i am using code::blocks with minGW compiler and after trying to recompile your hello world.cbp exemple it just dont want to excute it... and i get those warnings after compiling :

||=== HelloWorld, Win32 GCC Release ===|
libraries\irrBullet-0.1.8\examples\framework\exampleframework.cpp||In member function `irr::scene::IParticleSystemSceneNode* const CExampleFramework::createParticleSystem(const irr::core::vector3df&, irr::f32, irr::f32, const irr::video::SColor&, const irr::video::SColor&, irr::f32, irr::f32, irr::f32, const irr::core::dimension2df&, irr::core::dimension2df, const irr::core::stringc&, irr::f32, bool, irr::video::E_MATERIAL_TYPE, bool) const':|
libraries\irrBullet-0.1.8\examples\framework\exampleframework.cpp|214|warning: passing `irr::f32' for converting 3 of `virtual irr::scene::IParticleBoxEmitter* irr::scene::IParticleSystemSceneNode::createBoxEmitter(const irr::core::aabbox3df&, const irr::core::vector3df&, irr::u32, irr::u32, const irr::video::SColor&, const irr::video::SColor&, irr::u32, irr::u32, irr::s32, const irr::core::dimension2df&, const irr::core::dimension2df&)'|
libraries\irrBullet-0.1.8\examples\framework\exampleframework.cpp|214|warning: passing `irr::f32' for converting 4 of `virtual irr::scene::IParticleBoxEmitter* irr::scene::IParticleSystemSceneNode::createBoxEmitter(const irr::core::aabbox3df&, const irr::core::vector3df&, irr::u32, irr::u32, const irr::video::SColor&, const irr::video::SColor&, irr::u32, irr::u32, irr::s32, const irr::core::dimension2df&, const irr::core::dimension2df&)'|
libraries\irrBullet-0.1.8\examples\framework\exampleframework.cpp|214|warning: passing `irr::f32' for converting 7 of `virtual irr::scene::IParticleBoxEmitter* irr::scene::IParticleSystemSceneNode::createBoxEmitter(const irr::core::aabbox3df&, const irr::core::vector3df&, irr::u32, irr::u32, const irr::video::SColor&, const irr::video::SColor&, irr::u32, irr::u32, irr::s32, const irr::core::dimension2df&, const irr::core::dimension2df&)'|
libraries\irrBullet-0.1.8\examples\framework\exampleframework.cpp|214|warning: passing `irr::f32' for converting 8 of `virtual irr::scene::IParticleBoxEmitter* irr::scene::IParticleSystemSceneNode::createBoxEmitter(const irr::core::aabbox3df&, const irr::core::vector3df&, irr::u32, irr::u32, const irr::video::SColor&, const irr::video::SColor&, irr::u32, irr::u32, irr::s32, const irr::core::dimension2df&, const irr::core::dimension2df&)'|
libraries\irrBullet-0.1.8\examples\framework\exampleframework.cpp|214|warning: passing `irr::f32' for converting 9 of `virtual irr::scene::IParticleBoxEmitter* irr::scene::IParticleSystemSceneNode::createBoxEmitter(const irr::core::aabbox3df&, const irr::core::vector3df&, irr::u32, irr::u32, const irr::video::SColor&, const irr::video::SColor&, irr::u32, irr::u32, irr::s32, const irr::core::dimension2df&, const irr::core::dimension2df&)'|
libraries\irrBullet-0.1.8\examples\framework\exampleframework.cpp|244|warning: passing `irr::f32' for converting 1 of `virtual irr::scene::ISceneNodeAnimator* irr::scene::ISceneManager::createDeleteAnimator(irr::u32)'|
||=== Build finished: 0 errors, 6 warnings ===|


so what i did wrong?
[b].::|AK|::.[/b]
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: irrBullet 0.1.8 - Bullet physics wrapper

Post by mongoose7 »

Passing floats instead of ints?
Post Reply