- 
                Notifications
    You must be signed in to change notification settings 
- Fork 348
Open
Description
It is common with our measurement setup that the markers need to be globally rotated prior to use.
The java bindings have a way to rotate marker tables:
| function rotateTable(self, table, axisString, value) | 
OpenSenseUtils contains an orientation table rotation utility:
| static void rotateOrientationTable( | 
There should be a similar utility for marker rotation. I usually use a simple function like this but it would be nice to have this as part of the API:
void rotateMarkerTable(
        OpenSim::TimeSeriesTableVec3& table,
        const SimTK::Rotation_<double>& rotationMatrix)
{
    const SimTK::Rotation R_XG = rotationMatrix;
    int nc = int(table.getNumColumns());
    size_t nt = table.getNumRows();
    for (size_t i = 0; i < nt; ++i) {
        auto row = table.updRowAtIndex(i);
        for (int j = 0; j < nc; ++j) {
            row[j] = R_XG * row[j];
        }
    }
    return;
}Metadata
Metadata
Assignees
Labels
No labels