Logo ROOT   6.07/09
Reference Guide
TPolyLineShape.h
Go to the documentation of this file.
1 // @(#)root/table:$Id$
2 // Author:
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TPolyLineShape
13 #define ROOT_TPolyLineShape
14 
15 #ifndef ROOT_TShape
16 #include "TShape.h"
17 #endif
18 #ifndef ROOT_TAttMarker
19 #include "TAttMarker.h"
20 #endif
21 
22 class TPoints3DABC;
23 class TVirtualPad;
24 
26 
27 class TPolyLineShape : public TShape, public TAttMarker {
28  protected:
29  Bool_t fPointFlag; // Flag whether we should paint "points" (option "P")
30  Bool_t fLineFlag; // Flag whether we should connect the points with "line" (option "L")
31  EShapeTypes fShapeType; // shape of the segment connections
32  TShape *fShape; // shape for draw each segment of the polylins
33  TShape *fConnection; // shape to represent the each "end" of the polyline
34  TPoints3DABC *fPoints; // PolyLine itself
35  Float_t fWidthFactor; // factor to calculate the the tube diameters
36  Bool_t fHasDrawn; // flag to avoid multiply plots
37  Bool_t fSmooth; // Make smooth connections
38  Size3D *fSizeX3D; //! the X3D buffer sizes
39 
40 
41 protected:
42  virtual void Create();
43  virtual Size3D *CreateX3DSize(Bool_t marker=kFALSE);
44  virtual void SetConnection(TShape *connection){ fConnection = connection;}
45  virtual Int_t PointDistancetoPrimitive(Int_t px, Int_t py);
46 
47 public:
50  virtual ~TPolyLineShape();
51  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
52  virtual void Draw(Option_t *opt="");
53  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
54  virtual TShape *GetConnection() const { return fConnection;}
55  virtual Color_t GetColorAttribute() const;
56  virtual const char *GetName() const;
57  virtual char *GetObjectInfo(Int_t px, Int_t py) const;
58  virtual Size_t GetSizeAttribute() const;
59  virtual Style_t GetStyleAttribute() const;
60  virtual const char *GetTitle() const;
61  virtual TPoints3DABC *GetMarker() const { return fPoints;}
62  virtual TPoints3DABC *GetPoints() const { return fPoints;}
63  virtual TShape *GetShape() const { return fShape;}
64  virtual Bool_t GetSmooth() const { return fSmooth;}
65  virtual Float_t GetWidthFactor() const { return fWidthFactor;}
66  virtual void PaintNode(Float_t *start,Float_t *end,Option_t *option);
67  virtual void Paint(Option_t *opt);
68  virtual void Paint3d(Option_t *opt);
69  virtual void PaintX3DLine(Option_t *opt="");
70  virtual void PaintX3DMarker(Option_t *opt="");
71  static Double_t *Gyrot(Double_t *dirc, Double_t cosang,Double_t sinang, Double_t trans[3][3]);
72  virtual void PaintPoints(Int_t n, Float_t *p=0, Option_t *opt="");
73  virtual void PaintPolyMarker(Int_t n, Float_t *p=0, Marker_t m=0, Option_t *opt="");
74  static Float_t Product(Float_t *v1, Float_t *v2,Int_t ndim=3);
75  static Double_t Product(Double_t *v1, Double_t *v2,Int_t ndim=3);
76  virtual Color_t SetColorAttribute(Color_t color);
77  virtual Size_t SetSizeAttribute(Size_t size);
78  virtual Int_t SetConnection(EShapeTypes connection=kBrik);
79  virtual void SetShape(TShape *shape);
80  virtual void SetSmooth(Bool_t smooth=kTRUE){ fSmooth=smooth;}
82  virtual void SetWidthFactor(Float_t fact=1.0){fWidthFactor = fact;} //*MENU
83  virtual Int_t Size() const;
84  virtual void Sizeof3D() const;
85  ClassDef(TPolyLineShape,0) // The base class to define an abstract 3D shape of STAR "event" geometry
86 };
87 
88 
89 #endif
EShapeTypes
short Style_t
Definition: RtypesCore.h:76
virtual void SetShape(TShape *shape)
to be documented
virtual char * GetObjectInfo(Int_t px, Int_t py) const
forward the GetObjectInfo call to the decorated object
float Float_t
Definition: RtypesCore.h:53
float Size_t
Definition: RtypesCore.h:83
const char Option_t
Definition: RtypesCore.h:62
virtual Size_t GetSizeAttribute() const
to be documented
Abstract class to define Arrays of 3D points.
Definition: TPoints3DABC.h:27
virtual Size_t SetSizeAttribute(Size_t size)
to be documented
virtual Int_t Size() const
to be documented
virtual 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 ...
virtual void SetConnection(TShape *connection)
virtual Size3D * CreateX3DSize(Bool_t marker=kFALSE)
to be documented
virtual Int_t PointDistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*Compute distance from point px,py to a 3-D points *-*-*-*-*-*-* *-* ====================...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
forward the ExecuteEvent call to the decorated object
virtual TPoints3DABC * GetMarker() const
virtual void Paint(Option_t *opt)
to be documented
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual Color_t GetColorAttribute() const
to be documented
virtual void Create()
the X3D buffer sizes
TPolyLineShape()
to be documented
virtual void SetWidthFactor(Float_t fact=1.0)
virtual const char * GetTitle() const
forward the GetObjectInfo call to the decorated object
virtual void PaintX3DLine(Option_t *opt="")
to be documented
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*-*Compute distance from point px,py to a 3-D polyline*-*-*-*-*-*-* *-* =================...
virtual Style_t SetStyleAttribute(Style_t style)
SetStyleAttribute(Style_t style) - set new style for this line Returns: previous value of the line st...
Marker Attributes class.
Definition: TAttMarker.h:24
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void Paint3d(Option_t *opt)
to be documented
virtual ~TPolyLineShape()
to be documented
virtual void PaintX3DMarker(Option_t *opt="")
to be documented
short Marker_t
Definition: RtypesCore.h:77
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
TShape * fConnection
short Color_t
Definition: RtypesCore.h:79
point * points
Definition: X3DBuffer.c:20
virtual void Sizeof3D() const
*-*-*-*-*-*-*Return total X3D size of this shape with its attributes*-*-*-*-*-* *-* =================...
This is the base class for all geometry shapes.
Definition: TShape.h:47
virtual TPoints3DABC * GetPoints() const
virtual const char * GetName() const
forward the GetName call to the decorated object
static Double_t * Gyrot(Double_t *dirc, Double_t cosang, Double_t sinang, Double_t trans[3][3])
TMarker * m
Definition: textangle.C:8
Float_t fWidthFactor
virtual Color_t SetColorAttribute(Color_t color)
to be documented
TPoints3DABC * fPoints
double Double_t
Definition: RtypesCore.h:55
EShapeTypes fShapeType
virtual void SetSmooth(Bool_t smooth=kTRUE)
Size3D * fSizeX3D
TCanvas * style()
Definition: style.C:1
virtual Bool_t GetSmooth() const
virtual void PaintPolyMarker(Int_t n, Float_t *p=0, Marker_t m=0, Option_t *opt="")
*-*-*-*-*-*-*-*-*Paint polymarker in CurrentPad World coordinates*-*-*-*-*-*-*-* *-* ================...
virtual TShape * GetShape() const
static Float_t Product(Float_t *v1, Float_t *v2, Int_t ndim=3)
to be documented
virtual Float_t GetWidthFactor() const
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual Style_t GetStyleAttribute() const
to be documented
virtual TShape * GetConnection() const
const Int_t n
Definition: legend1.C:16
virtual void Draw(Option_t *opt="")
to be documented
virtual void PaintPoints(Int_t n, Float_t *p=0, Option_t *opt="")
*-*-*-*-*-*-*-*-*Draw this 3-D polyline with new coordinates*-*-*-*-*-*-*-*-*-* *-* =================...