Main Content

move

Class: Aero.Node
Namespace: Aero

Change node position and orientation versus time data

Syntax

move(h,translation,rotation)

Description

move(h,translation,rotation) sets a new position and orientation for the body object h.

Input Arguments

expand all

Aerospace node object, specified as an instance of the Aero.Node class.

Translation matrix, specified as a 1-by-3 matrix. translation is defined in the aerospace body x-y-z coordinate system or another coordinate system.

If translation is defined in another coordinate system, you can use the CoordtransformFcn function to move it to an aerospace body. The specified aerospace body coordinate system is defined relative to the screen as x-left, y-in, z-down.

Data Types: double

Node rotation, specified by a 1-by-3 matrix in radians. The rotation is specified as an Euler angle about the right-hand x-y-z coordinate axes. The order of application of the rotation is z-y-x (yaw, pitch, and roll (Y-P-R)).

Data Types: double

Examples

expand all

Use the Simulink® 3D Animation™ vrnode/getfield function to retrieve the translation and rotation. These coordinates are those used in the animation software.

h = Aero.VirtualRealityAnimation;
h.VRWorldFilename = 'asttkoff.wrl';
h.initialize();

Figure VR Plane Take-Off contains objects of type hgjavacomponent, uimenu, uipanel, uitoolbar.

newtrans = getfield(h.Nodes{2}.VRNode,'translation') - [0 40 6];
newrot = [0.4 0.3 0.1];
h.Nodes{2}.move(newtrans,newrot);

Version History

Introduced in R2007b

See Also