Skip to content

Commit 4c6ca72

Browse files
committed
document distlimit functionality in ragdoll
1 parent a612bb1 commit 4c6ca72

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/engine/model/ragdoll.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ class ragdollskel final
6969
};
7070
std::vector<rotfriction> rotfrictions;
7171

72+
//a distance constraint between two specified vertices
73+
//vert specifies the indices of the vertices in the verts vector, and
74+
//min/maxdist the limits to keep them within
7275
struct distlimit final
7376
{
7477
int vert[2];
@@ -214,6 +217,16 @@ class ragdolldata final
214217
*/
215218
void calcboundsphere();
216219
void constrain(vec &cwall);
220+
221+
/**
222+
* @brief Adds weights to keep pairs of vertices within specified bounds
223+
*
224+
* For each vertex pair in the defined distlimits vector, adds weights to
225+
* those verts to pull or push those vertices to lie within the specified min/maxdist
226+
* distance apart.
227+
*
228+
* Modifies vertex weights and newpos fields and no other components of ragdolldata.
229+
*/
217230
void constraindist();
218231

219232
/**

0 commit comments

Comments
 (0)