Skip to content

Instantly share code, notes, and snippets.

@serguei-k
Last active December 29, 2018 06:32
Show Gist options
  • Save serguei-k/673bcdc5f5daf7559d686bd9c6a5f16a to your computer and use it in GitHub Desktop.
Save serguei-k/673bcdc5f5daf7559d686bd9c6a5f16a to your computer and use it in GitHub Desktop.
Variable FK 1
MMatrix localXform;
localXform[3][0] = length / double(sampleCount);
MMatrix parentXform;
for (auto i = 0; i < sampleCount; ++i)
{
MMatrix xform = i != 0 ? localXform : MMatrix::identity;
xform *= parentXform;
for (auto j = 0; j < controlCount; ++j)
{
// apply transformations ...
}
parentXform = xform;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment