CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

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"
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 
66 
69  ~Normal3D() {}
70 
74  set(v.x(),v.y(),v.z()); return *this;
75  }
76 
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 
125 
129 
133 
137 
144  : BasicVector3D<double>(v.x(),v.y(),v.z()) {}
145 
151  operator CLHEP::Hep3Vector () const { return CLHEP::Hep3Vector(x(),y(),z()); }
152 
156  set(v.x(),v.y(),v.z()); return *this;
157  }
158 
162  set(v.x(),v.y(),v.z()); return *this;
163  }
164 
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 */
double
#define double(obj)
Definition: excDblThrow.cc:32
HepGeom::Normal3D< double >::operator=
Normal3D< double > & operator=(const BasicVector3D< float > &v)
Definition: Geometry/Normal3D.h:161
a
@ a
Definition: testCategories.cc:125
HepGeom::BasicVector3D
Definition: CLHEP/Geometry/BasicVector3D.h:28
HepGeom::BasicVector3D::y
T y() const
Definition: CLHEP/Geometry/BasicVector3D.h:145
HepGeom::Normal3D< double >::Normal3D
Normal3D(const float *a)
Definition: Geometry/Normal3D.h:114
HepGeom::Normal3D< double >::operator=
Normal3D< double > & operator=(const Normal3D< double > &v)
Definition: Geometry/Normal3D.h:155
HepGeom::Normal3D< float >::Normal3D
Normal3D(const BasicVector3D< float > &v)
Definition: Geometry/Normal3D.h:65
HepGeom::Normal3D< double >::operator=
Normal3D< double > & operator=(const BasicVector3D< double > &v)
Definition: Geometry/Normal3D.h:167
BasicVector3D.h
HepGeom::BasicVector3D::z
T z() const
Definition: CLHEP/Geometry/BasicVector3D.h:148
HepGeom::Normal3D< float >::operator=
Normal3D< float > & operator=(const BasicVector3D< float > &v)
Definition: Geometry/Normal3D.h:79
HepGeom::Normal3D< float >::Normal3D
Normal3D(float x1, float y1, float z1)
Definition: Geometry/Normal3D.h:52
HepGeom::Normal3D< double >::~Normal3D
~Normal3D()
Definition: Geometry/Normal3D.h:136
HepGeom::Normal3D< double >::Normal3D
Normal3D(const Normal3D< double > &v)
Definition: Geometry/Normal3D.h:124
CLHEP::detail::n
n
Definition: Ranlux64Engine.cc:85
v
they are gone ZOOM Features Discontinued The following features of the ZOOM package were felt to be extreme overkill These have been after checking that no existing user code was utilizing as in SpaceVector v
Definition: keyMergeIssues.doc:324
HepGeom::Normal3D< float >::~Normal3D
~Normal3D()
Definition: Geometry/Normal3D.h:69
HepGeom::Normal3D< double >::Normal3D
Normal3D(const double *a)
Definition: Geometry/Normal3D.h:119
Hep3Vector
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a Hep3Vector(for example) means. We are not forming SpaceVector as an class derived from Hep3Vector and enhancing it in that way. Another rule imposed by the agreement is to avoid using the Exceptions package(even though that will later go into CLHEP for other uses). A desirable goal is to avoid cluttering the interface and enlarging the code linked in when ordinary CLHEP Vector functionallity is used. To this end
HepGeom::Transform3D
Definition: CLHEP/Geometry/Transform3D.h:172
HepGeom::Normal3D< double >::Normal3D
Normal3D()
Definition: Geometry/Normal3D.h:106
CLHEP::Hep3Vector
Definition: Geometry/CLHEP/Vector/ThreeVector.h:41
HepGeom::BasicVector3D::set
void set(T x1, T y1, T z1)
Definition: CLHEP/Geometry/BasicVector3D.h:162
HepGeom::Normal3D< float >::Normal3D
Normal3D(const float *a)
Definition: Geometry/Normal3D.h:56
HepGeom::Normal3D< double >::Normal3D
Normal3D(const BasicVector3D< float > &v)
Definition: Geometry/Normal3D.h:128
HepGeom
Definition: CLHEP/Geometry/BasicVector3D.h:19
HepGeom::Normal3D< float >::operator=
Normal3D< float > & operator=(const Normal3D< float > &v)
Definition: Geometry/Normal3D.h:73
HepGeom::Normal3D< double >::Normal3D
Normal3D(const BasicVector3D< double > &v)
Definition: Geometry/Normal3D.h:132
defs.h
HepGeom::BasicVector3D::x
T x() const
Definition: CLHEP/Geometry/BasicVector3D.h:142
HepGeom::Normal3D< double >::Normal3D
Normal3D(const CLHEP::Hep3Vector &v)
Definition: Geometry/Normal3D.h:143
HepGeom::Normal3D< float >::Normal3D
Normal3D(const Normal3D< float > &v)
Definition: Geometry/Normal3D.h:61
HepGeom::Normal3D< double >::Normal3D
Normal3D(double x1, double y1, double z1)
Definition: Geometry/Normal3D.h:110
HepGeom::Normal3D< double >
Definition: CLHEP/Geometry/Normal3D.h:102
HepGeom::Normal3D< float >
Definition: CLHEP/Geometry/Normal3D.h:44
HepGeom::Normal3D< float >::Normal3D
Normal3D()
Definition: Geometry/Normal3D.h:48
HepGeom::operator*
Normal3D< float > operator*(const Transform3D &m, const Normal3D< float > &v)
Definition: Normal3D.cc:25