library: libTable #include "TPolyLineShape.h"

# TPolyLineShape

class description - source file - inheritance tree (.pdf)

## class TPolyLineShape : public TShape, public TAttMarker

| Inheritance Chart:

`TObject`

<-

`TNamed`

`TAttLine`

`TAttFill`

`TAtt3D`

<-

`TShape`

`TAttMarker`

<-

`TPolyLineShape`

        protected:

                   virtual void Create()
          virtual _x3d_sizeof_* CreateX3DSize(Bool_t marker = kFALSE)
                  virtual Int_t PointDistancetoPrimitive(Int_t px, Int_t py)
                   virtual void SetConnection(TShape* connection)

        public:

                                TPolyLineShape()
                                TPolyLineShape(TPoints3DABC* points, Option_t* option = "P")
                                TPolyLineShape(const TPolyLineShape&)
                        virtual ~TPolyLineShape()
                 static TClass* Class()
                  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
                   virtual void Draw(Option_t* opt = "")
                   virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
                virtual Color_t GetColorAttribute() const
                virtual TShape* GetConnection() const
          virtual TPoints3DABC* GetMarker() const
            virtual const char* GetName() const
                  virtual char* GetObjectInfo(Int_t px, Int_t py) const
          virtual TPoints3DABC* GetPoints() const
                virtual TShape* GetShape() const
                 virtual Size_t GetSizeAttribute() const
                 virtual Bool_t GetSmooth() const
                virtual Style_t GetStyleAttribute() const
            virtual const char* GetTitle() const
                virtual Float_t GetWidthFactor() const
               static Double_t* Gyrot(Double_t* dirc, Double_t cosang, Double_t sinang, Double_t** trans)
                virtual TClass* IsA() const
                TPolyLineShape& operator=(const TPolyLineShape&)
                   virtual void Paint(Option_t* opt)
                   virtual void Paint3d(Option_t* opt)
                   virtual void PaintNode(Float_t* start, Float_t* end, Option_t* option)
                   virtual void PaintPoints(Int_t n, Float_t* p = 0, Option_t* opt = "")
                   virtual void PaintPolyMarker(Int_t n, Float_t* p = 0, Marker_t m = 0, Option_t* opt = "")
                   virtual void PaintX3DLine(Option_t* opt = "")
                   virtual void PaintX3DMarker(Option_t* opt = "")
                 static Float_t Product(Float_t* v1, Float_t* v2, Int_t ndim = 3)
                static Double_t Product(Double_t* v1, Double_t* v2, Int_t ndim = 3)
                virtual Color_t SetColorAttribute(Color_t color)
                  virtual Int_t SetConnection(EShapeTypes connection = kBrik)
                   virtual void SetShape(TShape* shape)
                 virtual Size_t SetSizeAttribute(Size_t size)
                   virtual void SetSmooth(Bool_t smooth = kTRUE)
                virtual Style_t SetStyleAttribute(Style_t style)
                   virtual void SetWidthFactor(Float_t fact = 1.0)
                   virtual void ShowMembers(TMemberInspector& insp, char* parent)
                  virtual Int_t Size() const
                   virtual void Sizeof3D() const
                   virtual void Streamer(TBuffer& b)
                           void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

                 Bool_t fPointFlag    Flag whether we should paint "points" (option "P")
                 Bool_t fLineFlag     Flag whether we should connect the points with "line" (option "L")
            EShapeTypes fShapeType    shape of the segment connections
                TShape* fShape        shape for draw each segment of the polylins
                TShape* fConnection   shape to represent the each "end" of the polyline
          TPoints3DABC* fPoints       PolyLine itself
                Float_t fWidthFactor  factor to calculate the the tube diameters
                 Bool_t fHasDrawn     flag to avoid multiply plots
                 Bool_t fSmooth       Make smooth connections
          _x3d_sizeof_* fSizeX3D      ! the X3D buffer sizes

## Class Description

                               STAR 3D geometry Object Model
                               =============================

                               TDataSet            Legend:
                                  |                  "classA"
                                  |                     |     "classB" is derived from
                                  v                     v       the "classA"
                               TVolume               "classB"
                                  ^
                                  |                  "classQ"
                                  |                      ^     "classQ" has a pointer
                                TShape                   |       to "classT"
                                  |                   "classT"
                                  v
               -----------------------------------------------------
               |               |      |                     |      |
               |               |      |     .    .    .     |      |
               |               |      |                     |      |
               V               v      v                     v      v
          TPolyLineShape     TBRIK  TTUBE                 TPCON  TTRD1
           |        ^
           |        |

R O O T S H A P E S

           V        |       (see

GEANT 3.21 shapes

     as well)
     St_PolyLine3D  |
                    |
               TPoints3DABC
                    |
                    |
                    v
          --------------------------------------------------------
          |                 |                 |                  |
          |                 |                 |                  |
          |                 |                 |                  |
          V                 v                 v                  v
    StHits3DPoints   StHelix3DPoints   TTable3Points          TPoints3D
          ^                 ^                 ^                  ^
          |                 |                 |                  |
          |                 |                 |                  |
      StObjArray    StTrack / StHelixD  TTableSorter       flat floating
                                              ^              point array
                                              |        (see St_PolyLine3D as well)
                                              |
                                            TTable

                         S  T  A  R    S  H  A  P  E  S
                         -------------------------------

