From 420eabf385953092388321b230536106dd27999a Mon Sep 17 00:00:00 2001
From: Anders Nilsson <anders.nilsson@cs.lth.se>
Date: Fri, 14 Sep 2007 10:06:43 +0200
Subject: [PATCH] Added example from Mathias on how to visualize a bounding box
 as a wire box.

---
 examples/BoundingBox_example.x3d | 40 ++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 examples/BoundingBox_example.x3d

diff --git a/examples/BoundingBox_example.x3d b/examples/BoundingBox_example.x3d
new file mode 100644
index 0000000..38f9995
--- /dev/null
+++ b/examples/BoundingBox_example.x3d
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.1//EN"
+                     "http://www.web3d.org/specifications/x3d-3.1.dtd">
+<X3D profile="Immersive" version="3.0"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.0.xsd">
+  <head>
+    <meta content="BoundingBox example.x3d" name="title"/>
+    <meta
+      content="Illustrating bounding box notation and visualization. Based on helloworld.x3d example." name="description"/>
+    <meta content="13 September 2007" name="created"/>
+    <meta content="Mathias Haage" name="creator"/>
+  </head>
+  <Scene><!--Example scene to illustrate bounding box.--><Group>
+      <Viewpoint description="Bounding Box" position="0 -1 7"/>
+      <Transform rotation="0 1 0 3">
+        <Shape bboxCenter="0 0 0" bboxSize="2 2 2">
+          <Sphere/>
+          <Appearance>
+            <ImageTexture url="&quot;earth-topo.png&quot; &quot;earth-topo.jpg&quot; &quot;earth-topo.gif&quot;&#10;&quot;earth-topo-small.gif&quot;&#10;&quot;../earth-topo.png&quot;&#10;&quot;../earth-topo.jpg&quot;&#10;&quot;../earth-topo.gif&quot; &quot;../earth-topo-small.gif&quot;&#10;&quot;/www.web3d.org/x3d/content/examples/earth-topo.png&quot;&#10;&quot;/www.web3d.org/x3d/content/examples/earth-topo.jpg&quot;&#10;&quot;/www.web3d.org/x3d/content/examples/earth-topo.gif&quot;&#10;&quot;/www.web3d.org/x3d/content/examples/earth-topo-small.gif&quot;&#10;&quot;http://www.web3d.org/x3d/content/examples/earth-topo.png&quot;&#10;&quot;http://www.web3d.org/x3d/content/examples/earth-topo.jpg&quot;&#10;&quot;http://www.web3d.org/x3d/content/examples/earth-topo.gif&quot;&#10;&quot;http://www.web3d.org/x3d/content/examples/earth-topo-small.gif&quot;"/>
+          </Appearance>
+        </Shape>
+        <Shape>
+          <IndexedLineSet colorPerVertex="false" coordIndex="0 1&#10;1 3&#10;3 2&#10;2 0&#10;0 4&#10;4 5&#10;5 1&#10;1 5&#10;5 7&#10;7 3&#10;3 7&#10;7 6&#10;6 2&#10;2 6&#10;6 4&#10;">
+            <Coordinate point="-1 -1 -1&#10;-1 -1 1&#10;-1 1 -1&#10;-1 1 1&#10;1 -1 -1&#10;1 -1 1&#10;1 1 -1&#10;1 1 1&#10;"/>
+          </IndexedLineSet>
+        </Shape>
+      </Transform>
+      <Transform translation="0 -2 0">
+        <Shape>
+          <Text string="&quot;Bounding&quot; &quot;Box!&quot;">
+            <FontStyle justify="&quot;MIDDLE&quot; &quot;MIDDLE&quot;"/>
+          </Text>
+          <Appearance>
+            <Material diffuseColor="0.1 0.5 1"/>
+          </Appearance>
+        </Shape>
+      </Transform>
+    </Group>
+  </Scene>
+</X3D>
-- 
GitLab