Main Content

addViewpoint

(To be removed) Add viewpoint for virtual reality animation

addViewpoint will be removed in a future release.

Description

addViewpoint(h, parent_node, parent_field, node_name) adds a viewpoint node_name with parent_node and parent_field to the virtual world animation object, h.

addViewpoint(___, description) adds a viewpoint named described by description.

addViewpoint(___,position) adds a viewpoint with position position.

example

addViewpoint(___, orientation) adds a viewpoint with orientation orientation.

addViewpoint(description) adds a viewpoint with the Simulink® 3D Animation™ vrnode/setfield (Simulink 3D Animation) function. This requires you to use VRML coordinates.

Examples

collapse all

This example shows how to add a viewpoint named chaseView.

h = Aero.VirtualRealityAnimation;
h.VRWorldFilename = 'asttkoff.wrl';
h.initialize();
h.addViewpoint(h.Nodes{2}.VRNode,'children','chaseView','View From Helicopter');

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

Input Arguments

collapse all

Virtual reality animation object, specified as an Aero.VirtualRealityAnimation object.

vrworld node name, specified as a character vector or string. This name must be unique from other node names in the same .wrl file. The wrl_file must contain the node to be added.

Data Types: char | string

Parent node field of the vrnode object, specified as a character vector or string.

Valid parent field of the vrnode object, specified as a character vector or string.

Valid parent field of the vrnode object, specified as a character vector or string.

Position of the viewpoint object, specified as a character vector or string. Specify position using VRML coordinates (x y z).

Orientation of the viewpoint object, specified as a character vector or string. Specify orientation in a VRML axes angle format (x y z Θ).

Version History

Introduced in R2007b

expand all