play
(To be removed) Animate virtual reality world for given position and angle in time series data
play
will be removed in a future release.
Syntax
Description
play(
animates the
virtual reality world in h
)h
for the current
TimeseriesDataSource
at the specified rate given by the
'TimeScaling'
property (in seconds of animation data per
second of wall-clock time) and animated at a certain number of frames per second
using the 'FramesPerSecond'
property.
Examples
Animate Virtual Reality World
This example shows how to animate the virtual reality world, asttkoff
.
h = Aero.VirtualRealityAnimation;
h.FramesPerSecond = 10;
h.TimeScaling = 5;
h.VRWorldFilename = 'asttkoff.wrl';
h.initialize();
load takeoffData [~, idxPlane] = find(strcmp('Plane', h.nodeInfo)); h.Nodes{idxPlane}.TimeSeriesSource = takeoffData; h.Nodes{idxPlane}.TimeSeriesSourceType = 'StructureWithTime'; h.Nodes{idxPlane}.CoordTransformFcn = @vranimCustomTransform; h.play();
Input Arguments
h
— Virtual reality animation object
Aero.VirtualRealityAnimation
object
Virtual reality animation object, specified as an Aero.VirtualRealityAnimation
object.
More About
Algorithm
The time series data is interpreted according to the
'TimeSeriesSourceType'
property, which can be one of:
'timeseries' | MATLAB® time series data with six values per time:
The values are resampled. |
'Simulink.Timeseries' | Simulink.Timeseries (Simulink® signal logging):
|
'StructureWithTime' | Simulink struct with time (for example, Simulink root outport logging
Signals are linearly interpolated vs. time
using |
'Array6DoF' | A double-precision array in n rows and 7
columns for 6-DoF data: time x y z phi theta psi .
If a double-precision array of 8 or more columns is in
'TimeSeriesSource' , the first 7 columns are
used as 6-DoF data. |
'Array3DoF' | A double-precision array in n rows and 4
columns for 3-DoF data: time x z theta . If a
double-precision array of 5 or more columns is in
'TimeSeriesSource' , the first 4 columns are
used as 3-DoF data. |
'Custom' | Position and angle data is retrieved from
'TimeSeriesSource' by the currently
registered 'TimeseriesReadFcn' . |
The time advancement algorithm used by play
is based on
animation frames counted by ticks:
ticks = ticks + 1; time = tstart + ticks*FramesPerSecond*TimeScaling;
where
TimeScaling | Specify the seconds of animation data per second of wall-clock time. |
FramesPerSecond | Specify the number of frames per second used to animate the
'TimeSeriesSource' . |
For default 'TimeseriesReadFcn'
methods, the last frame played
is the last time value.
Time is in seconds, position values are in the same units as the geometry data loaded into the animation object, and all angles are in radians.
Version History
Introduced in R2007bR2024b: To be removed
Aero.VirtualRealityAnimation
will be removed in a future release.
See Also
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 (한국어)