Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Functions
HepGeom Namespace Reference

Data Structures

class  BasicVector3D
 
class  Normal3D
 
class  Normal3D< double >
 
class  Normal3D< float >
 
class  Plane3D
 
class  Point3D
 
class  Point3D< double >
 
class  Point3D< float >
 
class  Reflect3D
 
class  ReflectX3D
 
class  ReflectY3D
 
class  ReflectZ3D
 
class  Rotate3D
 
class  RotateX3D
 
class  RotateY3D
 
class  RotateZ3D
 
class  Scale3D
 
class  ScaleX3D
 
class  ScaleY3D
 
class  ScaleZ3D
 
class  Transform3D
 
class  Translate3D
 
class  TranslateX3D
 
class  TranslateY3D
 
class  TranslateZ3D
 
class  Vector3D
 
class  Vector3D< double >
 
class  Vector3D< float >
 

Function Documentation

Point3D<float> HepGeom::operator* ( const Transform3D &  m,
const Point3D< float > &  v 
)
related

Definition at line 21 of file Point3D.cc.

References HepGeom::Transform3D::dx(), HepGeom::Transform3D::dy(), HepGeom::Transform3D::dz(), HepGeom::BasicVector3D< T >::x(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::BasicVector3D< T >::y(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::BasicVector3D< T >::z(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().

21  {
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  }
Vector3D<float> HepGeom::operator* ( const Transform3D &  m,
const Vector3D< float > &  v 
)
related

Definition at line 21 of file Vector3D.cc.

References HepGeom::BasicVector3D< T >::x(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::BasicVector3D< T >::y(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::BasicVector3D< T >::z(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().

21  {
22  double vx = v.x(), vy = v.y(), vz = v.z();
23  return Vector3D<float>
24  (m.xx()*vx + m.xy()*vy + m.xz()*vz,
25  m.yx()*vx + m.yy()*vy + m.yz()*vz,
26  m.zx()*vx + m.zy()*vy + m.zz()*vz);
27  }
Normal3D<float> HepGeom::operator* ( const Transform3D &  m,
const Normal3D< float > &  v 
)
related

Definition at line 24 of file Normal3D.cc.

References HepGeom::BasicVector3D< T >::x(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::BasicVector3D< T >::y(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::BasicVector3D< T >::z(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().

24  {
25  double vx = v.x(), vy = v.y(), vz = v.z();
26  double xx = m.xx(), xy = m.xy(), xz = m.xz();
27  double yx = m.yx(), yy = m.yy(), yz = m.yz();
28  double zx = m.zx(), zy = m.zy(), zz = m.zz();
29  return Normal3D<float>
30  ((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
31  (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
32  (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
33  }
Point3D<double> HepGeom::operator* ( const Transform3D &  m,
const Point3D< double > &  v 
)
related

Definition at line 41 of file Point3D.cc.

References HepGeom::Transform3D::dx(), HepGeom::Transform3D::dy(), HepGeom::Transform3D::dz(), HepGeom::BasicVector3D< T >::x(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::BasicVector3D< T >::y(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::BasicVector3D< T >::z(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().

41  {
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  }
Vector3D<double> HepGeom::operator* ( const Transform3D &  m,
const Vector3D< double > &  v 
)
related

Definition at line 41 of file Vector3D.cc.

References HepGeom::BasicVector3D< T >::x(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::BasicVector3D< T >::y(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::BasicVector3D< T >::z(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().

41  {
42  double vx = v.x(), vy = v.y(), vz = v.z();
43  return Vector3D<double>
44  (m.xx()*vx + m.xy()*vy + m.xz()*vz,
45  m.yx()*vx + m.yy()*vy + m.yz()*vz,
46  m.zx()*vx + m.zy()*vy + m.zz()*vz);
47  }
Normal3D<double> HepGeom::operator* ( const Transform3D &  m,
const Normal3D< double > &  v 
)
related

Definition at line 50 of file Normal3D.cc.

References HepGeom::BasicVector3D< T >::x(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::BasicVector3D< T >::y(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::BasicVector3D< T >::z(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().

50  {
51  double vx = v.x(), vy = v.y(), vz = v.z();
52  double xx = m.xx(), xy = m.xy(), xz = m.xz();
53  double yx = m.yx(), yy = m.yy(), yz = m.yz();
54  double zx = m.zx(), zy = m.zy(), zz = m.zz();
55  return Normal3D<double>
56  ((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
57  (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
58  (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
59  }
std::ostream& HepGeom::operator<< ( std::ostream &  os,
const Plane3D< float > &  p 
)
related

Definition at line 22 of file Plane3D.cc.

22  {
23  return os
24  << '(' << p.a() << ',' << p.b() << ',' << p.c() << ',' << p.d() << ')';
25  }
const char * p
Definition: xmltok.h:285
std::ostream& HepGeom::operator<< ( std::ostream &  os,
const Plane3D< double > &  p 
)
related

Definition at line 29 of file Plane3D.cc.

29  {
30  return os
31  << '(' << p.a() << ',' << p.b() << ',' << p.c() << ',' << p.d() << ')';
32  }
const char * p
Definition: xmltok.h:285
std::ostream& HepGeom::operator<< ( std::ostream &  os,
const BasicVector3D< float > &  a 
)
related

Definition at line 107 of file BasicVector3D.cc.

References test::a.

108  {
109  return os << "(" << a.x() << "," << a.y() << "," << a.z() << ")";
110  }
std::ostream& HepGeom::operator<< ( std::ostream &  os,
const BasicVector3D< double > &  a 
)
related

Definition at line 263 of file BasicVector3D.cc.

References test::a.

264  {
265  return os << "(" << a.x() << "," << a.y() << "," << a.z() << ")";
266  }
std::istream& HepGeom::operator>> ( std::istream &  is,
BasicVector3D< float > &  a 
)
related

Definition at line 114 of file BasicVector3D.cc.

References test::c, HepGeom::BasicVector3D< T >::setX(), HepGeom::BasicVector3D< T >::setY(), HepGeom::BasicVector3D< T >::setZ(), test::x, and z.

115  {
116  // Required format is ( a, b, c ) that is, three numbers, preceded by
117  // (, followed by ), and separated by commas. The three numbers are
118  // taken as x, y, z.
119 
120  float x, y, z;
121  char c;
122 
123  is >> std::ws >> c;
124  // ws is defined to invoke eatwhite(istream & )
125  // see (Stroustrup gray book) page 333 and 345.
126  if (is.fail() || c != '(' ) {
127  std::cerr
128  << "Could not find required opening parenthesis "
129  << "in input of a BasicVector3D<float>"
130  << std::endl;
131  return is;
132  }
133 
134  is >> x >> std::ws >> c;
135  if (is.fail() || c != ',' ) {
136  std::cerr
137  << "Could not find x value and required trailing comma "
138  << "in input of a BasicVector3D<float>"
139  << std::endl;
140  return is;
141  }
142 
143  is >> y >> std::ws >> c;
144  if (is.fail() || c != ',' ) {
145  std::cerr
146  << "Could not find y value and required trailing comma "
147  << "in input of a BasicVector3D<float>"
148  << std::endl;
149  return is;
150  }
151 
152  is >> z >> std::ws >> c;
153  if (is.fail() || c != ')' ) {
154  std::cerr
155  << "Could not find z value and required close parenthesis "
156  << "in input of a BasicVector3D<float>"
157  << std::endl;
158  return is;
159  }
160 
161  a.setX(x);
162  a.setY(y);
163  a.setZ(z);
164  return is;
165  }
G4double z
Definition: TRTMaterials.hh:39
std::istream& HepGeom::operator>> ( std::istream &  is,
BasicVector3D< double > &  a 
)
related

Definition at line 270 of file BasicVector3D.cc.

References test::c, HepGeom::BasicVector3D< T >::setX(), HepGeom::BasicVector3D< T >::setY(), HepGeom::BasicVector3D< T >::setZ(), test::x, and z.

271  {
272  // Required format is ( a, b, c ) that is, three numbers, preceded by
273  // (, followed by ), and separated by commas. The three numbers are
274  // taken as x, y, z.
275 
276  double x, y, z;
277  char c;
278 
279  is >> std::ws >> c;
280  // ws is defined to invoke eatwhite(istream & )
281  // see (Stroustrup gray book) page 333 and 345.
282  if (is.fail() || c != '(' ) {
283  std::cerr
284  << "Could not find required opening parenthesis "
285  << "in input of a BasicVector3D<double>"
286  << std::endl;
287  return is;
288  }
289 
290  is >> x >> std::ws >> c;
291  if (is.fail() || c != ',' ) {
292  std::cerr
293  << "Could not find x value and required trailing comma "
294  << "in input of a BasicVector3D<double>"
295  << std::endl;
296  return is;
297  }
298 
299  is >> y >> std::ws >> c;
300  if (is.fail() || c != ',' ) {
301  std::cerr
302  << "Could not find y value and required trailing comma "
303  << "in input of a BasicVector3D<double>"
304  << std::endl;
305  return is;
306  }
307 
308  is >> z >> std::ws >> c;
309  if (is.fail() || c != ')' ) {
310  std::cerr
311  << "Could not find z value and required close parenthesis "
312  << "in input of a BasicVector3D<double>"
313  << std::endl;
314  return is;
315  }
316 
317  a.setX(x);
318  a.setY(y);
319  a.setZ(z);
320  return is;
321  }
G4double z
Definition: TRTMaterials.hh:39