About RigidBody's activation state

Post Reply
benny.mo.777
Posts: 5
Joined: Tue Jan 04, 2011 12:49 pm

About RigidBody's activation state

Post by benny.mo.777 »

Hi there,

Could someone please explain what the meaning of each state below ?? or Can I find in a manual ?

src/BulletCollision/CollisionDispatch/btCollisionObject.h
---------------------------------------------
#define ACTIVE_TAG 1
#define ISLAND_SLEEPING 2
#define WANTS_DEACTIVATION 3
#define DISABLE_DEACTIVATION 4
#define DISABLE_SIMULATION 5
----------------------------------------------

I guess ACTIVE_TAG means active (Good guess,huh ?) so that the object having the state could be moved in a step simulation.
Anyways, I don't understand the others...hmm...

Thanks.
-benney
lulzfish
Posts: 43
Joined: Mon Jan 03, 2011 4:26 pm

Re: About RigidBody's activation state

Post by lulzfish »

DISABLE_DEACTIVATION sounds familiar, I believe that makes a body active forever, used for something like a player-controlled object.

DISABLE_SIMULATION could do the opposite, making a body deactivated forever.

Then I'd guess that ISLAND_SLEEPING means the body, and its island, are asleep, since Bullet sleeps objects per-island.

And finally, WANTS_DEACTIVATION means that it's an active object trying to fall asleep, and Bullet is keeping an eye on its velocity for the next few frames to see if it's a good candidate. You probably don't need to set this one manually.

So there's 5 decent guesses. It should really be in the wiki or something.
benny.mo.777
Posts: 5
Joined: Tue Jan 04, 2011 12:49 pm

Re: About RigidBody's activation state

Post by benny.mo.777 »

Hi, lulzfish.

Thanks a lot !

I almost understood but one more question came up to me according to ur answer.
What's the definition of a term "island" ? Is it a common term in physics in general ? or in bullet ??

Thanks in advance.
-Benny
lulzfish
Posts: 43
Joined: Mon Jan 03, 2011 4:26 pm

Re: About RigidBody's activation state

Post by lulzfish »

I'm pretty sure an island is a group of dynamic (or maybe kinematic as well) bodies that are connected by constraints or contacts.

So if you have two stacks of boxes, and the stacks are not touching, then each stack is an island. If a box falls off its stack and bounces away, it may split off onto a third island.

Bullet appears to put objects to sleep per-island, by waiting until every body in an island is stopped, then freezing them all at once. This is why the sleeping constant is called ISLAND_SLEEPING, it means the whole island is asleep.

I think it's a general physics simulation term.
benny.mo.777
Posts: 5
Joined: Tue Jan 04, 2011 12:49 pm

Re: About RigidBody's activation state

Post by benny.mo.777 »

Hi lulzfish,

Thanks again !

Oh, is It a general physics term ?? hm... I couldn't find any on google.
Anyway, I understand now.

I've just dived into bullet and even c, c++ a couple of weeks ago so I'm having hard days...
I must be used to it asap or my boss is gonna kill me. :p

Love ya !
-Benny
TheJosh
Posts: 17
Joined: Tue Jan 24, 2012 5:39 am

Re: About RigidBody's activation state

Post by TheJosh »

lulzfish wrote:It should really be in the wiki or something.
http://bulletphysics.org/mediawiki-1.5. ... ion_States
Post Reply