X3D Model Documentation: BeamHemispherePrototype.x3d

  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='Immersive' 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='titlecontent=' BeamHemispherePrototype.x3d '/>
  6            <meta name='creatorcontent='Don Brutzman'/>
  7            <meta name='createdcontent='29 January 2003'/>
  8            <meta name='modifiedcontent='20 October 2019'/>
  9            <meta name='descriptioncontent='Produce wireframe or transparent beam hemispheres.'/>
 10            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamHemispherePrototype.x3d '/>
 11            <meta name='generatorcontent='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 12            <meta name='licensecontent='../../license.html'/>
 13       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: BEAM_CALCULATE, BEAM_CONTROL, BeamTopCylinder, CAP_COLOR, CAP_SWITCH, CYLINDER_COLOR, DETECTION, LockedDownInterface2D, SOLID_SWITCH, WIRE_COLOR, WIREFRAME_SWITCH

Index for Viewpoint node: Viewpoint_1

Index for ProtoDeclare definition: BeamHemisphere
-->
 14       <Scene>
 15            <NavigationInfo DEF='LockedDownInterface2Dtype='"NONE"'/>
 16            <Background skyColor='0 0.3 0.5'/>
 17            <WorldInfo info='"Produce wireframe or transparent beam hemispheres."title='BeamHemisphereProto'/>
 18            <Viewpoint description='Beam Hemisphere'/>
 19            <ProtoDeclare name='BeamHemisphereappinfo='Produce wireframe or transparent beam hemisphere. Typical uses include sonar/radar/light beams. Negative range values invert base and apex at same relative location. Default: hemisphere with centroid at (0 0 0) and radius 1 atop x-z plane.'>
 20                 <ProtoInterface>
 21                      <field name='nametype='SFStringvalue='(unnamed)accessType='initializeOnly'
                     appinfo='Assigning a name to a BeamHemisphere aids tracing'/>
 22                      <field name='contacttype='SFBoolaccessType='inputOnly'
                     appinfo='(communications) is transmitted signal in contact with receiver or (sensor) is a target return detected?'/>
 23                      <field name='rangetype='SFFloataccessType='inputOnly'
                     appinfo='distance in meters along x axis'/>
 24                      <field name='defaultRangetype='SFFloatvalue='1accessType='initializeOnly'
                     appinfo='distance in meters used until eventIn range sent'/>
 25                      <field name='wireframetype='SFBoolvalue='trueaccessType='initializeOnly'
                     appinfo='whether wireframe beam is drawn'/>
 26                      <field name='solidtype='SFBoolvalue='trueaccessType='initializeOnly'
                     appinfo='whether solid beam is drawn'/>
 27                      <field name='contactColortype='SFColorvalue='.8 .1 .1accessType='initializeOnly'
                     appinfo='rendering color when contact=true'/>
 28                      <field name='noContactColortype='SFColorvalue='.3 .5 .5accessType='initializeOnly'
                     appinfo='rendering color when contact=false'/>
 29                      <field name='transparencytype='SFFloatvalue='0accessType='inputOutput'
                     appinfo='1 = fully transparent wireframe only'/>
 30                      <!-- BEAM_CONTROL beam scaling is controlled by range input -->
 31                 </ProtoInterface>
 32                 <ProtoBody>
 33                      <Group>
 34 
                         <!-- ROUTE information for BEAM_CONTROL node:  [from BEAM_CALCULATE.beamScale to scale ] [from BEAM_CALCULATE.direction to rotation ] -->
                         <Transform DEF='BEAM_CONTROL'>
 35 
                              <!-- ROUTE information for WIREFRAME_SWITCH node:  [from DETECTION.wireframeChoice to whichChoice ] -->
                              <Switch DEF='WIREFRAME_SWITCHwhichChoice='0'>
 36                                     <WorldInfo info='"initial choice is null node (WorldInfo), meaning no wireframe beam"'/>
 37                                     <Shape>
 38                                          <Appearance>
 39 
                                             <!-- ROUTE information for WIRE_COLOR node:  [from DETECTION.beamColor to emissiveColor ] -->
                                             <Material DEF='WIRE_COLORdiffuseColor='.1 .1 .1emissiveColor='.1 .1 .1'>
 40                                                    <IS>
 41                                                         <connect nodeField='transparencyprotoField='transparency'/>
 42                                                    </IS>
 43                                               </Material>
 44                                          </Appearance>
 45                                          <IndexedLineSet coordIndex='0 1 2 -1 1 3 4 -1 2 4 5 -1 3 6 7 -1 4 7 8 -1 5 8 9 -1 6 10 11 -1 7 11 12 -1 8 12 13 -1 9 13 14 -1 10 15 16 -1 11 16 17 -1 12 17 18 -1 13 18 19 -1 14 19 20 -1 1 4 2 -1 3 7 4 -1 4 8 5 -1 6 11 7 -1 7 12 8 -1 8 13 9 -1 10 16 11 -1 11 17 12 -1 12 18 13 -1 13 19 14 -1 21 22 23 -1 22 24 25 -1 23 25 26 -1 24 27 28 -1 25 28 29 -1 26 29 30 -1 27 31 32 -1 28 32 33 -1 29 33 34 -1 30 34 35 -1 31 0 2 -1 32 2 5 -1 33 5 9 -1 34 9 14 -1 35 14 20 -1 22 25 23 -1 24 28 25 -1 25 29 26 -1 27 32 28 -1 28 33 29 -1 29 34 30 -1 31 2 32 -1 32 5 33 -1 33 9 34 -1 34 14 35 -1 21 36 22 -1 36 37 38 -1 22 38 24 -1 37 39 40 -1 38 40 41 -1 24 41 27 -1 41 42 43 -1 27 43 31 -1 31 44 0 -1 36 38 22 -1 37 40 38 -1 38 41 24 -1 40 42 41 -1 41 43 27 -1 43 44 31 -1 15 45 16 -1 45 46 47 -1 16 47 17 -1 46 48 49 -1 47 49 50 -1 17 50 18 -1 48 51 52 -1 49 52 53 -1 50 53 54 -1 18 54 19 -1 51 55 56 -1 52 56 57 -1 53 57 58 -1 54 58 59 -1 19 59 20 -1 45 47 16 -1 46 49 47 -1 47 50 17 -1 48 52 49 -1 49 53 50 -1 50 54 18 -1 51 56 52 -1 52 57 53 -1 53 58 54 -1 54 59 19 -1 15 60 45 -1 45 61 46 -1 61 62 63 -1 46 63 48 -1 63 64 65 -1 48 65 51 -1 64 66 67 -1 65 67 68 -1 51 68 55 -1 60 61 45 -1 61 63 46 -1 62 64 63 -1 63 65 48 -1 64 67 65 -1 65 68 51 -1 55 69 56 -1 69 70 71 -1 56 71 57 -1 70 72 73 -1 71 73 74 -1 57 74 58 -1 72 75 76 -1 73 76 77 -1 74 77 78 -1 58 78 59 -1 75 79 80 -1 76 80 81 -1 77 81 82 -1 78 82 83 -1 59 83 20 -1 69 71 56 -1 70 73 71 -1 71 74 57 -1 72 76 73 -1 73 77 74 -1 74 78 58 -1 75 80 76 -1 76 81 77 -1 77 82 78 -1 78 83 59 -1 55 84 69 -1 84 85 86 -1 69 86 70 -1 85 87 88 -1 86 88 89 -1 70 89 72 -1 87 90 91 -1 88 91 92 -1 89 92 93 -1 72 93 75 -1 90 94 95 -1 91 95 96 -1 92 96 97 -1 93 97 98 -1 75 98 79 -1 84 86 69 -1 85 88 86 -1 86 89 70 -1 87 91 88 -1 88 92 89 -1 89 93 72 -1 90 95 91 -1 91 96 92 -1 92 97 93 -1 93 98 75 -1 79 99 80 -1 99 100 101 -1 80 101 81 -1 100 102 103 -1 101 103 104 -1 81 104 82 -1 102 105 106 -1 103 106 107 -1 104 107 108 -1 82 108 83 -1 105 21 23 -1 106 23 26 -1 107 26 30 -1 108 30 35 -1 83 35 20 -1 99 101 80 -1 100 103 101 -1 101 104 81 -1 102 106 103 -1 103 107 104 -1 104 108 82 -1 105 23 106 -1 106 26 107 -1 107 30 108 -1 108 35 83 -1 79 109 99 -1 109 110 111 -1 99 111 100 -1 110 112 113 -1 111 113 114 -1 100 114 102 -1 112 115 116 -1 113 116 117 -1 114 117 118 -1 102 118 105 -1 115 119 120 -1 116 120 121 -1 117 121 122 -1 118 122 123 -1 105 123 21 -1 109 111 99 -1 110 113 111 -1 111 114 100 -1 112 116 113 -1 113 117 114 -1 114 118 102 -1 115 120 116 -1 116 121 117 -1 117 122 118 -1 118 123 105 -1 119 115 124 -1 115 112 128 -1 124 128 125 -1 112 110 129 -1 128 129 130 -1 125 130 126 -1 110 109 131 -1 129 131 132 -1 130 132 133 -1 126 133 127 -1 109 79 98 -1 131 98 97 -1 132 97 96 -1 133 96 95 -1 127 95 94 -1 115 128 124 -1 112 129 128 -1 128 130 125 -1 110 131 129 -1 129 132 130 -1 130 133 126 -1 109 98 131 -1 131 97 132 -1 132 96 133 -1 133 95 127 -1 39 37 135 -1 37 36 137 -1 135 137 138 -1 136 138 139 -1 36 21 123 -1 137 123 122 -1 138 122 121 -1 139 121 120 -1 134 120 119 -1 37 137 135 -1 135 138 136 -1 36 123 137 -1 137 122 138 -1 138 121 139 -1 139 120 134 -1 94 90 140 -1 90 87 141 -1 87 85 142 -1 141 142 143 -1 85 84 144 -1 142 144 145 -1 84 55 68 -1 144 68 67 -1 145 67 66 -1 90 141 140 -1 87 142 141 -1 85 144 142 -1 142 145 143 -1 84 68 144 -1 144 67 145 -1'>
 46                                               <Coordinate point='0.5257 0 0.8507 0.3477 0 0.9376 0.4636 0.1875 0.866 0.1227 0 0.9924 0.2531 0.2047 0.9455 0.368 0.397 0.8408 -0.1227 0 0.9924 0 0.2116 0.9773 0.1308 0.4233 0.8965 0.2453 0.5955 0.765 -0.3477 0 0.9376 -0.2531 0.2047 0.9455 -0.1308 0.4233 0.8965 0 0.6142 0.7891 0.1159 0.7501 0.6511 -0.5257 0 0.8507 -0.4636 0.1875 0.866 -0.368 0.397 0.8408 -0.2453 0.5955 0.765 -0.1159 0.7501 0.6511 0 0.8507 0.5257 0.8507 0.5257 0 0.866 0.4636 0.1875 0.7501 0.6511 0.1159 0.8408 0.368 0.397 0.7408 0.5844 0.3313 0.5955 0.765 0.2453 0.765 0.2453 0.5955 0.6849 0.4732 0.5541 0.5541 0.6849 0.4732 0.397 0.8408 0.368 0.6511 0.1159 0.7501 0.5844 0.3313 0.7408 0.4732 0.5541 0.6849 0.3313 0.7408 0.5844 0.1875 0.866 0.4636 0.9376 0.3477 0 0.9924 0.1227 0 0.9455 0.2531 0.2047 0.9924 0 0 0.9773 0 0.2116 0.8965 0.1308 0.4233 0.8965 0 0.4233 0.7891 0 0.6142 0.6511 0 0.7501 -0.6511 0.1159 0.7501 -0.765 0.2453 0.5955 -0.5844 0.3313 0.7408 -0.8408 0.368 0.397 -0.6849 0.4732 0.5541 -0.4732 0.5541 0.6849 -0.866 0.4636 0.1875 -0.7408 0.5844 0.3313 -0.5541 0.6849 0.4732 -0.3313 0.7408 0.5844 -0.8507 0.5257 0 -0.7501 0.6511 0.1159 -0.5955 0.765 0.2453 -0.397 0.8408 0.368 -0.1875 0.866 0.4636 -0.6511 0 0.7501 -0.7891 0 0.6142 -0.8965 0 0.4233 -0.8965 0.1308 0.4233 -0.9773 0 0.2116 -0.9455 0.2531 0.2047 -0.9924 0 0 -0.9924 0.1227 0 -0.9376 0.3477 0 -0.7501 0.6511 -0.1159 -0.5955 0.765 -0.2453 -0.6142 0.7891 0 -0.397 0.8408 -0.368 -0.4233 0.8965 -0.1308 -0.4233 0.8965 0.1308 -0.1875 0.866 -0.4636 -0.2047 0.9455 -0.2531 -0.2116 0.9773 0 -0.2047 0.9455 0.2531 0 0.8507 -0.5257 0 0.9376 -0.3477 0 0.9924 -0.1227 0 0.9924 0.1227 0 0.9376 0.3477 -0.866 0.4636 -0.1875 -0.8408 0.368 -0.397 -0.7408 0.5844 -0.3313 -0.765 0.2453 -0.5955 -0.6849 0.4732 -0.5541 -0.5541 0.6849 -0.4732 -0.6511 0.1159 -0.7501 -0.5844 0.3313 -0.7408 -0.4732 0.5541 -0.6849 -0.3313 0.7408 -0.5844 -0.5257 0 -0.8507 -0.4636 0.1875 -0.866 -0.368 0.397 -0.8408 -0.2453 0.5955 -0.765 -0.1159 0.7501 -0.6511 0.1875 0.866 -0.4636 0.397 0.8408 -0.368 0.2047 0.9455 -0.2531 0.5955 0.765 -0.2453 0.4233 0.8965 -0.1308 0.2116 0.9773 0 0.7501 0.6511 -0.1159 0.6142 0.7891 0 0.4233 0.8965 0.1308 0.2047 0.9455 0.2531 0.1159 0.7501 -0.6511 0.2453 0.5955 -0.765 0.3313 0.7408 -0.5844 0.368 0.397 -0.8408 0.4732 0.5541 -0.6849 0.5541 0.6849 -0.4732 0.4636 0.1875 -0.866 0.5844 0.3313 -0.7408 0.6849 0.4732 -0.5541 0.7408 0.5844 -0.3313 0.5257 0 -0.8507 0.6511 0.1159 -0.7501 0.765 0.2453 -0.5955 0.8408 0.368 -0.397 0.866 0.4636 -0.1875 0.3477 0 -0.9376 0.1227 0 -0.9924 -0.1227 0 -0.9924 -0.3477 0 -0.9376 0.2531 0.2047 -0.9455 0.1308 0.4233 -0.8965 0 0.2116 -0.9773 0 0.6142 -0.7891 -0.1308 0.4233 -0.8965 -0.2531 0.2047 -0.9455 0.6511 0 -0.7501 0.9773 0 -0.2116 0.8965 0 -0.4233 0.9455 0.2531 -0.2047 0.8965 0.1308 -0.4233 0.7891 0 -0.6142 -0.6511 0 -0.7501 -0.7891 0 -0.6142 -0.8965 0.1308 -0.4233 -0.8965 0 -0.4233 -0.9455 0.2531 -0.2047 -0.9773 0 -0.2116'/>
 47                                          </IndexedLineSet>
 48                                     </Shape>
 49                                </Switch>
 50 
                              <!-- ROUTE information for SOLID_SWITCH node:  [from DETECTION.solidChoice to whichChoice ] -->
                              <Switch DEF='SOLID_SWITCHwhichChoice='0'>
 51                                     <WorldInfo info='"initial choice is null node (WorldInfo), meaning no solid beam"'/>
 52                                     <Shape>
 53                                          <Appearance>
 54 
                                             <!-- ROUTE information for CYLINDER_COLOR node:  [from DETECTION.beamColor to emissiveColor ] -->
                                             <Material DEF='CYLINDER_COLORdiffuseColor='.1 .1 .1'>
 55                                                    <IS>
 56                                                         <connect nodeField='transparencyprotoField='transparency'/>
 57                                                    </IS>
 58                                               </Material>
 59                                          </Appearance>
 60                                          <IndexedFaceSet creaseAngle='.01solid='falsecoordIndex='0 1 2 -1 1 3 4 -1 2 4 5 -1 3 6 7 -1 4 7 8 -1 5 8 9 -1 6 10 11 -1 7 11 12 -1 8 12 13 -1 9 13 14 -1 10 15 16 -1 11 16 17 -1 12 17 18 -1 13 18 19 -1 14 19 20 -1 1 4 2 -1 3 7 4 -1 4 8 5 -1 6 11 7 -1 7 12 8 -1 8 13 9 -1 10 16 11 -1 11 17 12 -1 12 18 13 -1 13 19 14 -1 21 22 23 -1 22 24 25 -1 23 25 26 -1 24 27 28 -1 25 28 29 -1 26 29 30 -1 27 31 32 -1 28 32 33 -1 29 33 34 -1 30 34 35 -1 31 0 2 -1 32 2 5 -1 33 5 9 -1 34 9 14 -1 35 14 20 -1 22 25 23 -1 24 28 25 -1 25 29 26 -1 27 32 28 -1 28 33 29 -1 29 34 30 -1 31 2 32 -1 32 5 33 -1 33 9 34 -1 34 14 35 -1 21 36 22 -1 36 37 38 -1 22 38 24 -1 37 39 40 -1 38 40 41 -1 24 41 27 -1 41 42 43 -1 27 43 31 -1 31 44 0 -1 36 38 22 -1 37 40 38 -1 38 41 24 -1 40 42 41 -1 41 43 27 -1 43 44 31 -1 15 45 16 -1 45 46 47 -1 16 47 17 -1 46 48 49 -1 47 49 50 -1 17 50 18 -1 48 51 52 -1 49 52 53 -1 50 53 54 -1 18 54 19 -1 51 55 56 -1 52 56 57 -1 53 57 58 -1 54 58 59 -1 19 59 20 -1 45 47 16 -1 46 49 47 -1 47 50 17 -1 48 52 49 -1 49 53 50 -1 50 54 18 -1 51 56 52 -1 52 57 53 -1 53 58 54 -1 54 59 19 -1 15 60 45 -1 45 61 46 -1 61 62 63 -1 46 63 48 -1 63 64 65 -1 48 65 51 -1 64 66 67 -1 65 67 68 -1 51 68 55 -1 60 61 45 -1 61 63 46 -1 62 64 63 -1 63 65 48 -1 64 67 65 -1 65 68 51 -1 55 69 56 -1 69 70 71 -1 56 71 57 -1 70 72 73 -1 71 73 74 -1 57 74 58 -1 72 75 76 -1 73 76 77 -1 74 77 78 -1 58 78 59 -1 75 79 80 -1 76 80 81 -1 77 81 82 -1 78 82 83 -1 59 83 20 -1 69 71 56 -1 70 73 71 -1 71 74 57 -1 72 76 73 -1 73 77 74 -1 74 78 58 -1 75 80 76 -1 76 81 77 -1 77 82 78 -1 78 83 59 -1 55 84 69 -1 84 85 86 -1 69 86 70 -1 85 87 88 -1 86 88 89 -1 70 89 72 -1 87 90 91 -1 88 91 92 -1 89 92 93 -1 72 93 75 -1 90 94 95 -1 91 95 96 -1 92 96 97 -1 93 97 98 -1 75 98 79 -1 84 86 69 -1 85 88 86 -1 86 89 70 -1 87 91 88 -1 88 92 89 -1 89 93 72 -1 90 95 91 -1 91 96 92 -1 92 97 93 -1 93 98 75 -1 79 99 80 -1 99 100 101 -1 80 101 81 -1 100 102 103 -1 101 103 104 -1 81 104 82 -1 102 105 106 -1 103 106 107 -1 104 107 108 -1 82 108 83 -1 105 21 23 -1 106 23 26 -1 107 26 30 -1 108 30 35 -1 83 35 20 -1 99 101 80 -1 100 103 101 -1 101 104 81 -1 102 106 103 -1 103 107 104 -1 104 108 82 -1 105 23 106 -1 106 26 107 -1 107 30 108 -1 108 35 83 -1 79 109 99 -1 109 110 111 -1 99 111 100 -1 110 112 113 -1 111 113 114 -1 100 114 102 -1 112 115 116 -1 113 116 117 -1 114 117 118 -1 102 118 105 -1 115 119 120 -1 116 120 121 -1 117 121 122 -1 118 122 123 -1 105 123 21 -1 109 111 99 -1 110 113 111 -1 111 114 100 -1 112 116 113 -1 113 117 114 -1 114 118 102 -1 115 120 116 -1 116 121 117 -1 117 122 118 -1 118 123 105 -1 119 115 124 -1 115 112 128 -1 124 128 125 -1 112 110 129 -1 128 129 130 -1 125 130 126 -1 110 109 131 -1 129 131 132 -1 130 132 133 -1 126 133 127 -1 109 79 98 -1 131 98 97 -1 132 97 96 -1 133 96 95 -1 127 95 94 -1 115 128 124 -1 112 129 128 -1 128 130 125 -1 110 131 129 -1 129 132 130 -1 130 133 126 -1 109 98 131 -1 131 97 132 -1 132 96 133 -1 133 95 127 -1 39 37 135 -1 37 36 137 -1 135 137 138 -1 136 138 139 -1 36 21 123 -1 137 123 122 -1 138 122 121 -1 139 121 120 -1 134 120 119 -1 37 137 135 -1 135 138 136 -1 36 123 137 -1 137 122 138 -1 138 121 139 -1 139 120 134 -1 94 90 140 -1 90 87 141 -1 87 85 142 -1 141 142 143 -1 85 84 144 -1 142 144 145 -1 84 55 68 -1 144 68 67 -1 145 67 66 -1 90 141 140 -1 87 142 141 -1 85 144 142 -1 142 145 143 -1 84 68 144 -1 144 67 145 -1'>
 61                                               <Coordinate point='0.5257 0 0.8507 0.3477 0 0.9376 0.4636 0.1875 0.866 0.1227 0 0.9924 0.2531 0.2047 0.9455 0.368 0.397 0.8408 -0.1227 0 0.9924 0 0.2116 0.9773 0.1308 0.4233 0.8965 0.2453 0.5955 0.765 -0.3477 0 0.9376 -0.2531 0.2047 0.9455 -0.1308 0.4233 0.8965 0 0.6142 0.7891 0.1159 0.7501 0.6511 -0.5257 0 0.8507 -0.4636 0.1875 0.866 -0.368 0.397 0.8408 -0.2453 0.5955 0.765 -0.1159 0.7501 0.6511 0 0.8507 0.5257 0.8507 0.5257 0 0.866 0.4636 0.1875 0.7501 0.6511 0.1159 0.8408 0.368 0.397 0.7408 0.5844 0.3313 0.5955 0.765 0.2453 0.765 0.2453 0.5955 0.6849 0.4732 0.5541 0.5541 0.6849 0.4732 0.397 0.8408 0.368 0.6511 0.1159 0.7501 0.5844 0.3313 0.7408 0.4732 0.5541 0.6849 0.3313 0.7408 0.5844 0.1875 0.866 0.4636 0.9376 0.3477 0 0.9924 0.1227 0 0.9455 0.2531 0.2047 0.9924 0 0 0.9773 0 0.2116 0.8965 0.1308 0.4233 0.8965 0 0.4233 0.7891 0 0.6142 0.6511 0 0.7501 -0.6511 0.1159 0.7501 -0.765 0.2453 0.5955 -0.5844 0.3313 0.7408 -0.8408 0.368 0.397 -0.6849 0.4732 0.5541 -0.4732 0.5541 0.6849 -0.866 0.4636 0.1875 -0.7408 0.5844 0.3313 -0.5541 0.6849 0.4732 -0.3313 0.7408 0.5844 -0.8507 0.5257 0 -0.7501 0.6511 0.1159 -0.5955 0.765 0.2453 -0.397 0.8408 0.368 -0.1875 0.866 0.4636 -0.6511 0 0.7501 -0.7891 0 0.6142 -0.8965 0 0.4233 -0.8965 0.1308 0.4233 -0.9773 0 0.2116 -0.9455 0.2531 0.2047 -0.9924 0 0 -0.9924 0.1227 0 -0.9376 0.3477 0 -0.7501 0.6511 -0.1159 -0.5955 0.765 -0.2453 -0.6142 0.7891 0 -0.397 0.8408 -0.368 -0.4233 0.8965 -0.1308 -0.4233 0.8965 0.1308 -0.1875 0.866 -0.4636 -0.2047 0.9455 -0.2531 -0.2116 0.9773 0 -0.2047 0.9455 0.2531 0 0.8507 -0.5257 0 0.9376 -0.3477 0 0.9924 -0.1227 0 0.9924 0.1227 0 0.9376 0.3477 -0.866 0.4636 -0.1875 -0.8408 0.368 -0.397 -0.7408 0.5844 -0.3313 -0.765 0.2453 -0.5955 -0.6849 0.4732 -0.5541 -0.5541 0.6849 -0.4732 -0.6511 0.1159 -0.7501 -0.5844 0.3313 -0.7408 -0.4732 0.5541 -0.6849 -0.3313 0.7408 -0.5844 -0.5257 0 -0.8507 -0.4636 0.1875 -0.866 -0.368 0.397 -0.8408 -0.2453 0.5955 -0.765 -0.1159 0.7501 -0.6511 0.1875 0.866 -0.4636 0.397 0.8408 -0.368 0.2047 0.9455 -0.2531 0.5955 0.765 -0.2453 0.4233 0.8965 -0.1308 0.2116 0.9773 0 0.7501 0.6511 -0.1159 0.6142 0.7891 0 0.4233 0.8965 0.1308 0.2047 0.9455 0.2531 0.1159 0.7501 -0.6511 0.2453 0.5955 -0.765 0.3313 0.7408 -0.5844 0.368 0.397 -0.8408 0.4732 0.5541 -0.6849 0.5541 0.6849 -0.4732 0.4636 0.1875 -0.866 0.5844 0.3313 -0.7408 0.6849 0.4732 -0.5541 0.7408 0.5844 -0.3313 0.5257 0 -0.8507 0.6511 0.1159 -0.7501 0.765 0.2453 -0.5955 0.8408 0.368 -0.397 0.866 0.4636 -0.1875 0.3477 0 -0.9376 0.1227 0 -0.9924 -0.1227 0 -0.9924 -0.3477 0 -0.9376 0.2531 0.2047 -0.9455 0.1308 0.4233 -0.8965 0 0.2116 -0.9773 0 0.6142 -0.7891 -0.1308 0.4233 -0.8965 -0.2531 0.2047 -0.9455 0.6511 0 -0.7501 0.9773 0 -0.2116 0.8965 0 -0.4233 0.9455 0.2531 -0.2047 0.8965 0.1308 -0.4233 0.7891 0 -0.6142 -0.6511 0 -0.7501 -0.7891 0 -0.6142 -0.8965 0.1308 -0.4233 -0.8965 0 -0.4233 -0.9455 0.2531 -0.2047 -0.9773 0 -0.2116'/>
 62                                          </IndexedFaceSet>
 63                                     </Shape>
 64                                </Switch>
 65 
                              <!-- ROUTE information for CAP_SWITCH node:  [from DETECTION.solidChoice to whichChoice ] -->
                              <Switch DEF='CAP_SWITCHwhichChoice='1'>
 66                                     <WorldInfo info='"initial choice is null node (WorldInfo), meaning no solid beam"'/>
 67                                     <Transform>
 68                                          <Shape>
 69                                               <Appearance>
 70 
                                                  <!-- ROUTE information for CAP_COLOR node:  [from DETECTION.beamColor to emissiveColor ] -->
                                                  <Material DEF='CAP_COLORdiffuseColor='.1 .1 .1'>
 71                                                         <IS>
 72                                                              <connect nodeField='transparencyprotoField='transparency'/>
 73                                                         </IS>
 74                                                    </Material>
 75                                               </Appearance>
 76                                               <Cylinder DEF='BeamTopCylinderheight='0.0001side='false'/>
 77                                          </Shape>
 78                                     </Transform>
 79                                </Switch>
 80                           </Transform>
 81                      </Group>
 82                      <!-- Non-renderable animation controls -->
 83 
 84                           <field name='nametype='SFStringaccessType='initializeOnly'/>
 85                           <field name='contacttype='SFBoolaccessType='inputOnly'/>
 86                           <field name='wireframetype='SFBoolaccessType='initializeOnly'/>
 87                           <field name='solidtype='SFBoolaccessType='initializeOnly'/>
 88                           <field name='contactColortype='SFColoraccessType='initializeOnly'/>
 89                           <field name='noContactColortype='SFColoraccessType='initializeOnly'/>
 90                           <field name='beamColortype='SFColoraccessType='outputOnly'/>
 91                           <field name='wireframeChoicetype='SFInt32accessType='outputOnly'/>
 92                           <field name='solidChoicetype='SFInt32accessType='outputOnly'/>
 93                           <field name='tracetype='SFBoolvalue='falseaccessType='initializeOnly'
                          appinfo='internal flag to turn on Script tracing'/>
 94                           <IS>
 95                                <connect nodeField='nameprotoField='name'/>
 96                                <connect nodeField='contactprotoField='contact'/>
 97                                <connect nodeField='wireframeprotoField='wireframe'/>
 98                                <connect nodeField='solidprotoField='solid'/>
 99                                <connect nodeField='contactColorprotoField='contactColor'/>
100                                <connect nodeField='noContactColorprotoField='noContactColor'/>
101                           </IS>
  <![CDATA[
          
ecmascript:
function initialize ()
{
	beamColor = noContactColor;
	if (wireframe == true) wireframeChoice = 1;
	if (solid     == true) solidChoice     = 1;
	if (trace) Browser.println ('[BeamHemisphere ' + name + '] trace=' + trace);
	if (trace) Browser.println ('[BeamHemisphere ' + name + '] wireframeChoice=' + wireframeChoice + ', solidChoice=' + solidChoice);
	if (trace) Browser.println ('[BeamHemisphere ' + name + '] contactColor=' + contactColor.toString() + ', noContactColor=' + noContactColor.toString());
}
function contact (newDetect, timeStamp)
{
	if (newDetect) beamColor = contactColor;
	else           beamColor = noContactColor;
	if (trace) Browser.println ('[BeamHemisphere ' + name + '] contact=' + newDetect + ', beamColor=' + beamColor.toString());
}

        
]]>
103                      </Script>
104                      < ROUTE  fromNode='DETECTION' fromField='beamColor' toNode='WIRE_COLOR' toField='emissiveColor'/>
105                      < ROUTE  fromNode='DETECTION' fromField='beamColor' toNode='CYLINDER_COLOR' toField='emissiveColor'/>
106                      < ROUTE  fromNode='DETECTION' fromField='beamColor' toNode='CAP_COLOR' toField='emissiveColor'/>
107                      < ROUTE  fromNode='DETECTION' fromField='wireframeChoice' toNode='WIREFRAME_SWITCH' toField='whichChoice'/>
108                      < ROUTE  fromNode='DETECTION' fromField='solidChoice' toNode='SOLID_SWITCH' toField='whichChoice'/>
109                      < ROUTE  fromNode='DETECTION' fromField='solidChoice' toNode='CAP_SWITCH' toField='whichChoice'/>
110 
                    <!-- ROUTE information for BEAM_CALCULATE node:  [from beamScale to BEAM_CONTROL.scale ] [from direction to BEAM_CONTROL.rotation ] -->
                    <Script DEF='BEAM_CALCULATE'>
111                           <field name='nametype='SFStringaccessType='initializeOnly'/>
112                           <field name='rangetype='SFFloataccessType='inputOnly'/>
113                           <field name='defaultRangetype='SFFloataccessType='initializeOnly'/>
114                           <field name='beamScaletype='SFVec3faccessType='outputOnly'/>
115                           <field name='directiontype='SFRotationaccessType='outputOnly'/>
116                           <field name='tracetype='SFBoolvalue='falseaccessType='initializeOnly'
                          appinfo='internal flag to turn on Script tracing'/>
117                           <IS>
118                                <connect nodeField='nameprotoField='name'/>
119                                <connect nodeField='rangeprotoField='range'/>
120                                <connect nodeField='defaultRangeprotoField='defaultRange'/>
121                           </IS>
  <![CDATA[
          
ecmascript:
function initialize ()
{
	// Note that VRML scale factor triplets all equal to zero are not allowed
	if (defaultRange == 0)      defaultRange = .0001;
	beamScale = new SFVec3f (defaultRange, defaultRange, defaultRange);
	if (trace) ('[BeamHemisphere ' + name + '] initial beamScale=', beamScale.toString());
}
function range (newRange, timeStamp)
{
	if (newRange < 0)
	{
		direction     = new SFRotation (1, 0, 0, 3.141592653);
		beamScale = new SFVec3f (-newRange, -newRange, -newRange);
	}
	else if (newRange == 0)
	{
		direction     = new SFRotation (1, 0, 0, 0);
		beamScale = new SFVec3f ( .0001, .0001, .0001 );  // zero scale is illegal
	}
	else // (newRange > 0)
	{
		direction     = new SFRotation (1, 0, 0, 0);
		beamScale = new SFVec3f (newRange, newRange, newRange);
	}
}

        
]]>
123                      </Script>
124                      < ROUTE  fromNode='BEAM_CALCULATE' fromField='beamScale' toNode='BEAM_CONTROL' toField='scale'/>
125                      < ROUTE  fromNode='BEAM_CALCULATE' fromField='direction' toNode='BEAM_CONTROL' toField='rotation'/>
126                 </ProtoBody>
127            </ProtoDeclare>
128            <!-- Viewable geometry for this scene is anchored text that links to an example showing ExternProtoDeclare usage of BeamCylinder -->
129            <Anchor description='Beam Hemisphere Example'   url=' "BeamHemisphereExample.x3d" "../../CommunicationsAndSensors/Beam/BeamHemisphereExample.x3d" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamHemisphereExample.x3d" "BeamHemisphereExample.wrl" "../../CommunicationsAndSensors/Beam/BeamHemisphereExample.wrl" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamHemisphereExample.wrl" '>
130                 <Shape>
131                      <Appearance>
132                           <Material diffuseColor='0 1 1emissiveColor='0 1 1'/>
133                      </Appearance>
134                      <Text string='"BeamHemispherePrototype" "is a Prototype definition file." "" "To see an example scene" "click this text and view" "BeamHemisphereExample."'>
135                           <FontStyle justify='"MIDDLE" "MIDDLE"'/>
136                      </Text>
137                 </Shape>
138                 <!-- Transparent box to simplify user selection (i.e. "clickability") -->
139                 <Shape>
140                      <Box size='11 6 0.1'/>
141                      <Appearance>
142                           <Material transparency='1'/>
143                      </Appearance>
144                 </Shape>
145            </Anchor>
146       </Scene>
147  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: BEAM_CALCULATE, BEAM_CONTROL, BeamTopCylinder, CAP_COLOR, CAP_SWITCH, CYLINDER_COLOR, DETECTION, LockedDownInterface2D, SOLID_SWITCH, WIRE_COLOR, WIREFRAME_SWITCH

Index for Viewpoint node: Viewpoint_1

Index for ProtoDeclare definition: BeamHemisphere
-->
X3D Tooltips element index: Anchor, Appearance, Background, Box, connect, Coordinate, Cylinder, field, FontStyle, Group, head, IndexedFaceSet, IndexedLineSet, IS, Material, meta, NavigationInfo, ProtoBody, ProtoDeclare, ProtoInterface, ROUTE, Scene, Script, Shape, Switch, Text, Transform, Viewpoint, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

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

BEAM_CALCULATE
Script
beamScale
SFVec3f

ROUTE
event to
(1)
BEAM_CONTROL
Transform
scale
SFVec3f
BEAM_CALCULATE
Script
direction
SFRotation

ROUTE
event to
(1)
BEAM_CONTROL
Transform
rotation
SFRotation

DETECTION
Script
beamColor
SFColor

ROUTE
event to
(1)
WIRE_COLOR
Material
emissiveColor
SFColor
DETECTION
Script
beamColor
SFColor

ROUTE
event to
(1)
CYLINDER_COLOR
Material
emissiveColor
SFColor
DETECTION
Script
beamColor
SFColor

ROUTE
event to
(1)
CAP_COLOR
Material
emissiveColor
SFColor
DETECTION
Script
wireframeChoice
SFInt32

ROUTE
event to
(1)
WIREFRAME_SWITCH
Switch
whichChoice
SFInt32
DETECTION
Script
solidChoice
SFInt32

ROUTE
event to
(1)
SOLID_SWITCH
Switch
whichChoice
SFInt32
DETECTION
Script
solidChoice
SFInt32

ROUTE
event to
(1)
CAP_SWITCH
Switch
whichChoice
SFInt32

line 129
Anchor
description='Beam Hemisphere Example' 
User-interaction hint for this node. 

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/CommunicationsAndSensors/Beam/BeamHemispherePrototypeIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamHemispherePrototype.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)
    <ProtoDeclare name='ProtoName'> <field name='fieldName'/> </ProtoDeclare> -->

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