CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
Geometry
Geometry
Geometry/Normal3D.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id: Normal3D.h,v 1.3 2003/10/23 21:29:50 garren Exp $
3
// ---------------------------------------------------------------------------
4
//
5
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
6
//
7
// History:
8
// 09.09.96 E.Chernyaev - initial version
9
// 12.06.01 E.Chernyaev - CLHEP-1.7: introduction of BasicVector3D to decouple
10
// the functionality from CLHEP::Hep3Vector
11
// 01.04.03 E.Chernyaev - CLHEP-1.9: template version
12
//
13
14
#ifndef HEP_NORMAL3D_H
15
#define HEP_NORMAL3D_H
16
17
#include <iosfwd>
18
#include "
CLHEP/Geometry/defs.h
"
19
#include "CLHEP/Vector/ThreeVector.h"
20
#include "
CLHEP/Geometry/BasicVector3D.h
"
21
22
namespace
HepGeom {
23
24
class
Transform3D;
25
34
template
<
class
T>
35
class
Normal3D :
public
BasicVector3D<T> {};
36
43
template
<>
44
class
Normal3D<float> :
public
BasicVector3D<float> {
45
public
:
48
Normal3D
() {}
49
52
Normal3D
(
float
x1,
float
y1,
float
z1) :
BasicVector3D
<float>(x1,y1,z1) {}
53
56
explicit
Normal3D
(
const
float
*
a
)
57
:
BasicVector3D
<float>(a[0],a[1],a[2]) {}
58
61
Normal3D
(
const
Normal3D<float>
& v) :
BasicVector3D
<float>(v) {}
62
65
Normal3D
(
const
BasicVector3D<float>
& v) :
BasicVector3D
<float>(v) {}
66
69
~Normal3D
() {}
70
73
Normal3D<float>
&
operator=
(
const
Normal3D<float>
& v) {
74
set
(v.
x
(),v.
y
(),v.
z
());
return
*
this
;
75
}
76
79
Normal3D<float>
&
operator=
(
const
BasicVector3D<float>
& v) {
80
set
(v.
x
(),v.
y
(),v.
z
());
return
*
this
;
81
}
82
85
Normal3D<float>
& transform(
const
Transform3D
& m);
86
};
87
92
Normal3D<float>
93
operator*
(
const
Transform3D & m,
const
Normal3D<float> &
n
);
94
101
template
<>
102
class
Normal3D<
double
> :
public
BasicVector3D<double> {
103
public
:
106
Normal3D
() {}
107
110
Normal3D
(
double
x1,
double
y1,
double
z1) :
BasicVector3D
<
double
>(x1,y1,z1) {}
111
114
explicit
Normal3D
(
const
float
*
a
)
115
:
BasicVector3D
<
double
>(a[0],a[1],a[2]) {}
116
119
explicit
Normal3D
(
const
double
*
a
)
120
:
BasicVector3D
<
double
>(a[0],a[1],a[2]) {}
121
124
Normal3D
(
const
Normal3D<double>
& v) :
BasicVector3D
<
double
>(v) {}
125
128
Normal3D
(
const
BasicVector3D<float>
& v) :
BasicVector3D
<
double
>(v) {}
129
132
Normal3D
(
const
BasicVector3D<double>
& v) :
BasicVector3D
<
double
>(v) {}
133
136
~Normal3D
() {}
137
143
Normal3D
(
const
CLHEP::Hep3Vector
& v)
144
:
BasicVector3D
<
double
>(v.
x
(),v.
y
(),v.
z
()) {}
145
151
operator
CLHEP::Hep3Vector
()
const
{
return
CLHEP::Hep3Vector
(
x
(),
y
(),
z
()); }
152
155
Normal3D<double>
&
operator=
(
const
Normal3D<double>
& v) {
156
set
(v.
x
(),v.
y
(),v.
z
());
return
*
this
;
157
}
158
161
Normal3D<double>
&
operator=
(
const
BasicVector3D<float>
& v) {
162
set
(v.
x
(),v.
y
(),v.
z
());
return
*
this
;
163
}
164
167
Normal3D<double>
&
operator=
(
const
BasicVector3D<double>
& v) {
168
set
(v.
x
(),v.
y
(),v.
z
());
return
*
this
;
169
}
170
173
Normal3D<double>
& transform(
const
Transform3D
& m);
174
};
175
180
Normal3D<double>
181
operator*
(
const
Transform3D & m,
const
Normal3D<double> &
n
);
182
183
}
/* namespace HepGeom */
184
185
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
186
// backwards compatibility will be enabled ONLY in CLHEP 1.9
187
typedef
HepGeom::Normal3D<double>
HepNormal3D;
188
#endif
189
190
#endif
/* HEP_NORMAL3D_H */
Generated on Sun Jun 17 2012 08:08:27 for CLHEP by
1.8.1.1