Closed GoogleCodeExporter closed 9 years ago
By the way, the files attached above were modifications of the r2379 repository
code, so they should be basically up-to-date (as of today).
Original comment by dave.bru...@gmail.com
on 9 Apr 2011 at 8:04
Just noticed this issue
http://code.google.com/p/bullet/issues/detail?id=470
So, majestik also implemented something to allow for manual rest length
updates. However, judging from his code, there is only minimal overlap (though
probably still some), since he implemented a scaling of the rest length, while
I just created (from code extracted from updateConstants()) a function that
sets the rest length as the current link lengths.
Original comment by dave.bru...@gmail.com
on 9 Apr 2011 at 8:57
Thanks a lot for your work.
Do you mind integrating majestik's rest length update in your patch?
Original comment by erwin.coumans
on 9 Apr 2011 at 9:02
Ok, I've updated my patch with majestik's code (along with a slight fix in my
own) in this attached file.
Note: I modified his implementation slightly so that scaling resting lengths is
a one-time event to all existing links explicitly when the user calls
setRestLengthScale, and not also implicitly to every new link added after a
scaling event. I believe this results in more "expected" behaviour for the
user. I also modified his member names slightly for clarity (for example,
m_restLength to m_restLengthScale).
Original comment by dave.bru...@gmail.com
on 10 Apr 2011 at 9:29
Attachments:
I modified dave.bru's patch and attached it here. This patch splits
updateConstants method into three methods: resetLinkRestLengths,
updateLinkConstants and updateArea. So calling updateConstants will work as it
did and give us the backward compatibility. When people want to update a
specific thing like area or link constants, individual method can be called.
Regarding updating areas for nodes, updateArea method has a parameter and can
switch between averaging areas of adjacent faces or one third of sum of
adjacent faces. The first approach is what Bullet has been using. To ensure the
backward compatibility, the default is the first approach. The second one is
more accurate but breaks Init_Volume demo in AppSoftBodyDemo project.
Original comment by saggitas...@gmail.com
on 28 Aug 2012 at 6:58
Attachments:
This issue was closed by revision r2557.
Original comment by erwin.coumans
on 9 Sep 2012 at 5:22
Original issue reported on code.google.com by
dave.bru...@gmail.com
on 9 Apr 2011 at 8:01Attachments: