Logo ROOT   6.10/09
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(); }
69  void SetOrigin(Float_t x, Float_t y, Float_t z) { fOrigin.Set(x, y, z); StampGeom(); }
70  void SetVector(const TEveVector& v) { fVector = v; StampGeom(); }
71  void SetVector(Float_t x, Float_t y, Float_t z) { fVector.Set(x, y, z); StampGeom(); }
72 
73  Int_t GetDrawQuality() const { return fDrawQuality; }
74  void SetDrawQuality(Int_t q) { fDrawQuality = q; }
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
TEveVector GetOrigin()
Definition: TEveArrow.h:63
virtual ~TEveArrow()
Definition: TEveArrow.h:48
TEveArrow(const TEveArrow &)
void SetTubeR(Float_t x)
Definition: TEveArrow.h:59
void SetDrawQuality(Int_t q)
Definition: TEveArrow.h:74
void Set(const Float_t *v)
Definition: TEveVector.h:59
float Float_t
Definition: RtypesCore.h:53
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
const char Option_t
Definition: RtypesCore.h:62
Float_t fConeL
Definition: TEveArrow.h:38
virtual TObject * GetObject(const TEveException &) const
Get a TObject associated with this render-element.
Definition: TEveArrow.h:50
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:19
void SetOrigin(const TEveVector &o)
Definition: TEveArrow.h:68
Class used for display of a thick arrow.
Definition: TEveArrow.h:21
int Int_t
Definition: RtypesCore.h:41
void StampGeom()
Definition: TEveArrow.h:53
virtual void ComputeBBox()
Compute bounding-box of the arrow.
Definition: TEveArrow.cxx:46
Int_t GetDrawQuality() const
Definition: TEveArrow.h:73
void SetVector(const TEveVector &v)
Definition: TEveArrow.h:70
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:297
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Float_t GetConeL() const
Definition: TEveArrow.h:57
void SetConeL(Float_t x)
Definition: TEveArrow.h:61
short Color_t
Definition: RtypesCore.h:79
TEveVector & RefVector()
Definition: TEveArrow.h:66
virtual void Paint(Option_t *option="")
Paint object.
Definition: TEveArrow.cxx:70
void SetOrigin(Float_t x, Float_t y, Float_t z)
Definition: TEveArrow.h:69
SVector< double, 2 > v
Definition: Dict.h:5
TEveVector GetVector()
Definition: TEveArrow.h:65
void SetConeR(Float_t x)
Definition: TEveArrow.h:60
void ResetBBox()
Definition: TAttBBox.h:46
void SetVector(Float_t x, Float_t y, Float_t z)
Definition: TEveArrow.h:71
Int_t fDrawQuality
Definition: TEveArrow.h:43
GUI editor for TEveArrow.
Double_t y[n]
Definition: legend1.C:17
Float_t GetTubeR() const
Definition: TEveArrow.h:55
TEveVector fVector
Definition: TEveArrow.h:41
Mother of all ROOT objects.
Definition: TObject.h:37
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
Float_t fTubeR
Definition: TEveArrow.h:36
TEveVector fOrigin
Definition: TEveArrow.h:40
Float_t fConeR
Definition: TEveArrow.h:37
Helper for management of bounding-box information.
Definition: TAttBBox.h:17
Float_t GetConeR() const
Definition: TEveArrow.h:56
Color_t fColor
Definition: TEveArrow.h:34
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
TEveVector & RefOrigin()
Definition: TEveArrow.h:64
float * q
Definition: THbookFile.cxx:87
OpenGL renderer class for TEveArrow.
Definition: TEveArrowGL.h:21
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
TEveArrow & operator=(const TEveArrow &)