| 1 | <?xml version="1.0" encoding="UTF-8"?> | 
| 2 | <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd"> | 
| 3 | <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'> | 
| 4 | <head> | 
| 5 | <component level='2' name='RigidBodyPhysics'/> | 
| 6 | <meta name='title' content=' MotorJoint.x3d '/> | 
| 7 | <meta name='description' content='Example scene for RigidBodyPhysics component'/> | 
| 8 | <meta name='creator' content='Alan Hudson and Justin Couch'/> | 
| 9 | <meta name='translator' content='Don Brutzman'/> | 
| 10 | <meta name='created' content='1 January 2008'/> | 
| 11 | <meta name='translated' content='26 December 2008'/> | 
| 12 | <meta name='modified' content='4 February 2024'/> | 
| 13 | <meta name='reference' content='http://www.xj3d.org/extensions/index.html#Physics'/> | 
| 14 | <meta name='reference' content='originals/motor_joint.x3dv'/> | 
| 15 | <meta name='reference' content=' https://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/rigid_physics.html '/> | 
| 16 | <meta name=' warning ' content=' under development '/> | 
| 17 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/MotorJoint.x3d '/> | 
| 18 | <meta name='generator' content='X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit'/> | 
| 19 | <meta name='generator' content='Xj3D converter, http://www.xj3d.org'/> | 
| 20 | <meta name='license' content='../../license.html'/> | 
| 21 | </head> | 
 DEF nodes index: 
               
               BODY-1,
BODY-2,
PI,
SPHERE-GEOM-1,
SPHERE-GEOM-2,
TS
               
               
                  DEF nodes index: 
               
               BODY-1,
BODY-2,
PI,
SPHERE-GEOM-1,
SPHERE-GEOM-2,
TS
            | 22 | <Scene> | 
| 23 | <WorldInfo title='MotorJoint.x3d'/> | 
| 24 | <Group> | 
| 25 | 
               <!-- CollidableShape
                              SPHERE-GEOM-1 is a DEF node that has 1 USE node: USE_1 --> <CollidableShape DEF='SPHERE-GEOM-1' containerField='children'> | 
| 26 | <Shape containerField='shape'> | 
| 27 | <Appearance> | 
| 28 | <Material emissiveColor='1.0 0.0 0.0'/> | 
| 29 | </Appearance> | 
| 30 | <Sphere radius='0.2'/> | 
| 31 | </Shape> | 
| 32 | </CollidableShape> | 
| 33 | 
               <!-- CollidableShape
                              SPHERE-GEOM-2 is a DEF node that has 1 USE node: USE_1 --> <CollidableShape DEF='SPHERE-GEOM-2' containerField='children'> | 
| 34 | <Shape containerField='shape'> | 
| 35 | <Appearance> | 
| 36 | <Material emissiveColor='0.0 0.0 1.0'/> | 
| 37 | </Appearance> | 
| 38 | <Sphere radius='0.2'/> | 
| 39 | </Shape> | 
| 40 | </CollidableShape> | 
| 41 | </Group> | 
| 42 | <RigidBodyCollection containerField='children'> | 
| 43 | |
| 44 | <CollidableShape USE='SPHERE-GEOM-1' containerField='geometry'/> | 
| 45 | </RigidBody> | 
| 46 | 
               <!-- RigidBody
                              BODY-2 is a DEF node that has 1 USE node: USE_1
                               <!-- ROUTE information for BODY-2 node: [from PI.value_changed to position ] --> <RigidBody DEF='BODY-2' angularDampingFactor='0' containerField='bodies' linearVelocity='0.1 0.0 0.0' mass='0.1' position='0.3 0.0 0.0' useGlobalGravity='false'> | 
| 47 | <CollidableShape USE='SPHERE-GEOM-2' containerField='geometry'/> | 
| 48 | </RigidBody> | 
| 49 | <SliderJoint axis='1.0 0.0 0.0' containerField='joints'> | 
| 50 | <RigidBody USE='BODY-1' containerField='body1'/> | 
| 51 | <RigidBody USE='BODY-2' containerField='body2'/> | 
| 52 | </SliderJoint> | 
| 53 | </RigidBodyCollection> | 
| 54 | 
          <!-- ROUTE information for TS node: 
[from fraction_changed to PI.set_fraction
                        ]
 --> <TimeSensor DEF='TS' cycleInterval='10.0' loop='true'/> | 
| 55 | 
          <!-- ROUTE information for PI node: 
[from TS.fraction_changed to set_fraction
                        ]
[from value_changed to BODY-2.position
                        ]
 --> <PositionInterpolator DEF='PI' key='0.0 0.25 0.5 0.75 1.0' keyValue='-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'/> | 
| 56 | < ROUTE fromNode='TS' fromField='fraction_changed' toNode='PI' toField='set_fraction'/> | 
| 57 | < ROUTE fromNode='PI' fromField='value_changed' toNode='BODY-2' toField='position'/> | 
| 58 | </Scene> | 
| 59 | </X3D> | 
 DEF nodes index: 
         
         BODY-1,
BODY-2,
PI,
SPHERE-GEOM-1,
SPHERE-GEOM-2,
TS
         
         
            DEF nodes index: 
         
         BODY-1,
BODY-2,
PI,
SPHERE-GEOM-1,
SPHERE-GEOM-2,
TS
      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 | PI PositionInterpolator set_fraction SFFloat | then | PI PositionInterpolator value_changed SFVec3f | BODY-2 RigidBody position SFVec3f | 
         <!--
Color-coding 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.
-->
         
         <!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->