Main Content

addBody

Class: Aero.Animation
Namespace: Aero

Add body to animation object

Syntax

idx = addBody(h,b)

Description

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.

Examples

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,'pa24-250_orange.ac','Ac3d');
b = h.Bodies{1};
idx2 = addBody(h,b)
idx2 = 
2

Version History

Introduced in R2007a