ROOT
v6-20
Reference Guide
TTRD1.cxx
Go to the documentation of this file.
1
// @(#)root/g3d:$Id$
2
// Author: Nenad Buncic 17/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
#include "
TTRD1.h
"
13
#include "
TNode.h
"
14
15
ClassImp
(
TTRD1
);
16
17
/** \class TTRD1
18
\ingroup g3d
19
A trapezoid with the x dimension varying along z.
20
21
\image html g3d_trd1.png
22
23
It has 7 parameters:
24
25
- name: name of the shape
26
- title: shape's title
27
- material: (see TMaterial)
28
- dx1: half-length along x at the z surface positioned at -DZ
29
- dx2: half-length along x at the z surface positioned at +DZ
30
- dy: half-length along the y-axis
31
- dz: half-length along the z-axis
32
*/
33
34
////////////////////////////////////////////////////////////////////////////////
35
/// TRD1 shape default constructor
36
37
TTRD1::TTRD1
()
38
{
39
fDx2
= 0.;
40
}
41
42
////////////////////////////////////////////////////////////////////////////////
43
/// TRD1 shape normal constructor
44
45
TTRD1::TTRD1
(
const
char
*
name
,
const
char
*title,
const
char
*material,
Float_t
dx1,
Float_t
dx2,
Float_t
dy,
Float_t
dz)
46
:
TBRIK
(
name
, title,material,dx1,dy,dz)
47
{
48
fDx2
= dx2;
49
}
50
51
////////////////////////////////////////////////////////////////////////////////
52
/// TRD1 shape default destructor
53
54
TTRD1::~TTRD1
()
55
{
56
}
57
58
////////////////////////////////////////////////////////////////////////////////
59
/// Create TRD1 points
60
61
void
TTRD1::SetPoints
(
Double_t
*
points
)
const
62
{
63
Float_t
dx1, dx2, dy, dz;
64
65
dx1 =
TBRIK::fDx
;
66
dx2 =
fDx2
;
67
dy =
TBRIK::fDy
;
68
dz =
TBRIK::fDz
;
69
70
if
(
points
) {
71
points
[ 0] = -dx1 ;
points
[ 1] = -dy ;
points
[ 2] = -dz;
72
points
[ 3] = -dx1 ;
points
[ 4] = dy ;
points
[ 5] = -dz;
73
points
[ 6] = dx1 ;
points
[ 7] = dy ;
points
[ 8] = -dz;
74
points
[ 9] = dx1 ;
points
[10] = -dy ;
points
[11] = -dz;
75
points
[12] = -dx2 ;
points
[13] = -dy ;
points
[14] = dz;
76
points
[15] = -dx2 ;
points
[16] = dy ;
points
[17] = dz;
77
points
[18] = dx2 ;
points
[19] = dy ;
points
[20] = dz;
78
points
[21] = dx2 ;
points
[22] = -dy ;
points
[23] = dz;
79
}
80
}
Double_t
double Double_t
Definition:
RtypesCore.h:55
Float_t
float Float_t
Definition:
RtypesCore.h:53
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:365
name
char name[80]
Definition:
TGX11.cxx:109
TNode.h
TTRD1.h
points
point * points
Definition:
X3DBuffer.c:22
TBRIK
A box with faces perpendicular to the axes.
Definition:
TBRIK.h:26
TBRIK::fDz
Float_t fDz
Definition:
TBRIK.h:31
TBRIK::fDy
Float_t fDy
Definition:
TBRIK.h:30
TBRIK::fDx
Float_t fDx
Definition:
TBRIK.h:29
TTRD1
A trapezoid with the x dimension varying along z.
Definition:
TTRD1.h:28
TTRD1::~TTRD1
virtual ~TTRD1()
TRD1 shape default destructor.
Definition:
TTRD1.cxx:54
TTRD1::fDx2
Float_t fDx2
Definition:
TTRD1.h:30
TTRD1::TTRD1
TTRD1()
TRD1 shape default constructor.
Definition:
TTRD1.cxx:37
TTRD1::SetPoints
virtual void SetPoints(Double_t *points) const
Create TRD1 points.
Definition:
TTRD1.cxx:61
graf3d
g3d
src
TTRD1.cxx
ROOT v6-20 - Reference Guide Generated on Fri Apr 1 2022 00:20:37 (GVA Time) using Doxygen 1.9.4