TPolyLineShape()

TPolyLineShape(TPoints3DABC *points,Option_t* option)

      fShape       = new TTUBE("tube","tube","void",0.5,0.5);

~TPolyLineShape()

void Create()

Size3D* CreateX3DSize(Bool_t marker)

Int_t SetConnection(EShapeTypes connection)

Int_t DistancetoPrimitive(Int_t px, Int_t py)

    *-*-*-*-*-*-*-*Compute distance from point px,py to a 3-D polyline*-*-*-*-*-*-*
    *-*            ===================================================
    *-*
    *-*  Compute the closest distance of approach from point px,py to each segment
    *-*  of the polyline.
    *-*  Returns when the distance found is below DistanceMaximum.
    *-*  The distance is computed in pixels units.
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Int_t PointDistancetoPrimitive(Int_t px, Int_t py)

    *-*-*-*-*-*-*Compute distance from point px,py to a 3-D points *-*-*-*-*-*-*
    *-*          =====================================================
    *-*
    *-*  Compute the closest distance of approach from point px,py to each segment
    *-*  of the polyline.
    *-*  Returns when the distance found is below DistanceMaximum.
    *-*  The distance is computed in pixels units.
    *-*
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void Draw(Option_t *)

void ExecuteEvent(Int_t event, Int_t px, Int_t py)

     forward the ExecuteEvent call to the decorated object

Color_t GetColorAttribute() const

const char* GetName() const

     forward the GetName call to the decorated object

char* GetObjectInfo(Int_t px, Int_t py) const

     forward the GetObjectInfo call to the decorated object

Size_t GetSizeAttribute() const

Style_t GetStyleAttribute() const

const char* GetTitle() const

     forward the GetObjectInfo call to the decorated object

void PaintNode(Float_t *start,Float_t *end,Option_t *option)

     Double_t *start - coordinate of the start point of the current segment
     Double_t *end   - coordinate of the end   point of the current segment

void Paint(Option_t *opt)

void PaintPoints(Int_t n, Float_t *, Option_t *)

    *-*-*-*-*-*-*-*-*Draw this 3-D polyline with new coordinates*-*-*-*-*-*-*-*-*-*
    *-*              ===========================================

void PaintPolyMarker(Int_t n, Float_t *, Marker_t, Option_t *)

    *-*-*-*-*-*-*-*-*Paint polymarker in CurrentPad World coordinates*-*-*-*-*-*-*-*
    *-*              ================================================

void Paint3d(Option_t *opt)

void PaintX3DLine(Option_t *)

void PaintX3DMarker(Option_t *)

Float_t Product(Float_t *v1, Float_t *v2,Int_t ndim)

Double_t Product(Double_t *v1, Double_t *v2,Int_t ndim)

Double_t* Gyrot(Double_t *dirc, Double_t cosang, Double_t sinang, Double_t trans[3][3])

    ************************************************************************
    *                                                                      *
    *   call gyrot(dirc,angp,trans,ntrans)                       vp 880722 *
    *                                       revised              vp 921009 *
    *                                       revised (f->c++)     vf 981006 *
    *       routine for filling rotation transformation matrix             *
    *       from axis and rotation angle around                            *
    *                                                                      *
    *   arguments:                                                         *
    *       dirc    direct cosinuses (may be not normalised)               *
    *       cosang, sinang - cos and sin of the rotation angle             *
    *       tranz   rotation & shift matrix 3*3  (input/output)            *
    *    ---------------------------------------------------------------   *
    *  This code is provided by Victor Perevoztchikov                      *
    ************************************************************************

Color_t SetColorAttribute(Color_t color)

Size_t SetSizeAttribute(Size_t size)

Style_t SetStyleAttribute(Style_t style)

     SetStyleAttribute(Style_t style) - set new style for this line
     Returns:
              previous value of the line style

void SetShape(TShape *shape)

Int_t Size() const

void Sizeof3D() const

    *-*-*-*-*-*-*Return total X3D size of this shape with its attributes*-*-*-*-*-*
    *-*          =======================================================

### Inline Functions

                    TShape* GetConnection() const
              TPoints3DABC* GetMarker() const
              TPoints3DABC* GetPoints() const
                    TShape* GetShape() const
                     Bool_t GetSmooth() const
                    Float_t GetWidthFactor() const
                      Int_t SetConnection(EShapeTypes connection = kBrik)
                       void SetSmooth(Bool_t smooth = kTRUE)
                       void SetWidthFactor(Float_t fact = 1.0)
                    TClass* Class()
                    TClass* IsA() const
                       void ShowMembers(TMemberInspector& insp, char* parent)
                       void Streamer(TBuffer& b)
                       void StreamerNVirtual(TBuffer& b)
             TPolyLineShape TPolyLineShape(const TPolyLineShape&)
            TPolyLineShape& operator=(const TPolyLineShape&)

Author:
Last update: root/star:$Name: $:$Id: TPolyLineShape.cxx,v 1.3 2004/11/18 18:08:48 brun Exp $