Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/sg/style_color is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_sg_style_color
0005 #define tools_sg_style_color
0006 
0007 #include "../colorf"
0008 
0009 namespace tools {
0010 namespace sg {
0011 
0012 class style_color : public std::pair<std::string,colorf> {
0013   typedef std::pair<std::string,colorf> parent;
0014 public:
0015   style_color():parent("",colorf()) {
0016   }
0017   style_color(const std::string& a_name,const colorf& a_color):parent(a_name,a_color) {
0018   }
0019   style_color(const std::string& a_name,float a_r,float a_g,float a_b):parent(a_name,colorf(a_r,a_g,a_b)) {
0020   }
0021   virtual ~style_color(){
0022   }
0023 public:
0024   style_color(const style_color& a_from):parent(a_from.first,a_from.second) {
0025   }
0026   style_color& operator=(const style_color& a_from){
0027     first = a_from.first;
0028     second = a_from.second;
0029     return *this;
0030   }
0031 public:
0032   void set_name(const std::string& a_name) {first = a_name;}
0033   void set_value(float a_r,float a_g,float a_b,float a_a) {second.set_value(a_r,a_g,a_b,a_a);}
0034 };
0035 
0036 }}
0037 
0038 #endif
0039 
0040 
0041