StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TPolyLineShape.h
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 
21 enum EShapeTypes { kNULL=0, kSphere, kBrik};
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;
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:
45  TPolyLineShape(TPoints3DABC *points,Option_t* option="P");
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;}
77  virtual Style_t SetStyleAttribute(Style_t style);
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
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
virtual Size_t GetSizeAttribute() const
to be documented
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)
virtual Size3D * CreateX3DSize(Bool_t marker=kFALSE)
to be documented
virtual Int_t PointDistancetoPrimitive(Int_t px, Int_t py)
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 Color_t GetColorAttribute() const
to be documented
virtual void Create()
the X3D buffer sizes
TPolyLineShape()
to be documented
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)
virtual Style_t SetStyleAttribute(Style_t style)
virtual void Paint3d(Option_t *opt)
to be documented
virtual ~TPolyLineShape()
to be documented
virtual void PaintX3DMarker(Option_t *opt="")
to be documented
virtual void Sizeof3D() const
Return total X3D size of this shape with its attributes.
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])
virtual Color_t SetColorAttribute(Color_t color)
to be documented
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
virtual Style_t GetStyleAttribute() const
to be documented
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.