1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
|
3 | <X3D profile='Interchange' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'> |
4 | <head> |
5 | <meta name='title' content='ColorExample.x3d'/> |
6 | <meta name='description' content='Vertex color applied to IndexedFaceSet built positive-displacement cylinder pump house. Note that this scene is not really static because the PositionInterpolators contain an initial offest of the piston and rocker arm.'/> |
7 | <meta name='creator' content='Todd Gagnon and Mark A. Boyd'/> |
8 | <meta name='translator' content='Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html'/> |
9 | <meta name='created' content='8 June 1998'/> |
10 | <meta name='translated' content='20 December 2002'/> |
11 | <meta name='modified' content='27 July 2024'/> |
12 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/ColorExample.x3d'/> |
13 | <meta name='reference' content='KelpTank.x3d'/> |
14 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/PumpHouse.x3d'/> |
15 | <meta name='generator' content='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/> |
16 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
17 | <meta name='license' content='../license.html'/> |
18 | </head> |
19 | <Scene> |
20 | <WorldInfo title='ColorExample.x3d'/> |
21 | <Background skyColor='1 1 1'/> |
22 | <Viewpoint description='Book View' orientation='0 -1 0 0.53' position='-2.28 0.29 4.06'/> |
23 | <Group> |
24 | <Shape> |
25 | |
26 | <Material diffuseColor='0.82 0.78 0.74'/> |
27 | </Appearance> |
28 | <IndexedFaceSet colorIndex='0 0 0 0 -1 0 0 1 1 -1 1 1 1 1 -1 1 0 0 1 -1 0 0 1 1 -1 1 1 1 -1 0 0 1 1 -1 0 0 1 1 -1 1 1 1 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 1 1 1 1 -1 1 1 1 1 -1' coordIndex='0 1 5 4 -1 5 1 2 6 -1 6 2 3 7 -1 3 0 4 7 -1 1 12 13 2 -1 2 13 14 -1 12 15 16 13 -1 15 0 3 16 -1 16 3 17 -1 9 5 6 10 -1 8 9 10 11 -1 4 8 11 7 -1 4 5 9 8 -1 11 10 6 7 -1 3 2 14 17 -1 13 16 17 14 -1'> |
29 | <Coordinate DEF='CoordinateNodeExample' point='0.0 0.0 0.0 2.0 0.0 0.0 2.0 1.75 0.0 0.0 1.75 0.0 0.625 0.75 0.0 1.0 0.75 0.0 1.0 1.6 0.0 0.625 1.6 0.0 0.625 0.75 -0.65 1.0 0.75 -0.65 1.0 1.6 -0.65 0.625 1.6 -0.65 2.0 0.0 -2.7 2.0 1.75 -2.7 2.0 2.5 -1.0 0.0 0.0 -2.7 0.0 1.75 -2.7 0.0 2.5 -1.0'/> |
30 | <Color DEF='ColorNodeExample' color='.82 .78 .74 .66 .37 .02'/> |
31 | </IndexedFaceSet> |
32 | </Shape> |
33 | <Transform scale='0.91 0.6 0.3' translation='0.8 -0.65 0.5'> |
34 | <Shape> |
35 | <Appearance> |
36 | <Material diffuseColor='0.749 0.694 0.651'/> |
37 | </Appearance> |
38 | <Cylinder bottom='false' top='false'/> |
39 | </Shape> |
40 | </Transform> |
41 | </Group> |
42 | <Group> |
43 | <Transform scale='0.5 0.5 0.5' translation='1.0 1.1 -1.5'> |
44 |
<!-- ROUTE information for PistonTransform node:
[from PistonPath.value_changed to set_translation
]
-->
<Transform DEF='PistonTransform'> |
45 | <Transform scale='1.8 1.2 0.6' translation='0.0 -0.2 0.0'> |
46 | <Shape> |
47 | <Appearance> |
48 | <Material diffuseColor='0.427 0.427 0.42'/> |
49 | </Appearance> |
50 | <Cylinder height='1.0' radius='0.98'/> |
51 | </Shape> |
52 | </Transform> |
53 |
<!-- Transform
CylinderRod is a DEF node that has 1 USE node: USE_1 -->
<Transform DEF='CylinderRod' rotation='0.0 0.0 -1.0 0.523599' translation='-0.25 0.75 0.0'> |
54 | <Shape> |
55 | <Appearance USE='PumpHouseAppearance'/> |
56 | <Cylinder height='1.0' radius='0.1'/> |
57 | </Shape> |
58 | </Transform> |
59 | <Transform rotation='0.0 0.0 1.0 1.047198' translation='1.0 0.6 0.0'> |
60 | <Transform USE='CylinderRod'/> |
61 | </Transform> |
62 | <Transform translation='0.0 1.2 0.0'> |
63 | <Shape> |
64 | <Appearance USE='PumpHouseAppearance'/> |
65 | <Sphere radius='0.15'/> |
66 | </Shape> |
67 | </Transform> |
68 |
<!-- ROUTE information for RockerArm1 node:
[from Rocker1Path.value_changed to set_translation
]
[from Rocker1Rotation.value_changed to set_rotation
]
-->
<Transform DEF='RockerArm1' center='0.0 -0.4 0.0'> |
69 | <Shape> |
70 | <Appearance USE='PumpHouseAppearance'/> |
71 | <Cylinder height='1.8' radius='0.1'/> |
72 | </Shape> |
73 | <Transform translation='0.0 0.95 0.0'> |
74 | <Shape> |
75 | <Appearance USE='PumpHouseAppearance'/> |
76 | <Sphere radius='0.15'/> |
77 | </Shape> |
78 | </Transform> |
79 |
<!-- ROUTE information for Rocker1Path node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to RockerArm1.set_translation
]
-->
<PositionInterpolator DEF='Rocker1Path' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='0.0 2.0 -0.25 0.0 1.8 -0.35 0.0 1.8 -0.35 0.0 2.0 -0.25 0.0 2.0 -0.12 0.0 2.0 -0.25'/> |
80 |
<!-- ROUTE information for Rocker1Rotation node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to RockerArm1.set_rotation
]
-->
<OrientationInterpolator DEF='Rocker1Rotation' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='-1.0 0.0 0.0 0.523599 -1.0 0.0 0.0 1.0471976 -1.0 0.0 0.0 1.0471976 -1.0 0.0 0.0 0.523599 -1.0 0.0 0.0 0.2617994 -1.0 0.0 0.0 0.523599'/> |
81 | </Transform> |
82 |
<!-- ROUTE information for RockerArm2 node:
[from Rocker2Path.value_changed to set_translation
]
[from Rocker2Rotation.value_changed to set_rotation
]
-->
<Transform DEF='RockerArm2' center='0.0 0.7 0.0'> |
83 | <Shape> |
84 | <Appearance USE='PumpHouseAppearance'/> |
85 | <Cylinder height='1.8' radius='0.1'/> |
86 | </Shape> |
87 | <Transform translation='0.0 -0.95 0.0'> |
88 | <Shape> |
89 | <Appearance USE='PumpHouseAppearance'/> |
90 | <Sphere radius='0.15'/> |
91 | </Shape> |
92 | </Transform> |
93 |
<!-- ROUTE information for Rocker2Path node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to RockerArm2.set_translation
]
-->
<PositionInterpolator DEF='Rocker2Path' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='0.0 1.95 -1.0 0.0 1.2 -1.6 0.0 1.2 -1.6 0.0 1.95 -1.0 0.0 2.2 -0.65 0.0 1.95 -1.0'/> |
94 |
<!-- ROUTE information for Rocker2Rotation node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to RockerArm2.set_rotation
]
-->
<OrientationInterpolator DEF='Rocker2Rotation' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='1.0 0.0 0.0 0.523599 1.0 0.0 0.0 0.4 1.0 0.0 0.0 0.4 1.0 0.0 0.0 0.523599 1.0 0.0 0.0 1.570796 1.0 0.0 0.0 0.523599'/> |
95 | </Transform> |
96 | </Transform> |
97 |
<!-- ROUTE information for PistonClock node:
[from fraction_changed to PistonPath.set_fraction
]
[from fraction_changed to Rocker1Path.set_fraction
]
[from fraction_changed to Rocker1Rotation.set_fraction
]
[from fraction_changed to Rocker2Path.set_fraction
]
[from fraction_changed to Rocker2Rotation.set_fraction
]
-->
<TimeSensor DEF='PistonClock' cycleInterval='5500' loop='true'/> |
98 |
<!-- ROUTE information for PistonPath node:
[from PistonClock.fraction_changed to set_fraction
]
[from value_changed to PistonTransform.set_translation
]
-->
<PositionInterpolator DEF='PistonPath' key='0.0 0.3 0.32 0.5 0.75 1.0' keyValue='-0.4 -2.3 4.0 -0.4 -1.5 4.0 -0.4 -1.5 4.0 -0.4 -2.3 4.0 -0.4 -3.3 4.0 -0.4 -2.3 4.0'/> |
99 | </Transform> |
100 | </Group> |
101 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='PistonPath' toField='set_fraction'/> |
102 | < ROUTE fromNode='PistonPath' fromField='value_changed' toNode='PistonTransform' toField='set_translation'/> |
103 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker1Path' toField='set_fraction'/> |
104 | < ROUTE fromNode='Rocker1Path' fromField='value_changed' toNode='RockerArm1' toField='set_translation'/> |
105 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker1Rotation' toField='set_fraction'/> |
106 | < ROUTE fromNode='Rocker1Rotation' fromField='value_changed' toNode='RockerArm1' toField='set_rotation'/> |
107 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker2Path' toField='set_fraction'/> |
108 | < ROUTE fromNode='Rocker2Path' fromField='value_changed' toNode='RockerArm2' toField='set_translation'/> |
109 | < ROUTE fromNode='PistonClock' fromField='fraction_changed' toNode='Rocker2Rotation' toField='set_fraction'/> |
110 | < ROUTE fromNode='Rocker2Rotation' fromField='value_changed' toNode='RockerArm2' toField='set_rotation'/> |
111 | </Scene> |
112 | </X3D> |
Event Graph ROUTE Table with 10 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.
<!--
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. -->