createBody (Aero.Animation) - Create body for animation object

Syntax

idx = createBody(h,bodyDataSrc)
idx = h.createBody(bodyDataSrc)
idx = createBody(h,bodyDataSrc,geometrysource)
idx = h.createBody(bodyDataSrc,geometrysource)

Description

idx = createBody(h,bodyDataSrc) and idx = h.createBody(bodyDataSrc) create a new body using the bodyDataSrc, makes its patches, and adds it to the animation object h. This command assumes a default geometry source type set to Auto.

idx = createBody(h,bodyDataSrc,geometrysource) and idx = h.createBody(bodyDataSrc,geometrysource) create a new body using the bodyDataSrc file, makes its patches, and adds it to the animation object h. geometrysource is the geometry source type for the body.

By default geometrysource is set to Auto, which recognizes .mat extensions as MAT-files, .ac extensions as Ac3d files, and structures containing fields of name, faces, vertices, and cdata as MATLAB® variables. If you want to use alternate file extensions or file types, enter one of the following:

Examples

Create a body for the animation object, h. Use the Ac3d format data source pa24-250_orange.ac, for the body.

h = Aero.Animation;
idx1 = h.createBody('pa24-250_orange.ac','Ac3d');

See Also

addBody, moveBody, play, removeBody, show, updateBodies

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS