Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
source
externals
clhep
src
Point3D.cc
이 파일의 문서화 페이지로 가기
1
// -*- C++ -*-
2
// $Id:$
3
// ---------------------------------------------------------------------------
4
5
#include "
CLHEP/Geometry/Point3D.h
"
6
#include "
CLHEP/Geometry/Transform3D.h
"
7
8
namespace
HepGeom {
9
//--------------------------------------------------------------------------
10
Point3D<float> &
11
Point3D<float>::transform
(
const
Transform3D
&
m
) {
12
double
vx =
x
(), vy =
y
(), vz =
z
();
13
set
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz + m.
dx
(),
14
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz + m.
dy
(),
15
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz + m.
dz
());
16
return
*
this
;
17
}
18
19
//--------------------------------------------------------------------------
20
Point3D<float>
21
operator*
(
const
Transform3D
&
m
,
const
Point3D<float>
& v) {
22
double
vx = v.
x
(), vy = v.
y
(), vz = v.
z
();
23
return
Point3D<float>
24
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz + m.
dx
(),
25
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz + m.
dy
(),
26
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz + m.
dz
());
27
}
28
29
//--------------------------------------------------------------------------
30
Point3D<double> &
31
Point3D<double>::transform
(
const
Transform3D
&
m
) {
32
double
vx =
x
(), vy =
y
(), vz =
z
();
33
set
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz + m.
dx
(),
34
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz + m.
dy
(),
35
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz + m.
dz
());
36
return
*
this
;
37
}
38
39
//--------------------------------------------------------------------------
40
Point3D<double>
41
operator*
(
const
Transform3D
&
m
,
const
Point3D<double>
& v) {
42
double
vx = v.
x
(), vy = v.
y
(), vz = v.
z
();
43
return
Point3D<double>
44
(m.
xx
()*vx + m.
xy
()*vy + m.
xz
()*vz + m.
dx
(),
45
m.
yx
()*vx + m.
yy
()*vy + m.
yz
()*vz + m.
dy
(),
46
m.
zx
()*vx + m.
zy
()*vy + m.
zz
()*vz + m.
dz
());
47
}
48
}
/* namespace HepGeom */
HepGeom::Transform3D
Definition:
Transform3D.h:171
HepGeom::Transform3D::xy
double xy() const
Definition:
Transform3D.h:255
HepGeom::Transform3D::yz
double yz() const
Definition:
Transform3D.h:267
HepGeom::Transform3D::dx
double dx() const
Definition:
Transform3D.h:279
HepGeom::Transform3D::zy
double zy() const
Definition:
Transform3D.h:273
Point3D.h
HepGeom::BasicVector3D::x
T x() const
Definition:
BasicVector3D.h:141
HepGeom::Transform3D::yy
double yy() const
Definition:
Transform3D.h:264
m
static constexpr double m
Definition:
G4SIunits.hh:129
HepGeom::Transform3D::zz
double zz() const
Definition:
Transform3D.h:276
HepGeom::Transform3D::yx
double yx() const
Definition:
Transform3D.h:261
HepGeom::Transform3D::xx
double xx() const
Definition:
Transform3D.h:252
HepGeom::BasicVector3D::y
T y() const
Definition:
BasicVector3D.h:144
HepGeom::Transform3D::dz
double dz() const
Definition:
Transform3D.h:285
Transform3D.h
HepGeom::Transform3D::xz
double xz() const
Definition:
Transform3D.h:258
HepGeom::BasicVector3D::set
void set(T x1, T y1, T z1)
Definition:
BasicVector3D.h:161
HepGeom::BasicVector3D::z
T z() const
Definition:
BasicVector3D.h:147
HepGeom::Transform3D::dy
double dy() const
Definition:
Transform3D.h:282
HepGeom::operator*
Normal3D< float > operator*(const Transform3D &m, const Normal3D< float > &v)
Definition:
Normal3D.cc:24
HepGeom::Point3D
Definition:
Point3D.h:34
HepGeom::Transform3D::zx
double zx() const
Definition:
Transform3D.h:270
HepGeom::Point3D< float >
Definition:
Point3D.h:43
HepGeom::Point3D< double >
Definition:
Point3D.h:122
다음에 의해 생성됨 :
1.8.5