<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<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 '>
<head>
<meta name='titlecontent='SimpleBuildingConstructionExample.x3d'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='17 October 2001'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='descriptioncontent='Example use of simple prototypes for building construction: Wall, Floor, Level and Building.'/>
<meta name='identifiercontent=' https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionExample.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo title='SimpleBuildingConstructionExample.x3d'/>
<ExternProtoDeclare name='Floorappinfo='Each Floor cantains the current floor surface plus a ceiling surface for the floor immediately underneath. A Floor does not include exterior or interior wall polygons.'
  url=' "SimpleBuildingConstructionPrototypes.x3d#Floor" "https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.x3d#Floor" "SimpleBuildingConstructionPrototypes.wrl#Floor" "https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.wrl#Floor" '>
<field name='nametype='SFStringaccessType='initializeOnly'
 appinfo='Identifying name for this Floor.'/>

<field name='descriptiontype='MFStringaccessType='initializeOnly'
 appinfo='Description info for this construction.'/>

<field name='sizetype='SFNodeaccessType='initializeOnly'
 appinfo='single-value Coordinate node with dimension x=width y=height z=depth in meters'/>

<field name='floorAppearancetype='SFNodeaccessType='initializeOnly'
 appinfo='Appearance node with Material colors ImageTexture etc. for this construction.'/>

<field name='ceilingAppearancetype='SFNodeaccessType='initializeOnly'
 appinfo='Appearance node with Material colors ImageTexture etc. for this construction.'/>

<field name='showSidestype='SFBoolaccessType='initializeOnly'
 appinfo='Whether sides are visible.'/>

<field name='widthtype='SFFloataccessType='outputOnly'
 appinfo='width of front side of floor aligned with local X axis.'/>

<field name='heighttype='SFFloataccessType='outputOnly'
 appinfo='height of vertical distance between floor and ceiling directly underneath aligned with local Y axis.'/>

<field name='depthtype='SFFloataccessType='outputOnly'
 appinfo='depth of horizontal side of floor aligned with local -Z axis.'/>

<field name='builttype='SFBoolaccessType='outputOnly'
 appinfo='Indicate whether initialization complete.'/>
</ExternProtoDeclare>
<ExternProtoDeclare name='Wallappinfo='Each Wall contains exterior and interior walls.'
  url=' "SimpleBuildingConstructionPrototypes.x3d#Wall" "https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.x3d#Wall" "SimpleBuildingConstructionPrototypes.wrl#Wall" "https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.wrl#Wall" '>
<field name='nametype='SFStringaccessType='initializeOnly'
 appinfo='Identifying name for this Wall.'/>

<field name='descriptiontype='MFStringaccessType='initializeOnly'
 appinfo='Description info for this construction.'/>

<field name='sizetype='SFNodeaccessType='initializeOnly'
 appinfo='single-value Coordinate node with dimension x=width y=height z=depth in meters'/>

<field name='interiorAppearancetype='SFNodeaccessType='initializeOnly'
 appinfo='Appearance node with Material colors ImageTexture etc. for this construction.'/>

<field name='exteriorAppearancetype='SFNodeaccessType='initializeOnly'
 appinfo='Appearance node with Material colors ImageTexture etc. for this construction.'/>

<field name='showSidestype='SFBoolaccessType='initializeOnly'
 appinfo='Whether sides are visible.'/>

<field name='widthtype='SFFloataccessType='outputOnly'
 appinfo='width of horizontal side of wall aligned with local X axis.'/>

<field name='heighttype='SFFloataccessType='outputOnly'
 appinfo='height of Wall aligned with local Y axis.'/>

<field name='depthtype='SFFloataccessType='outputOnly'
 appinfo='depth of horizontal thickness of Wall aligned with local -Z axis.'/>

<field name='builttype='SFBoolaccessType='outputOnly'
 appinfo='Indicate whether initialization complete.'/>
</ExternProtoDeclare>
<ExternProtoDeclare name='Levelappinfo='collection of a Floor and four Walls working in order up from lowest level (i.e. story) of the Building'
  url=' "SimpleBuildingConstructionPrototypes.x3d#Level" "https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.x3d#Level" "SimpleBuildingConstructionPrototypes.wrl#Level" "https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.wrl#Level" '>
<field name='nametype='SFStringaccessType='initializeOnly'
 appinfo='Identifying name for this Level.'/>

