Main Content

addRoute (Aero.VirtualRealityAnimation)

Add VRML ROUTE statement to virtual reality animation

Syntax

addRoute(h, nodeOut, eventOut, nodeIn, eventIn)
h.addRoute(nodeOut, eventOut, nodeIn, eventIn)

Description

addRoute(h, nodeOut, eventOut, nodeIn, eventIn) and h.addRoute(nodeOut, eventOut, nodeIn, eventIn) add a VRML ROUTE statement to the virtual reality animation, where nodeOut is the node from which information is routed, eventOut is the event (property), nodeIn is the node to which information is routed, and eventIn is the receiving event (property).

Examples

Add a ROUTE command to connect the Plane position to the Camera1 node.

h = Aero.VirtualRealityAnimation;
h.VRWorldFilename = [matlabroot,'/examples/aero/data/asttkoff.wrl'];
copyfile(h.VRWorldFilename,[tempdir,'asttkoff.wrl'],'f');
h.VRWorldFilename = [tempdir,'asttkoff.wrl'];
h.initialize();
h.addNode('Lynx',[matlabroot,'/examples/aero/data/chaseHelicopter.wrl']);
h.addRoute('Plane','translation','Camera1','translation');

Version History

Introduced in R2007b

See Also