How do I set the transform of geometry within body?
Posted: Tue Mar 02, 2021 1:26 pm
Hello,
Could you please tell me how to set the position (transform) of multiple geometry files within a body using the MATLAB API. I.e., I would like to set the transform of 'cerv1.vtp' mesh as [0 0 0 0.0216 0.1179 0].
Any help is appreciated.
Thanks in advance,
Ross
Could you please tell me how to set the position (transform) of multiple geometry files within a body using the MATLAB API. I.e., I would like to set the transform of 'cerv1.vtp' mesh as [0 0 0 0.0216 0.1179 0].
Code: Select all
head = Body('head', headMass, Vec3(0), Inertia(1));
head.attachGeometry(Mesh('skull.vtp'));
head.attachGeometry(Mesh('jaw.vtp'));
head.attachGeometry(Mesh('cerv1.vtp'));
head.attachGeometry(Mesh('cerv2.vtp'));
head.attachGeometry(Mesh('cerv3.vtp'));
head.attachGeometry(Mesh('cerv4.vtp'));
head.attachGeometry(Mesh('cerv5.vtp'));
head.attachGeometry(Mesh('cerv6.vtp'));
head.attachGeometry(Mesh('cerv7.vtp'));
model.addBody(head);
Thanks in advance,
Ross