Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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).

Input Arguments

hAnimation object.
translation1-by-3 matrix in the aerospace body coordinate system.
rotation1-by-3 matrix, in radians, that specifies the rotations about the right-hand x-y-z sequence of coordinate axes.
idxBody 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);
Was this topic helpful?