CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Point3D.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: Point3D.cc,v 1.3 2003/08/13 20:00:11 garren Exp $
3// ---------------------------------------------------------------------------
4
5#include "CLHEP/Geometry/defs.h"
6#include "CLHEP/Geometry/Point3D.h"
7#include "CLHEP/Geometry/Transform3D.h"
8
9namespace HepGeom {
10 //--------------------------------------------------------------------------
11 Point3D<float> &
13 double vx = x(), vy = y(), vz = z();
14 set(m.xx()*vx + m.xy()*vy + m.xz()*vz + m.dx(),
15 m.yx()*vx + m.yy()*vy + m.yz()*vz + m.dy(),
16 m.zx()*vx + m.zy()*vy + m.zz()*vz + m.dz());
17 return *this;
18 }
19
20 //--------------------------------------------------------------------------
22 operator*(const Transform3D & m, const Point3D<float> & v) {
23 double vx = v.x(), vy = v.y(), vz = v.z();
24 return Point3D<float>
25 (m.xx()*vx + m.xy()*vy + m.xz()*vz + m.dx(),
26 m.yx()*vx + m.yy()*vy + m.yz()*vz + m.dy(),
27 m.zx()*vx + m.zy()*vy + m.zz()*vz + m.dz());
28 }
29
30 //--------------------------------------------------------------------------
33 double vx = x(), vy = y(), vz = z();
34 set(m.xx()*vx + m.xy()*vy + m.xz()*vz + m.dx(),
35 m.yx()*vx + m.yy()*vy + m.yz()*vz + m.dy(),
36 m.zx()*vx + m.zy()*vy + m.zz()*vz + m.dz());
37 return *this;
38 }
39
40 //--------------------------------------------------------------------------
42 operator*(const Transform3D & m, const Point3D<double> & v) {
43 double vx = v.x(), vy = v.y(), vz = v.z();
44 return Point3D<double>
45 (m.xx()*vx + m.xy()*vy + m.xz()*vz + m.dx(),
46 m.yx()*vx + m.yy()*vy + m.yz()*vz + m.dy(),
47 m.zx()*vx + m.zy()*vy + m.zz()*vz + m.dz());
48 }
49} /* namespace HepGeom */
double dy() const
Definition: Transform3D.h:289
double zz() const
Definition: Transform3D.h:283
double yz() const
Definition: Transform3D.h:274
double dz() const
Definition: Transform3D.h:292
double dx() const
Definition: Transform3D.h:286
double xy() const
Definition: Transform3D.h:262
double zx() const
Definition: Transform3D.h:277
double yx() const
Definition: Transform3D.h:268
double zy() const
Definition: Transform3D.h:280
double xx() const
Definition: Transform3D.h:259
double yy() const
Definition: Transform3D.h:271
double xz() const
Definition: Transform3D.h:265
Normal3D< float > operator*(const Transform3D &m, const Normal3D< float > &v)
Definition: Normal3D.cc:25