TEveArrow.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveArrow.h 36373 2010-10-19 17:43:35Z matevz $
00002 // Author: Matevz Tadel 2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TEveArrow
00013 #define ROOT_TEveArrow
00014 
00015 #include "TEveElement.h"
00016 #include "TEveVector.h"
00017 #include "TNamed.h"
00018 #include "TAtt3D.h"
00019 #include "TAttBBox.h"
00020 
00021 class TEveArrow : public TEveElement,
00022                   public TNamed,
00023                   public TAtt3D,
00024                   public TAttBBox
00025 {
00026    friend class TEveArrowGL;
00027    friend class TEveArrowEditor;
00028 
00029 private:
00030    TEveArrow(const TEveArrow&);            // Not implemented
00031    TEveArrow& operator=(const TEveArrow&); // Not implemented
00032 
00033 protected:
00034    Color_t     fColor;
00035 
00036    Float_t     fTubeR;
00037    Float_t     fConeR;
00038    Float_t     fConeL;
00039 
00040    TEveVector  fOrigin;
00041    TEveVector  fVector;
00042 
00043    Int_t       fDrawQuality; // Number of segments of circles.
00044 
00045 public:
00046    TEveArrow(Float_t xVec=0, Float_t yVec=0, Float_t zVec=1,
00047              Float_t xOrg=0, Float_t yOrg=0, Float_t zOrg=0);
00048    virtual ~TEveArrow() {}
00049 
00050    virtual TObject* GetObject(const TEveException& ) const
00051    { const TObject* obj = this; return const_cast<TObject*>(obj); }
00052 
00053    void SetTubeR(Float_t x) { fTubeR = x; }
00054    void SetConeR(Float_t x) { fConeR = x; }
00055    void SetConeL(Float_t x) { fConeL = x; }
00056 
00057    Float_t GetTubeR() const { return fTubeR; }
00058    Float_t GetConeR() const { return fConeR; }
00059    Float_t GetConeL() const { return fConeL; }
00060 
00061    TEveVector GetVector() { return fVector; }
00062    TEveVector GetOrigin() { return fOrigin; }
00063 
00064    Int_t GetDrawQuality() const  { return fDrawQuality; }
00065    void  SetDrawQuality(Int_t q) { fDrawQuality = q; }
00066 
00067    virtual void ComputeBBox();
00068    virtual void Paint(Option_t* option="");
00069 
00070    ClassDef(TEveArrow, 0); // Class for gl visualisation of arrow.
00071 };
00072 
00073 #endif

Generated on Tue Jul 5 14:14:47 2011 for ROOT_528-00b_version by  doxygen 1.5.1