#######################################################################
#  MACRO FILE NAME: exN03Vis6.mac                                     #
#                                                                     #
#  AUTHOR(S): Guy Barrand                                             #
#                                                                     #
#  DATE: June 09, 2000                                                #
#                                                                     #
#  CONTENTS: A basic macro for demonstrating Inventor driver          #
#                                                                     #
#  USAGE:  % $G4BINDIR/exampleN03  exN03Vis6.mac                      #
#                                                                     #
#  REQUIRED PLATFORMS & SOFTWARES: Unix, Motif, X-window, OpenGL,     #
#                                  HEPVis                             #
#                                  Inventor (TGS or SoFree)           #
#                                                                     #
#  ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION:               #
#  (See geant4/source/visualization/README for details.)              #
#                                                                     #
#    % setenv G4VIS_BUILD_OIX_DRIVER       1                          # 
#                                                                     #
#  ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION:                #
#  (See geant4/source/visualization/README for details.)              #
#                                                                     #
#    % setenv G4VIS_USE_OIX                1                          #
#                                                                     # 
#  Addional Notes:                                                    #
#######################################################################

# Create "scene-0" 
/vis/scene/create

# Invoke the Xo driver 
/vis/sceneHandler/create OIX
/vis/viewer/create

# Add detector geometry to the current scene
/vis/scene/add/volume
/vis/scene/include/trajectories
/tracking/storeTrajectory 1

# Bird-eye view of events
/vis/camera/reset
/vis/camera/viewpoint    45 45 

# Attach the just created Go scene graph to the viewer.
/vis/viewer/update
# Attach the just created Go scene graph to the viewer.
/vis/viewer/update
/vis/scene/notifyHandlers

/run/beamOn 1

#######################################################################
#   Controls on an Inventor examiner viewer are :                     #
#  - in picking mode (cursor is the upper left arrow)                 #
#   Ctrl + pick an volume : see daughters.                            #
#   Shift + pick an volume : see mother.                              #
#  - in viewing mode (cursor is the hand)                             #
#   Left-button + pointer move : rotate.                              #
#   Ctrl+Left-button + pointer move : pane.                           #
#   Ctrl+Shift+Left-button + pointer move : scale.                    #
#   Middle-button + pointer move : pane.                              #
#                                                                     #
#######################################################################
