CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
Geometry
src
Vector3D.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id: Vector3D.cc,v 1.3 2003/08/13 20:00:11 garren Exp $
3
// ---------------------------------------------------------------------------
4
5
#include "
CLHEP/Geometry/defs.h
"
6
#include "
CLHEP/Geometry/Vector3D.h
"
7
#include "
CLHEP/Geometry/Transform3D.h
"
8
9
namespace
HepGeom
{
10
//--------------------------------------------------------------------------
11
Vector3D<float> &
12
Vector3D<float>::transform
(
const
Transform3D
& m) {
13
double
vx =
x
(), vy =
y
(), vz =
z
();
14
set
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz,
15
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz,
16
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz);
17
return
*
this
;
18
}
19
20
//--------------------------------------------------------------------------
21
Vector3D<float>
22
operator*
(
const
Transform3D
& m,
const
Vector3D<float>
& v) {
23
double
vx = v.
x
(), vy = v.
y
(), vz = v.
z
();
24
return
Vector3D<float>
25
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz,
26
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz,
27
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz);
28
}
29
30
//--------------------------------------------------------------------------
31
Vector3D<double> &
32
Vector3D<double>::transform
(
const
Transform3D
& m) {
33
double
vx =
x
(), vy =
y
(), vz =
z
();
34
set
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz,
35
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz,
36
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz);
37
return
*
this
;
38
}
39
40
//--------------------------------------------------------------------------
41
Vector3D<double>
42
operator*
(
const
Transform3D
& m,
const
Vector3D<double>
& v) {
43
double
vx = v.
x
(), vy = v.
y
(), vz = v.
z
();
44
return
Vector3D<double>
45
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz,
46
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz,
47
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz);
48
}
49
}
/* namespace HepGeom */
HepGeom::Transform3D
Definition:
CLHEP/Geometry/Transform3D.h:172
HepGeom::Transform3D::xy
double xy() const
Definition:
CLHEP/Geometry/Transform3D.h:256
HepGeom::Transform3D::yz
double yz() const
Definition:
CLHEP/Geometry/Transform3D.h:268
HepGeom::Vector3D< double >
Definition:
CLHEP/Geometry/Vector3D.h:102
Transform3D.h
HepGeom::Transform3D::zy
double zy() const
Definition:
CLHEP/Geometry/Transform3D.h:274
defs.h
HepGeom::BasicVector3D::x
T x() const
Definition:
CLHEP/Geometry/BasicVector3D.h:142
HepGeom::Transform3D::yy
double yy() const
Definition:
CLHEP/Geometry/Transform3D.h:265
HepGeom::Transform3D::zz
double zz() const
Definition:
CLHEP/Geometry/Transform3D.h:277
HepGeom::Transform3D::yx
double yx() const
Definition:
CLHEP/Geometry/Transform3D.h:262
HepGeom::Transform3D::xx
double xx() const
Definition:
CLHEP/Geometry/Transform3D.h:253
HepGeom::BasicVector3D::y
T y() const
Definition:
CLHEP/Geometry/BasicVector3D.h:145
HepGeom::Vector3D< float >
Definition:
CLHEP/Geometry/Vector3D.h:44
HepGeom::Transform3D::xz
double xz() const
Definition:
CLHEP/Geometry/Transform3D.h:259
HepGeom
Definition:
CLHEP/Geometry/BasicVector3D.h:19
HepGeom::BasicVector3D::set
void set(T x1, T y1, T z1)
Definition:
CLHEP/Geometry/BasicVector3D.h:162
HepGeom::BasicVector3D::z
T z() const
Definition:
CLHEP/Geometry/BasicVector3D.h:148
HepGeom::Vector3D
Definition:
CLHEP/Geometry/Transform3D.h:129
HepGeom::operator*
Normal3D< float > operator*(const Transform3D &m, const Normal3D< float > &v)
Definition:
Normal3D.cc:25
HepGeom::Transform3D::zx
double zx() const
Definition:
CLHEP/Geometry/Transform3D.h:271
Vector3D.h
Generated by
1.8.9.1