Logo ROOT  
Reference Guide
TEveArrow.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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 
12 #ifndef ROOT_TEveArrow
13 #define ROOT_TEveArrow
14 
15 #include "TEveElement.h"
16 #include "TEveVector.h"
17 #include "TNamed.h"
18 #include "TAtt3D.h"
19 #include "TAttBBox.h"
20 
21 class TEveArrow : public TEveElement,
22  public TNamed,
23  public TAtt3D,
24  public TAttBBox
25 {
26  friend class TEveArrowGL;
27  friend class TEveArrowEditor;
28 
29 private:
30  TEveArrow(const TEveArrow&); // Not implemented
31  TEveArrow& operator=(const TEveArrow&); // Not implemented
32 
33 protected:
35 
39 
42 
43  Int_t fDrawQuality; // Number of segments of circles.
44 
45 public:
46  TEveArrow(Float_t xVec=0, Float_t yVec=0, Float_t zVec=1,
47  Float_t xOrg=0, Float_t yOrg=0, Float_t zOrg=0);
48  virtual ~TEveArrow() {}
49 
50  virtual TObject* GetObject(const TEveException& ) const
51  { const TObject* obj = this; return const_cast<TObject*>(obj); }
52 
54 
55  Float_t GetTubeR() const { return fTubeR; }
56  Float_t GetConeR() const { return fConeR; }
57  Float_t GetConeL() const { return fConeL; }
58 
59  void SetTubeR(Float_t x) { fTubeR = x; StampGeom(); }
60  void SetConeR(Float_t x) { fConeR = x; StampGeom(); }
61  void SetConeL(Float_t x) { fConeL = x; StampGeom(); }
62 
64  TEveVector& RefOrigin() { return fOrigin; }
66  TEveVector& RefVector() { return fVector; }
67 
68  void SetOrigin(const TEveVector& o) { fOrigin = o; StampGeom(); }
70  void SetVector(const TEveVector& v) { fVector = v; StampGeom(); }
72 
73  Int_t GetDrawQuality() const { return fDrawQuality; }
75 
76  virtual void ComputeBBox();
77  virtual void Paint(Option_t* option="");
78 
79  ClassDef(TEveArrow, 0); // Class for gl visualisation of arrow.
80 };
81 
82 #endif
TEveArrow::GetConeR
Float_t GetConeR() const
Definition: TEveArrow.h:62
TEveArrow::RefVector
TEveVector & RefVector()
Definition: TEveArrow.h:72
TEveElement
Definition: TEveElement.h:35
TEveArrow::fConeL
Float_t fConeL
Definition: TEveArrow.h:44
TEveArrow::StampGeom
void StampGeom()
Definition: TEveArrow.h:59
TEveElement::kCBObjProps
@ kCBObjProps
Definition: TEveElement.h:384
TEveArrow::SetOrigin
void SetOrigin(const TEveVector &o)
Definition: TEveArrow.h:74
TEveArrow::GetTubeR
Float_t GetTubeR() const
Definition: TEveArrow.h:61
TEveArrow::SetConeR
void SetConeR(Float_t x)
Definition: TEveArrow.h:66
TEveArrow::SetVector
void SetVector(const TEveVector &v)
Definition: TEveArrow.h:76
TNamed.h
Float_t
float Float_t
Definition: RtypesCore.h:57
TEveArrow::fDrawQuality
Int_t fDrawQuality
Definition: TEveArrow.h:49
TEveArrow::SetDrawQuality
void SetDrawQuality(Int_t q)
Definition: TEveArrow.h:80
TEveArrow
Definition: TEveArrow.h:21
TEveArrow::fConeR
Float_t fConeR
Definition: TEveArrow.h:43
TEveElement::AddStamp
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
Definition: TEveElement.cxx:2035
x
Double_t x[n]
Definition: legend1.C:17
TEveElement.h
TEveArrow::GetObject
virtual TObject * GetObject(const TEveException &) const
Get a TObject associated with this render-element.
Definition: TEveArrow.h:56
TAtt3D
Definition: TAtt3D.h:19
Color_t
short Color_t
Definition: RtypesCore.h:83
v
@ v
Definition: rootcling_impl.cxx:3635
q
float * q
Definition: THbookFile.cxx:89
TAttBBox
Definition: TAttBBox.h:17
TEveArrow::fOrigin
TEveVector fOrigin
Definition: TEveArrow.h:46
TEveArrowGL
Definition: TEveArrowGL.h:21
TEveArrow::GetOrigin
TEveVector GetOrigin()
Definition: TEveArrow.h:69
TEveArrow::~TEveArrow
virtual ~TEveArrow()
Definition: TEveArrow.h:54
TEveArrow::GetConeL
Float_t GetConeL() const
Definition: TEveArrow.h:63
TEveArrow::fColor
Color_t fColor
Definition: TEveArrow.h:40
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TEveArrow::GetDrawQuality
Int_t GetDrawQuality() const
Definition: TEveArrow.h:79
TEveVector.h
TEveArrow::Paint
virtual void Paint(Option_t *option="")
Paint object.
Definition: TEveArrow.cxx:70
TAtt3D.h
TAttBBox.h
TAttBBox::ResetBBox
void ResetBBox()
Definition: TAttBBox.h:52
TNamed
Definition: TNamed.h:29
TEveVectorT< Float_t >
y
Double_t y[n]
Definition: legend1.C:17
TEveArrow::fVector
TEveVector fVector
Definition: TEveArrow.h:47
TEveArrow::ComputeBBox
virtual void ComputeBBox()
Compute bounding-box of the arrow.
Definition: TEveArrow.cxx:46
TEveArrow::SetTubeR
void SetTubeR(Float_t x)
Definition: TEveArrow.h:65
TEveArrowEditor
Definition: TEveArrowEditor.h:21
TEveException
Definition: TEveUtil.h:101
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TEveArrow::fTubeR
Float_t fTubeR
Definition: TEveArrow.h:42
TEveArrow::SetConeL
void SetConeL(Float_t x)
Definition: TEveArrow.h:67
TEveArrow::TEveArrow
TEveArrow(const TEveArrow &)
TEveElement::kCBTransBBox
@ kCBTransBBox
Definition: TEveElement.h:383
TEveArrow::GetVector
TEveVector GetVector()
Definition: TEveArrow.h:71
TEveVectorT::Set
void Set(const Float_t *v)
Definition: TEveVector.h:82
TEveArrow::RefOrigin
TEveVector & RefOrigin()
Definition: TEveArrow.h:70
TEveArrow::operator=
TEveArrow & operator=(const TEveArrow &)
int