ROOT logo
// @(#)root/eve:$Id: TEveProjectionManager.h 33037 2010-04-15 13:58:19Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TEveProjectionManager
#define ROOT_TEveProjectionManager

#include "TEveElement.h"
#include "TAttBBox.h"
#include "TEveProjections.h"


class TEveProjectionManager : public TEveElementList,
                              public TAttBBox
{
private:
   TEveProjectionManager(const TEveProjectionManager&);            // Not implemented
   TEveProjectionManager& operator=(const TEveProjectionManager&); // Not implemented

protected:
   TEveProjection* fProjections[TEveProjection::kPT_End];

   TEveProjection* fProjection;     // current projection
   TEveVector      fCenter;         // center of distortion
   Float_t         fCurrentDepth;   // z depth of object being projected

   List_t          fDependentEls;   // elements that depend on manager and need to be destroyed with it

   Bool_t          fImportEmpty;    // import sub-trees with no projectable elements

   virtual Bool_t  ShouldImport(TEveElement* el);
   virtual void    UpdateDependentElsAndScenes(TEveElement* root);

public:
   TEveProjectionManager(TEveProjection::EPType_e type=TEveProjection::kPT_Unknown);
   virtual ~TEveProjectionManager();

   void AddDependent(TEveElement* el);
   void RemoveDependent(TEveElement* el);

   void            SetProjection(TEveProjection::EPType_e type);
   TEveProjection* GetProjection() { return fProjection; }

   virtual void    UpdateName();

   void            SetCenter(Float_t x, Float_t y, Float_t z);
   TEveVector&     GetCenter() { return fCenter; }

   void            SetCurrentDepth(Float_t d) { fCurrentDepth = d;      }
   Float_t         GetCurrentDepth()    const { return fCurrentDepth;   }

   void            SetImportEmpty(Bool_t ie)  { fImportEmpty = ie;   }
   Bool_t          GetImportEmpty()     const { return fImportEmpty; }

   virtual Bool_t  HandleElementPaste(TEveElement* el);

   virtual TEveElement* ImportElementsRecurse(TEveElement* el,
                                              TEveElement* parent);
   virtual TEveElement* ImportElements(TEveElement* el,
                                       TEveElement* ext_list=0);

   virtual TEveElement* SubImportElements(TEveElement* el, TEveElement* proj_parent);
   virtual Int_t        SubImportChildren(TEveElement* el, TEveElement* proj_parent);

   virtual void    ProjectChildren();
   virtual void    ProjectChildrenRecurse(TEveElement* el);

   virtual void    ComputeBBox();

   ClassDef(TEveProjectionManager, 0); // Manager class for steering of projections and managing projected objects.
};

#endif
 TEveProjectionManager.h:1
 TEveProjectionManager.h:2
 TEveProjectionManager.h:3
 TEveProjectionManager.h:4
 TEveProjectionManager.h:5
 TEveProjectionManager.h:6
 TEveProjectionManager.h:7
 TEveProjectionManager.h:8
 TEveProjectionManager.h:9
 TEveProjectionManager.h:10
 TEveProjectionManager.h:11
 TEveProjectionManager.h:12
 TEveProjectionManager.h:13
 TEveProjectionManager.h:14
 TEveProjectionManager.h:15
 TEveProjectionManager.h:16
 TEveProjectionManager.h:17
 TEveProjectionManager.h:18
 TEveProjectionManager.h:19
 TEveProjectionManager.h:20
 TEveProjectionManager.h:21
 TEveProjectionManager.h:22
 TEveProjectionManager.h:23
 TEveProjectionManager.h:24
 TEveProjectionManager.h:25
 TEveProjectionManager.h:26
 TEveProjectionManager.h:27
 TEveProjectionManager.h:28
 TEveProjectionManager.h:29
 TEveProjectionManager.h:30
 TEveProjectionManager.h:31
 TEveProjectionManager.h:32
 TEveProjectionManager.h:33
 TEveProjectionManager.h:34
 TEveProjectionManager.h:35
 TEveProjectionManager.h:36
 TEveProjectionManager.h:37
 TEveProjectionManager.h:38
 TEveProjectionManager.h:39
 TEveProjectionManager.h:40
 TEveProjectionManager.h:41
 TEveProjectionManager.h:42
 TEveProjectionManager.h:43
 TEveProjectionManager.h:44
 TEveProjectionManager.h:45
 TEveProjectionManager.h:46
 TEveProjectionManager.h:47
 TEveProjectionManager.h:48
 TEveProjectionManager.h:49
 TEveProjectionManager.h:50
 TEveProjectionManager.h:51
 TEveProjectionManager.h:52
 TEveProjectionManager.h:53
 TEveProjectionManager.h:54
 TEveProjectionManager.h:55
 TEveProjectionManager.h:56
 TEveProjectionManager.h:57
 TEveProjectionManager.h:58
 TEveProjectionManager.h:59
 TEveProjectionManager.h:60
 TEveProjectionManager.h:61
 TEveProjectionManager.h:62
 TEveProjectionManager.h:63
 TEveProjectionManager.h:64
 TEveProjectionManager.h:65
 TEveProjectionManager.h:66
 TEveProjectionManager.h:67
 TEveProjectionManager.h:68
 TEveProjectionManager.h:69
 TEveProjectionManager.h:70
 TEveProjectionManager.h:71
 TEveProjectionManager.h:72
 TEveProjectionManager.h:73
 TEveProjectionManager.h:74
 TEveProjectionManager.h:75
 TEveProjectionManager.h:76
 TEveProjectionManager.h:77
 TEveProjectionManager.h:78
 TEveProjectionManager.h:79
 TEveProjectionManager.h:80