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 | <meta name='title' content='Chair.x3d'/> |
6 | <meta name='description' content='A chair for a room, modeled as a Prototype for reuse.'/> |
7 | <meta name='creator' content='Frederic Roussille'/> |
8 | <meta name='contributor' content='Don Brutzman'/> |
9 | <meta name='created' content='1 April 2001'/> |
10 | <meta name='modified' content='20 October 2019'/> |
11 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/Chair.x3d'/> |
12 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
13 | <meta name='license' content='../license.html'/> |
14 | </head> |
15 | <Scene> |
16 | <WorldInfo title='Chair.x3d'/> |
17 | <Viewpoint description='Chair example ProtoInstance' position='0 0 4'/> |
18 | <ProtoDeclare name='Chair'> |
19 | <ProtoInterface> |
20 | <field name='diffuseColor' type='SFColor' value='0.7 0.7 0.4' accessType='inputOutput'/> |
21 | </ProtoInterface> |
22 | <ProtoBody> |
23 | <Transform scale='0.15 0.15 0.15' translation='0 0.52 0'> |
24 |
<!-- ROUTE information for seat node:
[from SeatRotationCylinderSensor.rotation_changed to set_rotation
]
-->
<Transform DEF='seat'> |
25 | <Transform rotation='1 0 0 1.57'> |
26 | <!-- seat --> |
27 | <Shape> |
28 |
<!-- Appearance
chair_color is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Appearance DEF='chair_color'> |
29 | <Material DEF='color'> |
30 | <IS> |
31 | <connect nodeField='diffuseColor' protoField='diffuseColor'/> |
32 | </IS> |
33 | </Material> |
34 | </Appearance> |
35 | <Extrusion DEF='ExtrusionSeatCushion' ccw='false' creaseAngle='1.57' crossSection='-2 0 2 0 2.3 0.3 2.4 0.4 2.5 0.5 2.5 1 -2 1 -2 0' scale='0.5 1' solid='false' spine='1 0 0 0.92 -0.38 0 0.71 -0.71 0 0.38 -0.92 0 0 -1 0 -0.38 -0.92 0 -0.71 -0.71 0 -0.92 -0.38 0 -1 0 0 -0.92 0.38 0 -0.71 0.71 0 -0.38 0.92 0 0 1 0 0.38 0.92 0 0.71 0.71 0 0.92 0.38 0 1 0 0'/> |
36 | </Shape> |
37 | </Transform> |
38 | <Transform translation='0 1 1'> |
39 | <!-- back --> |
40 | <Shape> |
41 | <Appearance USE='chair_color'/> |
42 | <Extrusion DEF='ExtrusionSeatBack' convex='false' creaseAngle='1.57' crossSection='1 0 0.8 0 0.736 0.304 0.568 0.568 0.304 0.736 0 0.8 -0.304 0.736 -0.568 0.568 -0.736 0.304 -0.8 0 -1 0 -0.92 0.38 -0.71 0.71 -0.38 0.92 0 1 0.38 0.92 0.71 0.71 0.92 0.38 1 0 0.8 0' scale='1.4 1 2 1' solid='false' spine='0 0 0 0 4 0'/> |
43 | </Shape> |
44 | </Transform> |
45 |
<!-- ROUTE information for SeatRotationCylinderSensor node:
[from rotation_changed to seat.set_rotation
]
-->
<CylinderSensor DEF='SeatRotationCylinderSensor' description='Swivel chair'/> |
46 | </Transform> |
47 | <Transform rotation='1 0 0 -1.57'> |
48 | <!-- foot --> |
49 | <Shape> |
50 | <Appearance USE='chair_color'/> |
51 | <Extrusion DEF='ExtrusionSeatBase' beginCap='false' convex='false' creaseAngle='1.57' crossSection='0 0 0.2 0 0.23 2 0.28 3 1 3.3 1.5 3.5 0 3.5 0 0' endCap='false' solid='false' spine='0.1 0 0 0.092 -0.038 0 0.071 -0.071 0 0.038 -0.092 0 0 -0.1 0 -0.038 -0.092 0 -0.071 -0.071 0 -0.092 -0.038 0 -0.1 0 0 -0.092 0.038 0 -0.071 0.071 0 -0.038 0.092 0 0 0.1 0 0.038 0.092 0 0.071 0.071 0 0.092 0.038 0 0.1 0 0'/> |
52 | </Shape> |
53 | </Transform> |
54 | </Transform> |
55 | < ROUTE fromNode='SeatRotationCylinderSensor' fromField='rotation_changed' toNode='seat' toField='set_rotation'/> |
56 | </ProtoBody> |
57 | </ProtoDeclare> |
58 | <ProtoInstance name='Chair' DEF='chaise'/> |
59 | </Scene> |
60 | </X3D> |
Event Graph ROUTE Table with 1 ROUTE connection 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.
chaise
ProtoInstance Chair |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
SeatRotationCylinderSensor
CylinderSensor rotation_changed SFRotation |
seat
Transform set_rotation SFRotation |
<!--
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)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->