# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Posted: Fri Aug 03, 2012 8:48 pm

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

Top

 Posted: Sat Aug 04, 2012 8:41 pm

Joined: Sun Aug 07, 2011 5:27 am
Posts: 13
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

 Posted: Mon Aug 06, 2012 2:57 pm

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

 Posted: Tue Aug 07, 2012 1:53 pm

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 9 guests

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities