Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/curve 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_curve
0005 #define tools_curve
0006 
0007 #include "scast"
0008 #include "S_STRING"
0009 
0010 #ifdef TOOLS_MEM
0011 #include "mem"
0012 #endif
0013 
0014 #include "lina/vec3f"
0015 #include "lina/mat4f"
0016 
0017 namespace tools {
0018 
0019 class curve {
0020 public:
0021   TOOLS_SCLASS(tools::curve)
0022   virtual void* cast(const std::string& a_class) const {
0023     if(void* p = cmp_cast<curve>(this,a_class)) {return p;}
0024     return 0;
0025   }
0026 public:
0027   virtual void copy(curve*&) const = 0;
0028 public:
0029   virtual bool pos_tan_nor(float a_s,
0030                            vec3f& a_pos,
0031                            vec3f& a_tan,
0032                            vec3f& a_nor) const = 0;
0033 public:
0034   curve(){
0035 #ifdef TOOLS_MEM
0036     mem::increment(s_class().c_str());
0037 #endif
0038     m_model.set_identity();
0039   }
0040   virtual ~curve(){
0041 #ifdef TOOLS_MEM
0042     mem::decrement(s_class().c_str());
0043 #endif
0044   }
0045 public:
0046   curve(const curve& a_from):m_model(a_from.m_model){
0047 #ifdef TOOLS_MEM
0048     mem::increment(s_class().c_str());
0049 #endif
0050   }
0051   curve& operator=(const curve& a_from){
0052     m_model = a_from.m_model;
0053     return *this;
0054   }
0055 public:
0056   void set_model_matrix(const mat4f& a_m) {m_model = a_m;}
0057 protected:
0058   mat4f m_model;
0059 };
0060 
0061 }
0062 
0063 #endif