ROOT logo
// @(#)root/eve:$Id: TEveLine.h 31517 2009-12-03 11:56:23Z matevz $
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 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_TEveLine
#define ROOT_TEveLine

#include "TEvePointSet.h"
#include "TEveVector.h"

#include "TAttLine.h"

//------------------------------------------------------------------------------
// TEveLine
//------------------------------------------------------------------------------

class TEveLine : public TEvePointSet,
                 public TAttLine
{
   friend class TEveLineEditor;
   friend class TEveLineGL;

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

protected:
   Bool_t  fRnrLine;
   Bool_t  fRnrPoints;
   Bool_t  fSmooth;

   static Bool_t fgDefaultSmooth;

public:
   TEveLine(Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
   TEveLine(const char* name, Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
   virtual ~TEveLine() {}

   virtual void SetMarkerColor(Color_t col);

   virtual void SetLineColor(Color_t col)   { SetMainColor(col); }
   virtual void SetLineStyle(Style_t lstyle);
   virtual void SetLineWidth(Width_t lwidth);

   Bool_t GetRnrLine() const     { return fRnrLine;   }
   Bool_t GetRnrPoints() const   { return fRnrPoints; }
   Bool_t GetSmooth() const      { return fSmooth;    }
   void   SetRnrLine(Bool_t r);
   void   SetRnrPoints(Bool_t r);
   void   SetSmooth(Bool_t r);

   void   ReduceSegmentLengths(Float_t max);

   TEveVector GetLineStart() const;
   TEveVector GetLineEnd()   const;

   virtual void CopyVizParams(const TEveElement* el);
   virtual void WriteVizParams(ostream& out, const TString& var);

   virtual TClass* ProjectedClass(const TEveProjection* p) const;

   static Bool_t GetDefaultSmooth()       { return fgDefaultSmooth; }
   static void SetDefaultSmooth(Bool_t r) { fgDefaultSmooth = r;    }

   ClassDef(TEveLine, 0); // An arbitrary polyline with fixed line and marker attributes.
};


//------------------------------------------------------------------------------
// TEveLineProjected
//------------------------------------------------------------------------------

class TEveLineProjected : public TEveLine,
                          public TEveProjected
{
private:
   TEveLineProjected(const TEveLineProjected&);            // Not implemented
   TEveLineProjected& operator=(const TEveLineProjected&); // Not implemented

protected:
   virtual void SetDepthLocal(Float_t d);

public:
   TEveLineProjected();
   virtual ~TEveLineProjected() {}

   virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
   virtual void UpdateProjection();

   ClassDef(TEveLineProjected, 0); // Projected replica of a TEveLine.
};

#endif
 TEveLine.h:1
 TEveLine.h:2
 TEveLine.h:3
 TEveLine.h:4
 TEveLine.h:5
 TEveLine.h:6
 TEveLine.h:7
 TEveLine.h:8
 TEveLine.h:9
 TEveLine.h:10
 TEveLine.h:11
 TEveLine.h:12
 TEveLine.h:13
 TEveLine.h:14
 TEveLine.h:15
 TEveLine.h:16
 TEveLine.h:17
 TEveLine.h:18
 TEveLine.h:19
 TEveLine.h:20
 TEveLine.h:21
 TEveLine.h:22
 TEveLine.h:23
 TEveLine.h:24
 TEveLine.h:25
 TEveLine.h:26
 TEveLine.h:27
 TEveLine.h:28
 TEveLine.h:29
 TEveLine.h:30
 TEveLine.h:31
 TEveLine.h:32
 TEveLine.h:33
 TEveLine.h:34
 TEveLine.h:35
 TEveLine.h:36
 TEveLine.h:37
 TEveLine.h:38
 TEveLine.h:39
 TEveLine.h:40
 TEveLine.h:41
 TEveLine.h:42
 TEveLine.h:43
 TEveLine.h:44
 TEveLine.h:45
 TEveLine.h:46
 TEveLine.h:47
 TEveLine.h:48
 TEveLine.h:49
 TEveLine.h:50
 TEveLine.h:51
 TEveLine.h:52
 TEveLine.h:53
 TEveLine.h:54
 TEveLine.h:55
 TEveLine.h:56
 TEveLine.h:57
 TEveLine.h:58
 TEveLine.h:59
 TEveLine.h:60
 TEveLine.h:61
 TEveLine.h:62
 TEveLine.h:63
 TEveLine.h:64
 TEveLine.h:65
 TEveLine.h:66
 TEveLine.h:67
 TEveLine.h:68
 TEveLine.h:69
 TEveLine.h:70
 TEveLine.h:71
 TEveLine.h:72
 TEveLine.h:73
 TEveLine.h:74
 TEveLine.h:75
 TEveLine.h:76
 TEveLine.h:77
 TEveLine.h:78
 TEveLine.h:79
 TEveLine.h:80
 TEveLine.h:81
 TEveLine.h:82
 TEveLine.h:83
 TEveLine.h:84
 TEveLine.h:85
 TEveLine.h:86
 TEveLine.h:87
 TEveLine.h:88
 TEveLine.h:89
 TEveLine.h:90
 TEveLine.h:91
 TEveLine.h:92
 TEveLine.h:93
 TEveLine.h:94
 TEveLine.h:95
 TEveLine.h:96
 TEveLine.h:97
 TEveLine.h:98
 TEveLine.h:99
 TEveLine.h:100