#VRML V2.0 utf8 WorldInfo { info [ "Copyright (C) 2004 J. \"MUFTI\" Scheurich, Tobias Feilhauer <feilhauer@casino.uni-stuttgart.de>" " This program is free software; you can redistribute it and/or modify" " it under the terms of the GNU General Public License" ] } DEF Transform1 Transform { children [ Transform { children [ Shape { appearance Appearance { material DEF Material1 Material { emissiveColor 0.968626 0.843137 1 } } geometry IndexedLineSet { coord Coordinate { point [ 1 1 1 1 -1 1 1 1 -1 1 -1 -1 ] } coordIndex [ 0 1 3 2 -1 ] } } Shape { appearance Appearance { material USE Material1 } geometry IndexedLineSet { coord Coordinate { point [ -1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 ] } coordIndex [ 0 1 3 2 -1 ] } } Shape { appearance Appearance { material USE Material1 } geometry IndexedLineSet { coord Coordinate { point [ -1 1 1 1 1 1 -1 1 -1 1 1 -1 ] } coordIndex [ 0 1 3 2 -1 ] } } Shape { appearance Appearance { material USE Material1 } geometry IndexedLineSet { coord Coordinate { point [ 1 -1 1 -1 -1 1 1 -1 -1 -1 -1 -1 ] } coordIndex [ 0 1 3 2 -1 ] } } Shape { appearance Appearance { material USE Material1 } geometry IndexedLineSet { coord Coordinate { point [ 1 1 1 -1 1 1 1 -1 1 -1 -1 1 ] } coordIndex [ 0 1 3 2 -1 ] } } Shape { appearance Appearance { material USE Material1 } geometry IndexedLineSet { coord Coordinate { point [ -1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 ] } coordIndex [ 0 1 3 2 -1 ] } } ] } ] translation 0 0 -5.129224 } Group { children [ DEF Group1 Group { children [ ] } DEF TouchSensor1 TouchSensor { } Transform { children [ Transform { children [ Shape { appearance Appearance { material Material { } } geometry ElevationGrid { height [ 0 0 0 0 ] xDimension 2 xSpacing 10 zDimension 2 zSpacing 10 } } ] rotation 1 0 0 1.605702 translation -3.980468 0 -6.105937 } ] } ] } ROUTE TouchSensor1.hitPoint_changed TO Transform1.set_translation DEF Script2 Script { eventIn SFVec3f position_in eventIn SFTime time1_in eventIn SFBool bool1_in eventOut MFString wuerfelstrings directOutput TRUE field SFVec3f position 0 0 0 field SFNode knoten USE Group1 field SFInt32 zaehler 0 field SFString gesamtString "" url [ "javascript: function bool1_in(value) { // value SFBool print('#VRML V2.0 utf8'); if (value) { for (i = 0; i < zaehler; i++) print(wuerfelstrings[i]); } } // field SFString gesamtString // // field SFInt32 zaehler // // eventOut MFString wuerfelstrings // // field SFVec3f position // function position_in(value) { // value SFVec3f position[0] = value[0]; position[1] = value[1]; position[2] = value[2]; } // field MFNode knoten // function time1_in(value) { var i; gesamtString = ' '; wuerfelstrings[zaehler] = ' Transform { translation ' + position + ' children Shape { appearance Appearance { material Material { } } geometry Box { }}}'; zaehler = zaehler + 1; for (i = 0; i < zaehler; i++) gesamtString = gesamtString + wuerfelstrings[i]; knoten.children = Browser.createVrmlFromString(gesamtString); } " ] } ROUTE TouchSensor1.hitPoint_changed TO Script2.position_in ROUTE TouchSensor1.touchTime TO Script2.time1_in Viewpoint { orientation 0.997956 1.369197e-2 6.241102e-2 0.594022 position 0.833411 -14.733370 5.434795 } Transform { children [ Billboard { axisOfRotation 0 0 0 children [ Group { children [ Shape { appearance Appearance { material Material { } } geometry Text { string [ "Print" ] } } Transform { children [ Shape { appearance Appearance { material Material { diffuseColor 1 0.101960 0.101960 } } geometry Sphere { radius 0.659999 } } ] translation 1.171902 -0.898298 -0.912959 } ] } DEF touchsensor2 TouchSensor { } ] } ] translation 0 -13.448519 0 } ROUTE touchsensor2.isActive TO Script2.bool1_in