Logo ROOT  
Reference Guide
TTUBS.h
Go to the documentation of this file.
1// @(#)root/g3d:$Id$
2// Author: Nenad Buncic 18/09/95
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_TTUBS
13#define ROOT_TTUBS
14
15
16////////////////////////////////////////////////////////////////////////////
17// //
18// TTUBS //
19// //
20// TUBS is a phi segment of a tube. It has 5 parameters, the same 3 as //
21// TUBE plus the phi limits. The segment start at first limit and //
22// includes increasing phi value up to the second limit or that plus //
23// 360 degrees. //
24// //
25////////////////////////////////////////////////////////////////////////////
26
27#include "TTUBE.h"
28
29class TTUBS : public TTUBE {
30protected:
31 Float_t fPhi1; // first phi limit
32 Float_t fPhi2; // second phi limit
33 virtual void MakeTableOfCoSin() const; // Create the table of the fSiTab; fCoTab
34
35 virtual void SetPoints(Double_t *points) const;
36
37public:
38 TTUBS();
39 TTUBS(const char *name, const char *title, const char *material, Float_t rmin, Float_t rmax, Float_t dz,
40 Float_t phi1, Float_t phi2);
41 TTUBS(const char *name, const char *title, const char *material, Float_t rmax, Float_t dz,
42 Float_t phi1, Float_t phi2);
43 virtual ~TTUBS();
44
45 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
46 virtual const TBuffer3D &GetBuffer3D(Int_t reqSections) const;
47 virtual Float_t GetPhi1() const {return fPhi1;}
48 virtual Float_t GetPhi2() const {return fPhi2;}
49 virtual void Sizeof3D() const;
50
51 ClassDef(TTUBS,1) //TUBS shape
52};
53
54#endif
int Int_t
Definition: RtypesCore.h:41
double Double_t
Definition: RtypesCore.h:55
float Float_t
Definition: RtypesCore.h:53
#define ClassDef(name, id)
Definition: Rtypes.h:326
char name[80]
Definition: TGX11.cxx:109
point * points
Definition: X3DBuffer.c:22
Generic 3D primitive description class.
Definition: TBuffer3D.h:18
A tube.
Definition: TTUBE.h:32
A segment of a tube.
Definition: TTUBS.h:29
virtual Float_t GetPhi2() const
Definition: TTUBS.h:48
virtual void Sizeof3D() const
Return total X3D needed by TNode::ls (when called with option "x")
Definition: TTUBS.cxx:170
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Get buffer 3d.
Definition: TTUBS.cxx:182
virtual Float_t GetPhi1() const
Definition: TTUBS.h:47
Float_t fPhi1
Definition: TTUBS.h:31
virtual void MakeTableOfCoSin() const
Make table of sine and cosine.
Definition: TTUBS.cxx:80
virtual ~TTUBS()
TUBS shape default destructor.
Definition: TTUBS.cxx:116
Float_t fPhi2
Definition: TTUBS.h:32
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a TUBE.
Definition: TTUBS.cxx:126
virtual void SetPoints(Double_t *points) const
Create TUBS points.
Definition: TTUBS.cxx:136
TTUBS()
TUBS shape default constructor.
Definition: TTUBS.cxx:47