Main Content


Class: Aero.Animation
Namespace: Aero

Add body to animation object


idx = addBody(h,b)


idx = addBody(h,b) adds a loaded body, b, to the animation object, h, generates patches for the body, and returns the index of the body in idx.

Input Arguments

expand all

Aerospace animation object, specified as an Aero.Animation object.

Loaded animation body, specified as a scalar.

Output Arguments

expand all

Body index, returned as a scalar.


expand all

Add a second animation body to a list that is a pointer to the first body. If you change the properties of one body, the properties of the other body change correspondingly.

h = Aero.Animation;
idx1 = createBody(h,'','Ac3d');
b = h.Bodies{1};
idx2 = addBody(h,b)
idx2 = 2

Version History

Introduced in R2007a