<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<
X3D profile='
Immersive'
version='
3.0'
xmlns:xsd='
http://www.w3.org/2001/XMLSchema-instance'
xsd:noNamespaceSchemaLocation='
http://www.web3d.org/specifications/x3d-3.0.xsd '>
<
head>
</
head>
<!--
-->
<
Scene>
<
Viewpoint description='
Chair example ProtoInstance'
position='
0 0 4'/>
<
ProtoDeclare name='
Chair'>
<
ProtoInterface>
<
field name='
diffuseColor'
type='
SFColor'
value='
0.7 0.7 0.4'
accessType='
inputOutput'/>
</
ProtoInterface>
<
ProtoBody>
<
Transform scale='
0.15 0.15 0.15'
translation='
0 0.52 0'>
<!--
seat ROUTE:
[
from SeatRotationCylinderSensor.rotation_changed to set_rotation
]
-->
<
Transform DEF='
seat'>
<
Transform rotation='
1 0 0 1.57'>
<!-- seat -->
<
Shape>
<
Appearance DEF='
chair_color'>
<
Material DEF='
color'>
<
IS>
<
connect nodeField='
diffuseColor'
protoField='
diffuseColor'/>
</
IS>
</
Material>
</
Appearance>
<
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'/>
</
Shape>
</
Transform>
<
Transform translation='
0 1 1'>
<!-- back -->
<
Shape>
</
Shape>
</
Transform>
<!--
SeatRotationCylinderSensor ROUTE:
[
from rotation_changed to seat.set_rotation
]
-->
<
CylinderSensor DEF='
SeatRotationCylinderSensor'
description='
Swivel chair'/>
</
Transform>
<
Transform rotation='
1 0 0 -1.57'>
<!-- foot -->
<
Shape>
<
Appearance USE='
chair_color'/>
<
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'/>
</
Shape>
</
Transform>
</
Transform>
<
ROUTE fromNode='
SeatRotationCylinderSensor'
fromField='
rotation_changed'
toNode='
seat'
toField='
set_rotation'/>
</
ProtoBody>
</
ProtoDeclare>
<
ProtoInstance name='
Chair'
DEF='
chaise'/>
</
Scene>
</
X3D>
<!--
-->
<!--
Color key:
<X3dNode
DEF='idName' field='value'/>
matches
<XmlElement
DEF='idName' attribute='value'/>
<Prototype
name='ProtoName'>
<field
name='fieldName'/> </Prototype>
-->