ROOT logo
// @(#)root/table:$Id: TPoints3D.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Valery Fine(fine@mail.cern.ch)   24/04/99

/*************************************************************************
 * Copyright (C) 1995-2000, 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_TPoints3D
#define ROOT_TPoints3D

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPoints3D                                                            //
//                                                                      //
// A 3-D PolyLine.                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TPoints3DABC
#include "TPoints3DABC.h"
#endif


class TPoints3D : public TPoints3DABC {

protected:
   enum EOwnerBits {
       kIsOwner         = BIT(23)
   };

   TPoints3DABC *fPoints;

   Bool_t IsOwner() const {return TestBit(kIsOwner);}
   Bool_t DoOwner(Bool_t done=kTRUE);

public:
   TPoints3D(TPoints3DABC *points=0);
   TPoints3D(Int_t n, Option_t *option="");
   TPoints3D(Int_t n, Float_t *p, Option_t *option="");
   TPoints3D(Int_t n, Float_t *x, Float_t *y, Float_t *z, Option_t *option="");
   TPoints3D(const TPoints3D &points);
   virtual ~TPoints3D();

   virtual void      Copy(TObject &points) const;
   virtual void      Delete(Option_t *);
   virtual void      Delete();
   virtual Int_t     DistancetoPrimitive(Int_t px, Int_t py);
   virtual void      ExecuteEvent(Int_t event, Int_t px, Int_t py);
   virtual Int_t     GetLastPosition()       const;
   virtual Int_t     GetN() const;
   virtual Float_t  *GetP() const;
   virtual Float_t   GetX(Int_t idx)  const;
   virtual Float_t   GetY(Int_t idx)  const;
   virtual Float_t   GetZ(Int_t idx)  const;
   virtual Float_t  *GetXYZ(Float_t *xyz,Int_t idx,Int_t num=1)  const;
   virtual const Float_t  *GetXYZ(Int_t idx);
   virtual Option_t *GetOption() const ;
   virtual void      ls(Option_t *option="") const;
   virtual void      PaintPoints(Int_t, Float_t *,Option_t *){;}
   virtual void      Print(Option_t *option="") const;
   virtual Int_t     SetLastPosition(Int_t idx);
   virtual void      SetOption(Option_t *option="");
   virtual Int_t     SetPoint(Int_t point, Float_t x, Float_t y, Float_t z); // *MENU*
   virtual Int_t     SetPoints(Int_t n, Float_t *p=0, Option_t *option="");
   virtual Int_t     Size() const;

   ClassDef(TPoints3D,1)  // Defines the abstract array of 3D points
};

inline void      TPoints3D::Delete(Option_t *opt){ TObject::Delete(opt);}
inline Int_t     TPoints3D::DistancetoPrimitive(Int_t px, Int_t py) {return fPoints?fPoints->DistancetoPrimitive(px,py):99999;}
inline Int_t     TPoints3D::GetLastPosition()  const   {return fPoints?fPoints->GetLastPosition():0;}
inline Int_t     TPoints3D::GetN()  const              {return fPoints?fPoints->GetN():0;}
inline Float_t  *TPoints3D::GetP()  const              {return fPoints?fPoints->GetP():0;}
inline Float_t   TPoints3D::GetX(Int_t idx)  const     {return fPoints?fPoints->GetX(idx):0;}
inline Float_t   TPoints3D::GetY(Int_t idx)  const     {return fPoints?fPoints->GetY(idx):0;}
inline Float_t   TPoints3D::GetZ(Int_t idx)  const     {return fPoints?fPoints->GetZ(idx):0;}
inline const Float_t  *TPoints3D::GetXYZ(Int_t idx)    {return fPoints?fPoints->GetXYZ(idx):0;}
inline Float_t  *TPoints3D::GetXYZ(Float_t *xyz,Int_t idx,Int_t num)  const
                          {return fPoints?fPoints->GetXYZ(xyz,idx,num):0;}
inline Option_t *TPoints3D::GetOption() const          {return fPoints?fPoints->GetOption():"";}
inline Int_t     TPoints3D::SetLastPosition(Int_t idx) {return fPoints?fPoints->SetLastPosition(idx):0;}
inline void      TPoints3D::SetOption(Option_t *option){if (fPoints) fPoints->SetOption(option);}
inline Int_t     TPoints3D::SetPoint(Int_t point, Float_t x, Float_t y, Float_t z){return fPoints?fPoints->SetPoint(point,x,y,z):0;}
inline Int_t     TPoints3D::SetPoints(Int_t n, Float_t *p, Option_t *option){return fPoints?fPoints->SetPoints(n,p,option):0;}

inline Int_t     TPoints3D::Size() const               {return fPoints?fPoints->Size():0;}

#endif


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