NVIDIAGameWorks / FleX

Other
646 stars 99 forks source link

Documentation for SetRigids neglects soft body case #131

Open ixchow opened 2 years ago

ixchow commented 2 years ago

At NvFlex.h:692, a note says:

A particle should not belong to more than one rigid body at a time.

But this isn't actually true. Rigid clusters appear to enforce shape-matching constraints, and it is often the case that it is useful for particles to participate in several such constraints (see, e.g., flexExtSoft.cpp's NvFlexExtCreateSoftFromMesh which adds each particles to, potentially, 2-3 clusters, if I understand correctly).

I suggest that this note be removed and the documentation be improved to indicate that SetRigid establishes a shape matching constraint, and that particles may belong to several constraints at once.