summaryrefslogtreecommitdiffstats
path: root/test/uscxml/test-scenegraph.scxml
diff options
context:
space:
mode:
Diffstat (limited to 'test/uscxml/test-scenegraph.scxml')
-rw-r--r--test/uscxml/test-scenegraph.scxml70
1 files changed, 70 insertions, 0 deletions
diff --git a/test/uscxml/test-scenegraph.scxml b/test/uscxml/test-scenegraph.scxml
new file mode 100644
index 0000000..0efcd6d
--- /dev/null
+++ b/test/uscxml/test-scenegraph.scxml
@@ -0,0 +1,70 @@
+<scxml datamodel="ecmascript" initial="start" binding="late"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ xmlns:scenegraph="http://uscxml.tk.informatik.tu-darmstadt.de/scenegraph.xsd">
+ <datamodel>
+ <data id="pitch">0</data>
+ <data id="yaw">0</data>
+ <data id="roll">0</data>
+ </datamodel>
+ <state id="start">
+ <invoke type="heartbeat">
+ <param name="interval" expr="'10ms'" />
+ <param name="eventname" expr="'heartbeat.20ms'" />
+ </invoke>
+ <invoke type="scenegraph">
+ <content>
+ <scenegraph:display x="10%" y="10 %" width="50 % " height=" 50 % ">
+ <scenegraph:viewport x="0" y="0" width="50%" height="50%" id="scene1">
+ <scenegraph:scale x="0.3" y="0.3" z="1">
+ <scenegraph:translation x="0" y="-10" z="1">
+ <scenegraph:node src="http://people.sc.fsu.edu/~jburkardt/data/obj/airboat.obj" />
+ </scenegraph:translation>
+ </scenegraph:scale>
+ </scenegraph:viewport>
+ <scenegraph:viewport x="0" y="50%" width="50%" height="50%" id="scene3">
+ <scenegraph:rotation id="treeRotation" pitch="100deg" roll="3.15149rad" yaw="10deg">
+ <scenegraph:node src="http://cs.iupui.edu/~aharris/webDesign/vrml/tree.wrl" />
+ </scenegraph:rotation>
+ </scenegraph:viewport>
+ <scenegraph:viewport x="50%" y="50%" width="50%" height="50%" id="scene4">
+ <scenegraph:translation x="0" y="0" z="0">
+ <scenegraph:node src="scenegraph/HARD_MP_VAL_000.wrl" />
+ </scenegraph:translation>
+ </scenegraph:viewport>
+ <scenegraph:viewport x="50%" y="0" width="50%" height="50%" id="scene2">
+ <scenegraph:translation x="0" y="0" z="0">
+ <scenegraph:node src="http://cs.iupui.edu/~aharris/mm/vrml4/house.wrl" />
+ </scenegraph:translation>
+ </scenegraph:viewport>
+ </scenegraph:display>
+
+ <scenegraph:display x="20%" y="20 %" width="50 % " height=" 50 % ">
+ <scenegraph:viewport x="0" y="0" width="100%" height="100%" id="scene1">
+ <scenegraph:translation x="0" y="0" z="0">
+ <scenegraph:node src="scenegraph/HARD_MP_VAL_000.wrl" />
+ </scenegraph:translation>
+ </scenegraph:viewport>
+ </scenegraph:display>
+ </content>
+ </invoke>
+ <state id="animate">
+ <onentry>
+ <script>
+ var nodeSet = document.evaluate("//scenegraph:rotation[@id='treeRotation']").asNodeSet();
+ nodeSet[0].setAttribute("pitch", "pitch" + pitch + "deg");
+ nodeSet[0].setAttribute("roll", "roll" + roll + "deg");
+ nodeSet[0].setAttribute("yaw", "yaw" + yaw + "deg");
+ pitch += 0.5;
+ roll += 0.3;
+ yaw += 0.1;
+ </script>
+ </onentry>
+ <transition event="heartbeat.20ms" target="animate" />
+ </state>
+ </state>
+ <final id="final">
+ <onentry>
+ <log expr="'Finished!'" />
+ </onentry>
+ </final>
+</scxml> \ No newline at end of file