button_gate_acc
VRModules				                   button gate acc (6)


NAME
	button gate acc - 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 events are encoded into the VR event field.

	In addiiton to the basic functionality of "button gate", this
	module "accumulates" the transformation values collected from
	the input field.  Recall that the values generated by the input
	devices represent "delta" values, so they're generally "pretty
	small" (ie, their absolute value is "close to" zero).  This 
	module provides a way to "accumulate" these values.

SUMMARY
     Name	   button gate acc

     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 acc 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.

	Output values represent accumulated values from the input
	field.  The accumulation occurs ONLY when the indicated 
	button event is present.

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 accumulated in the ouput
	field, then passed downstream.  In other words, if "button1" is 
	set to TRUE, no data will be accumulated then passed downstream 
	until a "button1 event" is detected in the input field.

OUTPUT
	see INPUT.

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

RELATED	MODULES
	button gate acc


VRModules					  Lawrence Berkeley Laboratory
April 1996
