I want to add an external force to a body with these settings:
The point of application should be in body frame, so that when the body moves, the force to 'follow' it.
But the direction of the force should be constant in x-direction of global frame.
Can someone help me how to do that using the API? I think I am doing it right, but I am not sure, because the visualization in the GUI is a bit tricky!
Here is my code now:
Code: Select all
PrescribedForce *prescribedForce = new PrescribedForce(&model.updBodySet().get("tibia_r"));
prescribedForce->setForceFunctions(new Constant(-110.0), new Constant(0.0), new Constant(0.0));
prescribedForce->setPointFunctions(new Constant(0.0), new Constant(-0.3), new Constant(0.0));
prescribedForce->setForceIsInGlobalFrame(true);
prescribedForce->setPointIsInGlobalFrame(false);
model.addForce(prescribedForce);