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