Geant4-11
Vector3D.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// ---------------------------------------------------------------------------
3
6
7namespace HepGeom {
8 //--------------------------------------------------------------------------
9 Vector3D<float> &
11 double vx = x(), vy = y(), vz = z();
12 set(m.xx()*vx + m.xy()*vy + m.xz()*vz,
13 m.yx()*vx + m.yy()*vy + m.yz()*vz,
14 m.zx()*vx + m.zy()*vy + m.zz()*vz);
15 return *this;
16 }
17
18 //--------------------------------------------------------------------------
20 operator*(const Transform3D & m, const Vector3D<float> & v) {
21 double vx = v.x(), vy = v.y(), vz = v.z();
22 return Vector3D<float>
23 (m.xx()*vx + m.xy()*vy + m.xz()*vz,
24 m.yx()*vx + m.yy()*vy + m.yz()*vz,
25 m.zx()*vx + m.zy()*vy + m.zz()*vz);
26 }
27
28 //--------------------------------------------------------------------------
31 double vx = x(), vy = y(), vz = z();
32 set(m.xx()*vx + m.xy()*vy + m.xz()*vz,
33 m.yx()*vx + m.yy()*vy + m.yz()*vz,
34 m.zx()*vx + m.zy()*vy + m.zz()*vz);
35 return *this;
36 }
37
38 //--------------------------------------------------------------------------
41 double vx = v.x(), vy = v.y(), vz = v.z();
42 return Vector3D<double>
43 (m.xx()*vx + m.xy()*vy + m.xz()*vz,
44 m.yx()*vx + m.yy()*vy + m.yz()*vz,
45 m.zx()*vx + m.zy()*vy + m.zz()*vz);
46 }
47} /* namespace HepGeom */
static constexpr double m
Definition: G4SIunits.hh:109
void set(T x1, T y1, T z1)
G4bool transform(G4String &input, const G4String &type)
Normal3D< float > operator*(const Transform3D &m, const Normal3D< float > &v)
Definition: Normal3D.cc:23