Main Content

addViewpoint

Add viewpoint for virtual reality animation

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.

example

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

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');

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