TEveProjectionManager.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveProjectionManager.h 33037 2010-04-15 13:58:19Z matevz $
00002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 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_TEveProjectionManager
00013 #define ROOT_TEveProjectionManager
00014 
00015 #include "TEveElement.h"
00016 #include "TAttBBox.h"
00017 #include "TEveProjections.h"
00018 
00019 
00020 class TEveProjectionManager : public TEveElementList,
00021                               public TAttBBox
00022 {
00023 private:
00024    TEveProjectionManager(const TEveProjectionManager&);            // Not implemented
00025    TEveProjectionManager& operator=(const TEveProjectionManager&); // Not implemented
00026 
00027 protected:
00028    TEveProjection* fProjections[TEveProjection::kPT_End];
00029 
00030    TEveProjection* fProjection;     // current projection
00031    TEveVector      fCenter;         // center of distortion
00032    Float_t         fCurrentDepth;   // z depth of object being projected
00033 
00034    List_t          fDependentEls;   // elements that depend on manager and need to be destroyed with it
00035 
00036    Bool_t          fImportEmpty;    // import sub-trees with no projectable elements
00037 
00038    virtual Bool_t  ShouldImport(TEveElement* el);
00039    virtual void    UpdateDependentElsAndScenes(TEveElement* root);
00040 
00041 public:
00042    TEveProjectionManager(TEveProjection::EPType_e type=TEveProjection::kPT_Unknown);
00043    virtual ~TEveProjectionManager();
00044 
00045    void AddDependent(TEveElement* el);
00046    void RemoveDependent(TEveElement* el);
00047 
00048    void            SetProjection(TEveProjection::EPType_e type);
00049    TEveProjection* GetProjection() { return fProjection; }
00050 
00051    virtual void    UpdateName();
00052 
00053    void            SetCenter(Float_t x, Float_t y, Float_t z);
00054    TEveVector&     GetCenter() { return fCenter; }
00055 
00056    void            SetCurrentDepth(Float_t d) { fCurrentDepth = d;      }
00057    Float_t         GetCurrentDepth()    const { return fCurrentDepth;   }
00058 
00059    void            SetImportEmpty(Bool_t ie)  { fImportEmpty = ie;   }
00060    Bool_t          GetImportEmpty()     const { return fImportEmpty; }
00061 
00062    virtual Bool_t  HandleElementPaste(TEveElement* el);
00063 
00064    virtual TEveElement* ImportElementsRecurse(TEveElement* el,
00065                                               TEveElement* parent);
00066    virtual TEveElement* ImportElements(TEveElement* el,
00067                                        TEveElement* ext_list=0);
00068 
00069    virtual TEveElement* SubImportElements(TEveElement* el, TEveElement* proj_parent);
00070    virtual Int_t        SubImportChildren(TEveElement* el, TEveElement* proj_parent);
00071 
00072    virtual void    ProjectChildren();
00073    virtual void    ProjectChildrenRecurse(TEveElement* el);
00074 
00075    virtual void    ComputeBBox();
00076 
00077    ClassDef(TEveProjectionManager, 0); // Manager class for steering of projections and managing projected objects.
00078 };
00079 
00080 #endif

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