[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

? Access and EventRouting ?



sorry, maybe you've received this mail for the second time !   
------------------------------------------------------------------------
-------------


Hi ! and thank you for your answers, :-)))))

I've decided to take the SwitchNode,
but now my new problem is:
how to get access to the eventIn's and the eventOut's

I have several viewpoints,
a SwitchNode
and a Script which has problems with its access to the Viewpoints
isBound-Event (I think it may be so)

-> everytime a Viewpoint is changed, the geometrie in the SwitchNode
will/should change too !

thanx and regards
Andrea



DEF seite Viewpoint {
  position 6.871 0.6217 -0.006253
  orientation 0.001825 -1 -0.001825 -1.571
  fieldOfView 0.6326
  description "seite"
}
DEF vorn Viewpoint {...}
DEF aufsicht Viewpoint {...}
DEF perspektive Viewpoint {...}

DEF scene Transform {
        children [
	 ... some geometrie ...

	DEF nv_bars Switch {
	   whichChoice 0
	   choice [
		DEF vp_vorn_nav Inline {
			 url "vp_vorn_nav.wrl"
		}
		DEF vp_seite_nav Inline {
			url "vp_seite_nav.wrl"
		}
		 DEF vp_pers_nav Inline {
			url "vp_pers_nav.wrl"
		}
		DEF vp_aufsicht_nav Inline {
			url "vp_aufsicht_nav.wrl"
		}
	    ]
	}
                                
		DEF vp_seite Script {
	            directOutput TRUE
                   	eventIn SFBool bind FALSE		//
problem ?
	        	eventOut SFInt32 switchValue
          	        	url "javascript:
                    	function initialize () {
                         	switchValue = 0;
                         	bind = FALSE;
                     	}
                     	function bind (value, ts) {
                       	 	if (value == TRUE)
                      	 	switchValue = 1;
                         	else switchValue=0;
                    	}"
                }
                DEF vp_vorn Script { ..}
                DEF vp_aufsicht Script { ..}
                DEF vp_pers Script { ..}

ROUTE seite.isBound TO vp_seite.bind				//
problem ?
ROUTE vp_nv-bars.switchValue TO nv_bars.set_whichChoice
//problem ?
        ]
}
-------------------------------------------------------------------
*** Please send administrative requests to <majordomo@sdsc.edu> ***
-------------------------------------------------------------------