<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://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
='
https://www.web3d.org/specifications/x3d-3.0.xsd
'
>
<head>
</head>
<!--
<!--
Event Graph ROUTE Table
shows event connections
-->
<!--
Index for DEF nodes:
Clock,
Floor,
OrbCollide,
OrbSpin,
OrbSpinner,
PedestalColor,
ProxyGeometryTransform,
Wispy,
WispyAmp,
WispyVolume
Index for Viewpoint nodes:
Viewpoint_1,
Viewpoint_2
-->
<Scene>
<WorldInfo title='Figure27_3CollisionDetectionSpinningOrb.x3d'/>
<Viewpoint description='Zoom in on the orb to trigger the Collision node' position='0 2 10'/>
<Viewpoint description='Close-up viewpoint by the orb that triggers the Collision node' position='0 0.8 2.5'/>
<!-- Note NavigationInfo avatarSize affects collision range -->
<NavigationInfo avatarSize='2 1 0.5' headlight='false' speed='2' type='"WALK" "EXAMINE" "ANY"'/>
<Group>
<Transform translation='0 0 2.5'>
</Transform>
<Transform translation='0 0 -2.5'>
</Transform>
<!-- Note that proxy geometry is not rendered -->
<Transform DEF='ProxyGeometryTransform' containerField='proxy' translation='0 0.6 0'>
<Shape>
<Box size='0.4 1.2 0.4'/>
<Appearance>
<Material transparency='0.8'/>
</Appearance>
</Shape>
</Transform>
<!-- If you want to also see the simplifying proxy geometry, DEF/USE it outside of the proxy containerField subtree. -->
<Transform USE='
ProxyGeometryTransform'/>
<!-- Rest of collidable scene follows. -->
<PointLight ambientIntensity='0.2' color='0.7 0.5 0' location='0.3 0 0' radius='10'/>
<Shape>
<Appearance>
</Appearance>
<Sphere radius='0.2'/>
</Shape>
</Transform>
</Collision>
<Shape>
<Appearance DEF='PedestalColor'>
<Material diffuseColor='0.7 0.6 0.5'/>
</Appearance>
<IndexedFaceSet coordIndex='0 1 4 -1 1 2 4 -1 2 3 4 -1 3 0 4 -1'>
<Coordinate point='-0.12 0.03 0.12 0.12 0.03 0.12 0.12 0.03 -0.12 -0.12 0.03 -0.12 0.0 0.63 0.0'/>
</IndexedFaceSet>
</Shape>
<Transform translation='0 0.015 0'>
</Transform>
</Group>
</Sound>
<!-- Animation clock -->
<
ROUTE
fromNode='
OrbCollide' fromField='collideTime' toNode='
Clock' toField='set_startTime'/>
<
ROUTE
fromNode='
OrbCollide' fromField='collideTime' toNode='
Wispy' toField='set_startTime'/>
<!-- Orb rotation animation and scalar-driven volume control -->
<
ROUTE
fromNode='
Clock' fromField='fraction_changed' toNode='
OrbSpinner' toField='set_fraction'/>
<
ROUTE
fromNode='
OrbSpinner' fromField='value_changed' toNode='
OrbSpin' toField='set_rotation'/>
<
ROUTE
fromNode='
Clock' fromField='fraction_changed' toNode='
WispyVolume' toField='set_fraction'/>
<
ROUTE
fromNode='
WispyVolume' fromField='value_changed' toNode='
WispyAmp' toField='set_intensity'/>
</Scene>
</X3D>
<!--
<!--
Event Graph ROUTE Table
shows event connections
-->
<!--
Index for DEF nodes:
Clock,
Floor,
OrbCollide,
OrbSpin,
OrbSpinner,
PedestalColor,
ProxyGeometryTransform,
Wispy,
WispyAmp,
WispyVolume
Index for Viewpoint nodes:
Viewpoint_1,
Viewpoint_2
-->
-->
<!--
Online at
https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter27SensingVisibilityProximityCollision/Figure27_3CollisionDetectionSpinningOrbIndex.html
-->
<!--
Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter27SensingVisibilityProximityCollision/Figure27_3CollisionDetectionSpinningOrb.x3d
-->
<!--
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.
-->