Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/sg/render_manager 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_render_manager
0005 #define tools_sg_render_manager
0006 
0007 #include "enums"
0008 #include "senums"
0009 #include "../img"
0010 #include "../scast"
0011 
0012 namespace tools {
0013 namespace sg {
0014 
0015 class render_manager {
0016 public:
0017   virtual void* cast(const std::string&) const = 0;
0018 public:
0019   virtual bool begin_render(int,int,                      //drawing area pos
0020                             unsigned int,unsigned int,    //drawing area size
0021                             float,float,float,float,bool a_clear = true) = 0; //back color
0022   virtual void end_render() = 0;
0023 
0024   virtual unsigned int create_texture(const img_byte&,bool /*a_NEAREST*/) = 0;
0025   virtual unsigned int create_gsto_from_data(size_t,const float*) = 0;
0026 
0027   virtual bool is_gsto_id_valid(unsigned int) const = 0;
0028   virtual void delete_gsto(unsigned int) = 0;
0029 
0030   // since rm of <TMGR,TRENDER> :
0031   virtual gsto_mode get_gsto_mode() const = 0;
0032   virtual void set_gsto_mode(gsto_mode) = 0;
0033   virtual void available_gsto_modes(std::vector<std::string>&) = 0;
0034   virtual void available_not_memory_gsto_mode(std::string&) const = 0;
0035   virtual size_t used_texture_memory() const = 0;
0036   virtual size_t gstos_size() const = 0;
0037 public:
0038   virtual ~render_manager(){}
0039 public:
0040   unsigned int create_gsto_from_data(const std::vector<float>& a_xyzs){
0041     const float* _xyzs = a_xyzs.data();
0042     return create_gsto_from_data(a_xyzs.size(),_xyzs);
0043   }
0044 };
0045 
0046 }}
0047 
0048 #endif