X3D Model Documentation: PoolMontereyPeninsulaCollegeUsingBoxes.x3d

  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            <meta name='titlecontent=' PoolMontereyPeninsulaCollegeUsingBoxes.x3d '/>
  6            <meta name='descriptioncontent='Monterey Peninsula College (MPC) swimming pool, simplest model'/>
  7            <meta name='creatorcontent='Don Brutzman and MV3204 class'/>
  8            <meta name='createdcontent='9 April 2010'/>
  9            <meta name='modifiedcontent='2 December 2024'/>
 10            <meta name='infocontent='Includes trace diagnostic for changing user navigation from EXAMINE to FLY when binding/unbinding the initial overhead-perspective Viewpoint'/>
 11            <meta name='referencecontent='TODO information about ROV races'/>
 12            <meta name='drawingcontent='PoolMontereyPeninsulaCollegeSketch'/>
 13            <meta name='Imagecontent='PoolMontereyPeninsulaCollegeDiagram.png'/>
 14            <meta name='Imagecontent='PoolMontereyPeninsulaCollegeDiagram.vsd'/>
 15            <meta name='photocontent='TODO photo(s) of pool'/>
 16            <meta name='subjectcontent='X3D swimming pool'/>
 17            <meta name=' warning content=' under development '/>
 18            <meta name='referencecontent=' PoolMontereyPeninsulaCollege.x3d '/>
 19            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Locations/MontereyPeninsulaCollege/PoolMontereyPeninsulaCollegeUsingBoxes.x3d '/>
 20            <meta name='generatorcontent='X3D-Edit, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 21            <meta name='licensecontent='../../license.html'/>
 22       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: AppearanceWall, CoordinateAxes, DeepFloor, DeepFloor2, DeepFloor3, DeepFloor4, DeepFloor5, DeepWall, LeftWall, LongWall, NavigationExamineMode, NavigationFlyMode, NavigationWalkMode, PoolFloor, RightWall, ScaleFeetToMeters, ShallowWall, ShiftBoxCornersToPoolCenter, ShortWall, Trace_ROUTE_ViewOverhead_isBound_TO_NavigationExamineMode_set_bind, ViewOverhead

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5, Viewpoint_6, Viewpoint_7, Viewpoint_8, ViewOverhead
-->
 23       <Scene>
 24            <!-- Put CoordinateAxes with correct directional alignment at pool origin -->
 25            <WorldInfo title='PoolMontereyPeninsulaCollegeUsingBoxes.x3d'/>
 26            <Inline DEF='CoordinateAxes'   url=' "../../Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "../../Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" '/>
 27            <!-- Only one NavInfo can be bound at a time. Include "ANY" to allow user override. -->
 28            <!-- Note that our local units here are still meters. -->
 29 
          <!-- ROUTE information for NavigationExamineMode node:  [from ViewOverhead.isBound to set_bind ] -->
          <NavigationInfo DEF='NavigationExamineModeavatarSize='0.25 1.6 2speed='5type='"EXAMINE" "FLY" "ANY"'/>
 30            <NavigationInfo DEF='NavigationWalkModeavatarSize='0.25 1.6 2speed='5type='"WALK" "ANY"'/>
 31            <NavigationInfo DEF='NavigationFlyModeavatarSize='0.25 1.6 2speed='5type='"FLY" "ANY"'/>
 32            <!-- TODO add a deck around the edge of the pool to allow WALKing around -->
 33            <!-- All pool model measurements are in feet, therefore scale them into meters. X is length, Y is height, Z is width. -->
 34            <Transform DEF='ScaleFeetToMetersscale='0.305 0.305 0.305'>
 35                 <!-- Box centers are at local coordinate 0 0 0, this translation shifts them to put corner at pool coordinate 0 0 0 -->
 36                 <!-- Viewpoints are placed here since their position is recorded in feet using the pool coordinate system -->
 37 
               <!-- ROUTE information for ViewOverhead node:  [from isBound to NavigationExamineMode.set_bind ] [from isBound to Trace_ROUTE_ViewOverhead_isBound_TO_NavigationExamineMode_set_bind.traceValue ] -->
               <Viewpoint DEF='ViewOverheadcenterOfRotation='37.5 0 32description='High above looking down from 100 feet aboveorientation='1 0 0 -1.5708position='37.5 100 32'/>
 38                 < ROUTE  fromNode='ViewOverhead' fromField='isBound' toNode='NavigationExamineMode' toField='set_bind'/>
 39                 <Group>
 40                      <!-- ======= ROUTE Trace ============================================== -->
 41 
                    <!-- ROUTE information for Trace_ROUTE_ViewOverhead_isBound_TO_NavigationExamineMode_set_bind node:  [from ViewOverhead.isBound to traceValue ] -->
                    <Script DEF='Trace_ROUTE_ViewOverhead_isBound_TO_NavigationExamineMode_set_bindmustEvaluate='true'>
 42                           <!-- Trace ROUTEd values on X3D browser console -->
 43                           <field name='reportIntervaltype='SFTimevalue='1.0accessType='initializeOnly'
                          appinfo='Sampling frequency in seconds (0 means all values)'/>
 44                           <field name='traceValuetype='SFBoolvalue='trueaccessType='inputOutput'/>
 45                           <field name='timeStampPreviousReporttype='SFTimevalue='-1accessType='initializeOnly'/>
  <![CDATA[
          
ecmascript:
    function set_traceValue (eventValue, timeStamp)
    {
        Browser.println ('Script method set_traceValue invoked, which is now handing off to traceValueHandler()...');
        traceValueHandler (eventValue, timeStamp);
    }
    function traceValue (eventValue, timeStamp)
    {
        Browser.println ('Script method traceValue invoked, which is now handing off to traceValueHandler()...');
        traceValueHandler (eventValue, timeStamp);
    }
    function traceValueHandler (eventValue, timeStamp)
    {
      // input eventValue received for trace field
      if (timeStamp - timeStampPreviousReport >= reportInterval) {
        Browser.println ('Trace_ROUTE_ViewOverhead_isBound_TO_NavigationExamineMode_set_bind type=SFBool value=' + eventValue);
        timeStampPreviousReport = timeStamp;
        if  (eventValue == true)
             Browser.println ('User navigation should be EXAMINE');
        else Browser.println ('User navigation should be FLY');
      }
    }
    function timeOfDay (someTime) {
      hh = Math.floor (someTime /(60*60)) % 24;
      mm = Math.floor (someTime / 60)     % 60;
      ss = Math.floor (someTime)          % 60;
      if (hh < 9) hour   = '0' + hh;
      else        hour   =       hh;
      if (mm < 9) minute = '0' + mm;
      else        minute =       mm;
      if (ss < 9) second = '0' + ss;
      else        second =       ss;
      return '(' + hour + ':' + minute + ':' + second + ' GMT)';
    }

        
]]>
 47                      </Script>
 48                      < ROUTE  fromNode='ViewOverhead' fromField='isBound' toNode='Trace_ROUTE_ViewOverhead_isBound_TO_NavigationExamineMode_set_bind' toField='traceValue'/>
 49                      <!-- ======= ROUTE Trace block complete ===================================================== -->
 50                 </Group>
 51                 <!-- other Viewpoints do not get EXAMINE navigation type -->
 52                 <Viewpoint description='Shallow end left side, from originorientation='0.0067 0.9998 0.0161 -2.3563position='-12 6 -12'/>
 53                 <Viewpoint description='Pool center left sideorientation='0 0.9955 0.0949 3.1413position='37.52 10 -20'/>
 54                 <Viewpoint description='Deep end left sideorientation='-0.0203 0.9988 0.0451 2.2984position='87 6 -12'/>
 55                 <Viewpoint description='Deep end centerorientation='-0.0857 0.9926 0.0857 1.5782position='95 10 32'/>
 56                 <Viewpoint description='Deep end right sideorientation='-0.1001 0.994 0.0449 0.8487position='87 6 76'/>
 57                 <Viewpoint description='Pool center right sideorientation='-1 0.002 0.0002 0.2235position='37.52 10 84'/>
 58                 <Viewpoint description='Shallow end right sideorientation='0.1001 0.994 0.0449 -0.8487position='-12 6 76'/>
 59                 <Viewpoint description='Shallow end centerorientation='0.0864 0.99251 0.0864 -1.578318position='-20 10 32'/>
 60                 <Transform DEF='ShiftBoxCornersToPoolCentertranslation='37.5 -12.75 32'>
 61                      <Shape DEF='PoolFloor'>
 62                           <Box size='75 0.25 64'/>
 63 
                         <!-- Appearance AppearanceWall is a DEF node that has 7 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5, USE_6, USE_7 -->
                         <Appearance DEF='AppearanceWall'>
 64                                <Material diffuseColor='0.5 0.9 0.9'/>
 65                           </Appearance>
 66                      </Shape>
 67                      <Transform DEF='ShallowWalltranslation='-37.5 6.25 0'>
 68 
                         <!-- Shape ShortWall is a DEF node that has 1 USE node: USE_1 -->
                         <Shape DEF='ShortWall'>
 69                                <Box size='0.25 12.75 64'/>
 70                                <Appearance USE='AppearanceWall'/>
 71                           </Shape>
 72                      </Transform>
 73                      <Transform DEF='DeepWalltranslation='37.5 6.25 0'>
 74                           <Shape USE='ShortWall'/>
 75                      </Transform>
 76                      <Transform DEF='LeftWalltranslation='0 6.25 -32'>
 77 
                         <!-- Shape LongWall is a DEF node that has 1 USE node: USE_1 -->
                         <Shape DEF='LongWall'>
 78                                <Box size='75 12.75 0.25'/>
 79                                <Appearance USE='AppearanceWall'/>
 80                           </Shape>
 81                      </Transform>
 82                      <Transform DEF='RightWalltranslation='0 6.25 32'>
 83                           <Shape USE='LongWall'/>
 84                      </Transform>
 85                      <Transform DEF='DeepFloorrotation='0 0 1 0.1732translation='32.5 .9 0'>
 86                           <Shape>
 87                                <Box size='10.152 0.25 64'/>
 88                                <Appearance USE='AppearanceWall'/>
 89                           </Shape>
 90                      </Transform>
 91                      <Transform DEF='DeepFloor2rotation='0 0 1 -0.2085translation='21 1.4 0'>
 92                           <Shape>
 93                                <Box size='13.288 0.25 64'/>
 94                                <Appearance USE='AppearanceWall'/>
 95                           </Shape>
 96                      </Transform>
 97                      <Transform DEF='DeepFloor3rotation='0 0 1 -0.2783translation='7.5 4.75 0'>
 98                           <Shape>
 99                                <Box size='14.560 0.25 64'/>