<field name='descriptiontype='MFStringaccessType='initializeOnly'
 appinfo='Description info for this construction.'/>

<field name='floortype='MFNodeaccessType='initializeOnly'
 appinfo='contains single Floor node'/>

<field name='frontWalltype='MFNodeaccessType='initializeOnly'
 appinfo='contains single front Wall node'/>

<field name='rightWalltype='MFNodeaccessType='initializeOnly'
 appinfo='contains single right-side Wall node'/>

<field name='rearWalltype='MFNodeaccessType='initializeOnly'
 appinfo='contains single rear Wall node'/>

<field name='leftWalltype='MFNodeaccessType='initializeOnly'
 appinfo='contains single left-side Wall node'/>

<field name='widthtype='SFFloataccessType='outputOnly'
 appinfo='Calculated width of horizontal side of Level aligned with local X axis.'/>

<field name='heighttype='SFFloataccessType='outputOnly'
 appinfo='Calculated height of Level aligned with local Y axis.'/>

<field name='depthtype='SFFloataccessType='outputOnly'
 appinfo='Calculated depth of horizontal thickness of Level aligned with local -Z axis.'/>

<field name='builttype='SFBoolaccessType='outputOnly'
 appinfo='Indicate whether initialization complete.'/>
</ExternProtoDeclare>
<ExternProtoDeclare name='Buildingappinfo='Collect prototypes for levels floors and walls to create a simple Building.'
  url=' "SimpleBuildingConstructionPrototypes.x3d#Building" "https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.x3d#Building" "SimpleBuildingConstructionPrototypes.wrl#Building" "https://savage.nps.edu/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.wrl#Building" '>
<field name='nametype='SFStringaccessType='initializeOnly'
 appinfo='Identifying name of this Building.'/>

<field name='descriptiontype='MFStringaccessType='initializeOnly'
 appinfo='Description info for this construction.'/>

<field name='authorAssisttype='SFBoolaccessType='initializeOnly'
 appinfo='whether or not to display author assist tools such as coordinate axes measuring grids etc.'/>

<field name='xHeadingtype='SFFloataccessType='initializeOnly'
 appinfo='compass direction in degrees of building X axis as seen when regarding front face of building pointing from left side to right side.'/>

<field name='orientationtype='SFRotationaccessType='outputOnly'
 appinfo='output rotation value calculated from xHeading as (0 1 0 xHeading * 2pi / 360)'/>

<field name='latitudetype='SFStringaccessType='initializeOnly'
 appinfo='example value: 120.30 E'/>

<field name='longitudetype='SFStringaccessType='initializeOnly'
 appinfo='example value: 20.45 N'/>

<field name='levelstype='MFNodeaccessType='initializeOnly'
 appinfo='contains array of Level nodes'/>

<field name='rooftype='SFNodeaccessType='initializeOnly'
 appinfo='Geometry for Roof positioned above topmost Level'/>

<field name='roofHeighttype='SFFloataccessType='initializeOnly'
 appinfo='height value for provided Roof geometry.'/>

<field name='widthtype='SFFloataccessType='outputOnly'
 appinfo='Calculated width of horizontal side of Building aligned with local X axis.'/>

<field name='heighttype='SFFloataccessType='outputOnly'
 appinfo='Calculated height of Building aligned with local Y axis.'/>

<field name='depthtype='SFFloataccessType='outputOnly'
 appinfo='Calculated depth of horizontal thickness of Building aligned with local -Z axis.'/>

<field name='builttype='SFBoolaccessType='outputOnly'
 appinfo='Indicate whether initialization complete.'/>
