// @(#)root/eve:$Id$
// Author: Matevz Tadel 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TEveArrow
#define ROOT_TEveArrow

#include "TEveElement.h"
#include "TEveVector.h"
#include "TNamed.h"
#include "TAtt3D.h"
#include "TAttBBox.h"

class TEveArrow : public TEveElement,
                  public TNamed,
                  public TAtt3D,
                  public TAttBBox
{
   friend class TEveArrowGL;
   friend class TEveArrowEditor;

private:
   TEveArrow(const TEveArrow&);            // Not implemented
   TEveArrow& operator=(const TEveArrow&); // Not implemented

protected:
   Color_t     fColor;

   Float_t     fTubeR;
   Float_t     fConeR;
   Float_t     fConeL;

   TEveVector  fOrigin;
   TEveVector  fVector;

   Int_t       fDrawQuality; // Number of segments of circles.

public:
   TEveArrow(Float_t xVec=0, Float_t yVec=0, Float_t zVec=1,
             Float_t xOrg=0, Float_t yOrg=0, Float_t zOrg=0);
   virtual ~TEveArrow() {}

   virtual TObject* GetObject(const TEveException& ) const
   { const TObject* obj = this; return const_cast<TObject*>(obj); }

   void SetTubeR(Float_t x) { fTubeR = x; }
   void SetConeR(Float_t x) { fConeR = x; }
   void SetConeL(Float_t x) { fConeL = x; }

   Float_t GetTubeR() const { return fTubeR; }
   Float_t GetConeR() const { return fConeR; }
   Float_t GetConeL() const { return fConeL; }

   TEveVector GetVector() { return fVector; }
   TEveVector GetOrigin() { return fOrigin; }

   Int_t GetDrawQuality() const  { return fDrawQuality; }
   void  SetDrawQuality(Int_t q) { fDrawQuality = q; }

   virtual void ComputeBBox();
   virtual void Paint(Option_t* option="");

   ClassDef(TEveArrow, 0); // Class for gl visualisation of arrow.
};

#endif
 TEveArrow.h:1
 TEveArrow.h:2
 TEveArrow.h:3
 TEveArrow.h:4
 TEveArrow.h:5
 TEveArrow.h:6
 TEveArrow.h:7
 TEveArrow.h:8
 TEveArrow.h:9
 TEveArrow.h:10
 TEveArrow.h:11
 TEveArrow.h:12
 TEveArrow.h:13
 TEveArrow.h:14
 TEveArrow.h:15
 TEveArrow.h:16
 TEveArrow.h:17
 TEveArrow.h:18
 TEveArrow.h:19
 TEveArrow.h:20
 TEveArrow.h:21
 TEveArrow.h:22
 TEveArrow.h:23
 TEveArrow.h:24
 TEveArrow.h:25
 TEveArrow.h:26
 TEveArrow.h:27
 TEveArrow.h:28
 TEveArrow.h:29
 TEveArrow.h:30
 TEveArrow.h:31
 TEveArrow.h:32
 TEveArrow.h:33
 TEveArrow.h:34
 TEveArrow.h:35
 TEveArrow.h:36
 TEveArrow.h:37
 TEveArrow.h:38
 TEveArrow.h:39
 TEveArrow.h:40
 TEveArrow.h:41
 TEveArrow.h:42
 TEveArrow.h:43
 TEveArrow.h:44
 TEveArrow.h:45
 TEveArrow.h:46
 TEveArrow.h:47
 TEveArrow.h:48
 TEveArrow.h:49
 TEveArrow.h:50
 TEveArrow.h:51
 TEveArrow.h:52
 TEveArrow.h:53
 TEveArrow.h:54
 TEveArrow.h:55
 TEveArrow.h:56
 TEveArrow.h:57
 TEveArrow.h:58
 TEveArrow.h:59
 TEveArrow.h:60
 TEveArrow.h:61
 TEveArrow.h:62
 TEveArrow.h:63
 TEveArrow.h:64
 TEveArrow.h:65
 TEveArrow.h:66
 TEveArrow.h:67
 TEveArrow.h:68
 TEveArrow.h:69
 TEveArrow.h:70
 TEveArrow.h:71
 TEveArrow.h:72
 TEveArrow.h:73