X3D
type: NamedIndividual
has head: head
has scene: Scene
profile: Immersive
version: 3.0
no namespace schema location: https://www.web3d.org/specifications/x3d-3.0.xsd

meta 1 1
type: NamedIndividual
type: meta
has parent: head
content: SimpleBuildingConstructionPrototypes.x3d
name: title

meta 1 2
type: NamedIndividual
type: meta
has parent: head
content: Don Brutzman
name: creator

meta 1 3
type: NamedIndividual
type: meta
has parent: head
content: 17 October 2001
name: created

meta 1 4
type: NamedIndividual
type: meta
has parent: head
content: 20 October 2019
name: modified

meta 1 5
type: NamedIndividual
type: meta
has parent: head
content: Prototypes for simple building construction: Floor, Wall, Level and Building.
name: description

meta 1 6
type: NamedIndividual
type: meta
has parent: head
content: https://www.web3d.org/x3d/content/examples/Savage/Buildings/UHRB/SimpleBuildingConstructionPrototypes.x3d
name: identifier

meta 1 7
type: NamedIndividual
type: meta
has parent: head
content: X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit
name: generator

meta 1 8
type: NamedIndividual
type: meta
has parent: head
content: ../../license.html
name: license

SimpleBuildingConstructionPrototypes.x3d
creator: Don Brutzman
created: 17 October 2001
modified: 20 October 2019
description: Prototypes for simple building construction: Floor, Wall, Level and Building.
generator: X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit
license: ../../license.html

WorldInfo 2 1
type: NamedIndividual
type: WorldInfo
has parent: Scene
title: SimpleBuildingConstructionPrototypes.x3d

ProtoDeclare 2 2
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 2 1
has proto body: ProtoBody 2 2 2
appinfo: 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.
name: Floor

field 2 2 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: initializeOnly
appinfo: Identifying name for this Floor.
name: name
type: SFString

field 2 2 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: initializeOnly
appinfo: Description info for this construction.
name: description
type: MFString

field 2 2 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
has coord: Coordinate 2 2 1 3 1
access type: initializeOnly
appinfo: single-value Coordinate node with dimension x=width y=height z=depth in meters
name: size
type: SFNode

field 2 2 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
has appearance: DefaultFloorAppearance
access type: initializeOnly
appinfo: Appearance node with Material colors ImageTexture etc. for this construction.
name: floorAppearance
type: SFNode

DefaultFloorAppearance
type: NamedIndividual
type: Appearance
has parent: field 2 2 1 4
has material: Material 2 2 1 4 1 1
DEF: DefaultFloorAppearance

Material 2 2 1 4 1 1
type: NamedIndividual
type: Material
has parent: DefaultFloorAppearance
diffuse color: 0.2

field 2 2 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
has appearance: DefaultCeilingAppearance
access type: initializeOnly
appinfo: Appearance node with Material colors ImageTexture etc. for this construction.
name: ceilingAppearance
type: SFNode

DefaultCeilingAppearance
type: NamedIndividual
type: Appearance
has parent: field 2 2 1 5
has material: Material 2 2 1 5 1 1
DEF: DefaultCeilingAppearance

field 2 2 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: initializeOnly
appinfo: Whether sides are visible.
name: showSides
type: SFBool
value: false

field 2 2 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: outputOnly
appinfo: width of front side of floor aligned with local X axis.
name: width
type: SFFloat

field 2 2 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: outputOnly
appinfo: height of vertical distance between floor and ceiling directly underneath aligned with local Y axis.
name: height
type: SFFloat

field 2 2 1 9
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: outputOnly
appinfo: depth of horizontal side of floor aligned with local -Z axis.
name: depth
type: SFFloat

field 2 2 1 10
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: outputOnly
appinfo: Indicate whether initialization complete.
name: built
type: SFBool

FloorRoot
type: NamedIndividual
type: Group
has parent: ProtoBody 2 2 2
has children: LowerLeftOutsideCornerLocation
has children: FloorConstructionScript
has ROUTE: ROUTE 2 2 2 1 3
has ROUTE: ROUTE 2 2 2 1 4
DEF: FloorRoot

LowerLeftOutsideCornerLocation
type: NamedIndividual
type: Transform
has parent: FloorRoot
has children: Floor
has children: Ceiling
has children: FloorSidesSwitch
DEF: LowerLeftOutsideCornerLocation

Floor
type: NamedIndividual
type: Shape
has parent: LowerLeftOutsideCornerLocation
has IS: IS 2 2 2 1 1 1 1
has geometry: IndexedFaceSet 2 2 2 1 1 1 2
DEF: Floor

connect 2 2 2 1 1 1 1 1
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 1 1 1
node field: appearance
proto field: floorAppearance

IndexedFaceSet 2 2 2 1 1 1 2
type: NamedIndividual
type: IndexedFaceSet
has parent: Floor
has coord: FloorCoordinate
coord index: 0
coord index: 1
coord index: 2
coord index: 3
coord index: -1

FloorCoordinate
type: NamedIndividual
type: Coordinate
has parent: IndexedFaceSet 2 2 2 1 1 1 2
DEF: FloorCoordinate

Ceiling
type: NamedIndividual
type: Shape
has parent: LowerLeftOutsideCornerLocation
has IS: IS 2 2 2 1 1 2 1
has geometry: IndexedFaceSet 2 2 2 1 1 2 2
DEF: Ceiling

connect 2 2 2 1 1 2 1 1
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 1 2 1
node field: appearance
proto field: ceilingAppearance

IndexedFaceSet 2 2 2 1 1 2 2
type: NamedIndividual
type: IndexedFaceSet
has parent: Ceiling
has coord: FloorCoordinate-USE-1
coord index: 4
coord index: 7
coord index: 6
coord index: 5
coord index: -1

FloorSidesSwitch
type: NamedIndividual
type: Switch
has parent: LowerLeftOutsideCornerLocation
has children: FloorSides
DEF: FloorSidesSwitch
which choice: -1

