TPoints3D.h

Go to the documentation of this file.
00001 // @(#)root/table:$Id: TPoints3D.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Valery Fine(fine@mail.cern.ch)   24/04/99
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, 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_TPoints3D
00013 #define ROOT_TPoints3D
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TPoints3D                                                            //
00018 //                                                                      //
00019 // A 3-D PolyLine.                                                      //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 #ifndef ROOT_TPoints3DABC
00024 #include "TPoints3DABC.h"
00025 #endif
00026 
00027 
00028 class TPoints3D : public TPoints3DABC {
00029 
00030 protected:
00031    enum EOwnerBits {
00032        kIsOwner         = BIT(23)
00033    };
00034 
00035    TPoints3DABC *fPoints;
00036 
00037    Bool_t IsOwner() const {return TestBit(kIsOwner);}
00038    Bool_t DoOwner(Bool_t done=kTRUE);
00039 
00040 public:
00041    TPoints3D(TPoints3DABC *points=0);
00042    TPoints3D(Int_t n, Option_t *option="");
00043    TPoints3D(Int_t n, Float_t *p, Option_t *option="");
00044    TPoints3D(Int_t n, Float_t *x, Float_t *y, Float_t *z, Option_t *option="");
00045    TPoints3D(const TPoints3D &points);
00046    virtual ~TPoints3D();
00047 
00048    virtual void      Copy(TObject &points) const;
00049    virtual void      Delete(Option_t *);
00050    virtual void      Delete();
00051    virtual Int_t     DistancetoPrimitive(Int_t px, Int_t py);
00052    virtual void      ExecuteEvent(Int_t event, Int_t px, Int_t py);
00053    virtual Int_t     GetLastPosition()       const;
00054    virtual Int_t     GetN() const;
00055    virtual Float_t  *GetP() const;
00056    virtual Float_t   GetX(Int_t idx)  const;
00057    virtual Float_t   GetY(Int_t idx)  const;
00058    virtual Float_t   GetZ(Int_t idx)  const;
00059    virtual Float_t  *GetXYZ(Float_t *xyz,Int_t idx,Int_t num=1)  const;
00060    virtual const Float_t  *GetXYZ(Int_t idx);
00061    virtual Option_t *GetOption() const ;
00062    virtual void      ls(Option_t *option="") const;
00063    virtual void      PaintPoints(Int_t, Float_t *,Option_t *){;}
00064    virtual void      Print(Option_t *option="") const;
00065    virtual Int_t     SetLastPosition(Int_t idx);
00066    virtual void      SetOption(Option_t *option="");
00067    virtual Int_t     SetPoint(Int_t point, Float_t x, Float_t y, Float_t z); // *MENU*
00068    virtual Int_t     SetPoints(Int_t n, Float_t *p=0, Option_t *option="");
00069    virtual Int_t     Size() const;
00070 
00071    ClassDef(TPoints3D,1)  // Defines the abstract array of 3D points
00072 };
00073 
00074 inline void      TPoints3D::Delete(Option_t *opt){ TObject::Delete(opt);}
00075 inline Int_t     TPoints3D::DistancetoPrimitive(Int_t px, Int_t py) {return fPoints?fPoints->DistancetoPrimitive(px,py):99999;}
00076 inline Int_t     TPoints3D::GetLastPosition()  const   {return fPoints?fPoints->GetLastPosition():0;}
00077 inline Int_t     TPoints3D::GetN()  const              {return fPoints?fPoints->GetN():0;}
00078 inline Float_t  *TPoints3D::GetP()  const              {return fPoints?fPoints->GetP():0;}
00079 inline Float_t   TPoints3D::GetX(Int_t idx)  const     {return fPoints?fPoints->GetX(idx):0;}
00080 inline Float_t   TPoints3D::GetY(Int_t idx)  const     {return fPoints?fPoints->GetY(idx):0;}
00081 inline Float_t   TPoints3D::GetZ(Int_t idx)  const     {return fPoints?fPoints->GetZ(idx):0;}
00082 inline const Float_t  *TPoints3D::GetXYZ(Int_t idx)    {return fPoints?fPoints->GetXYZ(idx):0;}
00083 inline Float_t  *TPoints3D::GetXYZ(Float_t *xyz,Int_t idx,Int_t num)  const
00084                           {return fPoints?fPoints->GetXYZ(xyz,idx,num):0;}
00085 inline Option_t *TPoints3D::GetOption() const          {return fPoints?fPoints->GetOption():"";}
00086 inline Int_t     TPoints3D::SetLastPosition(Int_t idx) {return fPoints?fPoints->SetLastPosition(idx):0;}
00087 inline void      TPoints3D::SetOption(Option_t *option){if (fPoints) fPoints->SetOption(option);}
00088 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;}
00089 inline Int_t     TPoints3D::SetPoints(Int_t n, Float_t *p, Option_t *option){return fPoints?fPoints->SetPoints(n,p,option):0;}
00090 
00091 inline Int_t     TPoints3D::Size() const               {return fPoints?fPoints->Size():0;}
00092 
00093 #endif
00094 
00095 

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