1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
|
3 | <X3D profile='Immersive' version='3.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'> |
4 | <head> |
5 | <component level='1' name='NURBS'/> |
6 | <meta name='title' content='NurbsPositionInterpolatorExample.x3d'/> |
7 | <meta name='description' content='Example of animating a ball along a NurbsCurve.'/> |
8 | <meta name='creator' content='Charles Adams'/> |
9 | <meta name='created' content='26 February 2003'/> |
10 | <meta name='modified' content='20 October 2019'/> |
11 | <meta name='reference' content='http://edocs.nps.edu/npspubs/scholarly/theses/2003/Jun/03Jun_Adams.pdf'/> |
12 | <meta name=' warning ' content=' under development, needs to be upgraded to final version of X3D NURBS nodes '/> |
13 | <meta name='subject' content='NURBS Position Interpolator'/> |
14 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/NURBS/NurbsPositionInterpolatorExample.x3d'/> |
15 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
16 | <meta name='license' content='../license.html'/> |
17 | </head> |
18 | <Scene> |
19 | <WorldInfo title='NurbsPositionInterpolatorExample.x3d'/> |
20 | <Viewpoint description='NurbsPositionInterpolator path' position='11 4.6 18'/> |
21 |
<!-- ROUTE information for ts node:
[from fraction_changed to npi.set_fraction
]
-->
<TimeSensor DEF='ts' cycleInterval='4' loop='true'/> |
22 |
<!-- ROUTE information for npi node:
[from ts.fraction_changed to set_fraction
]
[from value_changed to ball.set_translation
]
-->
<NurbsPositionInterpolator DEF='npi' knot='0 .25 .5 .75 1' order='4'> |
23 | <Coordinate containerField='controlPoint' point='4 6 0 7 12 0 11 6 0 15 2 0 20 6 0'/> |
24 | </NurbsPositionInterpolator> |
25 |
<!-- ROUTE information for ball node:
[from npi.value_changed to set_translation
]
-->
<Transform DEF='ball'> |
26 | <Shape> |
27 | <Appearance> |
28 | <Material diffuseColor='1 1 0'/> |
29 | </Appearance> |
30 | <Sphere/> |
31 | </Shape> |
32 | </Transform> |
33 | <Shape> |
34 | <NurbsCurve DEF='nc' order='4' tessellation='30' containerField='geometry'> |
35 | <Coordinate containerField='controlPoint' point='4 6 0 7 12 0 11 6 0 15 2 0 20 6 0'/> |
36 | </NurbsCurve> |
37 | <Appearance> |
38 | <Material emissiveColor='1 1 1'/> |
39 | </Appearance> |
40 | </Shape> |
41 | < ROUTE fromNode='ts' fromField='fraction_changed' toNode='npi' toField='set_fraction'/> |
42 | < ROUTE fromNode='npi' fromField='value_changed' toNode='ball' toField='set_translation'/> |
43 | </Scene> |
44 | </X3D> |
Event Graph ROUTE Table with 2 ROUTE connections total, showing X3D event-model relationships for this scene.
Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.
ts
TimeSensor fraction_changed SFFloat |
npi
NurbsPositionInterpolator set_fraction SFFloat |
then
|
npi
NurbsPositionInterpolator value_changed SFVec3f |
ball
Transform set_translation SFVec3f |
<!--
Color legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->