Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TEveCompound.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/eve:$Id$
0002 // Author: Matevz Tadel 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TEveCompound
0013 #define ROOT_TEveCompound
0014 
0015 #include "TEveElement.h"
0016 #include "TEveProjectionBases.h"
0017 
0018 
0019 //==============================================================================
0020 // TEveCompound
0021 //==============================================================================
0022 
0023 class TEveCompound : public TEveElementList
0024 {
0025 private:
0026    TEveCompound(const TEveCompound&);            // Not implemented
0027    TEveCompound& operator=(const TEveCompound&); // Not implemented
0028 
0029 protected:
0030    Short_t  fCompoundOpen; // If more than zero, tag new children as compound members.
0031 
0032 public:
0033    TEveCompound(const char* n="TEveCompound", const char* t="",
0034                 Bool_t doColor=kTRUE, Bool_t doTransparency=kFALSE);
0035    ~TEveCompound() override {}
0036 
0037    void   OpenCompound()         { ++fCompoundOpen;  }
0038    void   CloseCompound()        { --fCompoundOpen; }
0039    Bool_t IsCompoundOpen() const { return fCompoundOpen > 0; }
0040 
0041    void SetMainColor(Color_t color) override;
0042    void SetMainTransparency(Char_t t) override;
0043 
0044    void AddElement(TEveElement* el) override;
0045    void RemoveElementLocal(TEveElement* el) override;
0046    void RemoveElementsLocal() override;
0047 
0048    void FillImpliedSelectedSet(Set_t& impSelSet) override;
0049 
0050    TClass* ProjectedClass(const TEveProjection* p) const override;
0051 
0052    ClassDefOverride(TEveCompound, 0); // Container for managing compounds of TEveElements.
0053 };
0054 
0055 
0056 //==============================================================================
0057 // TEveCompoundProjected
0058 //==============================================================================
0059 
0060 class TEveCompoundProjected : public TEveCompound,
0061                               public TEveProjected
0062 {
0063 private:
0064    TEveCompoundProjected(const TEveCompoundProjected&);            // Not implemented
0065    TEveCompoundProjected& operator=(const TEveCompoundProjected&); // Not implemented
0066 
0067 public:
0068    TEveCompoundProjected();
0069    ~TEveCompoundProjected() override {}
0070 
0071    void SetMainColor(Color_t color) override;
0072 
0073    void UpdateProjection() override      {}
0074    TEveElement* GetProjectedAsElement() override { return this; }
0075 
0076    ClassDefOverride(TEveCompoundProjected, 0); // Projected TEveCompund container.
0077 };
0078 
0079 #endif