Aero.Body Class
Namespace: Aero
Create body object for use with animation object
Description
Use the Aero.Body
class to create a body object for use with an
Aero.Animation
object. To use the Aero.Body
object, you
typically:
Create the animation body.
Configure or customize the body object.
Load the body.
Generate patches for the body. This step requires an axes from a figure.
Set the
timeseries
data source.Move or update the body.
By default, an Aero.Body
object natively uses aircraft
x-y-z
coordinates for the body geometry and the
timeseries
data. It expects the rotation order
z-y-x
(psi, theta, phi).
Convert timeseries
data from other coordinate systems by registering a
different CoordTransformFcn
function.
The Aero.Body
class is a handle
class.
Creation
h = Aero.Body
constructs a body for an animation object. The
animation object is returned in h
.
Properties
Name
— Name of body
''
(default) | character vector | string scalar
Name of body, specified as a character vector or string scalar.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: string
| char
CoordTransformFcn
— Function that controls coordinate transformation
@nullCoordTransform
(default) | function handle | character vector | string scalar
Function that controls coordinate transformation, specified as a function handle, character vector, or string scalar.
Attributes:
GetAccess | public |
SetAccess | public |
Position
— Position of body
[0 0 0]
(default) | MATLAB® array
Position of body, specified as a MATLAB array.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: double
Rotation
— Rotation of body
[0 0 0]
(default) | MATLAB array
Rotation of body, specified as a MATLAB array.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: double
Geometry
— Geometry of body
[1×1 Aero.Geometry]
(default) | handle
Geometry of body, specified as a handle.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: double
PatchGenerationFcn
— Patch generation function
@generatePatchesFromFvcData
(default) | function handle | character vector | string scalar
Patch generation function, specified as a function handle, character vector, or string scalar.
Attributes:
GetAccess | public |
SetAccess | public |
PatchHandles
— Patch handles
[]
(default) | MATLAB array
Patch handles, specified as a MATLAB array.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: double
ViewingTransform
— Viewing transform
[]
(default) | scalar
Viewing transform, specified as a scalar.
Attributes:
GetAccess | public |
SetAccess | public |
TimeSeriesSource
— Time series data source
timeseries
object | timetable
object |
StructureWithTime
| double precision array
Time series source, specified as a time series source.
The time series data property stored in and interpreted according to the
'TimeSeriesSourceType'
property.
Attributes:
GetAccess | public |
SetAccess | public |
TimeSeriesSourceType
— Type of timeseries
source
'Array6DoF'
(default) | 'Timeseries'
| 'Timetable'
| 'StructureWithTime'
| 'Array3DoF'
| 'Custom'
Type of timeseries
data stored in
'TimeSeriesSource'
property, specified as one of these
values:
timeseries Type | Description |
---|---|
| A double-precision array in |
| MATLAB
The values are resampled. |
| MATLAB
The values are resampled. |
| Simulink struct with time, for example, Simulink root outport logging
Signals are linearly interpolated versus time using
|
| A double-precision array in |
| Position and angle data are retrieved from
|
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: string
| char
TimeSeriesReadFcn
— timeseries
read function
@interp6DoFArrayWithTime
(default) | function handle | character vector | string
timeseries
read function, specified as a function handle,
character vector, or string.
Attributes:
GetAccess | public |
SetAccess | public |
Methods
Public Methods
findstartstoptimes | Return start and stop times of time series data |
generatePatches | Generate patches for body with loaded face, vertex, and color data |
load | Get geometry data from source |
move | Change animation body position and orientation |
update | Update body position and orientation as function of time |
Examples
Create Aero.Body
Object
h = Aero.Body
h = Body with properties: Name: '' CoordTransformFcn: @nullCoordTransform Position: [0 0 0] Rotation: [0 0 0] Geometry: [1x1 Aero.Geometry] PatchGenerationFcn: @generatePatchesFromFvcData PatchHandles: [] ViewingTransform: [] TimeSeriesSource: [] TimeSeriesSourceType: 'Array6DoF' TimeSeriesReadFcn: @interp6DoFArrayWithTime
Update Body
This example shows how to update the body, b
, with time in seconds of 5.
b = Aero.Body; b.load('pa24-250_orange.ac','Ac3d'); tsdata = [ ... 0, 1,1,1, 0,0,0; ... 10 2,2,2, 1,1,1; ]; b.TimeSeriesSource = tsdata; b.update(5);
Version History
Introduced in R2007a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)