Logo ROOT   6.08/07
Reference Guide
TVolumeView.h
Go to the documentation of this file.
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 
18 //////////////////////////////////////////////////////////////////////////
19 // //
20 // TVolumeView //
21 // //
22 //////////////////////////////////////////////////////////////////////////
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); }
84  {return fListOfShapes ? (TShape *)fListOfShapes->First():0;}
85 inline Int_t TVolumeView::GetVisibility() const {return GetNode() ? GetNode()->GetVisibility():0;}
86 
87 #endif
88 
virtual void Add(TDataSet *dataset)
Definition: TDataSet.h:150
virtual ENodeSEEN GetVisibility() const
Definition: TVolume.h:88
virtual void Sizeof3D() const
-*-*-*-*-*-*Return total size of this 3-D Node with its attributes-*-* *-* ==========================...
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
Bool_t TestBit(UInt_t f) const
Definition: TObject.h:157
virtual TVolume * GetNode() const
to be documented
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:21
TList * fListOfShapes
Definition: TVolumeView.h:28
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual TVolumePosition * GetPosition() const
Definition: TVolumeView.h:52
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
-*-*-*-*-*-*-*-*Compute distance from point px,py to a TVolumeView-*-*-*-*-* *-* ====================...
virtual TShape * GetShape() const
Definition: TVolumeView.h:83
virtual TVolumePosition * Local2Master(const TVolumeView *localNode, const TVolumeView *masterNode=0)
to be documented
virtual Bool_t Is3D() const
Definition: TVolumeView.h:61
EDataSetPass
Definition: TDataSet.h:40
static const std::string pattern("pattern")
virtual void Paint(Option_t *option="")
-*-*-*-*-*-*-*-*-*-*-*Paint Referenced node with current parameters-*-*-* *-* =======================...
A doubly linked list.
Definition: TList.h:47
virtual void GetLocalRange(Float_t *min, Float_t *max)
GetRange.
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
This is the base class for all geometry shapes.
Definition: TShape.h:47
virtual TVolume * AddNode(TVolume *node)
Add the TVolume in the Tnode data-structure refered by this TVolumeView object Return TVolume * the i...
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:557
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
virtual void Add(TDataSet *dataset)
Definition: TVolumeView.h:79
TList * GetList() const
Definition: TDataSet.h:106
virtual void SetLineAttributes()
to be documented
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual Int_t GetVisibility() const
Definition: TVolumeView.h:85
virtual TList * GetListOfShapes() const
Definition: TVolumeView.h:82
virtual void Browse(TBrowser *b)
to be documented
virtual void PaintShape(Option_t *option)
Paint shape of the node To be called from the TObject::Paint method only.
double Double_t
Definition: RtypesCore.h:55
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
Definition: TObjectSet.h:56
virtual ~TVolumeView()
default dtor (empty for this class)
char Char_t
Definition: RtypesCore.h:29
virtual void Draw(Option_t *depth="3")
-*-*-*-*-*-*-*-*-*-*-*Draw Referenced node with current parameters-*-*-* *-* ========================...
virtual Bool_t IsMarked() const
Definition: TVolumeView.h:81
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
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)
Calculate the position of the vertrex of the outlined cube in repect of the given TVolumeView object...
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual TList * Nodes()
Definition: TVolumeView.h:69
virtual void SetVisibility(Int_t vis=1)
to be documented
virtual TString PathP() const
return the full path of this data set