Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -6,25 +6,27 @@
|
||||
|
||||
#include "vec3"
|
||||
#include "../S_STRING"
|
||||
#include <cmath>
|
||||
|
||||
namespace tools {
|
||||
|
||||
class vec3d : public vec3<double> {
|
||||
typedef vec3<double> parent;
|
||||
public:
|
||||
TOOLS_SCLASS(tools::vec3d) //for stype()
|
||||
public:
|
||||
vec3d():vec3<double>(){}
|
||||
vec3d(const double a_vec[3]):vec3<double>(a_vec){}
|
||||
vec3d(double a0,double a1,double a2):vec3<double>(a0,a1,a2){}
|
||||
vec3d():parent(){}
|
||||
vec3d(const double a_vec[3]):parent(a_vec){}
|
||||
vec3d(double a0,double a1,double a2):parent(a0,a1,a2){}
|
||||
virtual ~vec3d() {}
|
||||
public:
|
||||
vec3d(const vec3d& a_from):vec3<double>(a_from){}
|
||||
vec3d(const vec3d& a_from):parent(a_from){}
|
||||
vec3d& operator=(const vec3d& a_from){
|
||||
vec3<double>::operator=(a_from);
|
||||
parent::operator=(a_from);
|
||||
return *this;
|
||||
}
|
||||
|
||||
vec3d(const vec3<double>& a_from):vec3<double>(a_from){}
|
||||
vec3d(const parent& a_from):parent(a_from){}
|
||||
|
||||
public: //operators
|
||||
vec3d operator*(double a_v) const {
|
||||
@@ -63,6 +65,9 @@ public: //operators
|
||||
vec3d operator-() const {
|
||||
return vec3d(-m_data[0],-m_data[1],-m_data[2]);
|
||||
}
|
||||
public:
|
||||
double length() const {return parent::length(::sqrt);}
|
||||
double normalize() {return parent::normalize(::sqrt);}
|
||||
|
||||
private:static void check_instantiation() {vec3d v(0,0,0);v.set_value(1,1,1);}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user