Code structure.
The code is organized into 7 main files.
- "Main.cs".
- "ConstraintPoints.cs": Governs the behavior of the handles.
- "ScaleFreeConstruction.cs": Performs the first step of the algorithm (prevention of the non-uniform stretching and shearing).
- "ScaleAdjustment.cs": Part I of the second step of the algorithm (adjusting the scale).
- "ScaleAdjustment2.cs": Part II of the second step of the algorithm (fixing the rotation).
- "Util.cs": Contains some helper functions (mostly for matrix computations) used in all the other files.
- "ButtonControls.cs": The UI contains several buttons (e.g. "mark an interest point", "extract motion", "transfer motion", etc.). This file governs their behavior. All the C++ functions from the GraphTrack plugin are imported and called here.
Each of the files "ScaleFreeConstruction.cs", "ScaleAdjustment.cs", and "ScaleAdjustment2.cs" contains two functions: InitialComputations() and Step(). InitialComputations() computes some of the values (matrices) which are fixed for a given mesh, and only need to be computed once, in the beginning (notably