</ExternProtoDeclare>
<!-- ============================ -->
<!-- example instance -->
<Background groundAngle='1.57groundColor='0.6 0.9 0.6 0.6 0.9 0.6skyColor='0.6 0.6 0.9'/>
<Viewpoint description='Building, Level, Wall and Floor prototype examples. Next Viewpoints are calculated based on Building size.orientation='1 0 0 -0.3position='4 9 15'/>
<Switch DEF='TesterwhichChoice='1'>
<!-- test one child only -->
<Transform translation='-5 0 0'>
<ProtoInstance name='Floor'>
<fieldValue name='namevalue='hidden1'/>
<fieldValue name='descriptionvalue='"simple test floor"'/>
<fieldValue name='size'>
<!-- point dimensions: width height depth -->
<Coordinate point='10 0.2 5'/>
</fieldValue>
<fieldValue name='floorAppearance'>
<Appearance>
<Material diffuseColor='0.3 0.3 0.1'/>
</Appearance>
</fieldValue>
<fieldValue name='ceilingAppearance'>
<Appearance>
<Material/>
</Appearance>
</fieldValue>
<fieldValue name='showSidesvalue='true'/>
</ProtoInstance>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='hidden2'/>
<fieldValue name='descriptionvalue='"simple test wall"'/>
<!-- point dimensions: width height depth -->
<fieldValue name='size'>
<Coordinate point='10 2.5 0.5'/>
</fieldValue>
<fieldValue name='interiorAppearance'>
<Appearance>
<Material DEF='GreendiffuseColor='0.3 0.6 0.1'/>
</Appearance>
</fieldValue>
<fieldValue name='exteriorAppearance'>
<Appearance>
<Material DEF='LightBluediffuseColor='0.5 0.5 0.8'/>
</Appearance>
</fieldValue>
<fieldValue name='showSidesvalue='true'/>
</ProtoInstance>
</Transform>
<ProtoInstance name='Building'>
<fieldValue name='namevalue='exemplar'/>
<fieldValue name='descriptionvalue='"A set of example building prototype instances."'/>
<fieldValue name='authorAssistvalue='true'/>
<fieldValue name='xHeadingvalue='335'/>
<fieldValue name='latitudevalue='40 52 N'/>
<fieldValue name='longitudevalue='126 E'/>
<fieldValue name='levels'>
<ProtoInstance name='LevelDEF='LevelOne'>
<fieldValue name='namevalue='One'/>
<fieldValue name='descriptionvalue='"first level is ground story of building"'/>
<fieldValue name='floor'>
<ProtoInstance name='FloorDEF='BottomFloor'>
<fieldValue name='namevalue='bottom'/>
<fieldValue name='descriptionvalue='"planar surface for first floor"'/>
<fieldValue name='size'>
<!-- point dimensions: width height depth -->
<Coordinate DEF='FloorSizeCoordinateNodepoint='10 0.2 5'/>
</fieldValue>
<fieldValue name='floorAppearance'>
<Appearance DEF='FloorAppearanceNode'>
<Material DEF='OlivediffuseColor='0.3 0.3 0.1'/>
</Appearance>
</fieldValue>
<fieldValue name='ceilingAppearance'>
<Appearance DEF='CeilingAppearanceNode'>
<Material DEF='LightGrey'/>
</Appearance>
</fieldValue>
</ProtoInstance>
</fieldValue>
<fieldValue name='frontWall'>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='frontOne'/>
<fieldValue name='descriptionvalue='"example front Wall"'/>
<fieldValue name='size'>
<Coordinate DEF='FacingWallSizeCoordinateNodepoint='10 2.5 0.5'/>
</fieldValue>
<fieldValue name='interiorAppearance'>
<Appearance DEF='InteriorAppearanceNode'>
<Material diffuseColor='0.3 0.3 0.1'/>
</Appearance>
</fieldValue>
<fieldValue name='exteriorAppearance'>
<Appearance DEF='ExteriorAppearanceNode'>
<Material/>
</Appearance>
</fieldValue>
</ProtoInstance>
</fieldValue>
<fieldValue name='rightWall'>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='rightOne'/>
<fieldValue name='descriptionvalue='"example right Wall"'/>
<fieldValue name='size'>
<Coordinate DEF='SideWallSizeCoordinateNodepoint='5 2.5 0.5'/>
</fieldValue>
<fieldValue name='interiorAppearance'>
<Appearance USE='InteriorAppearanceNode'/>
</fieldValue>
<fieldValue name='exteriorAppearance'>
<Appearance DEF='ExteriorAppearanceNode2'> </Appearance>
</fieldValue>
</ProtoInstance>
</fieldValue>
<fieldValue name='rearWall'>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='rearOne'/>
<fieldValue name='descriptionvalue='"example rear Wall"'/>
<fieldValue name='size'>
<Coordinate USE='FacingWallSizeCoordinateNode'/>
</fieldValue>
<fieldValue name='interiorAppearance'>
<Appearance USE='InteriorAppearanceNode'/>
</fieldValue>
<fieldValue name='exteriorAppearance'>
<Appearance USE='ExteriorAppearanceNode'/>
</fieldValue>
</ProtoInstance>
</fieldValue>
<fieldValue name='leftWall'>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='leftOne'/>
<fieldValue name='descriptionvalue='"example left Wall"'/>
<fieldValue name='size'>
<Coordinate USE='SideWallSizeCoordinateNode'/>
</fieldValue>
<fieldValue name='interiorAppearance'>
<Appearance USE='InteriorAppearanceNode'/>
</fieldValue>
<fieldValue name='exteriorAppearance'>
<Appearance USE='ExteriorAppearanceNode2'/>
</fieldValue>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
<ProtoInstance name='LevelDEF='LevelTwo'>
<fieldValue name='namevalue='Two'/>
<fieldValue name='descriptionvalue='"second level of building has an open front Wall"'/>
<fieldValue name='floor'>
<ProtoInstance USE='BottomFloor'/>
</fieldValue>
<!-- no frontWall, but still need null-node fieldValue to avoid CosmoPlayer crash -->
<fieldValue name='frontWall'>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='frontTwo'/>
<fieldValue name='descriptionvalue='"test default values are null wall"'/>
</ProtoInstance>
</fieldValue>
<fieldValue name='rightWall'>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='rightTwo'/>
<fieldValue name='descriptionvalue='"example right Wall"'/>
<fieldValue name='size'>
<Coordinate USE='SideWallSizeCoordinateNode'/>
</fieldValue>
<fieldValue name='interiorAppearance'>
<Appearance DEF='InteriorAppearanceNode2'>
<Material diffuseColor='0.8 0.8 0.2'/>
</Appearance>
</fieldValue>
<fieldValue name='exteriorAppearance'>
<Appearance DEF='ExteriorAppearanceNode3'>
<Material diffuseColor='0.8 0.4 0.1'/>
</Appearance>
</fieldValue>
<fieldValue name='showSidesvalue='true'/>
</ProtoInstance>
</fieldValue>
<fieldValue name='rearWall'>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='rearTwo'/>
<fieldValue name='descriptionvalue='"example rear Wall"'/>
<fieldValue name='size'>
<Coordinate USE='FacingWallSizeCoordinateNode'/>
</fieldValue>
<fieldValue name='interiorAppearance'>
<Appearance USE='InteriorAppearanceNode2'/>
</fieldValue>
<fieldValue name='exteriorAppearance'>
<Appearance USE='ExteriorAppearanceNode3'/>
</fieldValue>
<fieldValue name='showSidesvalue='true'/>
</ProtoInstance>
</fieldValue>
<fieldValue name='leftWall'>
<ProtoInstance name='Wall'>
<fieldValue name='namevalue='leftTwo'/>
<fieldValue name='descriptionvalue='"example left Wall"'/>
<fieldValue name='size'>
<Coordinate USE='SideWallSizeCoordinateNode'/>
</fieldValue>
<fieldValue name='interiorAppearance'>
<Appearance USE='InteriorAppearanceNode2'/>
</fieldValue>
<fieldValue name='exteriorAppearance'>
<Appearance USE='ExteriorAppearanceNode3'/>
</fieldValue>
<fieldValue name='showSidesvalue='true'/>
</ProtoInstance>
</fieldValue>
</ProtoInstance>
<ProtoInstance USE='LevelOne'/>
</fieldValue>
<!-- roof can be any geometry. a very simple roof is to re-Use initial Floor. -->
<fieldValue name='roof'>
<!-- center of Box is at origin, so translate to get front left corner of Box at origin. Also adjust for roof overhang. -->
<Transform translation='5 0.2 -2.5'>
<Shape>
<Box size='11 0.4 6'/>
<Appearance>
<Material diffuseColor='0 0 1'/>
</Appearance>
</Shape>
</Transform>
</fieldValue>
<fieldValue name='roofHeightvalue='0.4'/>
</ProtoInstance>
</Switch>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclare definitions : Building, Floor, Level, Wall

Index for DEF nodes : BottomFloor, BrickTexture, CeilingAppearanceNode, ExteriorAppearanceNode, ExteriorAppearanceNode2, ExteriorAppearanceNode3, FacingWallSizeCoordinateNode, FloorAppearanceNode, FloorSizeCoordinateNode, Green, InteriorAppearanceNode, InteriorAppearanceNode2, LevelOne, LevelTwo, LightBlue, LightGrey, Olive, SideWallSizeCoordinateNode, Tester

Index for Viewpoint image : Viewpoint_1
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
    <Prototype name='ProtoName'> <field name='fieldName'/> </Prototype> -->

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