Geant4
11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
Point3D.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// ---------------------------------------------------------------------------
3
4
#include "
CLHEP/Geometry/Point3D.h
"
5
#include "
CLHEP/Geometry/Transform3D.h
"
6
7
namespace
HepGeom
{
8
//--------------------------------------------------------------------------
9
Point3D<float> &
10
Point3D<float>::transform
(
const
Transform3D
& m) {
11
double
vx = x(), vy = y(), vz = z();
12
set(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz + m.
dx
(),
13
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz + m.
dy
(),
14
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz + m.
dz
());
15
return
*
this
;
16
}
17
18
//--------------------------------------------------------------------------
19
Point3D<float>
20
operator*
(
const
Transform3D
& m,
const
Point3D<float>
& v) {
21
double
vx = v.
x
(), vy = v.
y
(), vz = v.
z
();
22
return
Point3D<float>
23
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz + m.
dx
(),
24
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz + m.
dy
(),
25
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz + m.
dz
());
26
}
27
28
//--------------------------------------------------------------------------
29
Point3D<double>
&
30
Point3D<double>::transform
(
const
Transform3D
& m) {
31
double
vx = x(), vy = y(), vz = z();
32
set(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz + m.
dx
(),
33
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz + m.
dy
(),
34
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz + m.
dz
());
35
return
*
this
;
36
}
37
38
//--------------------------------------------------------------------------
39
Point3D<double>
40
operator*
(
const
Transform3D
& m,
const
Point3D<double>
& v) {
41
double
vx = v.
x
(), vy = v.
y
(), vz = v.
z
();
42
return
Point3D<double>
43
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz + m.
dx
(),
44
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz + m.
dy
(),
45
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz + m.
dz
());
46
}
47
}
/* namespace HepGeom */
Point3D.h
Transform3D.h
HepGeom::BasicVector3D::x
T x() const
Definition:
BasicVector3D.h:147
HepGeom::BasicVector3D::y
T y() const
Definition:
BasicVector3D.h:150
HepGeom::BasicVector3D::z
T z() const
Definition:
BasicVector3D.h:153
HepGeom::Point3D
Definition:
Point3D.h:33
HepGeom::Transform3D
Definition:
Transform3D.h:170
HepGeom::Transform3D::dy
double dy() const
Definition:
Transform3D.h:287
HepGeom::Transform3D::zz
double zz() const
Definition:
Transform3D.h:281
HepGeom::Transform3D::yz
double yz() const
Definition:
Transform3D.h:272
HepGeom::Transform3D::dz
double dz() const
Definition:
Transform3D.h:290
HepGeom::Transform3D::dx
double dx() const
Definition:
Transform3D.h:284
HepGeom::Transform3D::xy
double xy() const
Definition:
Transform3D.h:260
HepGeom::Transform3D::zx
double zx() const
Definition:
Transform3D.h:275
HepGeom::Transform3D::yx
double yx() const
Definition:
Transform3D.h:266
HepGeom::Transform3D::zy
double zy() const
Definition:
Transform3D.h:278
HepGeom::Transform3D::xx
double xx() const
Definition:
Transform3D.h:257
HepGeom::Transform3D::yy
double yy() const
Definition:
Transform3D.h:269
HepGeom::Transform3D::xz
double xz() const
Definition:
Transform3D.h:263
HepGeom
Definition:
BasicVector3D.h:18
HepGeom::operator*
Normal3D< float > operator*(const Transform3D &m, const Normal3D< float > &v)
Definition:
Normal3D.cc:23
geant4-v11.1.1
source
externals
clhep
src
Point3D.cc
Generated by
1.9.6