moveBody - Class: Aero.Animation
Package: Aero
Move body in animation object
Syntax
moveBody(h,idx,translation,rotation)
h.moveBody(idx,translation,rotation)
Description
moveBody(h,idx,translation,rotation) and h.moveBody(idx,translation,rotation) set
a new position and attitude for the body specified with the index idx in
the animation object h. translation is
a 1-by-3 matrix in the aerospace body coordinate system. rotation is
a 1-by-3 matrix, in radians, that specifies the rotations about the
right-hand x-y-z sequence of coordinate
axes. The order of application of the rotation is z-y-x (R-Q-P).
Inputs
| h | Animation object. |
| translation | 1-by-3 matrix in the aerospace body coordinate system. |
| rotation | 1-by-3 matrix, in radians, that specifies the rotations about
the right-hand x-y-z sequence of coordinate
axes. |
| idx | Body specified with this index. |
Examples
Move the body with the index 1 to position offset from the original
by + [0 0 -3] and rotation, rot1.
h = Aero.Animation;
idx1 = h.createBody('pa24-250_orange.ac','Ac3d');
pos1 = h.Bodies{1}.Position;
rot1 = h.Bodies{1}.Rotation;
h.moveBody(1,pos1 + [0 0 -3],rot1);
 | move (Aero.Node) | | Node (Aero.Node) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit