X3D Model Documentation: SpotLightVisualization.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='SpotLightVisualization.x3d'/>
  6            <meta name='descriptioncontent='Create outline geometry to show SpotLight coverage. Author TODO: use the X3D-Edit SpotLight editor to modify and re-visualize the first SpotLight.'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='14 November 2009'/>
  9            <meta name='generatedcontent='14 November 2009'/>
 10            <meta name='modifiedcontent='20 October 2019'/>
 11            <meta name='referencecontent='SpotLightVisualization.png'/>
 12            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter11LightingEnvironmentalEffects/SpotLightVisualization.x3d'/>
 13            <meta name='generatorcontent='../Chapter09EventUtilitiesScripting/CircleLines.java'/>
 14            <meta name='licensecontent='../license.html'/>
 15       </head>
<!--

<!-- -->

<!-- to top Index for DEF nodes: BeamLines, CoordinateAxes, CutOffCone, LeftSide, PolygonalWall, RightSide

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5
-->
 16       <Scene>
 17            <WorldInfo title='SpotLightVisualization.x3d'/>
 18            <NavigationInfo headlight='false'/>
 19            <Background skyColor='0.05 0.1 0.2'/>
 20            <Viewpoint centerOfRotation='0 0 -5description='Two examples of a single SpotLightposition='0 0 15'/>
 21            <Viewpoint centerOfRotation='0 0 -5description='View from aboveorientation='1 0 0 -0.588position='0 10 10'/>
 22            <Transform DEF='RightSidetranslation='6 0 0'>
 23                 <!-- Author TODO: use the X3D-Edit SpotLight editor to modify and re-visualize the first SpotLight -->
 24                 <SpotLight beamWidth='0.1745color='0.8 0.8 0.2cutOffAngle='0.7837radius='10'/>
 25                 <Viewpoint description='View from behind DirectionalLightorientation='-0.8932 0.4488 0.0279 0.1389position='0.5 1 8'/>
 26 
 27 
               <!-- Transform PolygonalWall is a DEF node that has 1 USE node: USE_1 -->
               <Transform DEF='PolygonalWallrotation='1 0 0 1.57079translation='-5 5 -5'>
 28                      <Shape>
 29                           <ElevationGrid solid='falsexDimension='11zDimension='11height='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'/>
 30                           <Appearance>
 31                                <Material diffuseColor='1 1 1'/>
 32                           </Appearance>
 33                      </Shape>
 34                 </Transform>
 35            </Transform>
 36            <Transform DEF='LeftSidetranslation='-6 0 0'>
 37                 <!-- Watch out for global scope bugs if you copy a light by DEF/USE -->
 38                 <SpotLight beamWidth='0.1745color='0.8 0.8 0.2cutOffAngle='0.7837radius='10'/>
 39                 <Viewpoint description='View from behind SpotLightorientation='-0.8932 0.4488 0.0279 0.1389position='0.5 1 8'/>
 40                 <Viewpoint description='Side view of SpotLight outlineorientation='0 1 0 1.57079position='12 0 -2.5'/>
 41                 <Transform DEF='BeamLinesscale='1 1 5'>
 42                      <!-- CircleLines made out of 24 line segments, turned into a cone with 8 side lines -->
 43                      <Shape>
 44                           <IndexedLineSet coordIndex='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 -1 25 0 -1 25 3 -1 25 6 -1 25 9 -1 25 12 -1 25 15 -1 25 18 -1 25 21 -1'>
 45                                <Coordinate point='0 1 -1 0.259 0.966 -1 0.5 0.866 -1 0.707 0.707 -1 0.866 0.5 -1 0.966 0.259 -1 1 0 -1 0.966 -0.259 -1 0.866 -0.5 -1 0.707 -0.707 -1 0.5 -0.866 -1 0.259 -0.966 -1 0 -1 -1 -0.259 -0.966 -1 -0.5 -0.866 -1 -0.707 -0.707 -1 -0.866 -0.5 -1 -0.966 -0.259 -1 -1 -0 -1 -0.966 0.259 -1 -0.866 0.5 -1 -0.707 0.707 -1 -0.5 0.866 -1 -0.259 0.966 -1 0 1 -1 0 0 0 0 0 -1'/>
 46                           </IndexedLineSet>
 47                           <Appearance>
 48                                <Material emissiveColor='0.8 0.8 0.2'/>
 49                           </Appearance>
 50                      </Shape>
 51                      <Shape>
 52                           <IndexedLineSet coordIndex='0 1 -1'>
 53                                <Coordinate point='0 0 0 0 0 -1'/>
 54                           </IndexedLineSet>
 55                           <Appearance>
 56                                <Material/>
 57                           </Appearance>
 58                      </Shape>
 59                 </Transform>
 60                 <Transform DEF='CutOffConescale='5 5 5'>
 61                      <Transform rotation='1 0 0 1.57079translation='0 0 -0.5'>
 62                           <Shape>
 63                                <Cone bottom='falseheight='1'/>
 64                                <Appearance>
 65                                     <Material diffuseColor='0 0 0emissiveColor='0.4 0.4 0.1transparency='0.75'/>
 66                                </Appearance>
 67                           </Shape>
 68                      </Transform>
 69                 </Transform>
 70                 <Inline USE='CoordinateAxes'/>
 71                 <Transform USE='PolygonalWall'/>
 72            </Transform>
 73       </Scene>
 74  </X3D>
<!--

<!-- -->

<!-- to top Index for DEF nodes: BeamLines, CoordinateAxes, CutOffCone, LeftSide, PolygonalWall, RightSide

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5
-->
X3D Tooltips element index: Appearance, Background, Cone, Coordinate, ElevationGrid, head, IndexedLineSet, Inline, Material, meta, NavigationInfo, Scene, Shape, SpotLight, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter11LightingEnvironmentalEffects/SpotLightVisualizationIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter11LightingEnvironmentalEffects/SpotLightVisualization.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)
-->

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