57DIRECT SCENE INTERACTIONS\n\n\
59 \tw --- wireframe mode\n\
60 \te --- switch between dark / light color-set\n\
61 \tr --- filled polygons mode\n\
62 \tt --- outline mode\n\
65 \ta --- switch on/off arc-ball camera rotation control\n\
66 \tArrow Keys --- PAN (TRUCK) across scene\n\
67 \tHome --- reset current camera\n\
68 \tCtrl-Home --- switch external/automatic camera center\n\
70 LEFT mouse button -- ROTATE (ORBIT) the scene by holding the mouse button and moving\n\
71 the mouse (perspective camera, needs to be enabled in menu for orthographic cameras).\n\
72 By default, the scene will be rotated about its center. To select arbitrary center\n\
73 bring up the viewer-editor (e.g., shift-click into empty background) and use\n\
74 'Camera center' controls in the 'Guides' tab.\n\
76 MIDDLE mouse button or arrow keys -- PAN (TRUCK) the camera.\n\
78 RIGHT mouse button action depends on camera type:\n\
79 orthographic -- zoom,\n\
80 perspective -- move camera forwards / backwards\n\
82 By pressing Ctrl and Shift keys the mouse precision can be changed:\n\
83 Shift -- 10 times less precise\n\
84 Ctrl -- 10 times more precise\n\
85 Ctrl Shift -- 100 times more precise\n\
87 Mouse wheel action depends on camera type:\n\
88 orthographic -- zoom,\n\
89 perspective -- change field-of-view (focal length)\n\
91 To invert direction of mouse and key actions from scene-centric\n\
92 to viewer-centric, set in your .rootrc file:\n\
93 OpenGL.EventHandler.ViewerCentricControls: 1\n\
95 Double click will show GUI editor of the viewer (if assigned).\n\
97 RESET the camera via the button in viewer-editor or Home key.\n\
99 SELECT a shape with Shift+Left mouse button click.\n\
101 SELECT the viewer with Shift+Left mouse button click on a free space.\n\
103 MOVE a selected shape using Shift+Mid mouse drag.\n\
105 Invoke the CONTEXT menu with Shift+Right mouse click.\n\n"
106 "Secondary selection and direct render object interaction is initiated\n\
107 by Alt+Left mouse click (Mod1, actually). Only few classes support this option.\n\
108 When 'Alt' is taken by window manager, try Alt-Ctrl-Left.\n\
112 The \"Camera\" menu is used to select the different projections from \n\
113 the 3D world onto the 2D viewport. There are three perspective cameras:\n\
115 \tPerspective (Floor XOZ)\n\
116 \tPerspective (Floor YOZ)\n\
117 \tPerspective (Floor XOY)\n\
119 In each case the floor plane (defined by two axes) is kept level.\n\
121 There are also four orthographic cameras:\n\
123 \tOrthographic (XOY)\n\
124 \tOrthographic (XOZ)\n\
125 \tOrthographic (ZOY)\n\
126 \tOrthographic (ZOX)\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";
132SHAPES 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),
262 TGLViewer(pad, fgInitX, fgInitY, fgInitW, fgInitH),
268 fLeftVerticalFrame(0),
269 fRightVerticalFrame(0),
275 fMenuHidingShowMenu(
kTRUE),
338 Error(
"CreateGLWidget",
"Widget already exists.");
361 Error(
"DestroyGLWidget",
"Widget does not exist.");
544 fMenuBar->
Connect(
"ProcessedEvent(Event_t*)",
"TGLSAViewer",
this,
"HandleMenuBarHiding(Event_t*)");
545 fMenuBut->
Connect(
"ProcessedEvent(Event_t*)",
"TGLSAViewer",
this,
"HandleMenuBarHiding(Event_t*)");
567 fMenuBar->
Disconnect(
"ProcessedEvent(Event_t*)",
this,
"HandleMenuBarHiding(Event_t*)");
568 fMenuBut->
Disconnect(
"ProcessedEvent(Event_t*)",
this,
"HandleMenuBarHiding(Event_t*)");
598 (ev->
fX < 0 || ev->
fX >= (
Int_t)
f->GetWidth() ||
599 ev->
fY < 0 || ev->
fY >= (
Int_t)
f->GetHeight()))
613 f->Disconnect(
"ProcessedEvent(Event_t*)",
this);
772 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
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.
void SetIniDir(const char *inidir)
Set directory name.
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual void MapRaised()
map raised
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 MapWindow()
map window
virtual void UnmapWindow()
unmap window
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.