Warning, file /include/root/TViewerX3D.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TViewerX3D
0013 #define ROOT_TViewerX3D
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TX3DFrame.h"
0025 #include "TVirtualViewer3D.h"
0026
0027 class TVirtualPad;
0028 class TGCanvas;
0029 class TGMenuBar;
0030 class TGPopupMenu;
0031 class TGLayoutHints;
0032 class TX3DContainer;
0033
0034 class TViewerX3D : public TVirtualViewer3D
0035 {
0036
0037 friend class TX3DContainer;
0038
0039 private:
0040 TX3DFrame *fMainFrame;
0041 TString fOption;
0042 TString fTitle;
0043 Window_t fX3DWin;
0044 TGCanvas *fCanvas;
0045 TX3DContainer *fContainer;
0046 TGMenuBar *fMenuBar;
0047 TGPopupMenu *fFileMenu;
0048 TGPopupMenu *fHelpMenu;
0049 TGLayoutHints *fMenuBarLayout;
0050 TGLayoutHints *fMenuBarItemLayout;
0051 TGLayoutHints *fMenuBarHelpLayout;
0052 TGLayoutHints *fCanvasLayout;
0053 UInt_t fWidth;
0054 UInt_t fHeight;
0055 Int_t fXPos;
0056 Int_t fYPos;
0057 TVirtualPad *fPad;
0058 Bool_t fBuildingScene;
0059 enum EPass { kSize, kDraw };
0060 EPass fPass;
0061
0062 void CreateViewer(const char *name);
0063 void InitX3DWindow();
0064 void DeleteX3DWindow();
0065
0066 Bool_t HandleContainerButton(Event_t *ev);
0067
0068 static Bool_t fgCreated;
0069
0070 public:
0071 TViewerX3D(TVirtualPad *pad);
0072 TViewerX3D(TVirtualPad *pad, Option_t *option, const char *title="X3D Viewer",
0073 UInt_t width = 800, UInt_t height = 600);
0074 TViewerX3D(TVirtualPad *pad, Option_t *option, const char *title,
0075 Int_t x, Int_t y, UInt_t width, UInt_t height);
0076 ~TViewerX3D() override;
0077
0078 Int_t ExecCommand(Int_t px, Int_t py, char command);
0079 void GetPosition(Float_t &longitude, Float_t &latitude, Float_t &psi);
0080 void Iconify() { }
0081 void Show() { fMainFrame->MapRaised(); }
0082 void Close();
0083 void Update();
0084
0085 void PaintPolyMarker(const TBuffer3D & buffer) const;
0086
0087
0088 Bool_t PreferLocalFrame() const override { return kFALSE; }
0089 void BeginScene() override;
0090 Bool_t BuildingScene() const override { return fBuildingScene; }
0091 void EndScene() override;
0092 Int_t AddObject(const TBuffer3D & buffer, Bool_t * addChildren = nullptr) override;
0093 Int_t AddObject(UInt_t placedID, const TBuffer3D & buffer, Bool_t * addChildren = nullptr) override;
0094
0095
0096
0097 Bool_t OpenComposite(const TBuffer3D & , Bool_t * = nullptr) override { return kTRUE; }
0098 void CloseComposite() override {};
0099 void AddCompositeOp(UInt_t ) override {};
0100
0101 Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t parm2);
0102
0103 ClassDefOverride(TViewerX3D,0)
0104 };
0105
0106 #endif