TPolyLineShape.h

Go to the documentation of this file.
00001 // @(#)root/table:$Id: TPolyLineShape.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author:
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_TPolyLineShape
00013 #define ROOT_TPolyLineShape
00014 
00015 #ifndef ROOT_TShape
00016 #include "TShape.h"
00017 #endif
00018 #ifndef ROOT_TAttMarker
00019 #include "TAttMarker.h"
00020 #endif
00021 
00022 class TPoints3DABC;
00023 class TVirtualPad;
00024 
00025 enum EShapeTypes { kNULL=0, kSphere, kBrik};
00026 
00027 class TPolyLineShape : public TShape, public TAttMarker {
00028  protected:
00029    Bool_t        fPointFlag;   // Flag whether we should paint "points" (option "P")
00030    Bool_t        fLineFlag;    // Flag whether we should connect the points with "line" (option "L")
00031    EShapeTypes   fShapeType;   // shape of the segment connections
00032    TShape       *fShape;       // shape for draw each segment of the polylins
00033    TShape       *fConnection;  // shape to represent the each "end" of the polyline
00034    TPoints3DABC   *fPoints;    // PolyLine itself
00035    Float_t       fWidthFactor; // factor to calculate the the tube diameters
00036    Bool_t        fHasDrawn;    // flag to avoid multiply plots
00037    Bool_t        fSmooth;      // Make smooth connections
00038    Size3D       *fSizeX3D;     //! the X3D buffer sizes
00039 
00040 
00041 protected:
00042    virtual void  Create();
00043    virtual Size3D *CreateX3DSize(Bool_t marker=kFALSE);
00044    virtual void  SetConnection(TShape *connection){ fConnection = connection;}
00045    virtual Int_t PointDistancetoPrimitive(Int_t px, Int_t py);
00046 
00047 public:
00048    TPolyLineShape();
00049    TPolyLineShape(TPoints3DABC *points,Option_t* option="P");
00050    virtual ~TPolyLineShape();
00051    virtual Int_t        DistancetoPrimitive(Int_t px, Int_t py);
00052    virtual void         Draw(Option_t *opt="");
00053    virtual void         ExecuteEvent(Int_t event, Int_t px, Int_t py);
00054    virtual TShape      *GetConnection() const { return fConnection;}
00055    virtual Color_t      GetColorAttribute() const;
00056    virtual const char  *GetName()  const;
00057    virtual char        *GetObjectInfo(Int_t px, Int_t py) const;
00058    virtual Size_t       GetSizeAttribute()  const;
00059    virtual Style_t      GetStyleAttribute() const;
00060    virtual const char  *GetTitle() const;
00061    virtual TPoints3DABC *GetMarker() const { return fPoints;}
00062    virtual TPoints3DABC *GetPoints() const { return fPoints;}
00063    virtual TShape      *GetShape() const { return fShape;}
00064    virtual Bool_t       GetSmooth() const { return fSmooth;}
00065    virtual Float_t      GetWidthFactor() const { return fWidthFactor;}
00066    virtual void         PaintNode(Float_t *start,Float_t *end,Option_t *option);
00067    virtual void         Paint(Option_t *opt);
00068    virtual void         Paint3d(Option_t *opt);
00069    virtual void         PaintX3DLine(Option_t *opt="");
00070    virtual void         PaintX3DMarker(Option_t *opt="");
00071    static Double_t     *Gyrot(Double_t *dirc, Double_t cosang,Double_t sinang, Double_t trans[3][3]);
00072    virtual void         PaintPoints(Int_t n, Float_t *p=0, Option_t *opt="");
00073    virtual void         PaintPolyMarker(Int_t n, Float_t *p=0, Marker_t m=0, Option_t *opt="");
00074    static Float_t       Product(Float_t *v1, Float_t *v2,Int_t ndim=3);
00075    static Double_t      Product(Double_t *v1, Double_t *v2,Int_t ndim=3);
00076    virtual Color_t      SetColorAttribute(Color_t color);
00077    virtual Size_t       SetSizeAttribute(Size_t size);
00078    virtual Int_t        SetConnection(EShapeTypes connection=kBrik);
00079    virtual void         SetShape(TShape *shape);
00080    virtual void         SetSmooth(Bool_t smooth=kTRUE){ fSmooth=smooth;}
00081    virtual Style_t      SetStyleAttribute(Style_t style);
00082    virtual void         SetWidthFactor(Float_t fact=1.0){fWidthFactor = fact;} //*MENU
00083    virtual Int_t        Size() const;
00084    virtual void         Sizeof3D() const;
00085    ClassDef(TPolyLineShape,0) // The base class to define an abstract 3D shape of STAR "event" geometry
00086 };
00087 
00088 
00089 #endif

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