button_gate 
VRModules				                      button gate (6)


NAME
	button gate - serves to "gate" (i.e., block or selectively
	pass-through) VR events.  the gating criteria is whether one
	or more "buttons" have been pressed on the input device.  These
	button evens are encoded into the VR event field.

SUMMARY
     Name	   button gate

     Type	   filter

     Inputs	   field float 1D 1-space uniform
		   (VR device event field)

     Outputs	   field float 1D 1-space uniform
		   (VR device event field)


     Parameters	   _N_a_m_e		   _T_y_p_e		  _D_e_f_a_u_l_t	 _M_i_n	   _M_a_x
		   button1	   boolean	  off		 off	   on
		   button2	   boolean	  off		 off	   on
		   button3	   boolean	  off		 off	   on
		   button4	   boolean	  off		 off	   on
		   button5	   boolean	  off		 off	   on


DESCRIPTION
	
	Button gate selectively "gates", or "blocks" a VR event field
	from downstream modules.  The user selects one of the buttons
	from the parameter list as a "gate."  When a button event (ie,
	BUTTON_DOWN) is detected within the input field, the event is
	then copied to the output port.

	In addition, the button event is then cleared in the output
	field.

INPUTS
     	field float 1D 1-space uniform - VR device event field.  A set
	of C-language macros is used internal to the code for this 
	module to encode the device event information into an AVS
	field.  This field is not readily processible (unfortunately)
	by "normal" AVS modules.  This is the case because both
	floating point and boolean values are encoded into the field data.


PARAMETERS
	button1-button5 - a set of boolean toggles which indicate those
	button event(s) that cause data to be passed downstream.  In other
	words, if "button1" is set to TRUE, no data will be passed downstream
	until a "button1 event" is detected in the input field.

OUTPUT
	see INPUT.

EXAMPLE
	division ipu
	    |
	    |  ("hand" event field)
 	    |
	button gate
	    |
	vr xform obj
	    |
	geometry viewer

RELATED	MODULES
	button gate acc


VRModules					  Lawrence Berkeley Laboratory
April 1996
