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 | <component level='5' name='Rendering'/> |
6 | <meta name='title' content='ClipPlaneExample.x3d'/> |
7 | <meta name='creator' content='Nicholas Polys, Don Brutzman'/> |
8 | <meta name='created' content='20 February 2013'/> |
9 | <meta name='modified' content='20 October 2019'/> |
10 | <meta name='description' content='Illustrate use of two ClipPlane intersections across four sets of primitive geometry. Line indicators are outside the scope of the ClipPlane transformation hierarchy and so are not clipped.'/> |
11 | <meta name='reference' content='ClipPlaneExample.x3d'/> |
12 | <meta name='Image' content='ClipPlaneExampleFront.png'/> |
13 | <meta name='Image' content='ClipPlaneExampleOblique.png'/> |
14 | <meta name='Image' content='ClipPlaneExampleOverhead.png'/> |
15 | <meta name='Image' content='ClipPlaneExampleSide.png'/> |
16 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/CAD/ClipPlaneExample.x3d'/> |
17 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
18 | <meta name='generator' content='Vivaty Studio'/> |
19 | <meta name='license' content='../../license.html'/> |
20 | </head> |
21 | <Scene> |
22 | <!-- TODO Schematron error for orientation='0 0 0 0' --> |
23 | <Viewpoint description='ClipPlanes front view' position='0 1 10'/> |
24 | <Viewpoint description='ClipPlanes oblique view' orientation='1 0 0 -0.851966' position='0 8 7'/> |
25 | <Viewpoint description='ClipPlanes overhead view' orientation='1 0 0 -1.570796' position='0 12 0'/> |
26 | <Viewpoint description='ClipPlanes side view' orientation='-0.03326 0.99889 0.03326 1.571904' position='15 1 0'/> |
27 | <Background DEF='WhiteBackground' groundColor='1 1 1' skyColor='1 1 1'/> |
28 | <Group DEF='ClipPlaneGroup'> |
29 | <!-- ClipPlane nodes affect peers and children --> |
30 | <ClipPlane DEF='ClipPlaneHorizontal' containerField='children'/> |
31 | <ClipPlane DEF='ClipPlaneVertical' plane='0 0 -1 0' containerField='children'/> |
32 | <!-- Non-standard scripting animation test for ClipPlane <PythonScript DEF="PS" "url=OpacityMapStyle.py" /> <ROUTE fromNode='timer_pos0' fromField='value_changed' toNode='PS' toField='planeEquation'/> <ROUTE fromNode='PS' fromField='planeEquation' toNode='CP' toField='plane'/> --> |
33 | <!-- <TimeSensor DEF='timer' cycleInterval='13.000' loop='true' startTime='0.000'/> <ROUTE fromNode='timer' fromField='fraction_changed' toNode='timer_pos0' toField='set_fraction'/> <ROUTE fromNode='timer_pos0' fromField='value_changed' toNode='move' toField='set_translation'/> --> |
34 |
<!-- Group
PrimitiveShapes is a DEF node that has 1 USE node: USE_1 -->
<Group DEF='PrimitiveShapes'> |
35 | <WorldInfo info='"This Web3D Content was created with Vivaty Studio, a Web3D authoring tool" "www.mediamachines.com"' title='primitives'/> |
36 | <Transform DEF='dad_Box1' translation='-3 0 0'> |
37 | <Shape DEF='Box1'> |
38 | <Appearance> |
39 | <Material DEF='Red' ambientIntensity='.2' diffuseColor='1 0 0' shininess='.2'/> |
40 | </Appearance> |
41 | <Box DEF='GeoBox1' solid='false'/> |
42 | </Shape> |
43 | </Transform> |
44 | <Transform DEF='dad_Cylinder1' translation='-1 0 0'> |
45 | <Shape DEF='Cylinder1'> |
46 | <Appearance> |
47 | <Material DEF='Green' ambientIntensity='.2' diffuseColor='0 1 0' shininess='.2'/> |
48 | </Appearance> |
49 | <Cylinder DEF='GeoCylinder1' solid='false'/> |
50 | </Shape> |
51 | </Transform> |
52 | <Transform DEF='dad_Cone1' translation='1 0 0'> |
53 | <Shape DEF='Cone1'> |
54 | <Appearance> |
55 | <Material DEF='Blue' ambientIntensity='.2' diffuseColor='0 0 1' shininess='.2'/> |
56 | </Appearance> |
57 | <Cone DEF='GeoCone1' solid='false'/> |
58 | </Shape> |
59 | </Transform> |
60 | <Transform DEF='dad_Sphere1' translation='3 0 0'> |
61 | <Shape DEF='Sphere1'> |
62 | <Appearance> |
63 | <Material DEF='Shiny_Yellow' ambientIntensity='.2' diffuseColor='1 1 0' shininess='.1' specularColor='1 1 0'/> |
64 | </Appearance> |
65 | <Sphere DEF='GeoSphere1' solid='false'/> |
66 | </Shape> |
67 | </Transform> |
68 | <Transform DEF='dad_Light1' translation='0 5 0'> |
69 | <PointLight DEF='Light1'/> |
70 | </Transform> |
71 | <Transform DEF='dad_Background1' translation='-.73213 4.14112 0'> |
72 | <Background DEF='Background1' groundColor='1 1 1' skyColor='1 1 1'/> |
73 | </Transform> |
74 | </Group> |
75 | <Transform translation='0 3 0'> |
76 | <Group USE='PrimitiveShapes'/> |
77 | </Transform> |
78 | </Group> |
79 | <!-- Keep boundary lines outside of scope of the two clipping planes so that they can illustrate boundaries without being cut off --> |
80 | <Group DEF='BoundaryLines'> |
81 | <Transform DEF='move' translation='0 .00001 0'> |
82 | <Shape DEF='PlaneOutlineHorizontal'> |
83 |
<!-- Appearance
BoundaryLineAppearance is a DEF node that has 1 USE node: USE_1 -->
<Appearance DEF='BoundaryLineAppearance'> |
84 | <Material ambientIntensity='.2' emissiveColor='0.1 0.1 0.1'/> |
85 | </Appearance> |
86 | <IndexedLineSet coordIndex='0 1 2 3 0 -1'> |
87 | <Coordinate point='5 0 -2 5 0 2 -5 0 2 -5 0 -2'/> |
88 | </IndexedLineSet> |
89 | </Shape> |
90 | </Transform> |
91 | <PositionInterpolator DEF='timer_pos0' key='0 .5 1' keyValue='0 2 0 0 -2 0 0 2 0'/> |
92 | <Transform rotation='1 0 0 -1.578'> |
93 | <Transform DEF='move2' translation='0 .00001 0'> |
94 | <Shape DEF='PlaneOutlineVertical'> |
95 | <Appearance USE='BoundaryLineAppearance'/> |
96 | <!-- also includes center line --> |
97 | <IndexedLineSet coordIndex='0 1 2 3 0 -1 4 5 -1'> |
98 | <Coordinate point='5 0 -2 5 0 4 -5 0 4 -5 0 -2 5 0 0 -5 0 0'/> |
99 | </IndexedLineSet> |
100 | </Shape> |
101 | </Transform> |
102 | </Transform> |
103 | </Group> |
104 | </Scene> |
105 | </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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->