5 #include "CLHEP/Geometry/Normal3D.h"
6 #include "CLHEP/Geometry/Transform3D.h"
11 Normal3D<float>::transform(
const Transform3D &
m) {
12 double vx = x(), vy = y(), vz =
z();
13 double xx = m.xx(), xy = m.xy(), xz = m.xz();
14 double yx = m.yx(), yy = m.yy(), yz = m.yz();
15 double zx = m.zx(), zy = m.zy(), zz = m.zz();
16 set((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
17 (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
18 (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
24 operator*(
const Transform3D & m,
const Normal3D<float> & v) {
25 double vx = v.x(), vy = v.y(), vz = v.z();
26 double xx = m.xx(), xy = m.xy(), xz = m.xz();
27 double yx = m.yx(), yy = m.yy(), yz = m.yz();
28 double zx = m.zx(), zy = m.zy(), zz = m.zz();
29 return Normal3D<float>
30 ((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
31 (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
32 (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
37 Normal3D<double>::transform(
const Transform3D & m) {
38 double vx = x(), vy = y(), vz =
z();
39 double xx = m.xx(), xy = m.xy(), xz = m.xz();
40 double yx = m.yx(), yy = m.yy(), yz = m.yz();
41 double zx = m.zx(), zy = m.zy(), zz = m.zz();
42 set((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
43 (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
44 (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
50 operator*(
const Transform3D & m,
const Normal3D<double> & v) {
51 double vx = v.x(), vy = v.y(), vz = v.z();
52 double xx = m.xx(), xy = m.xy(), xz = m.xz();
53 double yx = m.yx(), yy = m.yy(), yz = m.yz();
54 double zx = m.zx(), zy = m.zy(), zz = m.zz();
55 return Normal3D<double>
56 ((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
57 (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
58 (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
Normal3D< float > operator*(const Transform3D &m, const Normal3D< float > &v)