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

Normal3D.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: Normal3D.cc,v 1.3 2003/08/13 20:00:11 garren Exp $
3 // ---------------------------------------------------------------------------
4 
5 #include "CLHEP/Geometry/defs.h"
8 
9 namespace HepGeom {
10  //--------------------------------------------------------------------------
11  Normal3D<float> &
13  double vx = x(), vy = y(), vz = z();
14  double xx = m.xx(), xy = m.xy(), xz = m.xz();
15  double yx = m.yx(), yy = m.yy(), yz = m.yz();
16  double zx = m.zx(), zy = m.zy(), zz = m.zz();
17  set((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
18  (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
19  (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
20  return *this;
21  }
22 
23  //--------------------------------------------------------------------------
25  operator*(const Transform3D & m, const Normal3D<float> & v) {
26  double vx = v.x(), vy = v.y(), vz = v.z();
27  double xx = m.xx(), xy = m.xy(), xz = m.xz();
28  double yx = m.yx(), yy = m.yy(), yz = m.yz();
29  double zx = m.zx(), zy = m.zy(), zz = m.zz();
30  return Normal3D<float>
31  ((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
32  (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
33  (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
34  }
35 
36  //--------------------------------------------------------------------------
37  Normal3D<double> &
39  double vx = x(), vy = y(), vz = z();
40  double xx = m.xx(), xy = m.xy(), xz = m.xz();
41  double yx = m.yx(), yy = m.yy(), yz = m.yz();
42  double zx = m.zx(), zy = m.zy(), zz = m.zz();
43  set((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
44  (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
45  (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
46  return *this;
47  }
48 
49  //--------------------------------------------------------------------------
51  operator*(const Transform3D & m, const Normal3D<double> & v) {
52  double vx = v.x(), vy = v.y(), vz = v.z();
53  double xx = m.xx(), xy = m.xy(), xz = m.xz();
54  double yx = m.yx(), yy = m.yy(), yz = m.yz();
55  double zx = m.zx(), zy = m.zy(), zz = m.zz();
56  return Normal3D<double>
57  ((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
58  (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
59  (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
60  }
61 } /* namespace HepGeom */
Normal3D.h
HepGeom::BasicVector3D::y
T y() const
Definition: CLHEP/Geometry/BasicVector3D.h:145
HepGeom::BasicVector3D::z
T z() const
Definition: CLHEP/Geometry/BasicVector3D.h:148
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::Transform3D
Definition: CLHEP/Geometry/Transform3D.h:172
Transform3D.h
HepGeom::BasicVector3D::set
void set(T x1, T y1, T z1)
Definition: CLHEP/Geometry/BasicVector3D.h:162
HepGeom
Definition: CLHEP/Geometry/BasicVector3D.h:19
defs.h
HepGeom::BasicVector3D::x
T x() const
Definition: CLHEP/Geometry/BasicVector3D.h:142
HepGeom::Normal3D
Definition: CLHEP/Geometry/Normal3D.h:35
HepGeom::Normal3D< double >
Definition: CLHEP/Geometry/Normal3D.h:102
HepGeom::Normal3D< float >
Definition: CLHEP/Geometry/Normal3D.h:44
HepGeom::operator*
Normal3D< float > operator*(const Transform3D &m, const Normal3D< float > &v)
Definition: Normal3D.cc:25