<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
<X3D profile='Immersive' version='3.2 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.2.xsd '>
<head>
<component level='2name='RigidBodyPhysics'/>
<meta name='titlecontent='MovingBody.x3d'/>
<meta name='descriptioncontent='Example scene for RigidBodyPhysics component'/>
<meta name='creatorcontent='Alan Hudson and Justin Couch'/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='1 January 2008'/>
<meta name='translatedcontent='26 December 2008'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent=' http://www.xj3d.org/extensions/index.html#Physics '/>
<meta name='referencecontent='originals/moving_body.x3dv'/>
<meta name='referencecontent=' https://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/rigid_physics.html '/>
<meta name=' warning content=' under development '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/MovingBody.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='generatorcontent='Xj3D converter, http://www.xj3d.org'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo title='MovingBody.x3d'/>
<Group>
<CollidableShape DEF='SPHERE-GEOM-1'>
<Shape containerField='shape'>
<Appearance>
<Material emissiveColor='1.0 0.0 0.0'/>
</Appearance>
<Sphere radius='0.2'/>
</Shape>
</CollidableShape>
<CollidableShape DEF='SPHERE-GEOM-2'>
<Shape containerField='shape'>
<Appearance>
<Material emissiveColor='0.0 0.0 1.0'/>
</Appearance>
<Sphere radius='0.2'/>
</Shape>
</CollidableShape>
</Group>
<!-- ROUTE information for BODY-COLLECTION node:  [from COLLISION-OUTPUT.contacts to set_contacts ] -->
<RigidBodyCollection DEF='BODY-COLLECTION'>
<!-- ROUTE information for BODY-1 node:  [from PI.value_changed to linearVelocity ] -->
<RigidBody DEF='BODY-1containerField='bodieslinearVelocity='0.1 0.0 0.0mass='0.1position='-0.5 0.0 0.0'>
<CollidableShape USE='SPHERE-GEOM-1containerField='geometry'/>
</RigidBody>
<RigidBody DEF='BODY-2angularDampingFactor='0containerField='bodiesmass='0.1useGlobalGravity='false'>
<CollidableShape USE='SPHERE-GEOM-2containerField='geometry'/>
</RigidBody>
</RigidBodyCollection>
<!-- ROUTE information for COLLISION-OUTPUT node:  [from contacts to BODY-COLLECTION.set_contacts ] -->
<CollisionSensor DEF='COLLISION-OUTPUT'>
<CollisionCollection DEF='COLLISION-GROUPbounce='1.0containerField='colliderminBounceSpeed='1.0'>
<CollidableShape USE='SPHERE-GEOM-1containerField='collidables'/>
<CollidableShape USE='SPHERE-GEOM-2containerField='collidables'/>
</CollisionCollection>
</CollisionSensor>
<!-- ROUTE information for TS node:  [from fraction_changed to PI.set_fraction ] -->
<TimeSensor DEF='TScycleInterval='10.0loop='true'/>
<!-- ROUTE information for PI node:  [from TS.fraction_changed to set_fraction ] [from value_changed to BODY-1.linearVelocity ] -->
<PositionInterpolator DEF='PIkey='0.0 0.25 0.5 0.75 1.0keyValue='-1.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0'/>
<ROUTE fromNode='COLLISION-OUTPUTfromField='contactstoNode='BODY-COLLECTIONtoField='set_contacts'/>
<ROUTE fromNode='TSfromField='fraction_changedtoNode='PItoField='set_fraction'/>
<ROUTE fromNode='PIfromField='value_changedtoNode='BODY-1toField='linearVelocity'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : BODY-1, BODY-2, BODY-COLLECTION, COLLISION-GROUP, COLLISION-OUTPUT, PI, SPHERE-GEOM-1, SPHERE-GEOM-2, TS
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->