TPolyLine3D.h

Go to the documentation of this file.
00001 // @(#)root/g3d:$Id: TPolyLine3D.h 27556 2009-02-20 17:38:28Z matevz $
00002 // Author: Nenad Buncic   17/08/95
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_TPolyLine3D
00013 #define ROOT_TPolyLine3D
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TPolyLine3D                                                          //
00019 //                                                                      //
00020 // A 3-D polyline.                                                      //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TObject
00025 #include "TObject.h"
00026 #endif
00027 #ifndef ROOT_TList
00028 #include "TList.h"
00029 #endif
00030 #ifndef ROOT_TTString
00031 #include "TString.h"
00032 #endif
00033 #ifndef ROOT_TAttLine
00034 #include "TAttLine.h"
00035 #endif
00036 #ifndef ROOT_TAtt3D
00037 #include "TAtt3D.h"
00038 #endif
00039 
00040 
00041 class TPolyLine3D : public TObject, public TAttLine, public TAtt3D
00042 {
00043 protected:
00044    Int_t        fN;            //Number of points
00045    Float_t     *fP;            //[3*fN] Array of 3-D coordinates  (x,y,z)
00046    TString      fOption;       //options
00047    Int_t        fLastPoint;    //The index of the last filled point
00048 
00049 public:
00050    TPolyLine3D();
00051    TPolyLine3D(Int_t n, Option_t *option="");
00052    TPolyLine3D(Int_t n, Float_t *p, Option_t *option="");
00053    TPolyLine3D(Int_t n, Double_t *p, Option_t *option="");
00054    TPolyLine3D(Int_t n, Float_t *x, Float_t *y, Float_t *z, Option_t *option="");
00055    TPolyLine3D(Int_t n, Double_t *x, Double_t *y, Double_t *z, Option_t *option="");
00056    TPolyLine3D(const TPolyLine3D &polylin);
00057    TPolyLine3D& operator=(const TPolyLine3D &polylin);
00058    virtual ~TPolyLine3D();
00059 
00060    virtual void      Copy(TObject &polyline) const;
00061    virtual Int_t     DistancetoPrimitive(Int_t px, Int_t py);
00062    virtual void      Draw(Option_t *option="");
00063    virtual void      DrawPolyLine(Int_t n, Float_t *p, Option_t *option="");
00064    virtual void      ExecuteEvent(Int_t event, Int_t px, Int_t py);
00065    Int_t             GetLastPoint() const {return fLastPoint;}
00066    Int_t             GetN() const {return fN;}
00067    Float_t          *GetP() const {return fP;}
00068    Option_t         *GetOption() const {return fOption.Data();}
00069    virtual void      ls(Option_t *option="") const;
00070    virtual Int_t     Merge(TCollection *list);
00071    virtual void      Paint(Option_t *option="");
00072    virtual void      Print(Option_t *option="") const;
00073    virtual void      SavePrimitive(ostream &out, Option_t *option = "");
00074    virtual Int_t     SetNextPoint(Double_t x, Double_t y, Double_t z); // *MENU*
00075    virtual void      SetOption(Option_t *option="") {fOption = option;}
00076    virtual void      SetPoint(Int_t point, Double_t x, Double_t y, Double_t z); // *MENU*
00077    virtual void      SetPolyLine(Int_t n, Option_t *option="");
00078    virtual void      SetPolyLine(Int_t n, Float_t *p, Option_t *option="");
00079    virtual void      SetPolyLine(Int_t n, Double_t *p, Option_t *option="");
00080    virtual Int_t     Size() const { return fLastPoint+1;}
00081 
00082    static  void      DrawOutlineCube(TList *outline, Double_t *rmin, Double_t *rmax);
00083 
00084    ClassDef(TPolyLine3D,1)  //A 3-D polyline
00085 };
00086 
00087 #endif

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