You should post it to bullet forums then, maybe they could fix it.Zurzaza wrote:I tried MLD (Valgrind for visual studio), but it seems that the leak is inside the core of bullet, I tried to remove it, but without success.serengeor wrote:try valgrind if you have a linux machine, it should give you some hints where to look at.Zurzaza wrote: New Features:
> Multithreaded Bullet (Bullet has some leaks [about 300-400 bytes] when using multithread, sorry but i can't solve them)
irrBP - An Irrlicht - Bullet Physics Wrapper
Working on game: Marrbles (Currently stopped).
License question
Hi all!
I have a question about irrBP license...more specifically, the 'share alike' clause, which states:
Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
If I have integrated the irrBP framework into my commercial project, and I make changes to irrBP, am I then required via the irrBP license to release my project source code under the creative commons 3 license?
Thanks in advance!
Jarrett
I have a question about irrBP license...more specifically, the 'share alike' clause, which states:
Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
If I have integrated the irrBP framework into my commercial project, and I make changes to irrBP, am I then required via the irrBP license to release my project source code under the creative commons 3 license?
Thanks in advance!
Jarrett
Re: License question
ehi chisser, sorry for my late reply, but i had problem with my pc during last days.
The SA condition of Creative Commons, is also called CopyLeft..
From wikipedia:
But, if you include a modified version of irrBP in any kind of project you had to distribute the resulting work on irrBP under the same or a similar license, but you may not distribute the entire project. Only the irrBP changes.
The SA condition of Creative Commons, is also called CopyLeft..
From wikipedia:
So, if you include irrBP in your commercial project, you haven't to share your application source code.Copyleft is a general method for making a program (or other work) free (libre), and requiring all modified and extended versions of the program to be free as well
But, if you include a modified version of irrBP in any kind of project you had to distribute the resulting work on irrBP under the same or a similar license, but you may not distribute the entire project. Only the irrBP changes.
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
The only irrlicht-physics wrapper that uses multithread technology.
gimbal lock
I have loaded a mesh, (node = smgr->getMesh("blabla") and created a ConvexHullBody (nodeBP = bpmgr->addConvexHullBody(node, 0.0, 1).
When I rotate the Irrlicht node (node->setRotation(x)) no gimbal lock, but the body is not updated. When I rotate the ConvexHullBody ( nodeBP ) I get a gimbal lock (89.699 degrees).
Any suggestions?
THX
When I rotate the Irrlicht node (node->setRotation(x)) no gimbal lock, but the body is not updated. When I rotate the ConvexHullBody ( nodeBP ) I get a gimbal lock (89.699 degrees).
Any suggestions?
THX
Re: gimbal lock
1) its because you can't rotate the node thats been assigned to physics body. Well you can, but it will go back to physics body rotation as the physics world updates again.spacetime wrote:I have loaded a mesh, (node = smgr->getMesh("blabla") and created a ConvexHullBody (nodeBP = bpmgr->addConvexHullBody(node, 0.0, 1).
When I rotate the Irrlicht node (node->setRotation(x)) no gimbal lock, but the body is not updated. When I rotate the ConvexHullBody ( nodeBP ) I get a gimbal lock (89.699 degrees).
Any suggestions?
THX
2) dunno.
Working on game: Marrbles (Currently stopped).
-
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
gimbal lock - workaround
Well I think I've found a workaround.
As mentioned I was able to rotate the Irrlicht scene node, which is a kind of actor in the EventReceiver by pressing a button. Code (simplyfied)
node->setRotation(node->getRotation()+vector3df(0.f, 2.f, 0.f));
using the same command on physics node produced a gimbal lock. Code
nodeBP->setRotation(nodeBP->getRotation()+vector3df(0.f, 2.f, 0.f));
(gimbal lock at 89.699)
Workaround:
node->setRotation(node->getRotation()+vector3df(0.f, 2.f, 0.f));
m_rotation->node->getRotation();
nodeBP->setRotation(m_rotation);
(No gimbal lock)
So basically I am repositioning the Irrlicht node, query the Position or rotation and set the physics node to it. Maybe not elegant, but it works
Could not see any negative side effects so far.
Serengor THX anyway
As mentioned I was able to rotate the Irrlicht scene node, which is a kind of actor in the EventReceiver by pressing a button. Code (simplyfied)
node->setRotation(node->getRotation()+vector3df(0.f, 2.f, 0.f));
using the same command on physics node produced a gimbal lock. Code
nodeBP->setRotation(nodeBP->getRotation()+vector3df(0.f, 2.f, 0.f));
(gimbal lock at 89.699)
Workaround:
node->setRotation(node->getRotation()+vector3df(0.f, 2.f, 0.f));
m_rotation->node->getRotation();
nodeBP->setRotation(m_rotation);
(No gimbal lock)
So basically I am repositioning the Irrlicht node, query the Position or rotation and set the physics node to it. Maybe not elegant, but it works
Could not see any negative side effects so far.
Serengor THX anyway
uhm, why do you not rotate the body, by simply using nodeBP->setRotation()? Any Modify to the irrlicht' node status (like rotation or position) won't be visible after a bullet step. Simply use that. If you rotate the body, the node would rotate too (same thing for the position)
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
The only irrlicht-physics wrapper that uses multithread technology.
gimbal lock - workaround
nodeBP is an actor which I want to move with the keyboard i.e. I do not want forces to apply on it in order to move it. Therefore I tried it in a simple way (by not using bullet's character controller or kinematic bodies / thanks ChaiRuiPeng anyway ).
The steering needs to be local, 'W' always forward 'S' backwards and so on.
Therefore my movement function is ('W' - forward)
I cannot use nodeBP because CIrrBPConvexHullBody does not have the needed function.
No need to setPosition for Irrlicht node as I wrote in my 2. post, it is updated automatically.
when I rotate the (physics)Body in a way
I got a gimbal lock
If i write
which I thought it is the same, I do not get gimbal lock. Note that I am using Irrlicht node to retrieve and calculate the rotation vector and then rotate the physics body (nodeBP), otherwise I get a gimbal lock
Again no need to setRotation to Irrlicht node, it is updated.
So use Irrlicht node to retrieve and calculate the rotation vector, store it in a variable and aply it then to the physics body nodeBP.
THX for suggestions, helped me clean up my code
The steering needs to be local, 'W' always forward 'S' backwards and so on.
Therefore my movement function is ('W' - forward)
Code: Select all
m_position = vector3df(0.f,0.f,2.f);
m_position.Z +=m_speed*m_frameDeltaTime;
node->getAbsoluteTransformation.transformVect(m_position);
nodeBP->setPosition(m_position);
No need to setPosition for Irrlicht node as I wrote in my 2. post, it is updated automatically.
when I rotate the (physics)Body in a way
Code: Select all
m_degree = 2.f*m_speed*m_frameDeltaTime;
nodeBP->setRotation(nodeBP->getRotation()+vector3df(0.f, m_degree, 0.f));
If i write
Code: Select all
m_degree = 2.f*m_speed*m_frameDeltaTime;
m_rotation = node->getRotation()+vector3df(0.f, m_degree, 0.f));
nodeBP->setRotation(m_rotation);
Again no need to setRotation to Irrlicht node, it is updated.
So use Irrlicht node to retrieve and calculate the rotation vector, store it in a variable and aply it then to the physics body nodeBP.
THX for suggestions, helped me clean up my code
problem with example_vehicle.cpp
Hi
I am trying to implement a car simulation. I just solved linking problems and compiled the example_vehicle.cpp. But nothing happened in response to mouse left click. My car (object) doesn't move even if I set the applyEngineForce() in the while(device->run()) loop. Is there any comment?
I am trying to implement a car simulation. I just solved linking problems and compiled the example_vehicle.cpp. But nothing happened in response to mouse left click. My car (object) doesn't move even if I set the applyEngineForce() in the while(device->run()) loop. Is there any comment?
Re: problem with example_vehicle.cpp
Hi, sorry for my delay but i had some problem this week.newleon wrote:Hi
I am trying to implement a car simulation. I just solved linking problems and compiled the example_vehicle.cpp. But nothing happened in response to mouse left click. My car (object) doesn't move even if I set the applyEngineForce() in the while(device->run()) loop. Is there any comment?
I found that problem and i'm looking for a solution. Thank you for your report, i'll write as soon as possible, when i'll have the solution.
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
The only irrlicht-physics wrapper that uses multithread technology.
Removing Constraint
I hope somebody can help.
I have attached a ball (dynamic object) to a hand (static object, I think mass =0 ) with a constraint
I tried also "buildP2PConstraint" and both options work.
The question is how to remove the constraint (when I throw the ball)
Gives me a compiler error
THX
I have attached a ball (dynamic object) to a hand (static object, I think mass =0 ) with a constraint
Code: Select all
m_constr=bmgr->buildConeTwistConstraint(hand,ball,vector3df(0,0,0),vector3df(0,0,0));
The question is how to remove the constraint (when I throw the ball)
Code: Select all
bmgr->getWorld()->getBulletWorldPtr()->removeConstraint(m_constr);
The same if I use P2PConstraint. Both require rigid bodies. Why is getBulletWorld() returning SoftRigidDynamicWorld ?no matching function for call to 'btSoftRigidDynamicsWorld::removeConstraint
THX
In the last SVN, that i've just released, there is a function called "removeConstraint" to remove the constraint.
In your example you were wrong twice:
1) If you call a "raw" bullet function, you need to use bullet's "raw" pointers, that you can extract with "getPtr()". Basically, you can't use a bullet function with a irrBP parameter, because irrBP is a layer over bullet, not just an extension
2) If you remove a constraint "manually" in the bullet world, you also need to manage the irrBP' constraint pointer manually, and that operation can result in an headache, so...avoid it!
My tip now is...download the lastest version from SVN and..good job!
In your example you were wrong twice:
1) If you call a "raw" bullet function, you need to use bullet's "raw" pointers, that you can extract with "getPtr()". Basically, you can't use a bullet function with a irrBP parameter, because irrBP is a layer over bullet, not just an extension
2) If you remove a constraint "manually" in the bullet world, you also need to manage the irrBP' constraint pointer manually, and that operation can result in an headache, so...avoid it!
My tip now is...download the lastest version from SVN and..good job!
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
The only irrlicht-physics wrapper that uses multithread technology.