NVIDIAGameWorks / FleX

Other
650 stars 100 forks source link

How to read the restPositions as the object is deformed plastically? #52

Closed YunzhuLi closed 5 years ago

YunzhuLi commented 5 years ago

Referring from the original paper that the plastic deformation is implemented as "mixing the deformation back into the particle’s local-space rest position according to a plastic creep coefficient". I've tried to read the restPositions using the following command as the object is deformed plastically,

NvFlexGetRestParticles(g_solver, g_buffers->restPositions.buffer, nullptr);

Yet the numbers are still the same as what has been assigned initially.

May I ask how can I get the restPositions? or in other words, how can I obtain the information that's needed to restore the state of a plastically deforming object?

Thanks in advance!

YunzhuLi commented 5 years ago

"NvFlexGetRigids" seems to be the way to go.