58 DIRECT SCENE INTERACTIONS\n\n\ 60 \tw --- wireframe mode\n\ 61 \te --- switch between dark / light color-set\n\ 62 \tr --- filled polygons mode\n\ 63 \tt --- outline mode\n\ 66 \ta --- switch on/off arc-ball camera rotation control\n\ 67 \tArrow Keys --- PAN (TRUCK) across scene\n\ 68 \tHome --- reset current camera\n\ 69 \tCtrl-Home --- switch external/automatic camera center\n\ 71 LEFT mouse button -- ROTATE (ORBIT) the scene by holding the mouse button and moving\n\ 72 the mouse (perspective camera, needs to be enabled in menu for orthographic cameras).\n\ 73 By default, the scene will be rotated about its center. To select arbitrary center\n\ 74 bring up the viewer-editor (e.g., shift-click into empty background) and use\n\ 75 'Camera center' controls in the 'Guides' tab.\n\ 77 MIDDLE mouse button or arrow keys -- PAN (TRUCK) the camera.\n\ 79 RIGHT mouse button action depends on camera type:\n\ 80 orthographic -- zoom,\n\ 81 perspective -- move camera forwards / backwards\n\ 83 By pressing Ctrl and Shift keys the mouse precision can be changed:\n\ 84 Shift -- 10 times less precise\n\ 85 Ctrl -- 10 times more precise\n\ 86 Ctrl Shift -- 100 times more precise\n\ 88 Mouse wheel action depends on camera type:\n\ 89 orthographic -- zoom,\n\ 90 perspective -- change field-of-view (focal length)\n\ 92 To invert direction of mouse and key actions from scene-centric\n\ 93 to viewer-centric, set in your .rootrc file:\n\ 94 OpenGL.EventHandler.ViewerCentricControls: 1\n\ 96 Double click will show GUI editor of the viewer (if assigned).\n\ 98 RESET the camera via the button in viewer-editor or Home key.\n\ 100 SELECT a shape with Shift+Left mouse button click.\n\ 102 SELECT the viewer with Shift+Left mouse button click on a free space.\n\ 104 MOVE a selected shape using Shift+Mid mouse drag.\n\ 106 Invoke the CONTEXT menu with Shift+Right mouse click.\n\n" 107 "Secondary selection and direct render object interaction is initiated\n\ 108 by Alt+Left mouse click (Mod1, actually). Only few classes support this option.\n\ 109 When 'Alt' is taken by window manager, try Alt-Ctrl-Left.\n\ 113 The \"Camera\" menu is used to select the different projections from \n\ 114 the 3D world onto the 2D viewport. There are three perspective cameras:\n\ 116 \tPerspective (Floor XOZ)\n\ 117 \tPerspective (Floor YOZ)\n\ 118 \tPerspective (Floor XOY)\n\ 120 In each case the floor plane (defined by two axes) is kept level.\n\ 122 There are also three orthographic cameras:\n\ 124 \tOrthographic (XOY)\n\ 125 \tOrthographic (XOZ)\n\ 126 \tOrthographic (ZOY)\n\ 128 In each case the first axis is placed horizontal, the second vertical e.g.\n\ 129 XOY means X horizontal, Y vertical.\n\n";
132 SHAPES COLOR AND MATERIAL\n\ 134 The selected shape's color can be modified in the Shapes-Color tabs.\n\ 135 Shape's color is specified by the percentage of red, green, blue light\n\ 136 it reflects. A surface can reflect DIFFUSE, AMBIENT and SPECULAR light.\n\ 137 A surface can also emit light. The EMISSIVE parameter allows to define it.\n\ 138 The surface SHININESS can also be modified.\n\ 142 The selected shape's location and geometry can be modified in the Shapes-Geom\n\ 143 tabs by entering desired values in respective number entry controls.\n\ 147 In the Scene-Clipping tabs select a 'Clip Type': None, Plane, Box\n\ 149 For 'Plane' and 'Box' the lower pane shows the relevant parameters:\n\ 151 \tPlane: Equation coefficients of form aX + bY + cZ + d = 0\n\ 152 \tBox: Center X/Y/Z and Length X/Y/Z\n\n" 153 "For Box checking the 'Show / Edit' checkbox shows the clip box (in light blue)\n\ 154 in viewer. It also attaches the current manipulator to the box - enabling\n\ 155 direct editing in viewer.\n\ 159 A widget attached to the selected object - allowing direct manipulation\n\ 160 of the object with respect to its local axes.\n\ 162 There are three modes, toggled with keys while manipulator is active, that is,\n\ 163 mouse pointer is above it (switches color to yellow):\n\ 164 \tMode\t\tWidget Component Style\t\tKey\n\ 165 \t----\t\t----------------------\t\t---\n\ 166 \tTranslation\tLocal axes with arrows\t\tv\n\ 167 \tScale\t\tLocal axes with boxes\t\tx\n\ 168 \tRotate\t\tLocal axes rings\t\tc\n\ 170 Each widget has three axis components - red (X), green (Y) and blue (Z).\n\ 171 The component turns yellow, indicating an active state, when the mouse is moved\n\ 172 over it. Left click and drag on the active component to adjust the objects\n\ 173 translation, scale or rotation.\n\ 174 Some objects do not support all manipulations (e.g. clipping planes cannot be \n\ 175 scaled). If a manipulation is not permitted the component it drawn in grey and \n\ 176 cannot be selected/dragged.\n";
199 "Animated GIF",
"*.gif+",
208 TGLViewer(pad, fgInitX, fgInitY, fgInitW, fgInitH),
215 fLeftVerticalFrame(0),
216 fRightVerticalFrame(0),
224 fMenuHidingShowMenu(
kTRUE),
338 Error(
"CreateGLWidget",
"Widget already exists.");
361 Error(
"DestroyGLWidget",
"Widget does not exist.");
542 fMenuBar->
Connect(
"ProcessedEvent(Event_t*)",
"TGLSAViewer",
this,
"HandleMenuBarHiding(Event_t*)");
543 fMenuBut->
Connect(
"ProcessedEvent(Event_t*)",
"TGLSAViewer",
this,
"HandleMenuBarHiding(Event_t*)");
565 fMenuBar->
Disconnect(
"ProcessedEvent(Event_t*)",
this,
"HandleMenuBarHiding(Event_t*)");
566 fMenuBut->
Disconnect(
"ProcessedEvent(Event_t*)",
this,
"HandleMenuBarHiding(Event_t*)");
611 f->
Disconnect(
"ProcessedEvent(Event_t*)",
this);
TGEventHandler * fEventHandler
select record from last overlay select
virtual void HideFrame(TGFrame *f)
Hide sub frame.
void ToggleEditObject()
Toggle state of the 'Edit Object' menu entry.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
void SetRoot(TGWindow *root=0)
Sets the current root (i.e.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
static const Int_t fgInitX
void Reset()
Reset the timer.
static const Int_t fgInitW
static const Int_t fgInitH
void MenuHidingTimeout()
Action for menu-hiding timeout.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
R__EXTERN void * gTQSender
const TGWindow * GetRoot() const
Returns current root (i.e.
TGLOrthoCamera fOrthoXnOZCamera
const Mask_t kLeaveWindowMask
virtual void SetFrame(TGFrame *frame, Bool_t left)
Set frame to be resized.
TGLOrthoCamera fOrthoXOZCamera
TGLOrthoCamera fOrthoXOYCamera
void ResetMenuHidingTimer(Bool_t show_menu)
Reset the timer for menu-bar hiding.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
const TGLPhysicalShape * GetSelected() const
Return selected physical shape.
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
R__EXTERN TApplication * gApplication
static std::string format(double x, double y, int digits, int width)
virtual void Layout()
Layout the elements of the composite frame.
R__EXTERN const char gHelpAbout[]
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
void SetEnableRotate(Bool_t x)
Concrete physical shape - a GL drawable.
const Mask_t kPointerMotionMask
void HandleMenuBarHiding(Event_t *ev)
Maybe switch menu-bar / menu-button.
TGLSAViewer(const TGLSAViewer &)
void DeleteMenuBar()
Delete the menu bar.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual TList * GetList() const
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
TGCanvas * GetTGCanvas() const
TVirtualPad is an abstract base class for the Pad and Canvas classes.
void ToggleOrthoDolly()
Toggle state of the 'Ortho allow dolly' menu entry.
const char * gGLSaveAsTypes[]
static void SetMenuHidingTimeout(Long_t timeout)
Set global timeout for menu-hiding in mili-seconds.
The top level standalone GL-viewer - created via plugin manager.
TGPopupMenu * fCameraMenu
const Mask_t kKeyPressMask
TGLPhysicalShape * fPShape
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
void RequestDraw(Short_t LOD=TGLRnrCtx::kLODMed)
Post request for redraw of viewer at level of detail 'LOD' Request is directed via cross thread gVirt...
TObject * GetExternal() const
void Close()
Close the viewer - destructed.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
void DisableCloseMenuEntries()
Deactivate menu entries for closing the GL window and exiting ROOT.
R__EXTERN TSystem * gSystem
void Popup()
Show help dialog.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void CreateGLWidget()
Create a GLwidget, it is an error if it is already created.
TGCompositeFrame * fLeftVerticalFrame
void EnableMenuBarHiding()
Enable hiding of menu bar.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
const Mask_t kExposureMask
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t)
Process GUI message capture by the main GUI frame (TGLSAFrame).
virtual void TurnOff()
Remove timer from system timer list.
TGPopupMenu * fFileSaveMenu
Handles synchronous and a-synchronous timer events.
void AddText(const char *helpText)
Add help text from helpText buffer to already existing text in TGTextView.
TTimer * fMenuHidingTimer
virtual void SelectionChanged()
Update GUI components for embedded viewer selection change.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
TGClient * GetClient() const
Standalone GL Viewer GUI main frame.
~TGLSAViewer()
Destroy standalone viewer object.
char * StrDup(const char *str)
Duplicate the string str.
void SetDollyToZoom(Bool_t x)
const Mask_t kEnterWindowMask
TGCompositeFrame * fRightVerticalFrame
const Mask_t kStructureNotifyMask
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
friend class TGLEventHandler
void CreateFrames()
Internal frames creation.
TGLOrthoCamera fOrthoXnOYCamera
TGLOrthoCamera fOrthoZOYCamera
TGLOrthoCamera fOrthoZnOYCamera
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
void SetCurrentCamera(ECameraType camera)
Set current active camera - 'cameraType' one of: kCameraPerspX, kCameraPerspY, kCameraPerspZ, kCameraOrthoXOY, kCameraOrthoXOZ, kCameraOrthoZOY, kCameraOrthoXnOY, kCameraOrthoXnOZ, kCameraOrthoZnOY.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
static const Int_t fgInitY
void ToggleOrthoRotate()
Toggle state of the 'Ortho allow rotate' menu entry.
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event, Bool_t force=kFALSE)
Activate object editors according to the selected object.
TGCompositeFrame * GetFrame() const
Return the main-frame.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Mother of all ROOT objects.
virtual void UnmapWindow()
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
static Long_t fgMenuHidingTimeout
static const char * fgHelpText1
const Mask_t kFocusChangeMask
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Bool_t fMenuHidingShowMenu
void Show()
Show the viewer.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
Bool_t ReturnFromRun() const
virtual void DisconnectFromCanvas()
Disconnect this editor from the Selected signal of fCanvas.
virtual void DeleteWindow()
Delete window.
void CreateMenus()
File/Camera/Help menus.
virtual void DestroyGLWidget()
Destroy the GLwidget, it is an error if it does not exist.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
TGedEditor * fGedEditor
event handler
void DisableMenuBarHiding()
Disable hiding of menu bar.
virtual void TurnOn()
Add the timer to the system timer list.
static const char * fgHelpText2
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
const TGLLogicalShape * GetLogical() const
Bool_t SavePicture()
Save current image using the default file name which can be set via SetPictureFileName() and defaults...
TGLPShapeObj * fPShapeWrap
GED editor.
void SetTime(Long_t milliSec)