Warning, file /include/root/TGLScenePad.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_TGLScenePad
0013 #define ROOT_TGLScenePad
0014
0015 #include "TGLScene.h"
0016 #include "TVirtualViewer3D.h"
0017 #include "CsgOps.h"
0018 #include <vector>
0019 #include <utility>
0020
0021 class TGLViewer;
0022 class TGLFaceSet;
0023 class TList;
0024
0025
0026 class TGLScenePad : public TVirtualViewer3D, public TGLScene {
0027
0028 private:
0029 TGLScenePad(const TGLScenePad&) = delete;
0030 TGLScenePad& operator=(const TGLScenePad&) = delete;
0031
0032 protected:
0033 TVirtualPad* fPad;
0034
0035
0036 Bool_t fInternalPIDs;
0037 UInt_t fNextInternalPID;
0038 UInt_t fLastPID;
0039 Int_t fAcceptedPhysicals;
0040
0041 Int_t ValidateObjectBuffer(const TBuffer3D& buffer, Bool_t includeRaw) const;
0042 TGLLogicalShape* CreateNewLogical(const TBuffer3D & buffer) const;
0043 TGLPhysicalShape* CreateNewPhysical(UInt_t physicalID, const TBuffer3D& buffer,
0044 const TGLLogicalShape& logical) const;
0045
0046 void ComposePolymarker(const TList *padPrimitives);
0047
0048 typedef std::pair<UInt_t, RootCsg::TBaseMesh*> CSPart_t;
0049 mutable TGLFaceSet *fComposite;
0050 UInt_t fCSLevel;
0051 std::vector<CSPart_t> fCSTokens;
0052 RootCsg::TBaseMesh* BuildComposite();
0053
0054 TGLLogicalShape* AttemptDirectRenderer(TObject* id);
0055
0056 Bool_t fSmartRefresh;
0057
0058 public:
0059 TGLScenePad(TVirtualPad* pad);
0060 ~TGLScenePad() override {}
0061
0062 TVirtualPad* GetPad() const { return fPad; }
0063 void SetPad(TVirtualPad* p) { fPad = p; }
0064
0065
0066 void AddHistoPhysical(TGLLogicalShape* log, const Float_t *histColor = nullptr);
0067 void SubPadPaint(TVirtualPad* pad);
0068
0069
0070 virtual void PadPaintFromViewer(TGLViewer* viewer);
0071
0072 Bool_t GetSmartRefresh() const { return fSmartRefresh; }
0073 void SetSmartRefresh(Bool_t smart_ref) { fSmartRefresh = smart_ref; }
0074
0075
0076
0077
0078 Bool_t CanLoopOnPrimitives() const override { return kTRUE; }
0079 void PadPaint(TVirtualPad* pad) override;
0080 void ObjectPaint(TObject* obj, Option_t* opt="") override;
0081
0082
0083 Int_t DistancetoPrimitive(Int_t , Int_t ) override { return 9999; }
0084 void ExecuteEvent(Int_t , Int_t , Int_t ) override {}
0085
0086 Bool_t PreferLocalFrame() const override { return kTRUE; }
0087
0088 void BeginScene() override;
0089 Bool_t BuildingScene() const override { return CurrentLock() == kModifyLock; }
0090 void EndScene() override;
0091
0092 Int_t AddObject(const TBuffer3D& buffer, Bool_t* addChildren = nullptr) override;
0093 Int_t AddObject(UInt_t physicalID, const TBuffer3D& buffer, Bool_t* addChildren = nullptr) override;
0094 Bool_t OpenComposite(const TBuffer3D& buffer, Bool_t* addChildren = nullptr) override;
0095 void CloseComposite() override;
0096 void AddCompositeOp(UInt_t operation) override;
0097
0098 ClassDefOverride(TGLScenePad, 0);
0099 };
0100
0101 #endif