Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Aug 03, 2012 8:48 pm 
Offline

Joined: Fri Aug 03, 2012 8:39 pm
Posts: 7
Hi....

I'm new to bullet physics and have worked with rigid bodies until now. I came to work with soft bodies this week and still have some points to clarify - concerning my use cases.
The point I need some understanding for this thread is about linear/angular constrain to tow dimensional movements. For rigid bodies I know there's setLinearFactor() and setAngularFactor() functions which do the job.

The question is, is there a way I can achieve the same thing for soft bodies? As far as I could understand, with a soft body forces, impulses, collisions and so on are handled by body's node, would that be a limitation to constrain entire body's movements? Is there any alternative to do so?

Thanks,

PS: This is my first post/question in the bullets forum so be kind to me :D


Top
 Profile  
 
PostPosted: Sat Aug 04, 2012 8:41 pm 
Offline

Joined: Sun Aug 07, 2011 5:27 am
Posts: 12
To constrain two softbodies toghether


btSoftBody::LJoint::Specs ls;
ls.cfm = 1;
ls.erp = 1;
ls.position = btVector3(0, 0, 0);
BodyA->appendLinearJoint(ls,BodyB);



btSoftBody::AJoint::Specs aspecs;
aspecs.cfm = 1;
aspecs.erp = 1;
aspecs.axis = btVector3(0,0,0);

BodyA->appendAngularJoint(aspecs,BodyB);


Hope this helps you


Top
 Profile  
 
PostPosted: Mon Aug 06, 2012 2:57 pm 
Offline

Joined: Fri Aug 03, 2012 8:39 pm
Posts: 7
Hi Xcoder79,

I'm not sure how a two soft bodies joint can help me to limit linear and angular movements but I'm giving it a try.

I'm also trying to cluster a soft and a rigid body(despite I'm still not sure what a cluster means in physics simulation context, I just saw somewhere in the forum it's possible).

Thanks a lot.


Top
 Profile  
 
PostPosted: Tue Aug 07, 2012 1:53 pm 
Offline

Joined: Fri Aug 03, 2012 8:39 pm
Posts: 7
Hi Xcoder79,

Your tip helped me to solve my issues. Actually I added a rigid body to my simulation and added it to the linear joint. Limited the linear moving on the rigid body side - with rigidBody->setLinearFactor(1, 1, 0). I didn't need to add the rigid body to the angular joint since it has already done the trick with aspecs.axis = btVector3(0,0,1); as you suggested. As a final step I have anchored some soft body's nodes to the rigid one - with softBody->appendAnchor(i, rigidBody);

Any way, is that(joining rigid and soft bodies) what people say to be body clustering?

Thanks a lot for your help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group