Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Functions
UVector3.hh File Reference
#include <cmath>
#include <iostream>
#include <fstream>

Go to the source code of this file.

Data Structures

struct  UVector3
 

Functions

UVector3 operator+ (const UVector3 &, const UVector3 &)
 
UVector3 operator- (const UVector3 &, const UVector3 &)
 
double operator* (const UVector3 &, const UVector3 &)
 
UVector3 operator* (const UVector3 &, double a)
 
UVector3 operator/ (const UVector3 &, double a)
 
UVector3 operator* (double a, const UVector3 &)
 
std::ostream & operator<< (std::ostream &os, const UVector3 &v)
 

Function Documentation

double operator* ( const UVector3 ,
const UVector3  
)

Definition at line 160 of file UVector3.cc.

References UVector3::Dot().

161 {
162  return a.Dot(b);
163 }
UVector3 operator* ( const UVector3 ,
double  a 
)

Definition at line 144 of file UVector3.cc.

References UVector3::x, UVector3::y, and UVector3::z.

145 {
146  return UVector3(a * p.x, a * p.y, a * p.z);
147 }
const char * p
Definition: xmltok.h:285
UVector3 operator* ( double  a,
const UVector3  
)

Definition at line 155 of file UVector3.cc.

References UVector3::x, UVector3::y, and UVector3::z.

156 {
157  return UVector3(a * p.x, a * p.y, a * p.z);
158 }
const char * p
Definition: xmltok.h:285
UVector3 operator+ ( const UVector3 ,
const UVector3  
)

Definition at line 134 of file UVector3.cc.

References UVector3::x, UVector3::y, and UVector3::z.

135 {
136  return UVector3(a.x + b.x, a.y + b.y, a.z + b.z);
137 }
UVector3 operator- ( const UVector3 ,
const UVector3  
)

Definition at line 139 of file UVector3.cc.

References UVector3::x, UVector3::y, and UVector3::z.

140 {
141  return UVector3(a.x - b.x, a.y - b.y, a.z - b.z);
142 }
UVector3 operator/ ( const UVector3 ,
double  a 
)

Definition at line 149 of file UVector3.cc.

References test::a, UVector3::x, UVector3::y, and UVector3::z.

150 {
151  a = 1. / a;
152  return UVector3(a * p.x, a * p.y, a * p.z);
153 }
const char * p
Definition: xmltok.h:285
std::ostream& operator<< ( std::ostream &  os,
const UVector3 v 
)
inline

Definition at line 324 of file UVector3.hh.

References UVector3::x, UVector3::y, and UVector3::z.

325 {
326  return os << "(" << v.x << "," << v.y << "," << v.z << ")";
327 }
double x
Definition: UVector3.hh:136
double z
Definition: UVector3.hh:138
double y
Definition: UVector3.hh:137