// @(#)root/eve:$Id$
// 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_TEveTrackProjected
#define ROOT_TEveTrackProjected

#include "TEveTrack.h"
#include "TEveProjectionBases.h"


class TEveTrackProjected : public TEveTrack,
                           public TEveProjected
{
   friend class TEveTrackProjectedGL;

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

   Int_t GetBreakPointIdx(Int_t start);

   TEveVector*          fOrigPnts;     // original track points

protected:
   std::vector<Int_t>   fBreakPoints; // indices of track break-points

   virtual void SetDepthLocal(Float_t d);

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

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

   virtual void UpdateProjection();
   virtual TEveElement* GetProjectedAsElement() { return this; }
   virtual void MakeTrack(Bool_t recurse=kTRUE);


   void         PrintLineSegments();

   virtual void SecSelected(TEveTrack*); // marked as signal in TEveTrack

   ClassDef(TEveTrackProjected, 1); // Projected copy of a TEveTrack.
};


/******************************************************************************/
// TEveTrackListProjected
/******************************************************************************/

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

protected:
   virtual void SetDepthLocal(Float_t d);

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

   virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable* model);
   virtual void UpdateProjection()  {}
   virtual TEveElement* GetProjectedAsElement() { return this; }

   virtual void SetDepth(Float_t d);
   virtual void SetDepth(Float_t d, TEveElement* el);

   ClassDef(TEveTrackListProjected, 1); // Specialization of TEveTrackList for holding TEveTrackProjected objects.
};

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