MeshCluster.hpp
Go to the documentation of this file.
1 
28 /*
29  * MeshCluster.hpp
30  *
31  * Created on: 12.04.2012
32  * Author: Thomas Wiemann
33  */
34 
35 #ifndef MESHCLUSTER_HPP_
36 #define MESHCLUSTER_HPP_
37 
38 #include <list>
39 using namespace std;
40 
43 
44 namespace lvr2
45 {
46 
47 class MeshCluster : public Renderable
48 {
49 public:
51 
52  void addMesh(MeshBufferPtr buffer, string name);
53 
54  virtual ~MeshCluster() { for (StaticMesh* sm : m_meshes) delete sm;};
55 
56  virtual inline void render()
57  {
58  list<StaticMesh*>::iterator it;
59  for(it = m_meshes.begin(); it != m_meshes.end(); it++)
60  {
61  (*it)->render();
62  }
63  }
64 
65  list<StaticMesh*> getMeshes() { return m_meshes;}
66 
67 private:
68  list<StaticMesh*> m_meshes;
69 };
70 
71 } // namespace lvr2
72 
73 #endif /* MESHCLUSTER_HPP_ */
std::shared_ptr< MeshBuffer > MeshBufferPtr
Definition: MeshBuffer.hpp:217
list< StaticMesh * > getMeshes()
Definition: MeshCluster.hpp:65
list< StaticMesh * > m_meshes
Definition: MeshCluster.hpp:68
virtual void render()
Definition: MeshCluster.hpp:56
virtual ~MeshCluster()
Definition: MeshCluster.hpp:54


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:08