Skip to content
Snippets Groups Projects
ExampleTrackInterpolation.x3d 4.88 KiB
<X3D profile='Interchange' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'>
  <head>
    <meta content='ExampleTrackInterpolation.x3d' name='title'/>
    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
    <meta content='1 January 2022' name='created'/>
    <meta content='30 May 2022' name='modified'/>
    <meta content='Don Brutzman' name='creator'/>
    <meta content='https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleTrackInterpolation.x3d' name='identifier'/>
    <meta content='PduTrack utility, opendis7-java Library https://github.com/open-dis/opendis7-java' name='generator'/>
    <meta content='NPS MOVES MV3500 Networked Graphics https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500' name='reference'/>
    <meta content='X3D Resources https://www.web3d.org/x3d/content/examples/X3dResources.html' name='reference'/>
    <meta content='X3D Scene Authoring Hints https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html' name='reference'/>
    <meta content='X3D Tooltips https://www.web3d.org/x3d/tooltips/X3dTooltips.html' name='reference'/>
    <meta content='X3D Validator https://savage.nps.edu/X3dValidator' name='reference'/>
    <meta content='Open source https://raw.githubusercontent.com/open-dis/opendis7-java/master/license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='PduTrackInterpolation.x3d'/>
    <TimeSensor DEF='testing123Clock' cycleInterval='42.0' loop='true'/>
    <PositionInterpolator DEF='testing123Positions' key='0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0' keyValue='
0.0 0.0 0.0,
0.0 1.0 0.0,
0.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,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 0.0'/>
    <ROUTE fromField='fraction_changed' fromNode='testing123Clock' toField='set_fraction' toNode='testing123Positions'/>
    <ROUTE fromField='fraction_changed' fromNode='testing123Clock' toField='set_fraction' toNode='testing123Orientations'/>
    <Shape>
      <Appearance DEF='TrackAppearance'>
        <Material emissiveColor='0.2 0.8 0.8'/>
      </Appearance>
      <LineSet vertexCount='42'>
        <Coordinate point='
0.0 0.0 0.0,
0.0 1.0 0.0,
0.0 2.0 0.0,
0.0 3.0 0.0,
0.0 4.0 0.0,
0.0 5.0 0.0,
0.0 6.0 0.0,
0.0 7.0 0.0,
0.0 8.0 0.0,
0.0 9.0 0.0,
0.0 10.0 0.0,
1.0 10.0 0.0,
2.0 10.0 0.0,
3.0 10.0 0.0,
4.0 10.0 0.0,
5.0 10.0 0.0,
6.0 10.0 0.0,
7.0 10.0 0.0,
8.0 10.0 0.0,
9.0 10.0 0.0,
10.0 10.0 0.0,
10.0 9.0 0.0,
10.0 8.0 0.0,
10.0 7.0 0.0,
10.0 6.0 0.0,
10.0 5.0 0.0,
10.0 4.0 0.0,
10.0 3.0 0.0,
10.0 2.0 0.0,
10.0 1.0 0.0,
10.0 0.0 0.0,
9.0 0.0 0.0,
8.0 0.0 0.0,
7.0 0.0 0.0,
6.0 0.0 0.0,
5.0 0.0 0.0,
4.0 0.0 0.0,
3.0 0.0 0.0,
2.0 0.0 0.0,
1.0 0.0 0.0,
0.0 0.0 0.0,
-1.0 0.0 0.0'/>
      </LineSet>
    </Shape>
    <Transform DEF='AnimationTransform'>
      <Transform rotation='0 0 1 1.57'>
        <Shape>
          <Appearance USE='TrackAppearance'/>
          <Cone bottomRadius='0.5'/>
        </Shape>
      </Transform>
    </Transform>
    <ROUTE fromField='value_changed' fromNode='testing123Positions' toField='translation' toNode='AnimationTransform'/>
    <ROUTE fromField='value_changed' fromNode='testing123Orientations' toField='rotation' toNode='AnimationTransform'/>
  </Scene>
</X3D>