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.

createBody

Class: Aero.Animation
Package: Aero

Create body and its associated patches in animation

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.

Input Arguments

bodyDataSrcSource of data for body.
geometrysourceGeometry source type for body:
  • Auto — Recognizes .mat extensions as MAT-files, .ac extensions as Ac3d files, and structures containing fields of name, faces, vertices, and cdata as MATLAB® variables. Default.

  • Variable — Recognizes structures containing fields of name, faces, vertices, and cdata as MATLAB variables.

  • MatFile — Recognizes .mat extensions as MAT-files.

  • Ac3d — Recognizes .ac extensions as Ac3d files.

  • Custom — Recognizes custom extensions.

Output Arguments

idxIndex of the body to be created.

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');
Was this topic helpful?