Logo ROOT   6.10/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 #include "TShape.h"
16 #include "TAttMarker.h"
17 
18 class TPoints3DABC;
19 class TVirtualPad;
20 
22 
23 class TPolyLineShape : public TShape, public TAttMarker {
24  protected:
25  Bool_t fPointFlag; // Flag whether we should paint "points" (option "P")
26  Bool_t fLineFlag; // Flag whether we should connect the points with "line" (option "L")
27  EShapeTypes fShapeType; // shape of the segment connections
28  TShape *fShape; // shape for draw each segment of the polylins
29  TShape *fConnection; // shape to represent the each "end" of the polyline
30  TPoints3DABC *fPoints; // PolyLine itself
31  Float_t fWidthFactor; // factor to calculate the the tube diameters
32  Bool_t fHasDrawn; // flag to avoid multiply plots
33  Bool_t fSmooth; // Make smooth connections
34  Size3D *fSizeX3D; //! the X3D buffer sizes
35 
36 
37 protected:
38  virtual void Create();
39  virtual Size3D *CreateX3DSize(Bool_t marker=kFALSE);
40  virtual void SetConnection(TShape *connection){ fConnection = connection;}
41  virtual Int_t PointDistancetoPrimitive(Int_t px, Int_t py);
42 
43 public:
46  virtual ~TPolyLineShape();
47  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
48  virtual void Draw(Option_t *opt="");
49  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
50  virtual TShape *GetConnection() const { return fConnection;}
51  virtual Color_t GetColorAttribute() const;
52  virtual const char *GetName() const;
53  virtual char *GetObjectInfo(Int_t px, Int_t py) const;
54  virtual Size_t GetSizeAttribute() const;
55  virtual Style_t GetStyleAttribute() const;
56  virtual const char *GetTitle() const;
57  virtual TPoints3DABC *GetMarker() const { return fPoints;}
58  virtual TPoints3DABC *GetPoints() const { return fPoints;}
59  virtual TShape *GetShape() const { return fShape;}
60  virtual Bool_t GetSmooth() const { return fSmooth;}
61  virtual Float_t GetWidthFactor() const { return fWidthFactor;}
62  virtual void PaintNode(Float_t *start,Float_t *end,Option_t *option);
63  virtual void Paint(Option_t *opt);
64  virtual void Paint3d(Option_t *opt);
65  virtual void PaintX3DLine(Option_t *opt="");
66  virtual void PaintX3DMarker(Option_t *opt="");
67  static Double_t *Gyrot(Double_t *dirc, Double_t cosang,Double_t sinang, Double_t trans[3][3]);
68  virtual void PaintPoints(Int_t n, Float_t *p=0, Option_t *opt="");
69  virtual void PaintPolyMarker(Int_t n, Float_t *p=0, Marker_t m=0, Option_t *opt="");
70  static Float_t Product(Float_t *v1, Float_t *v2,Int_t ndim=3);
71  static Double_t Product(Double_t *v1, Double_t *v2,Int_t ndim=3);
72  virtual Color_t SetColorAttribute(Color_t color);
73  virtual Size_t SetSizeAttribute(Size_t size);
74  virtual Int_t SetConnection(EShapeTypes connection=kBrik);
75  virtual void SetShape(TShape *shape);
76  virtual void SetSmooth(Bool_t smooth=kTRUE){ fSmooth=smooth;}
78  virtual void SetWidthFactor(Float_t fact=1.0){fWidthFactor = fact;} //*MENU
79  virtual Int_t Size() const;
80  virtual void Sizeof3D() const;
81  ClassDef(TPolyLineShape,0) // The base class to define an abstract 3D shape of STAR "event" geometry
82 };
83 
84 
85 #endif
EShapeTypes
virtual Int_t Size() const
to be documented
short Style_t
Definition: RtypesCore.h:76
virtual void SetShape(TShape *shape)
to be documented
float Float_t
Definition: RtypesCore.h:53
float Size_t
Definition: RtypesCore.h:83
const char Option_t
Definition: RtypesCore.h:62
Abstract class to define Arrays of 3D points.
Definition: TPoints3DABC.h:25
virtual Size_t SetSizeAttribute(Size_t size)
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 Size_t GetSizeAttribute() const
to be documented
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 void Paint(Option_t *opt)
to be documented
virtual void Create()
the X3D buffer sizes
virtual void Sizeof3D() const
-*-*-*-*-*-*Return total X3D size of this shape with its attributes-*-*-*-*-* *-* ===================...
virtual Float_t GetWidthFactor() const
TPolyLineShape()
to be documented
virtual void SetWidthFactor(Float_t fact=1.0)
virtual Color_t GetColorAttribute() const
to be documented
virtual TShape * GetConnection() const
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:19
#define ClassDef(name, id)
Definition: Rtypes.h:297
virtual void Paint3d(Option_t *opt)
to be documented
virtual ~TPolyLineShape()
to be documented
virtual Style_t GetStyleAttribute() const
to be documented
virtual void PaintX3DMarker(Option_t *opt="")
to be documented
virtual char * GetObjectInfo(Int_t px, Int_t py) const
forward the GetObjectInfo call to the decorated object
short Marker_t
Definition: RtypesCore.h:77
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:49
TShape * fConnection
short Color_t
Definition: RtypesCore.h:79
point * points
Definition: X3DBuffer.c:20
This is the base class for all geometry shapes.
Definition: TShape.h:35
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 TPoints3DABC * GetPoints() const
virtual Color_t SetColorAttribute(Color_t color)
to be documented
const Bool_t kFALSE
Definition: RtypesCore.h:92
virtual Bool_t GetSmooth() const
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 TShape * GetShape() const
virtual void PaintPolyMarker(Int_t n, Float_t *p=0, Marker_t m=0, Option_t *opt="")
-*-*-*-*-*-*-*-*Paint polymarker in CurrentPad World coordinates-*-*-*-*-*-*-* *-* ==================...
static Float_t Product(Float_t *v1, Float_t *v2, Int_t ndim=3)
to be documented
const Bool_t kTRUE
Definition: RtypesCore.h:91
virtual TPoints3DABC * GetMarker() 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-*-*-*-*-*-*-*-*-* *-* ===================...
virtual const char * GetName() const
forward the GetName call to the decorated object