CLHEP
2.4.7.1
C++ Class Library for High Energy Physics
CLHEP
Geometry
Transform3D.icc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id: Transform3D.icc,v 1.1 2003/07/17 09:05:28 garren Exp $
3
// ---------------------------------------------------------------------------
4
5
#include "
CLHEP/Vector/ThreeVector.h
"
6
#include "
CLHEP/Vector/Rotation.h
"
7
#include "
CLHEP/Geometry/Point3D.h
"
8
#include "
CLHEP/Geometry/Vector3D.h
"
9
#include "
CLHEP/Geometry/Normal3D.h
"
10
11
namespace
HepGeom
{
12
13
// I N L I N E S F O R T R A N S F O R M A T I O N
14
15
inline
16
Transform3D::Transform3D_row::Transform3D_row
17
(
const
Transform3D
& r,
int
i) : rr(r), ii(i) {}
18
19
inline
20
double
Transform3D::Transform3D_row::operator[]
(
int
jj)
const
{
21
return
rr(ii,jj);
22
}
23
24
inline
25
const
Transform3D::Transform3D_row
Transform3D::operator[]
(
int
i)
const
{
26
return
Transform3D_row
(*
this
, i);
27
}
28
29
inline
30
Transform3D::Transform3D
(
const
CLHEP::HepRotation
& mt,
const
CLHEP::Hep3Vector
& v) {
31
xx_
= mt.
xx
();
xy_
= mt.
xy
();
xz_
= mt.
xz
();
32
yx_
= mt.
yx
();
yy_
= mt.
yy
();
yz_
= mt.
yz
();
33
zx_
= mt.
zx
();
zy_
= mt.
zy
();
zz_
= mt.
zz
();
34
dx_
= v.
x
();
dy_
= v.
y
();
dz_
= v.
z
();
35
}
36
37
inline
38
CLHEP::HepRotation
39
Transform3D::getRotation
()
const
{
40
CLHEP::HepRotation
mt;
41
return
mt.
rotateAxes
(
CLHEP::Hep3Vector
(
xx_
,
yx_
,
zx_
),
42
CLHEP::Hep3Vector
(
xy_
,
yy_
,
zy_
),
43
CLHEP::Hep3Vector
(
xz_
,
yz_
,
zz_
));
44
}
45
46
inline
47
CLHEP::Hep3Vector
48
Transform3D::getTranslation
()
const
{
49
return
CLHEP::Hep3Vector
(
dx_
,
dy_
,
dz_
);
50
}
51
52
// I N L I N E S F O R R O T A T I O N
53
54
inline
55
Rotate3D::Rotate3D
(
const
CLHEP::HepRotation
& mt) {
56
xx_
= mt.
xx
();
xy_
= mt.
xy
();
xz_
= mt.
xz
();
57
yx_
= mt.
yx
();
yy_
= mt.
yy
();
yz_
= mt.
yz
();
58
zx_
= mt.
zx
();
zy_
= mt.
zy
();
zz_
= mt.
zz
();
59
dx_
= 0;
dy_
= 0;
dz_
= 0;
60
}
61
62
inline
63
Rotate3D::Rotate3D
(
double
a,
const
Vector3D<double>
& v) {
64
*
this
=
65
Rotate3D
(a,
Point3D<double>
(0,0,0),
Point3D<double>
(v.
x
(),v.
y
(),v.
z
()));
66
}
67
68
inline
69
Rotate3D::Rotate3D
(
const
Point3D<double>
& fr1,
const
Point3D<double>
& fr2,
70
const
Point3D<double>
& to1,
const
Point3D<double>
& to2)
71
:
Transform3D
(
Point3D
<double>(0,0,0),fr1,fr2,
72
Point3D
<double>(0,0,0),to1,to2) {}
73
74
// I N L I N E S F O R T R A N S L A T I O N
75
76
inline
77
Translate3D::Translate3D
(
const
CLHEP::Hep3Vector
& v)
78
:
Transform3D
(1,0,0,v.x(), 0,1,0,v.y(), 0,0,1,v.z()) {}
79
80
// I N L I N E S F O R R E F L E C T I O N
81
82
inline
83
Reflect3D::Reflect3D
(
const
Normal3D<double>
& n,
const
Point3D<double>
& p) {
84
*
this
=
Reflect3D
(n.
x
(), n.
y
(), n.
z
(), -n*p);
85
}
86
87
}
/* namespace HepGeom */
Normal3D.h
Point3D.h
Rotation.h
ThreeVector.h
Vector3D.h
CLHEP::Hep3Vector
Definition
ThreeVector.h:36
CLHEP::Hep3Vector::z
double z() const
Definition
ThreeVector.icc:25
CLHEP::Hep3Vector::x
double x() const
Definition
ThreeVector.icc:23
CLHEP::Hep3Vector::y
double y() const
Definition
ThreeVector.icc:24
CLHEP::HepRotation
Definition
Rotation.h:44
CLHEP::HepRotation::zz
double zz() const
Definition
Rotation.icc:23
CLHEP::HepRotation::yz
double yz() const
Definition
Rotation.icc:20
CLHEP::HepRotation::rotateAxes
HepRotation & rotateAxes(const Hep3Vector &newX, const Hep3Vector &newY, const Hep3Vector &newZ)
CLHEP::HepRotation::zx
double zx() const
Definition
Rotation.icc:21
CLHEP::HepRotation::yx
double yx() const
Definition
Rotation.icc:18
CLHEP::HepRotation::zy
double zy() const
Definition
Rotation.icc:22
CLHEP::HepRotation::xx
double xx() const
Definition
Rotation.icc:15
CLHEP::HepRotation::yy
double yy() const
Definition
Rotation.icc:19
CLHEP::HepRotation::xz
double xz() const
Definition
Rotation.icc:17
CLHEP::HepRotation::xy
double xy() const
Definition
Rotation.icc:16
HepGeom::BasicVector3D::x
T x() const
Definition
BasicVector3D.h:149
HepGeom::BasicVector3D::y
T y() const
Definition
BasicVector3D.h:152
HepGeom::BasicVector3D::z
T z() const
Definition
BasicVector3D.h:155
HepGeom::Normal3D
Definition
Normal3D.h:35
HepGeom::Point3D
Definition
Point3D.h:35
HepGeom::Reflect3D::Reflect3D
Reflect3D()
Definition
Transform3D.h:630
HepGeom::Rotate3D::Rotate3D
Rotate3D()
Definition
Transform3D.h:376
HepGeom::Transform3D::Transform3D_row
Definition
Transform3D.h:201
HepGeom::Transform3D::Transform3D_row::operator[]
double operator[](int) const
Definition
Transform3D.icc:20
HepGeom::Transform3D::Transform3D_row::Transform3D_row
Transform3D_row(const Transform3D &, int)
Definition
Transform3D.icc:17
HepGeom::Transform3D::dy_
double dy_
Definition
Transform3D.h:175
HepGeom::Transform3D::operator[]
const Transform3D_row operator[](int) const
Definition
Transform3D.icc:25
HepGeom::Transform3D::xx_
double xx_
Definition
Transform3D.h:174
HepGeom::Transform3D::zy_
double zy_
Definition
Transform3D.h:176
HepGeom::Transform3D::dz_
double dz_
Definition
Transform3D.h:176
HepGeom::Transform3D::dx_
double dx_
Definition
Transform3D.h:174
HepGeom::Transform3D::Transform3D
Transform3D()
Definition
Transform3D.h:212
HepGeom::Transform3D::getRotation
CLHEP::HepRotation getRotation() const
Definition
Transform3D.icc:39
HepGeom::Transform3D::getTranslation
CLHEP::Hep3Vector getTranslation() const
Definition
Transform3D.icc:48
HepGeom::Transform3D::yx_
double yx_
Definition
Transform3D.h:175
HepGeom::Transform3D::xy_
double xy_
Definition
Transform3D.h:174
HepGeom::Transform3D::yz_
double yz_
Definition
Transform3D.h:175
HepGeom::Transform3D::zx_
double zx_
Definition
Transform3D.h:176
HepGeom::Transform3D::xz_
double xz_
Definition
Transform3D.h:174
HepGeom::Transform3D::Transform3D
Transform3D(double XX, double XY, double XZ, double DX, double YX, double YY, double YZ, double DY, double ZX, double ZY, double ZZ, double DZ)
Definition
Transform3D.h:179
HepGeom::Transform3D::yy_
double yy_
Definition
Transform3D.h:175
HepGeom::Transform3D::zz_
double zz_
Definition
Transform3D.h:176
HepGeom::Translate3D::Translate3D
Translate3D()
Definition
Transform3D.h:517
HepGeom::Vector3D
Definition
Vector3D.h:35
HepGeom
Definition
BasicVector3D.h:20
Generated by
1.14.0