media @ VU
[] readme course preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthoughts appendix references examples resources _

talk show tell print

music-dossier-Environment_org.vr

music-dossier-Environment_org.vr (wrl ) [ flux / bitmanagement / cortona / octaga ]


  
  EXTERNPROTO Layer3D [
          eventIn MFNode addChildren
          eventIn MFNode removeChildren
          eventIn MFNode addChildrenLayer
          eventIn MFNode removeChildrenLayer
  
          exposedField SFVec3f bboxSize
          exposedField SFVec3f bboxCenter
          exposedField MFNode childrenLayer
          exposedField SFVec2f translation
          exposedField SFInt32 depth
          exposedField SFVec2f size
          exposedField SFNode background
          exposedField SFNode fog
          exposedField SFNode navigationInfo
          exposedField SFNode viewpoint
          exposedField MFNode children
  ]
  [
          "urn:inet:blaxxun.com:node:Layer3D"
          "http://www.blaxxun.com/vrml/protos/nodes.wrl#Layer3D"
          "http://www.blaxxun.com/developer/contact/3d/vrml/demo/layer/nodes.wrl#Layer3D"
  ]
    # installation  

EXTERNPROTO TerraDegliaEnv [ eventOut SFBool closeMyTD eventIn MFNode setNodes eventIn SFBool show ]"dossier-terraDegliaEnv.wrl#TerraDegliaEnv" # installation2
**KLOON**

