58DIRECT 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 four orthographic cameras:\n\
124 \tOrthographic (XOY)\n\
125 \tOrthographic (XOZ)\n\
126 \tOrthographic (ZOY)\n\
127 \tOrthographic (ZOX)\n\
129 In each case the first axis is placed horizontal, the second vertical e.g.\n\
130 XOY means X horizontal, Y vertical.\n\n";
133SHAPES COLOR AND MATERIAL\n\
135 The selected shape's color can be modified in the Shapes-Color tabs.\n\
136 Shape's color is specified by the percentage of red, green, blue light\n\
137 it reflects. A surface can reflect DIFFUSE, AMBIENT and SPECULAR light.\n\
138 A surface can also emit light. The EMISSIVE parameter allows to define it.\n\
139 The surface SHININESS can also be modified.\n\
143 The selected shape's location and geometry can be modified in the Shapes-Geom\n\
144 tabs by entering desired values in respective number entry controls.\n\
148 In the Scene-Clipping tabs select a 'Clip Type': None, Plane, Box\n\
150 For 'Plane' and 'Box' the lower pane shows the relevant parameters:\n\
152\tPlane: Equation coefficients of form aX + bY + cZ + d = 0\n\
153\tBox: Center X/Y/Z and Length X/Y/Z\n\n"
154 "For Box checking the 'Show / Edit' checkbox shows the clip box (in light blue)\n\
155 in viewer. It also attaches the current manipulator to the box - enabling\n\
156 direct editing in viewer.\n\
160 A widget attached to the selected object - allowing direct manipulation\n\
161 of the object with respect to its local axes.\n\
163 There are three modes, toggled with keys while manipulator is active, that is,\n\
164 mouse pointer is above it (switches color to yellow):\n\
165 \tMode\t\tWidget Component Style\t\tKey\n\
166 \t----\t\t----------------------\t\t---\n\
167 \tTranslation\tLocal axes with arrows\t\tv\n\
168 \tScale\t\tLocal axes with boxes\t\tx\n\
169 \tRotate\t\tLocal axes rings\t\tc\n\
171 Each widget has three axis components - red (X), green (Y) and blue (Z).\n\
172 The component turns yellow, indicating an active state, when the mouse is moved\n\
173 over it. Left click and drag on the active component to adjust the objects\n\
174 translation, scale or rotation.\n\
175 Some objects do not support all manipulations (e.g. clipping planes cannot be \n\
176 scaled). If a manipulation is not permitted the component it drawn in grey and \n\
177 cannot be selected/dragged.\n";
200 "Animated GIF",
"*.gif+",
209 TGLViewer(pad, fgInitX, fgInitY, fgInitW, fgInitH),
216 fLeftVerticalFrame(0),
217 fRightVerticalFrame(0),
225 fMenuHidingShowMenu(
kTRUE),
263 TGLViewer(pad, fgInitX, fgInitY, fgInitW, fgInitH),
269 fLeftVerticalFrame(0),
270 fRightVerticalFrame(0),
276 fMenuHidingShowMenu(
kTRUE),
339 Error(
"CreateGLWidget",
"Widget already exists.");
362 Error(
"DestroyGLWidget",
"Widget does not exist.");
545 fMenuBar->
Connect(
"ProcessedEvent(Event_t*)",
"TGLSAViewer",
this,
"HandleMenuBarHiding(Event_t*)");
546 fMenuBut->
Connect(
"ProcessedEvent(Event_t*)",
"TGLSAViewer",
this,
"HandleMenuBarHiding(Event_t*)");
568 fMenuBar->
Disconnect(
"ProcessedEvent(Event_t*)",
this,
"HandleMenuBarHiding(Event_t*)");
569 fMenuBut->
Disconnect(
"ProcessedEvent(Event_t*)",
this,
"HandleMenuBarHiding(Event_t*)");
599 (ev->
fX < 0 || ev->
fX >= (
Int_t)
f->GetWidth() ||
600 ev->
fY < 0 || ev->
fY >= (
Int_t)
f->GetHeight()))
614 f->Disconnect(
"ProcessedEvent(Event_t*)",
this);
773 if (
file.EndsWith(*fin + 1))
const Mask_t kFocusChangeMask
const Mask_t kExposureMask
const Mask_t kKeyPressMask
const Mask_t kPointerMotionMask
const Mask_t kLeaveWindowMask
const Mask_t kStructureNotifyMask
const Mask_t kEnterWindowMask
R__EXTERN const char gHelpAbout[]
R__EXTERN TApplication * gApplication
const char * gGLSaveAsTypes[]
R__EXTERN void * gTQSender
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TSystem * gSystem
Bool_t ReturnFromRun() const
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
const TGWindow * GetRoot() const
Returns current root (i.e.
void SetRoot(TGWindow *root=0)
Sets the current root (i.e.
virtual TList * GetList() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void Layout()
Layout the elements of the composite frame.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual void DeleteWindow()
Delete window.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
virtual void UnmapWindow()
TObject * GetExternal() const
void SetDollyToZoom(Bool_t x)
void SetEnableRotate(Bool_t x)
TGLPhysicalShape * fPShape
Concrete physical shape - a GL drawable.
const TGLLogicalShape * GetLogical() const
Standalone GL Viewer GUI main frame.
The top level standalone GL-viewer - created via plugin manager.
void Show()
Show the viewer.
static void SetMenuHidingTimeout(Long_t timeout)
Set global timeout for menu-hiding in mili-seconds.
void ToggleOrthoDolly()
Toggle state of the 'Ortho allow dolly' menu entry.
~TGLSAViewer()
Destroy standalone viewer object.
virtual void CreateGLWidget()
Create a GLwidget, it is an error if it is already created.
static const Int_t fgInitH
Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t)
Process GUI message capture by the main GUI frame (TGLSAFrame).
void EnableMenuBarHiding()
Enable hiding of menu bar.
TGLSAViewer(const TGLSAViewer &)
TGCompositeFrame * fRightVerticalFrame
void ResetMenuHidingTimer(Bool_t show_menu)
Reset the timer for menu-bar hiding.
void CreateMenus()
File/Camera/Help menus.
void ToggleOrthoRotate()
Toggle state of the 'Ortho allow rotate' menu entry.
void CreateFrames()
Internal frames creation.
void DeleteMenuBar()
Delete the menu bar.
void HandleMenuBarHiding(Event_t *ev)
Maybe switch menu-bar / menu-button.
static const char * fgHelpText2
TTimer * fMenuHidingTimer
void MenuHidingTimeout()
Action for menu-hiding timeout.
static Long_t fgMenuHidingTimeout
void Close()
Close the viewer - destructed.
void DisableMenuBarHiding()
Disable hiding of menu bar.
virtual void SelectionChanged()
Update GUI components for embedded viewer selection change.
static const Int_t fgInitX
virtual void DestroyGLWidget()
Destroy the GLwidget, it is an error if it does not exist.
static const Int_t fgInitW
TGPopupMenu * fFileSaveMenu
void ToggleEditObject()
Toggle state of the 'Edit Object' menu entry.
TGCompositeFrame * GetFrame() const
Return the main-frame.
TGPopupMenu * fCameraMenu
TGCompositeFrame * fLeftVerticalFrame
void DisableCloseMenuEntries()
Deactivate menu entries for closing the GL window and exiting ROOT.
static const char * fgHelpText1
static const Int_t fgInitY
Bool_t fMenuHidingShowMenu
Base GL viewer object - used by both standalone and embedded (in pad) GL.
TGLOrthoCamera fOrthoXOYCamera
TGLOrthoCamera fOrthoXnOZCamera
TGEventHandler * fEventHandler
select record from last overlay select
TGLOrthoCamera fOrthoZnOYCamera
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...
TGLOrthoCamera fOrthoZOYCamera
TGLPShapeObj * fPShapeWrap
GED editor.
void SetCurrentCamera(ECameraType camera)
Set current active camera - 'cameraType' one of: kCameraPerspX, kCameraPerspY, kCameraPerspZ,...
Bool_t SavePicture()
Save current image using the default file name which can be set via SetPictureFileName() and defaults...
TGLOrthoCamera fOrthoXOZCamera
TGedEditor * fGedEditor
event handler
friend class TGLEventHandler
const TGLPhysicalShape * GetSelected() const
Return selected physical shape.
TGLOrthoCamera fOrthoXnOYCamera
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
TGClient * GetClient() const
TGCanvas * GetTGCanvas() const
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event, Bool_t force=kFALSE)
Activate object editors according to the selected object.
virtual void DisconnectFromCanvas()
Disconnect this editor from the Selected signal of fCanvas.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Mother of all ROOT objects.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
void Popup()
Show help dialog.
void AddText(const char *helpText)
Add help text from helpText buffer to already existing text in TGTextView.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Handles synchronous and a-synchronous timer events.
virtual void TurnOff()
Remove timer from system timer list.
virtual void TurnOn()
Add the timer to the system timer list.
void Reset()
Reset the timer.
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.
void SetTime(Long_t milliSec)
TVirtualPad is an abstract base class for the Pad and Canvas classes.