g4tools  5.4.0
Public Member Functions | Protected Types | Protected Attributes | List of all members
tools::sg::gl2ps_manager Class Reference
Inheritance diagram for tools::sg::gl2ps_manager:
Inheritance graph
[legend]
Collaboration diagram for tools::sg::gl2ps_manager:
Collaboration graph
[legend]

Public Member Functions

virtual void * cast (const std::string &a_class) const
 
virtual bool begin_render (int, int, unsigned int, unsigned int, float, float, float, float, bool=true)
 
virtual void end_render ()
 
virtual unsigned int create_texture (const img_byte &a_img, bool)
 
virtual unsigned int create_gsto_from_data (size_t, const float *)
 
virtual bool is_gsto_id_valid (unsigned int a_id) const
 
virtual void delete_gsto (unsigned int a_id)
 
virtual gsto_mode get_gsto_mode () const
 
virtual void set_gsto_mode (gsto_mode)
 
virtual void available_gsto_modes (std::vector< std::string > &a_v)
 
virtual void available_not_memory_gsto_mode (std::string &a_s) const
 
virtual size_t used_texture_memory () const
 
virtual size_t gstos_size () const
 
 gl2ps_manager ()
 
virtual ~gl2ps_manager ()
 
 gl2ps_manager (const gl2ps_manager &a_from)
 
gl2ps_manageroperator= (const gl2ps_manager &a_from)
 
bool find (unsigned int a_id, img_byte &a_img)
 
void delete_gstos ()
 
- Public Member Functions inherited from tools::sg::render_manager
virtual ~render_manager ()
 
unsigned int create_gsto_from_data (const std::vector< float > &a_xyzs)
 

Protected Types

typedef std::map< unsigned int, img_bytegstos_t
 

Protected Attributes

unsigned int m_gen_id
 
gstos_t m_gstos
 

Detailed Description

Definition at line 14 of file gl2ps_manager.

Member Typedef Documentation

◆ gstos_t

typedef std::map<unsigned int,img_byte> tools::sg::gl2ps_manager::gstos_t
protected

Definition at line 89 of file gl2ps_manager.

Constructor & Destructor Documentation

◆ gl2ps_manager() [1/2]

tools::sg::gl2ps_manager::gl2ps_manager ( )
inline

Definition at line 51 of file gl2ps_manager.

51  :m_gen_id(0){
52 #ifdef TOOLS_MEM
53  mem::increment(s_class().c_str());
54 #endif
55  }

◆ ~gl2ps_manager()

virtual tools::sg::gl2ps_manager::~gl2ps_manager ( )
inlinevirtual

Definition at line 56 of file gl2ps_manager.

56  {
57  m_gstos.clear();
58 #ifdef TOOLS_MEM
59  mem::decrement(s_class().c_str());
60 #endif
61  }

◆ gl2ps_manager() [2/2]

tools::sg::gl2ps_manager::gl2ps_manager ( const gl2ps_manager a_from)
inline

Definition at line 63 of file gl2ps_manager.

64  :parent(a_from)
65  ,m_gen_id(0)
66  ,m_gstos()
67  {
68 #ifdef TOOLS_MEM
69  mem::increment(s_class().c_str());
70 #endif
71  }

Member Function Documentation

◆ available_gsto_modes()

virtual void tools::sg::gl2ps_manager::available_gsto_modes ( std::vector< std::string > &  a_v)
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 46 of file gl2ps_manager.

46 {a_v.clear();}

◆ available_not_memory_gsto_mode()

virtual void tools::sg::gl2ps_manager::available_not_memory_gsto_mode ( std::string &  a_s) const
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 47 of file gl2ps_manager.

47 {a_s.clear();}

◆ begin_render()

virtual bool tools::sg::gl2ps_manager::begin_render ( int  ,
int  ,
unsigned int  ,
unsigned int  ,
float  ,
float  ,
float  ,
float  ,
bool  = true 
)
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 23 of file gl2ps_manager.

23 {return true;}