EXTERNPROTO TerraDegliaEnv2 [ eventOut SFBool closeMyTD eventIn MFNode setNodes eventIn SFBool show ]"music-dossier-terraDegliaEnv2.wrl#TerraDegliaEnv" EXTERNPROTO PresentationEnvironment [ eventIn SFBool show eventIn SFString text eventIn SFNode contentLeft eventIn SFNode contentMiddle eventIn SFNode contentRight eventIn SFNode onlyContent eventIn SFString returnNodeID eventIn SFString titleText eventOut SFBool closeButtons eventOut SFBool ready eventOut SFString exit eventIn MFNode nodes eventOut SFString exitNodeID eventOut SFBool closeEnv ]"music-dossier-presentationEnvironment.wrl#PresentationEnvironment" EXTERNPROTO ConceptGraph [ eventIn MFNode setNodes eventIn SFString show eventOut SFString clickedOnNode exposedField SFVec3f viewpointPosition eventOut SFBool ready eventOut SFString historyAdd eventOut SFFloat endTransparencyCGButtons eventOut SFString nodeTitle ] "music-dossier-ConceptGraph8.wrl#ConceptGraph" EXTERNPROTO PresentationButtons [ eventOut SFString clickedOnNode eventOut SFBool ready eventOut SFString close eventIn MFNode setNodes eventIn SFString show eventOut SFNode contentLeft eventOut SFNode contentMiddle eventOut SFNode contentRight eventOut SFNode onlyContent eventOut SFBool noContent eventIn SFBool closeButtons eventIn SFString activeLink eventIn SFInt32 placeActive ] "music-dossier-PresentationButtons.wrl#PresentationButtons" EXTERNPROTO History[ eventIn SFString nodeIn eventOut SFString nodeOut eventOut SFBool ready eventOut SFBool show eventIn SFFloat endTransparencyButton ] "music-dossier-History.wrl#History" PROTO NodePresentationGraph [ eventIn MFNode connectedNodes eventIn SFNode setInfoObject field SFString ID "Noppes" eventOut SFNode infoObject eventOut MFNode connectedNodesOut ]{ Script { eventIn MFNode connectedNodes IS connectedNodes eventIn SFNode setInfoObject IS setInfoObject eventOut SFNode infoObject IS infoObject eventOut MFNode connectedNodesOut IS connectedNodesOut url "javascript: function connectedNodes(value) { connectedNodesOut = value; } function setInfoObject (value) { infoObject = value; } " } } PROTO Environment [ eventIn MFNode setConceptGraphNodes eventIn MFNode setPresentationGraphNodes eventIn SFString text eventOut SFBool ready eventOut SFBool conceptGraphReady eventOut SFBool presentationGraphReady eventOut SFBool historyReady eventOut SFBool presentationEnvironmentReady eventIn SFBool prepare eventIn SFString showNodeConceptGraph eventOut SFFloat endTransparencyCGButtons eventIn SFString showNodePresentation eventIn SFNode contentLeft eventIn SFNode contentMiddle eventIn SFNode contentRight eventIn SFString setActiveLink eventIn SFInt32 placeActiveLinkOnPane ] { NavigationInfo { type "NONE" } DEF presEnv PresentationEnvironment { ready IS presentationEnvironmentReady nodes IS setConceptGraphNodes contentLeft IS contentLeft contentMiddle IS contentMiddle contentRight IS contentRight text IS text } DEF conceptGraph ConceptGraph { setNodes IS setConceptGraphNodes ready IS conceptGraphReady show IS showNodeConceptGraph endTransparencyCGButtons IS endTransparencyCGButtons } Transform { translation -21.5 6 0 children [ DEF history History {ready IS historyReady } ] } DEF TDSwitch Switch { whichChoice -1 choice [ DEF myTerra TerraDegliaEnv{setNodes IS setPresentationGraphNodes} ] } DEF TD2Switch Switch { # **kloon** whichChoice -1 choice [ DEF myTerra2 TerraDegliaEnv2{setNodes IS setPresentationGraphNodes} ] } DEF layer Layer3D { depth -10 size 1 1 navigationInfo NavigationInfo { type "NONE" } viewpoint DEF Viewpoint1 Viewpoint { fieldOfView 0.96 orientation 0 1 0 0.0 position 0 0 20 description "Viewpoint Presentation Graph" }, children [ Transform { translation 0 0 -10 children [ DEF layerSwitch Switch { whichChoice -1 choice [ DEF presentationGraph PresentationButtons { setNodes IS setPresentationGraphNodes ready IS presentationGraphReady activeLink IS setActiveLink placeActive IS placeActiveLinkOnPane } ] } ] } DirectionalLight { direction 0 0 -1 on TRUE intensity 0.9 } ] } DEF layerTimer TimeSensor { loop TRUE enabled TRUE } DEF switchTerra Switch { whichChoice -1 choice [ TerraDegliaEnv{} ] } DEF switchTerra2 Switch { # **kloon** whichChoice -1 choice [ TerraDegliaEnv2{} ] } DEF layerScript Script { eventIn SFString showNodePresentation IS showNodePresentation eventIn SFString showNodeCG eventIn SFString showNodePG eventIn SFTime timer eventIn SFBool prepare IS prepare eventIn SFBool hide eventIn SFBool closeTD eventIn SFBool closeTD2 # KLOON eventIn SFBool exitPresentationEnv eventIn SFString openClose eventIn SFNode showOnlyContent eventOut SFInt32 showLayer eventOut SFVec2f size eventOut SFString showPresentationGraph eventOut SFString showConceptGraph eventOut SFBool showPresentationEnvironment eventOut SFBool ready IS ready eventOut SFInt32 showTD eventOut SFInt32 showTD2 # KLOON eventOut SFBool TDshow eventOut SFBool TD2show # KLOON eventOut SFString returnNodeID field SFVec2f endSize 1 0 field SFBool on FALSE field SFTime beginTime 0 field SFVec2f beginSize 1 0.01 field SFFloat totalTime 2 field SFNode presentationG USE presentationGraph directOutput TRUE url "javascript: function initialize() { ready = true; } // preprate function is called after data is loaded // smooth textures are disabled to make transparent font in the concept graph readable function prepare(value) { size = beginSize; showLayer = -1; Browser.setOption('smooth','FALSE'); } function hide(value,time) { //print('hiding'); if(value){ endSize = new SFVec2f(1,0.01); size = endSize; showLayer = -1; } else { endSize = new SFVec2f(1,0.3); size = endSize; showLayer = 0; } } // interpolation of the scale of the presentation buttons layer function timer(value) { if (on) { factor = (value - beginTime) / totalTime; if (factor < 1) { size = new SFVec2f(factor * (endSize.x - beginSize.x) + beginSize.x, factor * (endSize.y - beginSize.y) + beginSize.y); } else { size = endSize; on = false; if (size.y < 0.1) showLayer = -1; } } } function showNodeCG(value,time) { // print('show node cg'); endSize = new SFVec2f(1,0.01); Browser.setOption('smooth','FALSE'); // disable smooth textures to make font in concept graph readable showConceptGraph = value; showPresentationGraph = null; // removes information items from buttonbar and from presentation environment showPresentationEnvironment = false; // closes presentation environment and zooms out if (value != 'G0') { // if not closing terra della, then activate interpolation to shrink presentation button layer beginTime = time; beginSize = new SFVec2f(size); on = true; } else if (value != 'G02') { // if not closing terra della, then activate interpolation to shrink presentation button layer KLOON beginTime = time; beginSize = new SFVec2f(size); on = true; } } function showNodePG(value,time) { // print('show node pg'); size = endSize; endSize = new SFVec2f(1,0.3); if (value != 'G0' & value != 'G02') //terra { showPresentationGraph = value; if (presentationG.noContent) { // print('No content!'); showNodeCG(value,time); return; } if (presentationG.onlyContent) { showLayer = -1; returnNodeID = value; } else { showLayer = 0; } }
/ installation



showConceptGraph = null; Browser.setOption('smooth','TRUE'); // enables smooth textures for better texture quality in presentation environment showPresentationEnvironment = true; if (value != 'G0') { // if not opening terra della, then activate interpolation to enlarge presentation button layer beginTime = time; beginSize = new SFVec2f(size); on = true; } else { showTerraDeglia(); } if (value != 'G02') { // if not opening terra della, then activate interpolation to enlarge presentation button layer beginTime = time; beginSize = new SFVec2f(size); on = true; } else { showTerraDeglia2(); } }
/ installation


function showTerraDeglia() { Browser.setNavigationMode('ANY'); // activate navigation Browser.setViewpointByValue(new SFVec3f(1,0, 6),new SFRotation(0,0, 1, 0),2); showTD = 0; //sets terra switch to show environment TDshow = true; // activate terra environment

                  }
  
                  function showTerraDeglia2() { 
                          Browser.setNavigationMode('ANY');   // activate navigation
                          Browser.setViewpointByValue(new SFVec3f(1,0, 6),new SFRotation(0,0, 1, 0),2);
                          showTD2 = 0; //sets terra switch to show environment
                          TD2show = true; // activate terra environment
  
                  }
  
/ installation


function closeTD(value,time) { Browser.setNavigationMode('NONE'); // disable navigation Browser.setViewpointByValue(new SFVec3f(0,0, 38),new SFRotation(0,0, 1, 0),2); showTD = -1; // hide terra TDshow = false; // disable environment showNodeCG('MAIN',time); // show the terra deglia node in the concept graph //showConceptGraph =; }

                  function closeTD2(value,time) {
                          Browser.setNavigationMode('NONE'); // disable navigation
                          Browser.setViewpointByValue(new SFVec3f(0,0, 38),new SFRotation(0,0, 1, 0),2);
                          showTD2 = -1;   // hide terra
                          TD2show = false;        // disable environment
                          showNodeCG('MAIN',time); // show the terra deglia node in the concept graph
                          //showConceptGraph =;
                  }
  
                  "
          }
  
          ROUTE layerScript.showConceptGraph TO conceptGraph.show
          ROUTE layerScript.showPresentationGraph        TO presentationGraph.show
          ROUTE layerScript.size TO layer.size
          ROUTE layerTimer.time TO layerScript.timer
          ROUTE conceptGraph.clickedOnNode                TO        layerScript.showNodePG
          ROUTE presentationGraph.clickedOnNode        TO        layerScript.openClose
          ROUTE presentationGraph.close                        TO        layerScript.showNodeCG
          ROUTE layerScript.showPresentationEnvironment TO presEnv.show
          ROUTE layerScript.showLayer        TO layerSwitch.whichChoice
          ROUTE presentationGraph.contentLeft TO presEnv.contentLeft
          ROUTE presentationGraph.contentMiddle TO presEnv.contentMiddle
          ROUTE presentationGraph.contentRight TO presEnv.contentRight
          ROUTE presentationGraph.onlyContent        TO presEnv.onlyContent
          ROUTE presentationGraph.onlyContent        TO layerScript.showOnlyContent
          ROUTE conceptGraph.historyAdd TO history.nodeIn
          ROUTE history.nodeOut TO conceptGraph.show
          ROUTE presEnv.closeButtons TO layerScript.hide
          ROUTE conceptGraph.endTransparencyCGButtons        TO history.endTransparencyButton
          ROUTE layerScript.showTD TO TDSwitch.whichChoice
          ROUTE myTerra.closeMyTD        TO layerScript.closeTD
          ROUTE layerScript.TDshow TO        myTerra.show
          ROUTE presEnv.exit TO layerScript.showNodeCG
          ROUTE presentationGraph.noContent TO layerScript.exitPresentationEnv
          ROUTE layerScript.returnNodeID TO presEnv.returnNodeID
          ROUTE conceptGraph.nodeTitle TO        presEnv.titleText
  
          ROUTE presEnv.closeEnv TO        presentationGraph.closeButtons
          ROUTE presEnv.exitNodeID TO layerScript.showNodeCG
  
  #         KLOON
          ROUTE layerScript.TD2show TO myTerra2.show
          ROUTE myTerra2.closeMyTD TO layerScript.closeTD2
          ROUTE layerScript.showTD2 TO TD2Switch.whichChoice
  }
  


(C) A. Eliëns 21/5/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.