Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TCurlyArc.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/graf:$Id$
0002 // Author: Otto Schaile   20/11/99
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 #ifndef ROOT_TCurlyArc
0012 #define ROOT_TCurlyArc
0013 
0014 #include "TCurlyLine.h"
0015 
0016 class TCurlyArc : public TCurlyLine {
0017 
0018 private:
0019    Double_t fR1;                  ///< Radius of arc
0020    Double_t fPhimin;              ///< start phi (degrees)
0021    Double_t fPhimax;              ///< end phi (degrees)
0022    Double_t fTheta;               ///< used internally
0023 
0024    static Double_t fgDefaultWaveLength;   ///< default wavelength
0025    static Double_t fgDefaultAmplitude;    ///< default amplitude
0026    static Bool_t   fgDefaultIsCurly;      ///< default curly type
0027 
0028 public:
0029    TCurlyArc();
0030    TCurlyArc(Double_t x1, Double_t y1, Double_t rad,
0031              Double_t phimin, Double_t phimax,
0032              Double_t wl = .02, Double_t amp = .01);
0033    ~TCurlyArc() override {}
0034 
0035    void         Build() override;
0036    Int_t        DistancetoPrimitive(Int_t px, Int_t py) override;
0037    void         ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0038    Double_t     GetRadius() const {return fR1;}
0039    Double_t     GetPhimin() const {return fPhimin;}
0040    Double_t     GetPhimax() const {return fPhimax;}
0041    virtual void SetCenter(Double_t x1, Double_t y1); // *MENU* *ARGS={x1=>fX1,y1=>fY1}
0042    virtual void SetRadius(Double_t radius);          // *MENU* *ARGS={radius=>fR1}
0043    virtual void SetPhimin(Double_t phimin);          // *MENU* *ARGS={phimin=>fPhimin}
0044    virtual void SetPhimax(Double_t phimax);          // *MENU* *ARGS={phimax=>fPhimax}
0045    void         SavePrimitive(std::ostream &out, Option_t * = "") override;
0046 
0047    static void          SetDefaultWaveLength(Double_t WaveLength);
0048    static void          SetDefaultAmplitude (Double_t Amplitude );
0049    static void          SetDefaultIsCurly   (Bool_t   IsCurly   );
0050    static Double_t      GetDefaultWaveLength();
0051    static Double_t      GetDefaultAmplitude ();
0052    static Bool_t        GetDefaultIsCurly   ();
0053 
0054    Rectangle_t  GetBBox() override;
0055    TPoint       GetBBoxCenter() override;
0056    void         SetBBoxCenter(const TPoint &p) override;
0057    void         SetBBoxCenterX(const Int_t x) override;
0058    void         SetBBoxCenterY(const Int_t y) override;
0059    void         SetBBoxX1(const Int_t x) override;
0060    void         SetBBoxX2(const Int_t x) override;
0061    void         SetBBoxY1(const Int_t y) override;
0062    void         SetBBoxY2(const Int_t y) override;
0063 
0064    ClassDefOverride(TCurlyArc,3) // A curly arc
0065 };
0066 
0067 #endif
0068