100                                <Appearance USE='AppearanceWall'/>
101                           </Shape>
102                      </Transform>
103                      <Transform DEF='DeepFloor4rotation='0 0 1 -0.0476translation='-10 7.25 0'>
104                           <Shape>
105                                <Box size='21.024 0.25 64'/>
106                                <Appearance USE='AppearanceWall'/>
107                           </Shape>
108                      </Transform>
109                      <Transform DEF='DeepFloor5rotation='0 0 1 -0.0588translation='-29 8.25 0'>
110                           <Shape>
111                                <Box size='17.029 0.25 64'/>
112                                <Appearance USE='AppearanceWall'/>
113                           </Shape>
114                      </Transform>
115                 </Transform>
116            </Transform>
117       </Scene>
118  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: AppearanceWall, CoordinateAxes, DeepFloor, DeepFloor2, DeepFloor3, DeepFloor4, DeepFloor5, DeepWall, LeftWall, LongWall, NavigationExamineMode, NavigationFlyMode, NavigationWalkMode, PoolFloor, RightWall, ScaleFeetToMeters, ShallowWall, ShiftBoxCornersToPoolCenter, ShortWall, Trace_ROUTE_ViewOverhead_isBound_TO_NavigationExamineMode_set_bind, ViewOverhead

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5, Viewpoint_6, Viewpoint_7, Viewpoint_8, ViewOverhead
-->
X3D Tooltips element index: Appearance, Box, field, Group, head, Inline, Material, meta, NavigationInfo, ROUTE, Scene, Script, Shape, Transform, Viewpoint, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table entries 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.

ViewOverhead
Viewpoint
isBound
SFBool

ROUTE
event to
(1)
NavigationExamineMode
NavigationInfo
set_bind
SFBool
ViewOverhead
Viewpoint
isBound
SFBool

ROUTE
event to
(1)
Trace_ROUTE_ViewOverhead_isBound_TO_NavigationExamineMode_set_bind
Script
traceValue
SFBool


Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Savage/Locations/MontereyPeninsulaCollege/PoolMontereyPeninsulaCollegeUsingBoxesIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Locations/MontereyPeninsulaCollege/PoolMontereyPeninsulaCollegeUsingBoxes.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->