TEveCompound.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveCompound.h 35074 2010-08-30 15:18:02Z matevz $
00002 // Author: Matevz Tadel 2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TEveCompound
00013 #define ROOT_TEveCompound
00014 
00015 #include "TEveElement.h"
00016 #include "TEveProjectionBases.h"
00017 
00018 
00019 //==============================================================================
00020 // TEveCompound
00021 //==============================================================================
00022 
00023 class TEveCompound : public TEveElementList
00024 {
00025 private:
00026    TEveCompound(const TEveCompound&);            // Not implemented
00027    TEveCompound& operator=(const TEveCompound&); // Not implemented
00028 
00029 protected:
00030    Short_t  fCompoundOpen; // If more than zero, tag new children as compound members.
00031 
00032 public:
00033    TEveCompound(const char* n="TEveCompound", const char* t="",
00034                 Bool_t doColor=kTRUE, Bool_t doTransparency=kFALSE);
00035    virtual ~TEveCompound() {}
00036 
00037    void   OpenCompound()         { ++fCompoundOpen;  }
00038    void   CloseCompound()        { --fCompoundOpen; }
00039    Bool_t IsCompoundOpen() const { return fCompoundOpen > 0; }
00040 
00041    virtual void SetMainColor(Color_t color);
00042    virtual void SetMainTransparency(Char_t t);
00043 
00044    virtual void AddElement(TEveElement* el);
00045    virtual void RemoveElementLocal(TEveElement* el);
00046    virtual void RemoveElementsLocal();
00047 
00048    virtual void FillImpliedSelectedSet(Set_t& impSelSet);
00049 
00050    virtual TClass* ProjectedClass(const TEveProjection* p) const;
00051 
00052    ClassDef(TEveCompound, 0); // Container for managing compounds of TEveElements.
00053 };
00054 
00055 
00056 //==============================================================================
00057 // TEveCompoundProjected
00058 //==============================================================================
00059 
00060 class TEveCompoundProjected : public TEveCompound,
00061                               public TEveProjected
00062 {
00063 private:
00064    TEveCompoundProjected(const TEveCompoundProjected&);            // Not implemented
00065    TEveCompoundProjected& operator=(const TEveCompoundProjected&); // Not implemented
00066 
00067 public:
00068    TEveCompoundProjected();
00069    virtual ~TEveCompoundProjected() {}
00070 
00071    virtual void SetMainColor(Color_t color);
00072 
00073    virtual void UpdateProjection()      {}
00074    virtual TEveElement* GetProjectedAsElement() { return this; }
00075 
00076    ClassDef(TEveCompoundProjected, 0); // Projected TEveCompund container.
00077 };
00078 
00079 #endif

Generated on Tue Jul 5 14:14:53 2011 for ROOT_528-00b_version by  doxygen 1.5.1