ROOT
v6-40
Reference Guide
Loading...
Searching...
No Matches
TTRD2.cxx
Go to the documentation of this file.
1
// @(#)root/g3d:$Id$
2
// Author: Nenad Buncic 13/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 "
TTRD2.h
"
13
#include "
TNode.h
"
14
15
16
/** \class TTRD2
17
\ingroup g3d
18
A trapezoid with both x and y dimensions varying along z.
19
20
\image html g3d_trd2.png
21
It has 8 parameters:
22
23
- name: name of the shape
24
- title: shape's title
25
- material: (see TMaterial)
26
- dx1: half-length along x at the z surface positioned at -DZ
27
- dx2: half-length along x at the z surface positioned at +DZ
28
- dy1: half-length along y at the z surface positioned at -DZ
29
- dy2: half-length along y at the z surface positioned at +DZ
30
- dz: half-length along the z-axis
31
*/
32
33
////////////////////////////////////////////////////////////////////////////////
34
/// TRD2 shape default constructor
35
36
TTRD2::TTRD2
()
37
{
38
fDx2
= 0.;
39
fDy2
= 0.;
40
}
41
42
////////////////////////////////////////////////////////////////////////////////
43
/// TRD2 shape normal constructor
44
45
TTRD2::TTRD2
(
const
char
*
name
,
const
char
*title,
const
char
*material,
Float_t
dx1
,
Float_t
dx2
,
Float_t
dy1
,
46
Float_t
dy2
,
Float_t
dz
) :
TBRIK
(
name
, title,material,
dx1
,
dy1
,
dz
)
47
{
48
fDx2
=
dx2
;
49
fDy2
=
dy2
;
50
}
51
52
////////////////////////////////////////////////////////////////////////////////
53
/// TRD2 shape default destructor
54
55
TTRD2::~TTRD2
()
56
{
57
}
58
59
////////////////////////////////////////////////////////////////////////////////
60
/// Create TRD2 points
61
62
void
TTRD2::SetPoints
(
Double_t
*
points
)
const
63
{
64
Float_t
dx1
,
dx2
,
dy1
,
dy2
,
dz
;
65
66
dx1
=
TBRIK::fDx
;
67
dx2
=
fDx2
;
68
dy1
=
TBRIK::fDy
;
69
dy2
=
fDy2
;
70
dz
=
TBRIK::fDz
;
71
72
if
(
points
) {
73
points
[ 0] = -
dx1
;
points
[ 1] = -
dy1
;
points
[ 2] = -
dz
;
74
points
[ 3] = -
dx1
;
points
[ 4] =
dy1
;
points
[ 5] = -
dz
;
75
points
[ 6] =
dx1
;
points
[ 7] =
dy1
;
points
[ 8] = -
dz
;
76
points
[ 9] =
dx1
;
points
[10] = -
dy1
;
points
[11] = -
dz
;
77
points
[12] = -
dx2
;
points
[13] = -
dy2
;
points
[14] =
dz
;
78
points
[15] = -
dx2
;
points
[16] =
dy2
;
points
[17] =
dz
;
79
points
[18] =
dx2
;
points
[19] =
dy2
;
points
[20] =
dz
;
80
points
[21] =
dx2
;
points
[22] = -
dy2
;
points
[23] =
dz
;
81
}
82
}
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:360
points
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
Definition
TGWin32VirtualXProxy.cxx:148
name
char name[80]
Definition
TGX11.cxx:145
TNode.h
TTRD2.h
ROOT::Detail::TRangeCast
Definition
TCollection.h:313
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
TTRD2::TTRD2
TTRD2()
TRD2 shape default constructor.
Definition
TTRD2.cxx:36
TTRD2::fDx2
Float_t fDx2
Definition
TTRD2.h:31
TTRD2::SetPoints
void SetPoints(Double_t *points) const override
Create TRD2 points.
Definition
TTRD2.cxx:62
TTRD2::fDy2
Float_t fDy2
Definition
TTRD2.h:32
TTRD2::~TTRD2
~TTRD2() override
TRD2 shape default destructor.
Definition
TTRD2.cxx:55
double
float
graf3d
g3d
src
TTRD2.cxx
ROOTv6-40 - Reference Guide Generated on Thu May 14 2026 04:32:34 (GVA Time) using Doxygen 1.10.0