CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Fireworks/Core/interface/FWViewGeometryList.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWViewGeometryList_h
00002 #define Fireworks_Core_FWViewGeometryList_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     FWViewGeometryList
00007 // 
00016 //
00017 // Original Author:  Alja Mrak-Tadel 
00018 //         Created:  Tue Sep 14 13:28:39 CEST 2010
00019 // $Id: FWViewGeometryList.h,v 1.4 2010/09/28 11:39:50 amraktad Exp $
00020 //
00021 
00022 #include "sigc++/connection.h"
00023 
00024 #include "TEveElement.h"
00025 #include "Fireworks/Core/interface/FWColorManager.h"
00026 
00027 class TGeoMatrix;
00028 class TEveCompound;
00029 class FWGeometry;
00030 
00031 namespace fireworks {
00032    class Context;
00033 }
00034 
00035 class FWViewGeometryList: public TEveElementList
00036 {
00037 public:
00038    FWViewGeometryList( const fireworks::Context& context, bool projected = true );
00039    virtual ~FWViewGeometryList();
00040 
00041    void updateColors();
00042    void updateTransparency(bool projectedType);
00043 
00044 protected:
00045    const fireworks::Context&    m_context;  
00046    const FWGeometry*            m_geom;    // cached
00047 
00048    TEveCompound*       m_colorComp[kFWGeomColorSize];
00049 
00050    void addToCompound(TEveElement* el, FWGeomColorIndex idx, bool applyTransp = true) const ;
00051 
00052 private:
00053    FWViewGeometryList(const FWViewGeometryList&); // stop default
00054 
00055    const FWViewGeometryList& operator=(const FWViewGeometryList&); // stop default
00056 
00057    // ---------- member data --------------------------------
00058    sigc::connection  m_transpConnection;
00059    sigc::connection  m_colorConnection;
00060    bool m_projected; // needed for transparency
00061 };
00062 
00063 
00064 #endif