StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TVolumeView.h
1 // @(#)root/table:$Id$
2 // Author: Valery Fine(fine@bnl.gov) 25/12/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 #ifndef ROOT_TVolumeView
12 #define ROOT_TVolumeView
13 
14 #include <assert.h>
15 
16 #include "TVolume.h"
17 
19 // //
20 // TVolumeView //
21 // //
23 
24 // typedef TVolumeView TNodeView;
25 
26 class TVolumeView : public TObjectSet, public TAtt3D {
27 protected:
28  TList *fListOfShapes; //Pointer to the list of the "extra" shape definitions
29 
30  virtual void PaintShape(Option_t *option);
31  TVolumeView(TVolumeView &viewNode);
32 
33 
34 public:
35  TVolumeView():TObjectSet(),fListOfShapes(0) {;}
36  TVolumeView(TVolumeView *viewNode,TVolumePosition *nodePosition=0);
37  TVolumeView(TVolumeView *viewNode,const Char_t *NodeName1,const Char_t *NodeName2=0);
38  TVolumeView(TVolumeView *viewNode,TVolumeView *topNode);
39  TVolumeView(TVolumeView *viewNode,const TVolumeView *node1,const TVolumeView *node2);
40  TVolumeView(TVolume &pattern,Int_t maxDepLevel=0,const TVolumePosition *nodePosition=0,EDataSetPass iopt=kMarked,TVolumeView *root=0);
41  TVolumeView(Double_t *translate, Double_t *rotate, UInt_t positionId, TVolume *thisNode,
42  const Char_t *thisNodePath, const Char_t *matrixName=0, Int_t matrixType=0);
43  TVolumeView(TVolume *thisNode,TVolumePosition *nodePosition);
44  virtual ~TVolumeView();
45  virtual TVolume *AddNode(TVolume *node);
46  virtual void Add(TDataSet *dataset);
47  virtual void Add(TVolumeView *node);
48  virtual void Add(TShape *shape, Bool_t IsMaster=kFALSE);
49  virtual void Browse(TBrowser *b);
50  virtual void Draw(Option_t *depth="3"); // *MENU*
51  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
52  virtual TVolumePosition *GetPosition() const { return (TVolumePosition *)GetObject();}
53  virtual TVolume *GetNode() const ;
54  virtual Int_t GetGlobalRange(const TVolumeView *rootNode,Float_t *min, Float_t *max);
55  virtual TList *GetListOfShapes() const;
56  virtual void GetLocalRange(Float_t *min, Float_t *max);
57  virtual char *GetObjectInfo(Int_t px, Int_t py) const;
58  virtual TShape *GetShape() const;
59  virtual Int_t GetVisibility() const;
60  virtual Bool_t IsMarked() const;
61  virtual Bool_t Is3D() const {return kTRUE;}
62  virtual TVolumePosition *Local2Master(const TVolumeView *localNode,const TVolumeView *masterNode=0);
63  virtual TVolumePosition *Local2Master(const Char_t *localName, const Char_t *masterName=0);
64  virtual Float_t *Local2Master(const Float_t *local, Float_t *master,
65  const Char_t *localName, const Char_t *masterName=0, Int_t nVector=1);
66  virtual Float_t *Local2Master(const Float_t *local, Float_t *master,
67  const TVolumeView *localNode,
68  const TVolumeView *masterNode=0, Int_t nVector=1);
69  virtual TList *Nodes(){ return GetList();}
70  virtual void Paint(Option_t *option="");
71  virtual TString PathP() const;
72  virtual void SetLineAttributes(); // *MENU*
73  virtual void SavePrimitive(std::ostream &out, Option_t *option="");
74  virtual void SetVisibility(Int_t vis=1); // *MENU*
75  virtual void Sizeof3D() const;
76  ClassDef(TVolumeView,1) // Special kind of TDataSet
77 };
78 
79 inline void TVolumeView::Add(TDataSet * /*dataset*/){ assert(0);}
80 inline void TVolumeView::Add(TVolumeView *node){ TDataSet::Add(node);}
81 inline Bool_t TVolumeView::IsMarked() const { return TestBit(kMark); }
82 inline TList *TVolumeView::GetListOfShapes() const {return fListOfShapes;}
83 inline TShape *TVolumeView::GetShape() const
84  {return fListOfShapes ? (TShape *)fListOfShapes->First():0;}
85 inline Int_t TVolumeView::GetVisibility() const {return GetNode() ? GetNode()->GetVisibility():0;}
86 
87 #endif
88 
TObjectSet(const Char_t *name, TObject *obj=0, Bool_t makeOwner=kTRUE)
to be documented
Definition: TObjectSet.cxx:31
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual TVolumePosition * Local2Master(const TVolumeView *localNode, const TVolumeView *masterNode=0)
to be documented
virtual void Paint(Option_t *option="")
virtual void Sizeof3D() const
Return total size of this 3-D Node with its attributes.
virtual void GetLocalRange(Float_t *min, Float_t *max)
virtual TVolume * AddNode(TVolume *node)
virtual void SetLineAttributes()
to be documented
virtual TString PathP() const
return the full path of this data set
virtual void Browse(TBrowser *b)
to be documented
virtual void PaintShape(Option_t *option)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
virtual TVolume * GetNode() const
to be documented
virtual ~TVolumeView()
default dtor (empty for this class)
virtual void Draw(Option_t *depth="3")
Draw Referenced node with current parameters.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
to be documented
virtual Int_t GetGlobalRange(const TVolumeView *rootNode, Float_t *min, Float_t *max)
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
Definition: TObjectSet.h:56
virtual void SetVisibility(Int_t vis=1)
to be documented