addViewpoint (Aero.VirtualRealityAnimation) - Add viewpoint for virtual reality animation

Syntax

addViewpoint(h, parent_node, parent_field, node_name)
h.addViewpoint(parent_node, parent_field, node_name)
addViewpoint(h, parent_node, parent_field, node_name, description)
h.addViewpoint(parent_node, parent_field, node_name, description)
addViewpoint(h, parent_node, parent_field, node_name, description, position)
h.addViewpoint(parent_node, parent_field, node_name, description, position)
addViewpoint(h, parent_node, parent_field, node_name, description, position, orientation)
h.addViewpoint(parent_node, parent_field, node_name, description, position, orientation)

Description

addViewpoint(h, parent_node, parent_field, node_name) and h.addViewpoint(parent_node, parent_field, node_name) add a viewpoint named node_name whose parent_node is the parent node field of the vrnode object and whose parent_field is a valid parent field of the vrnode object to the virtual world animation object, h.

addViewpoint(h, parent_node, parent_field, node_name, description)and h.addViewpoint(parent_node, parent_field, node_name, description) add a viewpoint named node_name whose parent_node is the parent node field of the vrnode object and whose parent_field is a valid parent field of the vrnode object to the virtual world animation object, h. description is the string you want to describe the viewpoint.

addViewpoint(h, parent_node, parent_field, node_name, description, position) and h.addViewpoint(parent_node, parent_field, node_name, description, position) add a viewpoint named node_name whose parent_node is the parent node field of the vrnode object and whose parent_field is a valid parent field of the vrnode object to the virtual world animation object, h. description is the string you want to describe the viewpoint and position is the position of the viewpoint. Specify position using VRML coordinates (x y z).

addViewpoint(h, parent_node, parent_field, node_name, description, position, orientation) and h.addViewpoint(parent_node, parent_field, node_name, description, position, orientation) add a viewpoint named node_name whose parent_node is the parent node field of the vrnode object and whose parent_field is a valid parent field of the vrnode object to the virtual world animation object, h. description is the string you want to describe the viewpoint, position is the position of the viewpoint, and orientation is the orientation of the viewpoint. Specify position using VRML coordinates (x y z). Specify orientation in a VRML axes angle format (x y z Θ).

Examples

Add a viewpoint named chaseView.

h = Aero.VirtualRealityAnimation;
h.VRWorldFilename = [matlabroot,'/toolbox/aero/astdemos/vrtkoff.wrl'];
copyfile(h.VRWorldFilename,[tempdir,'vrtkoff.wrl'],'f');
h.VRWorldFilename = [tempdir,'vrtkoff.wrl'];
h.initialize();
h.addViewpoint(h.Nodes{2}.VRNode,'children','chaseView','View From Helicopter');

See Also

addRoute, removeViewpoint

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS