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='title' content='ArchPrototype.x3d'/> |
6 | <meta name='description' content='Create an arch. Can modify general parameters: clearSpanWidth, riseHeight, depth, topAbutmentHeight, pierWidth, pierHeight. See the reference file ArchModelingDiagrams.pdf to find further information. See also ArchPrototypeScript_more_readable.js. Possibility to create shapes related to arch: ArchHalf; IntradosOnly; ArchFilled; ArchHalfFilled; Lintel. See the reference file ArchModelingDiagrams.pdf to find further information.'/> |
7 | <meta name='creator' content='Michele Foti, Don Brutzman'/> |
8 | <meta name='created' content='15 December 2014'/> |
9 | <meta name='modified' content='16 June 2020'/> |
10 | <meta name=' TODO ' content=' debug local ProtoInstance '/> |
11 | <meta name=' TODO ' content=' add test ArchPrototypeExample '/> |
12 | <meta name=' TODO ' content=' Xj3D Player Issue, bogus error on line 243 of script regarding assignment to MFInt32 value '/> |
13 | <meta name='reference' content='ArchModelingDiagrams.pdf'/> |
14 | <meta name='reference' content='https://en.wikipedia.org/wiki/Arch'/> |
15 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Buildings/ArchPrototype.x3d'/> |
16 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
17 | <meta name='license' content='../license.html'/> |
18 | </head> |
19 | <Scene> |
20 | <WorldInfo title='ArchPrototype.x3d'/> |
21 | <ProtoDeclare name='ArchPrototype' appinfo='Create an arch. Can modify general parameters: clearSpanWidth, riseHeight, depth, topAbutmentHeight, pierWidth, pierHeight. - Possibility to create shapes related to an arch: ArchHalf; IntradosOnly; ArchFilled; ArchHalfFilled; Lintel. See the reference file ArchModelingDiagrams.pdf to find further information. See also ArchPrototypeScript_more_readable.js.js.'> |
22 | <ProtoInterface> |
23 | <!-- COLOR OF ARCH --> |
24 |
<field name='diffuseColor' type='SFColor' value='0.2 0.8 0.8' accessType='inputOutput'
appinfo='color of arch'/> |
25 |
<field name='emissiveColor' type='SFColor' value='0.2 0.8 0.8' accessType='inputOutput'
appinfo='color of arch'/> |
26 | <!-- INPUT PARAMETERS --> |
27 | <!-- General parameters: measures in meters --> |
28 |
<field name='clearSpanWidth' type='SFFloat' value='4' accessType='initializeOnly'
appinfo='clearSpanWidth: clearSpanWidth must be double of riseHeight to obtain an half circumference'/> |
29 |
<field name='riseHeight' type='SFFloat' value='2' accessType='initializeOnly'
appinfo='riseHeight: riseHeight must be half of clearSpanWidth to obtain an half circumference'/> |
30 |
<field name='depth' type='SFFloat' value='3' accessType='initializeOnly'
appinfo='depth'/> |
31 |
<field name='topAbutmentHeight' type='SFFloat' value='0.5' accessType='initializeOnly'
appinfo='topAbutmentHeight:topAbutmentHeight=0 means no topAbutment'/> |
32 |
<field name='pierWidth' type='SFFloat' value='0.5' accessType='initializeOnly'
appinfo='pierWidth:pierWidtht=0 means no pierWidth'/> |
33 |
<field name='pierHeight' type='SFFloat' value='1' accessType='initializeOnly'
appinfo='pierHeight: pierHeight=0 means no pierHeight'/> |
34 | <!-- Parameters to create shapes related to arch: put true to apply --> |
35 |
<field name='archHalf' type='SFBool' value='false' accessType='initializeOnly'
appinfo='archHalf: can modify also clearSpanWidth, riseHeight, depth, pierWidth, pierHeight, topAbutmentHeight, archHalfExtensionWidth at purpose, clearSpanWidth measure refers to a full arc, consider clearSpanWidth/2 for the archHalf width'/> |
36 |
<field name='archHalfExtensionWidth' type='SFFloat' value='0' accessType='initializeOnly'
appinfo='archHalfExtensionWidth: measure in meters, use only if archHalf=true, it is the width of the etension of the abutment of the archHalf. See the reference file ArchModelingDiagrams.pdf to find further information.'/> |
37 |
<field name='onlyIntrados' type='SFBool' value='false' accessType='initializeOnly'
appinfo='onlyIntrados: note it is a flat curved surface, can modify also clearSpanWidth, riseHeight, depth at purpose, if needed apply archHalf=true.'/> |
38 |
<field name='archFilled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='archFilled: note it is an half cylinder, can modify also clearSpanWidth, riseHeight, depth at purpose.'/> |
39 |
<field name='archHalfFilled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='archHalfFilled: note it is a quarter cylinder, can modify also clearSpanWidth, riseHeight, depth at purpose, clearSpanWidth measure refers to a full arc, consider clearSpanWidth/2 for the archHalfFilled width.'/> |
40 |
<field name='lintel' type='SFBool' value='false' accessType='initializeOnly'
appinfo='lintel: no arc is rendered, but a lintel: topAbutmentHeight on pierHeight, total height is pierHeight + topAbutmentHeight, if needed apply archHalf=true.'/> |
41 | </ProtoInterface> |
42 | <ProtoBody> |
43 | <!-- First node determines node type of this prototype --> |
44 | <!-- IndexedFaceset creates arch --> |
45 |
<!-- ROUTE information for ArchTransform node:
[from ArchPrototypeScript.computedScale to scale
]
-->
<Transform DEF='ArchTransform'> |
46 | <Shape DEF='Arch'> |
47 | <!-- note that convex='false' (meaning concave geometry) is crucial for this IFS of a geometric chord to render properly --> |
48 |
<!-- ROUTE information for ArchIndex node:
[from ArchPrototypeScript.indexOut to set_coordIndex
]
-->
<IndexedFaceSet DEF='ArchIndex' convex='false' solid='false'> |
49 |
<!-- ROUTE information for ArchChord node:
[from ArchPrototypeScript.pointOut to point
]
-->
<Coordinate DEF='ArchChord'/> |
50 | </IndexedFaceSet> |
51 | <Appearance> |
52 | <Material DEF='MaterialNode'> |
53 | <IS> |
54 | <connect nodeField='emissiveColor' protoField='emissiveColor'/> |
55 | <connect nodeField='diffuseColor' protoField='diffuseColor'/> |
56 | </IS> |
57 | </Material> |
58 | </Appearance> |
59 | </Shape> |
60 | </Transform> |
61 | <!-- Subsequent nodes do not render, but still must be a valid X3D subgraph --> |
62 | <!-- This embedded Script provides the X3D author with additional visibility and control over prototype inputs and outputs --> |
63 |
<!-- ROUTE information for ArchPrototypeScript node:
[from computedScale to ArchTransform.scale
]
[from pointOut to ArchChord.point
]
[from indexOut to ArchIndex.set_coordIndex
]
-->
<Script DEF='ArchPrototypeScript' url=' "ArchPrototypeScript.js" "https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Buildings/ArchPrototypeScript.js" '> |
64 | <!-- INPUT PARAMETERS --> |
65 | <!-- General parameters --> |
66 | <!-- Parameters to create to create shapes related to arch: put true to apply --> |
67 | <!-- OUTPUT PARAMETERS --> |
68 |
<field name='clearSpanWidth' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for clearSpanWidth parameter'/> |
69 |
<field name='riseHeight' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for riseHeight parameter'/> |
70 |
<field name='depth' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for depth parameter'/> |
71 |
<field name='topAbutmentHeight' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for topAbutmentHeight parameter'/> |
72 |
<field name='pierWidth' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for pierWidth parameter'/> |
73 |
<field name='pierHeight' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for pierHeight parameter'/> |
74 |
<field name='archHalf' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for archHalf parameter'/> |
75 |
<field name='archHalfExtensionWidth' type='SFFloat' accessType='initializeOnly'
appinfo='user or default input for archHalfExtensionWidth parameter'/> |
76 |
<field name='onlyIntrados' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for onlyIntrados parameter'/> |
77 |
<field name='archFilled' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for archFilled parameter'/> |
78 |
<field name='archHalfFilled' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for archHalfFilled parameter'/> |
79 |
<field name='lintel' type='SFBool' accessType='initializeOnly'
appinfo='user or default input for lintel parameter'/> |
80 |
<field name='computedScale' type='SFVec3f' accessType='outputOnly'
appinfo='computedScale: modify scale field - NOTE it is not used to modify the whole arch, but to modify clearSpanWidth, riseHeight, depth. It does not affect topAbutmentHeight, pierWidth, pierHeight, archHalfExtensionWidth'/> |
81 |
<field name='pointOut' type='MFVec3f' accessType='outputOnly'
appinfo='send computed points to the Coordinate node'/> |
82 |
<field name='indexOut' type='MFInt32' accessType='outputOnly'
appinfo='send computed indices to the IndexedFaceSet node'/> |
83 | <IS> |
84 | <connect nodeField='clearSpanWidth' protoField='clearSpanWidth'/> |
85 | <connect nodeField='riseHeight' protoField='riseHeight'/> |
86 | <connect nodeField='depth' protoField='depth'/> |
87 | <connect nodeField='pierWidth' protoField='pierWidth'/> |
88 | <connect nodeField='topAbutmentHeight' protoField='topAbutmentHeight'/> |
89 | <connect nodeField='pierHeight' protoField='pierHeight'/> |
90 | <connect nodeField='archHalf' protoField='archHalf'/> |
91 | <connect nodeField='archHalfExtensionWidth' protoField='archHalfExtensionWidth'/> |
92 | <connect nodeField='onlyIntrados' protoField='onlyIntrados'/> |
93 | <connect nodeField='archFilled' protoField='archFilled'/> |
94 | <connect nodeField='archHalfFilled' protoField='archHalfFilled'/> |
95 | <connect nodeField='lintel' protoField='lintel'/> |
96 | </IS> |
97 | </Script> |
98 | < ROUTE fromNode='ArchPrototypeScript' fromField='computedScale' toNode='ArchTransform' toField='scale'/> |
99 | < ROUTE fromNode='ArchPrototypeScript' fromField='pointOut' toNode='ArchChord' toField='point'/> |
100 | < ROUTE fromNode='ArchPrototypeScript' fromField='indexOut' toNode='ArchIndex' toField='set_coordIndex'/> |
101 | </ProtoBody> |
102 | </ProtoDeclare> |
103 | <ProtoInstance name='ArchPrototype' DEF='ArchInstance'> |
104 | <fieldValue name='diffuseColor' value='0.5 0.3 0.6'/> |
105 | <fieldValue name='emissiveColor' value='0.5 0.3 0.6'/> |
106 | <fieldValue name='clearSpanWidth' value='5'/> |
107 | <fieldValue name='riseHeight' value='2.5'/> |
108 | <fieldValue name='depth' value='2'/> |
109 | <fieldValue name='topAbutmentHeight' value='0.6'/> |
110 | <fieldValue name='pierWidth' value='1'/> |
111 | <fieldValue name='pierHeight' value='2'/> |
112 | </ProtoInstance> |
113 | <Shape> |
114 | <Text string='"TODO: internal and external" "prototype tests" "ArchPrototype.x3d"'> |
115 | <FontStyle family='"SANS"' justify='"MIDDLE" "MIDDLE"' style='BOLD'/> |
116 | </Text> |
117 | <Appearance> |
118 | <Material diffuseColor='0.9 0.9 0.9'/> |
119 | </Appearance> |
120 | </Shape> |
121 | <!-- Add any ROUTEs here that connect ProtoInstance to/from prior nodes in Scene (and outside of ProtoDeclare) --> |
122 | <Inline DEF='CoordinateAxes' url=' "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "../../../Savage/Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "../../../Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl" '/> |
123 | </Scene> |
124 | </X3D> |
Event Graph ROUTE Table entries with 3 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.
ArchPrototypeScript
Script computedScale SFVec3f |
ArchTransform
Transform scale SFVec3f |
|
ArchPrototypeScript
Script pointOut MFVec3f |
ArchChord
Coordinate point MFVec3f |
|
ArchPrototypeScript
Script indexOut MFInt32 |
ArchIndex
IndexedFaceSet set_coordIndex MFInt32 |
ArchInstance
ProtoInstance ArchPrototype |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
<!--
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)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->