Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 1 // Copyright (C) 2010, Guy Barrand. All rights reserved. 2 // See the file tools.license for terms. 2 // See the file tools.license for terms. 3 3 4 #ifndef tools_sg_sf_vec3f 4 #ifndef tools_sg_sf_vec3f 5 #define tools_sg_sf_vec3f 5 #define tools_sg_sf_vec3f 6 6 7 #include "sf_vec" 7 #include "sf_vec" 8 8 9 #include "../lina/vec3f" 9 #include "../lina/vec3f" 10 #include "../HEADER" 10 #include "../HEADER" 11 namespace tools { 11 namespace tools { 12 namespace sg { 12 namespace sg { 13 13 14 class sf_vec3f : public sf_vec<vec3f,float> { 14 class sf_vec3f : public sf_vec<vec3f,float> { 15 typedef sf_vec<vec3f,float> _parent; 15 typedef sf_vec<vec3f,float> _parent; 16 TOOLS_HEADER(sf_vec3f,tools::sg::sf_vec3f,_p 16 TOOLS_HEADER(sf_vec3f,tools::sg::sf_vec3f,_parent) 17 public: 17 public: 18 sf_vec3f():parent(){} 18 sf_vec3f():parent(){} 19 sf_vec3f(const vec3f& a_v):parent(a_v){} 19 sf_vec3f(const vec3f& a_v):parent(a_v){} 20 virtual ~sf_vec3f(){} 20 virtual ~sf_vec3f(){} 21 public: 21 public: 22 sf_vec3f(const sf_vec3f& a_from):parent(a_fr 22 sf_vec3f(const sf_vec3f& a_from):parent(a_from){} 23 sf_vec3f& operator=(const sf_vec3f& a_from){ 23 sf_vec3f& operator=(const sf_vec3f& a_from){ 24 parent::operator=(a_from); 24 parent::operator=(a_from); 25 return *this; 25 return *this; 26 } 26 } 27 public: 27 public: 28 sf_vec3f& operator+=(const vec3f& a_value) { 28 sf_vec3f& operator+=(const vec3f& a_value) {parent::operator+=(a_value);return *this;} 29 public: 29 public: 30 void set_value(float a_0,float a_1,float a_2 30 void set_value(float a_0,float a_1,float a_2) {value(vec3f(a_0,a_1,a_2));} 31 public: //for iv2sg 31 public: //for iv2sg 32 void setValue(const vec3f& a_v) {value(a_v); 32 void setValue(const vec3f& a_v) {value(a_v);} 33 void setValue(float a_0,float a_1,float a_2) 33 void setValue(float a_0,float a_1,float a_2) {value(vec3f(a_0,a_1,a_2));} 34 }; 34 }; 35 35 36 }} 36 }} 37 37 38 #endif 38 #endif