CAVE TooLs
version 3.5
last updated 10/5/1998
Electronic Visualization Laboratory  
University of Illinois at Chicago  
851 S. Morgan St., Room 1120  
Chicago, IL 60607-7053  
(312) 996-3002  
(312) 413-7585 fax  
costigan@evl.uic.edu  

Copyright 1996,1997,1998  Electronic Visualization Laboratory, 
University of Illinois at Chicago  

written by Jim Costigan

General CLASS INFORMATION

The CAVE Tools class is a group of virtual input controls that can be used in the CAVE Virtual environment. They consist of three independent classes, a sliding knob, a rotating knob and a button. All classes return a value of zero to one. All three classes are available and can be called individually by invoking the tool name's header and object file.   An example program is available the shows the implementation of the CAVETooLs.  You can download a copy of the object and source files and a sample program.
 

Tool Class

The Tool class is a parent class of the slider, knob and button class.  You can declare a set of variables as being members of the  tool class and then assign them to slider, button or knob class later in the program.  You can also define variables as the individual classes, so all exsting code should be backwards compatable.

Slider Class

The slider class creates a sliding knob that returns values from zero to one. The slider is positionable anywhere in the virtual environment and at any angle. Intersection is detected with the front vector of the wand at a given distance, the default is 15 feet. When intersection is detected the knob shows a semi transparent bonding sphere to indicated that the wand is pointing at the knob. Selection and adjustment can be made by pushing a wand button (default is button 2) and moving the wand along the Z axis.

Knob Class

The knob class creates a  rotating  knob that returns values from zero to one. The knob is positionable anywhere in the virtual environment and at any angle. Intersection is detected with the front vector of the wand at a given distance, the default is 15 feet. When intersection is detected the knob shows a semi transparent bonding sphere to indicated that the wand is pointing at the knob. Selection and adjustment can be made by pushing a wand button (default is button 2) and rotating the wand on the Y axis.

Button Class

The button class creates a  button that returns values of either zero to one. The button is positionable anywhere in the virtual environment and at any angle. Intersection is detected with the front vector of the wand at a given distance, the default is 15 feet. When intersection is detected the button shows a semi transparent bonding sphere to indicated that the wand is pointing at the button. Selection and adjustment can be made by pushing a wand button (default is button 2).  A slight change in size and color are used to indicate the button is in the depressed or 1 position

Construction Arguments

slider (X Position, Y Position, Z Position) Creates a slider at the given XYZ position. This slider will be drawn parallel to the Z axis and will travel toward negative Z.. Selection of the knob's will be at a distance of 15 feet. All sliders default to the CAVE's navigated position and will move with CAVE navigation. It is not necessary to add the slider under the CAVE_NAV_TRANSFORM.

slider (X Position, Y Position, Z Position, Trigger Distance) Creates a slider at the given XYZ position . The slider will be drawn parallel to the Z axis and will travel toward negative Z. Selection of the knob will be at the distance "Trigger Distance" in feet given in the argument.

knob (X Position, Y Position, Z Position) Creates a knob at the given XYZ position. This knob will be drawn parallel to the Z axis and will rotate on negative Y. Selection of the knob's will be at a distance of 15 feet. All sliders default to the CAVE's navigated position and will move with CAVE navigation. It is not necessary to add the slider under the CAVE_NAV_TRANSFORM.

knob (X Position, Y Position, Z Position, Trigger Distance) Creates a rotating knob at the given XYZ position . The knob will be drawn parallel to the Z axis and will rotate on negative Y. Selection of the knob will be at the distance "Trigger Distance" in feet given in the argument.

button (X Position, Y Position, Z Position) Creates a button at the given XYZ position. This button will be drawn parallel to the Z axis. Selection of the button will be at a distance of 15 feet. All buttons default to the CAVE's navigated position and will move with CAVE navigation. It is not necessary to add the button under the CAVE_NAV_TRANSFORM.

button (X Position, Y Position, Z Position, Trigger Distance) Creates a button at the given XYZ position . The button will be drawn parallel to the Z axis. Selection of the button will be at the distance "Trigger Distance" in feet given in the argument.
 

NonNav(TRUE) True here is assumed to be the intiger1, all other arguments are false.Takes the object out of the CAVE_NAV_TRANSFORM and puts it in the physical CAVE coordinate space.

 
Desk_Adjust (TRUE) True here is assumed to be the intiger1, all other arguments are false.  If true moves the wand wector used for intersection from wand foward to wand-down.

selection_button (Button Number) Changes the button which selects the knobs, sliders and buttons. The arguments are from 1 to 3. The default is wand button 2. Different knob's can be selected with different instances of the buttons.

set_value (new_value) Changes the initial value of the button so that the starting position can be on or off depending on the calling codes set up.  The only valid argument is 1.

set_start (start_value) Changes the initial value of the slider or knob so that the initial position is any position from the top to bottom of the scale.   Valid arguments are from 0 to 1.
 
scale(scale_value) Changes the size  of the slider or knob .   Valid arguments are from floating point numbers greater than 0.
 
Other Initialization Arguments

slider_rotate (Angle X, Angle Y, Angle Z) Rotates the slider on the given degree on he given angle. The slider_rotate argument will work with all cave tools (knob's and buttons). Recalculation of the sliders knob's position and travel is performed for this function. This argument should be given in the initialization but can be called anywhere.

knob_rotation (Angle X ,Angle Y Angle Z) Rotates the knob the degree in the argument on the given axis. There is no difference between knob_rotate and slider_rotate. This argument should be given in the initialization but can be called anywhere.

button_rotate (Angle X, Angle Y, Angle Z) Rotates the button the degree in the argument on the given axis. There is no difference between button_rotate and slider_rotate. This argument should be given in the initialization but can be called anywhere.

Calculation Calls

value_out() Returns the positional value of the slider, knob or button on a scale of 0 to 1. Values of the button are 1 for selected and 0 for not selected, values for the slider and knob return a float from 0 to 1. In order for selection or high lighting the argument value_out must be called. Tools that do not return values are not selectable, but can be drawn.
 
Drawing Functions

draw() Draws the object called. If you have initialized a slider my_slider then calling my_slider->draw() in the draw function. This call should  NOT be under the CAVE_NAV_TRANSFORM, as all Tools are drawn under the CAVE Navigation unless the NonNav function call.

pointer() Draws a pointer of the given object. If you have initialized the object with a trigger distance argument ,then the pointer will be of the trigger distance length, otherwise the pointer will be 15 feet long, the default trigger distance. This call should NOT be under the CAVE_NAV_TRANSFORM, as the pointer corresponds to the wand position which is in the cave orientation.

face_plate() Draws a faceplate for  the given object and follows the NonNav arguments.