FloorSides
type: NamedIndividual
type: Shape
has parent: FloorSidesSwitch
has IS: IS 2 2 2 1 1 3 1 1
has geometry: IndexedFaceSet 2 2 2 1 1 3 1 2
DEF: FloorSides

connect 2 2 2 1 1 3 1 1 1
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 1 3 1 1
node field: appearance
proto field: floorAppearance

IndexedFaceSet 2 2 2 1 1 3 1 2
type: NamedIndividual
type: IndexedFaceSet
has parent: FloorSides
has coord: FloorCoordinate-USE-2
coord index: 0
coord index: 3
coord index: 7
coord index: 4
coord index: -1
coord index: 2
coord index: 6
coord index: 1
coord index: 5
solid: false

FloorConstructionScript
type: NamedIndividual
type: Script
has parent: FloorRoot
has field: field 2 2 2 1 2 1
has field: field 2 2 2 1 2 2
has field: field 2 2 2 1 2 3
has field: field 2 2 2 1 2 4
has field: field 2 2 2 1 2 5
has field: field 2 2 2 1 2 6
has field: field 2 2 2 1 2 7
has field: field 2 2 2 1 2 8
has field: field 2 2 2 1 2 9
has field: field 2 2 2 1 2 10
has field: field 2 2 2 1 2 11
has IS: IS 2 2 2 1 2 12
DEF: FloorConstructionScript
direct output: true
source code: ecmascript: function tracePrint (outputString) { if (traceEnabled) Browser.println ('[Floor' + name + ']' + outputString); } function alwaysPrint (outputString) { Browser.println ('[Floor' + name + ']' + outputString); } function initialize () { built = false; tracePrint ('description=' + description); tracePrint ('showSides=' + showSides); if (showSides == true) wallsVisible = 0; // goes to Switch whichChoice tracePrint ('wallsVisible=' + wallsVisible); if ((size.point.length == 0) || (size.point.length > 1)) alwaysPrint ('** warning, size.point.length =' + size.point.length + ' rather than 1'); width = size.point[0].x; height = size.point[0].y; depth = size.point[0].z; tracePrint ('(width, height, depth)=(' + width + ',' + height + ',' + depth + ')'); // floor is immediately above ceiling floorPoints = new MFVec3f ( new SFVec3f (0, 0, 0), new SFVec3f (width, 0, 0), new SFVec3f (width, 0, -depth), new SFVec3f (0, 0, -depth), new SFVec3f (0, -height, 0), new SFVec3f (width, -height, 0), new SFVec3f (width, -height, -depth), new SFVec3f (0, -height, -depth)); tracePrint ('floorPoints=' + floorPoints); built = true; tracePrint ('built=' + built); }

field 2 2 2 1 2 1
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: initializeOnly
name: name
type: SFString

field 2 2 2 1 2 2
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: initializeOnly
name: description
type: MFString

field 2 2 2 1 2 3
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: initializeOnly
name: size
type: SFNode

field 2 2 2 1 2 4
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: initializeOnly
name: showSides
type: SFBool

field 2 2 2 1 2 5
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: outputOnly
name: wallsVisible
type: SFInt32

field 2 2 2 1 2 6
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: outputOnly
name: floorPoints
type: MFVec3f

field 2 2 2 1 2 7
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: outputOnly
name: width
type: SFFloat

field 2 2 2 1 2 8
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: outputOnly
name: height
type: SFFloat

field 2 2 2 1 2 9
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: outputOnly
name: depth
type: SFFloat

field 2 2 2 1 2 10
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: initializeOnly
name: traceEnabled
type: SFBool
value: true

field 2 2 2 1 2 11
type: NamedIndividual
type: field
has parent: FloorConstructionScript
access type: outputOnly
name: built
type: SFBool

connect 2 2 2 1 2 12 1
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 2 12
node field: name
proto field: name

connect 2 2 2 1 2 12 2
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 2 12
node field: description
proto field: description

connect 2 2 2 1 2 12 3
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 2 12
node field: size
proto field: size

connect 2 2 2 1 2 12 4
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 2 12
node field: showSides
proto field: showSides

connect 2 2 2 1 2 12 5
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 2 12
node field: width
proto field: width

connect 2 2 2 1 2 12 6
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 2 12
node field: height
proto field: height

connect 2 2 2 1 2 12 7
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 2 12
node field: depth
proto field: depth

connect 2 2 2 1 2 12 8
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 2 12
node field: built
proto field: built

ROUTE 2 2 2 1 3
type: NamedIndividual
type: ROUTE
has parent: FloorRoot
from field: floorPoints
from node: FloorConstructionScript
to field: point
to node: FloorCoordinate

ROUTE 2 2 2 1 4
type: NamedIndividual
type: ROUTE
has parent: FloorRoot
from field: wallsVisible
from node: FloorConstructionScript
to field: whichChoice
to node: FloorSidesSwitch

ProtoDeclare 2 3
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 3 1
has proto body: ProtoBody 2 3 2
appinfo: Each Wall contains exterior and interior walls.
name: Wall

field 2 3 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: initializeOnly
appinfo: Identifying name for this Wall.
name: name
type: SFString

field 2 3 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: initializeOnly
appinfo: Description info for this construction.
name: description
type: MFString

field 2 3 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
has coord: Coordinate 2 3 1 3 1
access type: initializeOnly
appinfo: single-value Coordinate node with dimension x=width y=height z=depth in meters
name: size
type: SFNode

Coordinate 2 3 1 3 1
type: NamedIndividual
type: Coordinate
has parent: field 2 3 1 3
point: 0

field 2 3 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
has appearance: DefaultInteriorAppearance
access type: initializeOnly
appinfo: Appearance node with Material colors ImageTexture etc. for this construction.
name: interiorAppearance
type: SFNode

DefaultInteriorAppearance
type: NamedIndividual
type: Appearance
has parent: field 2 3 1 4
has material: Material 2 3 1 4 1 1
DEF: DefaultInteriorAppearance

Material 2 3 1 4 1 1
type: NamedIndividual
type: Material
has parent: DefaultInteriorAppearance
diffuse color: 0.4

field 2 3 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
has appearance: DefaultExteriorAppearance
access type: initializeOnly
appinfo: Appearance node with Material colors ImageTexture etc. for this construction.
name: exteriorAppearance
type: SFNode

DefaultExteriorAppearance
type: NamedIndividual
type: Appearance
has parent: field 2 3 1 5
has material: Material 2 3 1 5 1 1
DEF: DefaultExteriorAppearance

Material 2 3 1 5 1 1
type: NamedIndividual
type: Material
has parent: DefaultExteriorAppearance
diffuse color: 0.6

field 2 3 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: initializeOnly
appinfo: Whether sides are visible.
name: showSides
type: SFBool
value: false

field 2 3 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: outputOnly
appinfo: width of horizontal side of wall aligned with local X axis.
name: width
type: SFFloat

field 2 3 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: outputOnly
appinfo: height of Wall aligned with local Y axis.
name: height
type: SFFloat

field 2 3 1 9
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: outputOnly
appinfo: depth of horizontal thickness of Wall aligned with local -Z axis.
name: depth
type: SFFloat

field 2 3 1 10
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: outputOnly
appinfo: Indicate whether initialization complete.
name: built
type: SFBool

WallRoot
type: NamedIndividual
type: Group
has parent: ProtoBody 2 3 2
has children: LowerLeftOutsideCornerLocationWall
has children: WallConstructionScript
has ROUTE: ROUTE 2 3 2 1 3
has ROUTE: ROUTE 2 3 2 1 4
DEF: WallRoot

LowerLeftOutsideCornerLocationWall
type: NamedIndividual
type: Transform
has parent: WallRoot
has children: InteriorWall
has children: ExteriorWall
has children: WallSidesSwitch
DEF: LowerLeftOutsideCornerLocationWall

InteriorWall
type: NamedIndividual
type: Shape
has parent: LowerLeftOutsideCornerLocationWall
has IS: IS 2 3 2 1 1 1 1
has geometry: IndexedFaceSet 2 3 2 1 1 1 2
DEF: InteriorWall

connect 2 3 2 1 1 1 1 1
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 1 1 1
node field: appearance
proto field: interiorAppearance

IndexedFaceSet 2 3 2 1 1 1 2
type: NamedIndividual
type: IndexedFaceSet
has parent: InteriorWall
has coord: WallCoordinate
coord index: 4
coord index: 7
coord index: 6
coord index: 5
coord index: -1

WallCoordinate
type: NamedIndividual
type: Coordinate
has parent: IndexedFaceSet 2 3 2 1 1 1 2
DEF: WallCoordinate

ExteriorWall
type: NamedIndividual
type: Shape
has parent: LowerLeftOutsideCornerLocationWall
has IS: IS 2 3 2 1 1 2 1
has geometry: IndexedFaceSet 2 3 2 1 1 2 2
DEF: ExteriorWall

connect 2 3 2 1 1 2 1 1
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 1 2 1
node field: appearance
proto field: exteriorAppearance

IndexedFaceSet 2 3 2 1 1 2 2
type: NamedIndividual
type: IndexedFaceSet
has parent: ExteriorWall
has coord: WallCoordinate-USE-1
coord index: 0
coord index: 1
coord index: 2
coord index: 3
coord index: -1

WallSidesSwitch
type: NamedIndividual
type: Switch
has parent: LowerLeftOutsideCornerLocationWall
has children: WallSides
DEF: WallSidesSwitch
which choice: -1

WallSides
type: NamedIndividual
type: Shape
has parent: WallSidesSwitch
has IS: IS 2 3 2 1 1 3 1 1
has geometry: IndexedFaceSet 2 3 2 1 1 3 1 2
DEF: WallSides

connect 2 3 2 1 1 3 1 1 1
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 1 3 1 1
node field: appearance
proto field: exteriorAppearance

IndexedFaceSet 2 3 2 1 1 3 1 2
type: NamedIndividual
type: IndexedFaceSet
has parent: WallSides
has coord: WallCoordinate-USE-2
coord index: 0
coord index: 3
coord index: 7
coord index: 4
coord index: -1
coord index: 2
coord index: 6
coord index: 1
coord index: 5

WallConstructionScript
type: NamedIndividual
type: Script
has parent: WallRoot
has field: field 2 3 2 1 2 1
has field: field 2 3 2 1 2 2
has field: field 2 3 2 1 2 3
has field: field 2 3 2 1 2 4
has field: field 2 3 2 1 2 5
has field: field 2 3 2 1 2 6
has field: field 2 3 2 1 2 7
has field: field 2 3 2 1 2 8
has field: field 2 3 2 1 2 9
has field: field 2 3 2 1 2 10
has field: field 2 3 2 1 2 11
has IS: IS 2 3 2 1 2 12
DEF: WallConstructionScript
direct output: true
source code: ecmascript: function tracePrint (outputString) { if (traceEnabled) Browser.println ('[Wall' + name + ']' + outputString); } function alwaysPrint (outputString) { Browser.println ('[Wall' + name + ']' + outputString); } function initialize () { built = false; tracePrint ('description=' + description); tracePrint ('showSides=' + showSides); if (showSides == true) wallsVisible = 0; // goes to Switch whichChoice tracePrint ('wallsVisible=' + wallsVisible); if ((size.point.length == 0) || (size.point.length > 1)) alwaysPrint ('** warning, size.point.length =' + size.point.length + ' rather than 1'); width = size.point[0].x; height = size.point[0].y; depth = size.point[0].z; tracePrint ('(width, height, depth)=(' + width + ',' + height + ',' + depth + ')'); coordinatePoints = new MFVec3f ( new SFVec3f (0, 0, 0), new SFVec3f (width, 0, 0), new SFVec3f (width, height, 0), new SFVec3f (0, height, 0), new SFVec3f (0, 0, -depth), new SFVec3f (width, 0, -depth), new SFVec3f (width, height, -depth), new SFVec3f (0, height, -depth)); tracePrint ('coordinatePoints=' + coordinatePoints); built = true; tracePrint ('built=' + built); }

field 2 3 2 1 2 1
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: initializeOnly
name: name
type: SFString

field 2 3 2 1 2 2
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: initializeOnly
name: description
type: MFString

field 2 3 2 1 2 3
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: initializeOnly
name: size
type: SFNode

field 2 3 2 1 2 4
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: initializeOnly
name: showSides
type: SFBool

field 2 3 2 1 2 5
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: outputOnly
name: wallsVisible
type: SFInt32

field 2 3 2 1 2 6
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: outputOnly
name: coordinatePoints
type: MFVec3f

field 2 3 2 1 2 7
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: outputOnly
name: width
type: SFFloat

field 2 3 2 1 2 8
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: outputOnly
name: height
type: SFFloat

field 2 3 2 1 2 9
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: outputOnly
name: depth
type: SFFloat

field 2 3 2 1 2 10
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: initializeOnly
name: traceEnabled
type: SFBool
value: true

field 2 3 2 1 2 11
type: NamedIndividual
type: field
has parent: WallConstructionScript
access type: outputOnly
name: built
type: SFBool

connect 2 3 2 1 2 12 1
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 2 12
node field: name
proto field: name

connect 2 3 2 1 2 12 2
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 2 12
node field: description
proto field: description

connect 2 3 2 1 2 12 3
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 2 12
node field: size
proto field: size

connect 2 3 2 1 2 12 4
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 2 12
node field: showSides
proto field: showSides

connect 2 3 2 1 2 12 5
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 2 12
node field: width
proto field: width

connect 2 3 2 1 2 12 6
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 2 12
node field: height
proto field: height

connect 2 3 2 1 2 12 7
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 2 12
node field: depth
proto field: depth

connect 2 3 2 1 2 12 8
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 2 12
node field: built
proto field: built

ROUTE 2 3 2 1 3
type: NamedIndividual
type: ROUTE
has parent: WallRoot
from field: coordinatePoints
from node: WallConstructionScript
to field: point
to node: WallCoordinate

ROUTE 2 3 2 1 4
type: NamedIndividual
type: ROUTE
has parent: WallRoot
from field: wallsVisible
from node: WallConstructionScript
to field: whichChoice
to node: WallSidesSwitch

ProtoDeclare 2 4
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 4 1
has proto body: ProtoBody 2 4 2
appinfo: collection of a Floor and four Walls working in order up from lowest level (i.e. story) of the Building
name: Level

field 2 4 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: initializeOnly
appinfo: Identifying name for this Level.
name: name
type: SFString

field 2 4 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: initializeOnly
appinfo: Description info for this construction.
name: description
type: MFString

field 2 4 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
has children: Group 2 4 1 3 1
access type: initializeOnly
appinfo: contains single Floor node
name: floor
type: MFNode

field 2 4 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
has children: ProtoInstance 2 4 1 4 1
access type: initializeOnly
appinfo: contains single front Wall node
name: frontWall
type: MFNode

ProtoInstance 2 4 1 4 1
type: NamedIndividual
type: ProtoInstance
has parent: field 2 4 1 4
name: Wall

field 2 4 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
has children: ProtoInstance 2 4 1 5 1
access type: initializeOnly
appinfo: contains single right-side Wall node
name: rightWall
type: MFNode

ProtoInstance 2 4 1 5 1
type: NamedIndividual
type: ProtoInstance
has parent: field 2 4 1 5
name: Wall

field 2 4 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
has children: ProtoInstance 2 4 1 6 1
access type: initializeOnly
appinfo: contains single rear Wall node
name: rearWall
type: MFNode

ProtoInstance 2 4 1 6 1
type: NamedIndividual
type: ProtoInstance
has parent: field 2 4 1 6
name: Wall

field 2 4 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
has children: ProtoInstance 2 4 1 7 1
access type: initializeOnly
appinfo: contains single left-side Wall node
name: leftWall
type: MFNode

ProtoInstance 2 4 1 7 1
type: NamedIndividual
type: ProtoInstance
has parent: field 2 4 1 7
name: Wall

field 2 4 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: outputOnly
appinfo: Calculated width of horizontal side of Level aligned with local X axis.
name: width
type: SFFloat

field 2 4 1 9
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: outputOnly
appinfo: Calculated height of Level aligned with local Y axis.
name: height
type: SFFloat

field 2 4 1 10
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: outputOnly
appinfo: Calculated depth of horizontal thickness of Level aligned with local -Z axis.
name: depth
type: SFFloat

field 2 4 1 11
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: outputOnly
appinfo: Indicate whether initialization complete.
name: built
type: SFBool

LevelRoot
type: NamedIndividual
type: Group
has parent: ProtoBody 2 4 2
has children: FloorTransform
has children: FrontWallTransform
has children: RightWallTransform
has children: RearWallTransform
has children: LeftWallTransform
has children: LevelConstructionScript
has children: LevelInitializeAfterChildrenReady
has ROUTE: ROUTE 2 4 2 1 7
has ROUTE: ROUTE 2 4 2 1 8
has ROUTE: ROUTE 2 4 2 1 9
DEF: LevelRoot

FloorTransform
type: NamedIndividual
type: Transform
has parent: LevelRoot
has IS: IS 2 4 2 1 1 1
DEF: FloorTransform

connect 2 4 2 1 1 1 1
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 1 1
node field: children
proto field: floor

FrontWallTransform
type: NamedIndividual
type: Transform
has parent: LevelRoot
has IS: IS 2 4 2 1 2 1
DEF: FrontWallTransform

connect 2 4 2 1 2 1 1
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 2 1
node field: children
proto field: frontWall

RightWallTransform
type: NamedIndividual
type: Transform
has parent: LevelRoot
has IS: IS 2 4 2 1 3 1
DEF: RightWallTransform
rotation: 0
rotation: 1
rotation: 1.57079

connect 2 4 2 1 3 1 1
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 3 1
node field: children
proto field: rightWall

RearWallTransform
type: NamedIndividual
type: Transform
has parent: LevelRoot
has IS: IS 2 4 2 1 4 1
DEF: RearWallTransform
rotation: 0
rotation: 1
rotation: 3.1416

connect 2 4 2 1 4 1 1
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 4 1
node field: children
proto field: rearWall

LeftWallTransform
type: NamedIndividual
type: Transform
has parent: LevelRoot
has IS: IS 2 4 2 1 5 1
DEF: LeftWallTransform
rotation: 0
rotation: 1
rotation: 4.7124

connect 2 4 2 1 5 1 1
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 5 1
node field: children
proto field: leftWall

LevelConstructionScript
type: NamedIndividual
type: Script
has parent: LevelRoot
has field: field 2 4 2 1 6 1
has field: field 2 4 2 1 6 2
has field: field 2 4 2 1 6 3
has field: field 2 4 2 1 6 4
has field: field 2 4 2 1 6 5
has field: field 2 4 2 1 6 6
has field: field 2 4 2 1 6 7
has field: field 2 4 2 1 6 8
has field: field 2 4 2 1 6 9
has field: field 2 4 2 1 6 10
has field: field 2 4 2 1 6 11
has field: field 2 4 2 1 6 12
has field: field 2 4 2 1 6 13
has field: field 2 4 2 1 6 14
has field: field 2 4 2 1 6 15
has field: field 2 4 2 1 6 16
has IS: IS 2 4 2 1 6 17
DEF: LevelConstructionScript
direct output: true
source code: ecmascript: var firstLoopWhileTrueCompleted; function tracePrint (outputString) { if (traceEnabled) Browser.println ('[Level' + name + ']' + outputString); } function alwaysPrint (outputString) { Browser.println ('[Level' + name + ']' + outputString); } function initialize () { built = false; firstLoopWhileTrueCompleted = false; alwaysPrint ('initialize, built=' + built); } function recheckUntilBuilt (value) { if (built == true) { built = true; // resend to trigger cancellation event for TimeSensor if (firstLoopWhileTrueCompleted) alwaysPrint ('recheckUntilBuilt() continuous built=true indicates internal error'); else firstLoopWhileTrueCompleted = true; return; // done } alwaysPrint ('recheckUntilBuilt testing...'); // following are single nodes, cast as MFNode type for IS/connect matchups if (floor[0].built == false) return; // not yet ready else if (frontWall[0].built == false) return; else if (rightWall[0].built == false) return; else if (rearWall[0].built == false) return; else if (leftWall[0].built == false) return; alwaysPrint ('recheckUntilBuilt ready, initializing Level...'); alwaysPrint ('description=' + description); if (floor) { // tracePrint ('floor found'); if (floor.length > 1) alwaysPrint ('** warning, more than one floor found (' + floor.length + ' nodes total)'); tracePrint ('floor (width, height, depth)=(' + floor[0].width + ',' + floor[0].height + ',' + floor[0].depth + ')'); } else tracePrint ('floor not found'); if (frontWall) { // tracePrint ('frontWall found'); if (frontWall > 1) alwaysPrint ('** warning, more than one frontWall found (' + frontWall.length + ' nodes total)'); tracePrint ('frontWall (width, height, depth)=(' + frontWall[0].width + ',' + frontWall[0].height + ',' + frontWall[0].depth + ')'); } else tracePrint ('frontWall not found'); if (rightWall) { // tracePrint ('rightWall found'); if (rightWall > 1) alwaysPrint ('** warning, more than one rightWall found (' + frontWall.length + ' nodes total)'); tracePrint ('rightWall (width…

field 2 4 2 1 6 1
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: initializeOnly
name: name
type: SFString

field 2 4 2 1 6 2
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: initializeOnly
name: description
type: MFString

field 2 4 2 1 6 3
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: initializeOnly
name: floor
type: MFNode

field 2 4 2 1 6 4
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: initializeOnly
name: frontWall
type: MFNode

field 2 4 2 1 6 5
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: initializeOnly
name: rightWall
type: MFNode

field 2 4 2 1 6 6
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: initializeOnly
name: rearWall
type: MFNode

field 2 4 2 1 6 7
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: initializeOnly
name: leftWall
type: MFNode

field 2 4 2 1 6 8
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: outputOnly
name: width
type: SFFloat

field 2 4 2 1 6 9
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: outputOnly
name: height
type: SFFloat

field 2 4 2 1 6 10
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: outputOnly
name: depth
type: SFFloat

field 2 4 2 1 6 11
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: outputOnly
name: rightTranslation
type: SFVec3f

field 2 4 2 1 6 12
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: outputOnly
name: rearTranslation
type: SFVec3f

field 2 4 2 1 6 13
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: outputOnly
name: leftTranslation
type: SFVec3f

field 2 4 2 1 6 14
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: initializeOnly
name: traceEnabled
type: SFBool
value: true

field 2 4 2 1 6 15
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: inputOnly
appinfo: New floor or wall initialization may be complete check and recalculate until built
name: recheckUntilBuilt
type: SFTime

field 2 4 2 1 6 16
type: NamedIndividual
type: field
has parent: LevelConstructionScript
access type: outputOnly
name: built
type: SFBool

connect 2 4 2 1 6 17 1
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: name
proto field: name

connect 2 4 2 1 6 17 2
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: description
proto field: description

connect 2 4 2 1 6 17 3
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: floor
proto field: floor

connect 2 4 2 1 6 17 4
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: frontWall
proto field: frontWall

connect 2 4 2 1 6 17 5
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: rightWall
proto field: rightWall

connect 2 4 2 1 6 17 6
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: rearWall
proto field: rearWall

connect 2 4 2 1 6 17 7
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: leftWall
proto field: leftWall

connect 2 4 2 1 6 17 8
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: width
proto field: width

connect 2 4 2 1 6 17 9
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: height
proto field: height

connect 2 4 2 1 6 17 10
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: depth
proto field: depth

connect 2 4 2 1 6 17 11
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 6 17
node field: built
proto field: built

ROUTE 2 4 2 1 7
type: NamedIndividual
type: ROUTE
has parent: LevelRoot
from field: rightTranslation
from node: LevelConstructionScript
to field: translation
to node: RightWallTransform

ROUTE 2 4 2 1 8
type: NamedIndividual
type: ROUTE
has parent: LevelRoot
from field: rearTranslation
from node: LevelConstructionScript
to field: translation
to node: RearWallTransform

ROUTE 2 4 2 1 9
type: NamedIndividual
type: ROUTE
has parent: LevelRoot
from field: leftTranslation
from node: LevelConstructionScript
to field: translation
to node: LeftWallTransform

LevelInitializeAfterChildrenReady
type: NamedIndividual
type: Group
has parent: LevelRoot
has children: LevelBuiltFilter
has children: LevelBuiltNegation
has children: LevelRecalculateUntilBuilt
has ROUTE: ROUTE 2 4 2 1 10 4
has ROUTE: ROUTE 2 4 2 1 10 5
has ROUTE: ROUTE 2 4 2 1 10 6
has ROUTE: ROUTE 2 4 2 1 10 7
DEF: LevelInitializeAfterChildrenReady

LevelBuiltFilter
type: NamedIndividual
type: BooleanFilter
has parent: LevelInitializeAfterChildrenReady
DEF: LevelBuiltFilter

LevelBuiltNegation
type: NamedIndividual
type: BooleanFilter
has parent: LevelInitializeAfterChildrenReady
DEF: LevelBuiltNegation

LevelRecalculateUntilBuilt
type: NamedIndividual
type: TimeSensor
has parent: LevelInitializeAfterChildrenReady
DEF: LevelRecalculateUntilBuilt
cycle interval: 0.1
loop: true

ROUTE 2 4 2 1 10 4
type: NamedIndividual
type: ROUTE
has parent: LevelInitializeAfterChildrenReady
from field: built
from node: LevelConstructionScript
to field: set_boolean
to node: LevelBuiltFilter

ROUTE 2 4 2 1 10 5
type: NamedIndividual
type: ROUTE
has parent: LevelInitializeAfterChildrenReady
from field: inputTrue
from node: LevelBuiltFilter
to field: set_boolean
to node: LevelBuiltNegation

ROUTE 2 4 2 1 10 6
type: NamedIndividual
type: ROUTE
has parent: LevelInitializeAfterChildrenReady
from field: inputNegate
from node: LevelBuiltNegation
to field: enabled
to node: LevelRecalculateUntilBuilt

ROUTE 2 4 2 1 10 7
type: NamedIndividual
type: ROUTE
has parent: LevelInitializeAfterChildrenReady
from field: cycleTime
from node: LevelRecalculateUntilBuilt
to field: recheckUntilBuilt
to node: LevelConstructionScript

ProtoDeclare 2 5
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 5 1
has proto body: ProtoBody 2 5 2
appinfo: Collect prototypes for levels floors and walls to create a simple Building.
name: Building

field 2 5 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
appinfo: Identifying name of this Building.
name: name
type: SFString

field 2 5 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
appinfo: Description info for this construction.
name: description
type: MFString

field 2 5 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
appinfo: whether or not to display author assist tools such as coordinate axes measuring grids etc.
name: authorAssist
type: SFBool
value: true

field 2 5 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: 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.
name: xHeading
type: SFFloat
value: 0.0

field 2 5 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
appinfo: output rotation value calculated from xHeading as (0 1 0 xHeading * 2pi / 360)
name: orientation
type: SFRotation

field 2 5 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
appinfo: example value: 120.30 E
name: latitude
type: SFString

field 2 5 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
appinfo: example value: 20.45 N
name: longitude
type: SFString

field 2 5 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
has children: ProtoInstance 2 5 1 8 1
access type: initializeOnly
appinfo: contains array of Level nodes
name: levels
type: MFNode

ProtoInstance 2 5 1 8 1
type: NamedIndividual
type: ProtoInstance
has parent: field 2 5 1 8
name: Level

field 2 5 1 9
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
has children: Group 2 5 1 9 1
access type: initializeOnly
appinfo: Geometry for Roof positioned above topmost Level
name: roof
type: SFNode

field 2 5 1 10
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
appinfo: height value for provided Roof geometry.
name: roofHeight
type: SFFloat
value: 0

field 2 5 1 11
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
appinfo: Calculated width of horizontal side of Building aligned with local X axis.
name: width
type: SFFloat

field 2 5 1 12
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
appinfo: Calculated height of Building aligned with local Y axis.
name: height
type: SFFloat

field 2 5 1 13
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
appinfo: Calculated depth of horizontal thickness of Building aligned with local -Z axis.
name: depth
type: SFFloat

field 2 5 1 14
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
appinfo: Indicate whether initialization complete.
name: built
type: SFBool

AuthorAssist1
type: NamedIndividual
type: Switch
has parent: Group 2 5 2 1
has children: CoordinateAxesTransform
DEF: AuthorAssist1
which choice: -1

CoordinateAxesTransform
type: NamedIndividual
type: Transform
has parent: AuthorAssist1
has children: CoordinateAxes
DEF: CoordinateAxesTransform

CoordinateAxes
type: NamedIndividual
type: Inline
has parent: CoordinateAxesTransform
DEF: CoordinateAxes
url: "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl"

BuildingRoot
type: NamedIndividual
type: Group
has parent: Group 2 5 2 1
has children: LevelsRoot
has children: BuildingConstructionScript
has children: BuildingInitializeAfterChildrenReady
has ROUTE: ROUTE 2 5 2 1 2 3
has ROUTE: ROUTE 2 5 2 1 2 4
has ROUTE: ROUTE 2 5 2 1 2 5
DEF: BuildingRoot

LevelsRoot
type: NamedIndividual
type: Transform
has parent: BuildingRoot
has children: AuthorAssist2
DEF: LevelsRoot

AuthorAssist2
type: NamedIndividual
type: Switch
has parent: LevelsRoot
has children: AuthorAssistTransform2
DEF: AuthorAssist2
which choice: -1

AuthorAssistTransform2
type: NamedIndividual
type: Transform
has parent: AuthorAssist2
has children: Inline 2 5 2 1 2 1 1 1 1
has children: Inline 2 5 2 1 2 1 1 1 2
has children: Inline 2 5 2 1 2 1 1 1 3
DEF: AuthorAssistTransform2

Inline 2 5 2 1 2 1 1 1 1
type: NamedIndividual
type: Inline
has parent: AuthorAssistTransform2
url: "GridXY_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Basic/course/GridXY_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXY_20x20Movable.wrl" "GridXY_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Basic/course/GridXY_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXY_20x20Movable.x3d"

Inline 2 5 2 1 2 1 1 1 2
type: NamedIndividual
type: Inline
has parent: AuthorAssistTransform2
url: "GridXZ_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Basic/course/GridXZ_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXZ_20x20Movable.wrl" "GridXZ_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Basic/course/GridXZ_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXZ_20x20Movable.x3d"

Inline 2 5 2 1 2 1 1 1 3
type: NamedIndividual
type: Inline
has parent: AuthorAssistTransform2
url: "GridYZ_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Basic/course/GridYZ_20x20Movable.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridYZ_20x20Movable.wrl" "GridYZ_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Basic/course/GridYZ_20x20Movable.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridYZ_20x20Movable.x3d"

BuildingConstructionScript
type: NamedIndividual
type: Script
has parent: BuildingRoot
has field: field 2 5 2 1 2 2 1
has field: field 2 5 2 1 2 2 2
has field: field 2 5 2 1 2 2 3
has field: field 2 5 2 1 2 2 4
has field: field 2 5 2 1 2 2 5
has field: field 2 5 2 1 2 2 6
has field: field 2 5 2 1 2 2 7
has field: field 2 5 2 1 2 2 8
has field: field 2 5 2 1 2 2 9
has field: field 2 5 2 1 2 2 10
has field: field 2 5 2 1 2 2 11
has field: field 2 5 2 1 2 2 12
has field: field 2 5 2 1 2 2 13
has field: field 2 5 2 1 2 2 14
has field: field 2 5 2 1 2 2 15
has field: field 2 5 2 1 2 2 16
has field: field 2 5 2 1 2 2 17
has field: field 2 5 2 1 2 2 18
has field: field 2 5 2 1 2 2 19
has IS: IS 2 5 2 1 2 2 20
DEF: BuildingConstructionScript
direct output: true
source code: ecmascript: var firstLoopWhileTrueCompleted; function tracePrint (outputString) { if (traceEnabled) Browser.println ('[Building' + name + ']' + outputString); } function alwaysPrint (outputString) { Browser.println ('[Building' + name + ']' + outputString); } function initialize () { built = false; firstLoopWhileTrueCompleted = false; alwaysPrint ('initialize, built=' + built); } function recheckUntilBuilt (value) { if (built == true) { built = true; // resend to trigger cancellation event for TimeSensor if (firstLoopWhileTrueCompleted) alwaysPrint ('recheckUntilBuilt() continuous built=true indicates internal error'); else firstLoopWhileTrueCompleted = true; return; // done } tracePrint ('recheckUntilBuilt testing...'); if (built == true) return; // done for (i=0; i < levels.length; i++) { if (levels[i].built == false) return; // not yet ready } tracePrint ('recheckUntilBuilt ready!'); alwaysPrint ('description=' + description); if (levels.length == 0) { alwaysPrint ('** warning, no levels found'); return; } orientation = new SFRotation (0, 1, 0, -xHeading * 3.14159 / 180.0); LevelsRoot.rotation = orientation; tracePrint ('xHeading=' + xHeading + ' degrees,' + 'orientation=' + orientation); width = 0; depth = 0; incrementalHeight = 0; // first child of LevelsRoot is oriented AuthorAssist2 Switch for (i=0; i < levels.length; i++) { tracePrint ('level[' + i + ']'); // compute max values for width, height, depth if (width < levels[i].width) width = levels[i].width; if (depth < levels[i].depth) depth = levels[i].depth; newTransform ='Transform {' + 'translation 0' + incrementalHeight + ' 0' + '}'; tracePrint ('newTransform=' + newTransform); newTransformNode = Browser.createVrmlFromString (newTransform); // returns MFNode // append newTransformNode to LevelsRoot.children LevelsRoot.children[i+1] = newTransformNode[0]; // append current Level to current newTransformNode newTransformNode[0].children[0] = levels[i]; incrementalHeight += levels[i].height; tracePrint ('incr…

field 2 5 2 1 2 2 1
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: name
type: SFString

field 2 5 2 1 2 2 2
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: description
type: MFString

field 2 5 2 1 2 2 3
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: xHeading
type: SFFloat

field 2 5 2 1 2 2 4
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: outputOnly
name: orientation
type: SFRotation

field 2 5 2 1 2 2 5
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: latitude
type: SFString

field 2 5 2 1 2 2 6
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: longitude
type: SFString

field 2 5 2 1 2 2 7
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: authorAssist
type: SFBool

field 2 5 2 1 2 2 8
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: levels
type: MFNode

field 2 5 2 1 2 2 9
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: roof
type: SFNode

field 2 5 2 1 2 2 10
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: roofHeight
type: SFFloat

field 2 5 2 1 2 2 11
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
has children: LevelsRoot-USE-1
access type: initializeOnly
name: LevelsRoot
type: SFNode

field 2 5 2 1 2 2 12
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: outputOnly
name: width
type: SFFloat

field 2 5 2 1 2 2 13
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: outputOnly
name: height
type: SFFloat

field 2 5 2 1 2 2 14
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: outputOnly
name: depth
type: SFFloat

field 2 5 2 1 2 2 15
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: outputOnly
name: scale
type: SFVec3f

field 2 5 2 1 2 2 16
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: outputOnly
name: authorAssistChoice
type: SFInt32

field 2 5 2 1 2 2 17
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: initializeOnly
name: traceEnabled
type: SFBool
value: true

field 2 5 2 1 2 2 18
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: inputOnly
appinfo: New floor or wall initialization may be complete check and recalculate until built
name: recheckUntilBuilt
type: SFTime

field 2 5 2 1 2 2 19
type: NamedIndividual
type: field
has parent: BuildingConstructionScript
access type: outputOnly
name: built
type: SFBool

connect 2 5 2 1 2 2 20 1
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: name
proto field: name

connect 2 5 2 1 2 2 20 2
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: description
proto field: description

connect 2 5 2 1 2 2 20 3
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: authorAssist
proto field: authorAssist

connect 2 5 2 1 2 2 20 4
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: xHeading
proto field: xHeading

connect 2 5 2 1 2 2 20 5
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: orientation
proto field: orientation

connect 2 5 2 1 2 2 20 6
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: latitude
proto field: latitude

connect 2 5 2 1 2 2 20 7
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: longitude
proto field: longitude

connect 2 5 2 1 2 2 20 8
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: levels
proto field: levels

connect 2 5 2 1 2 2 20 9
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: roof
proto field: roof

connect 2 5 2 1 2 2 20 10
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: roofHeight
proto field: roofHeight

connect 2 5 2 1 2 2 20 11
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: width
proto field: width

connect 2 5 2 1 2 2 20 12
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: height
proto field: height

connect 2 5 2 1 2 2 20 13
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: depth
proto field: depth

connect 2 5 2 1 2 2 20 14
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 2 2 20
node field: built
proto field: built

ROUTE 2 5 2 1 2 3
type: NamedIndividual
type: ROUTE
has parent: BuildingRoot
from field: authorAssistChoice
from node: BuildingConstructionScript
to field: whichChoice
to node: AuthorAssist1

ROUTE 2 5 2 1 2 4
type: NamedIndividual
type: ROUTE
has parent: BuildingRoot
from field: authorAssistChoice
from node: BuildingConstructionScript
to field: whichChoice
to node: AuthorAssist2

ROUTE 2 5 2 1 2 5
type: NamedIndividual
type: ROUTE
has parent: BuildingRoot
from field: scale
from node: BuildingConstructionScript
to field: scale
to node: CoordinateAxesTransform

BuildingInitializeAfterChildrenReady
type: NamedIndividual
type: Group
has parent: BuildingRoot
has children: BuildingBuiltFilter
has children: BuildingBuiltNegation
has children: BuildingRecalculateUntilBuilt
has ROUTE: ROUTE 2 5 2 1 2 6 4
has ROUTE: ROUTE 2 5 2 1 2 6 5
has ROUTE: ROUTE 2 5 2 1 2 6 6
has ROUTE: ROUTE 2 5 2 1 2 6 7
DEF: BuildingInitializeAfterChildrenReady

BuildingBuiltFilter
type: NamedIndividual
type: BooleanFilter
has parent: BuildingInitializeAfterChildrenReady
DEF: BuildingBuiltFilter

BuildingBuiltNegation
type: NamedIndividual
type: BooleanFilter
has parent: BuildingInitializeAfterChildrenReady
DEF: BuildingBuiltNegation

BuildingRecalculateUntilBuilt
type: NamedIndividual
type: TimeSensor
has parent: BuildingInitializeAfterChildrenReady
DEF: BuildingRecalculateUntilBuilt
cycle interval: 0.1
loop: true

ROUTE 2 5 2 1 2 6 4
type: NamedIndividual
type: ROUTE
has parent: BuildingInitializeAfterChildrenReady
from field: built
from node: BuildingConstructionScript
to field: set_boolean
to node: BuildingBuiltFilter

ROUTE 2 5 2 1 2 6 5
type: NamedIndividual
type: ROUTE
has parent: BuildingInitializeAfterChildrenReady
from field: inputTrue
from node: BuildingBuiltFilter
to field: set_boolean
to node: BuildingBuiltNegation

ROUTE 2 5 2 1 2 6 6
type: NamedIndividual
type: ROUTE
has parent: BuildingInitializeAfterChildrenReady
from field: inputNegate
from node: BuildingBuiltNegation
to field: enabled
to node: BuildingRecalculateUntilBuilt

ROUTE 2 5 2 1 2 6 7
type: NamedIndividual
type: ROUTE
has parent: BuildingInitializeAfterChildrenReady
from field: cycleTime
from node: BuildingRecalculateUntilBuilt
to field: recheckUntilBuilt
to node: BuildingConstructionScript

Viewpoint 2 6
type: NamedIndividual
type: Viewpoint
has parent: Scene
description: SimpleBuildingConstructionPrototypes
position: 0
position: 12

Background 2 7
type: NamedIndividual
type: Background
has parent: Scene
ground angle: 1.57
ground color: 0.6
ground color: 0.9
sky color: 0.6
sky color: 0.9

Anchor 2 8
type: NamedIndividual
type: Anchor
has parent: Scene
has children: Shape 2 8 1
description: SimpleBuildingConstructionExample
parameter: "target=_blank"
url: "SimpleBuildingConstructionExample.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/UHRB/SimpleBuildingConstructionExample.wrl" "SimpleBuildingConstructionExample.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/UHRB/SimpleBuildingConstructionExample.x3d"

Text 2 8 1 1
type: NamedIndividual
type: Text
has parent: Shape 2 8 1
has font style: FontStyle 2 8 1 1 1
string: "SimpleBuildingConstructionPrototypes" "is a prototype definition file" "" "Click this text to see" "SimpleBuildingConstructionExample"

FontStyle 2 8 1 1 1
type: NamedIndividual
type: FontStyle
has parent: Text 2 8 1 1
justify: "MIDDLE" "MIDDLE"

Material 2 8 1 2 1
type: NamedIndividual
type: Material
has parent: Appearance 2 8 1 2
diffuse color: 0.2
diffuse color: 0.8