◆ cast()

virtual void* tools::sg::gl2ps_manager::cast ( const std::string &  a_class) const
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 18 of file gl2ps_manager.

18  {
19  if(void* p = cmp_cast<gl2ps_manager>(this,a_class)) {return p;}
20  else return 0;
21  }

◆ create_gsto_from_data()

virtual unsigned int tools::sg::gl2ps_manager::create_gsto_from_data ( size_t  ,
const float *   
)
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 32 of file gl2ps_manager.

32 {return 0;}

◆ create_texture()

virtual unsigned int tools::sg::gl2ps_manager::create_texture ( const img_byte a_img,
bool   
)
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 26 of file gl2ps_manager.

26  {
27  m_gen_id++; //never return 0.
28  m_gstos[m_gen_id] = a_img;
29  return m_gen_id;
30  }

◆ delete_gsto()

virtual void tools::sg::gl2ps_manager::delete_gsto ( unsigned int  a_id)
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 39 of file gl2ps_manager.

39  {
40  gstos_t::iterator it = m_gstos.find(a_id);
41  if(it!=m_gstos.end()) m_gstos.erase(it);
42  }

◆ delete_gstos()

void tools::sg::gl2ps_manager::delete_gstos ( )
inline

Definition at line 86 of file gl2ps_manager.

86 {m_gstos.clear();}

◆ end_render()

virtual void tools::sg::gl2ps_manager::end_render ( )
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 24 of file gl2ps_manager.

24 {}

◆ find()

bool tools::sg::gl2ps_manager::find ( unsigned int  a_id,
img_byte a_img 
)
inline

Definition at line 79 of file gl2ps_manager.

79  {
80  gstos_t::iterator it = m_gstos.find(a_id);
81  if(it==m_gstos.end()) return false;
82  a_img = (*it).second;
83  return true;
84  }

◆ get_gsto_mode()

virtual gsto_mode tools::sg::gl2ps_manager::get_gsto_mode ( ) const
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 44 of file gl2ps_manager.

44 {return gsto_memory;}

◆ gstos_size()

virtual size_t tools::sg::gl2ps_manager::gstos_size ( ) const
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 49 of file gl2ps_manager.

49 {return 0;}

◆ is_gsto_id_valid()

virtual bool tools::sg::gl2ps_manager::is_gsto_id_valid ( unsigned int  a_id) const
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 34 of file gl2ps_manager.

34  {
35  gstos_t::const_iterator it = m_gstos.find(a_id);
36  if(it==m_gstos.end()) return false;
37  return true;
38  }

◆ operator=()

gl2ps_manager& tools::sg::gl2ps_manager::operator= ( const gl2ps_manager a_from)
inline

Definition at line 72 of file gl2ps_manager.

72  {
73  if(&a_from==this) return *this;
74  m_gen_id = 0;
75  m_gstos.clear();
76  return *this;
77  }

◆ set_gsto_mode()

virtual void tools::sg::gl2ps_manager::set_gsto_mode ( gsto_mode  )
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 45 of file gl2ps_manager.

45 {}

◆ used_texture_memory()

virtual size_t tools::sg::gl2ps_manager::used_texture_memory ( ) const
inlinevirtual

Implements tools::sg::render_manager.

Definition at line 48 of file gl2ps_manager.

48 {return 0;}

Member Data Documentation

◆ m_gen_id

unsigned int tools::sg::gl2ps_manager::m_gen_id
protected

Definition at line 88 of file gl2ps_manager.

◆ m_gstos

gstos_t tools::sg::gl2ps_manager::m_gstos
protected

Definition at line 90 of file gl2ps_manager.


The documentation for this class was generated from the following file:
tools::sg::gl2ps_manager::m_gen_id
unsigned int m_gen_id
Definition: gl2ps_manager:88
tools::sg::gl2ps_manager::m_gstos
gstos_t m_gstos
Definition: gl2ps_manager:90
tools::sg::gsto_memory
@ gsto_memory
Definition: enums:173