- This topic has 4 replies, 2 voices, and was last updated 5 years ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › [SOLVED] How to set a node's rotation in the c++ code?
Tagged: 64_bits, rotation node, SOFA_1906, Windows_10
Anyone know how to set a node’s rotation using the c++ code? the node is just one of any element.
Imagine a series of linked beams. As far as i konw, from the “KU=P” equitions, we can get the displacement vector “U”, but the radian in “U” is not the same as euler angles, so one can not just use euler angle to change a node’s rotation. so how to roate a node?
Hi @charles,
You can specify to your MechanicalObject (containing the rigid frames) their position and orientation with a quaternion.
I think the ArticulatedSystemMapping is close to what you need but I remember struggling a bit myself using it, but it’s worth having a look (in examples/Components/mapping)
Best
Hugo
i have solved the problem, not by looking at the source code though. it turns out a normal question in area which need to compute the orientation of a object, like computer graphic or robot control etc,and so many others.
and by the way,how to @ someone in a topic?
It turns out to be a normal question in field of robot control or computer graphics, i see now. Thanks all the same.
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.