LVRModelBridge.hpp
Go to the documentation of this file.
1 
34 #ifndef LVRMODEL_HPP_
35 #define LVRMODEL_HPP_
36 
37 #include "lvr2/io/Model.hpp"
39 
40 #include "LVRPointBufferBridge.hpp"
41 #include "LVRMeshBufferBridge.hpp"
42 
43 #include <vtkSmartPointer.h>
44 #include <vtkRenderer.h>
45 
46 #include <boost/shared_ptr.hpp>
47 
48 namespace lvr2
49 {
50 
51 struct Pose
52 {
53  float x, y, z, r, t, p;
54 };
55 
62 {
63 public:
64 
69  LVRModelBridge(ModelPtr model);
70 
72 
73  bool validPointBridge();
74  bool validMeshBridge();
75 
79  virtual ~LVRModelBridge();
80 
84  void addActors(vtkSmartPointer<vtkRenderer> renderer);
85 
89  void removeActors(vtkSmartPointer<vtkRenderer> renderer);
90 
91  void setPose(const Pose& pose);
92  void setTransform(const Transformd& transform);
93 
94  Pose getPose();
95 
96  void setVisibility(bool visible);
97  void setNormalsVisibility(bool visible);
98 
100  {
101  return m_pointBridge;
102  }
104  {
105  return m_meshBridge;
106  }
107 
108  // Declare model item classes as friends to have fast access to data chunks
109  friend class LVRModelItem;
110 
111 private:
112 
113  void doStuff(vtkSmartPointer<vtkTransform> transform);
114 
118 };
119 
120 typedef boost::shared_ptr<LVRModelBridge> ModelBridgePtr;
121 
122 } /* namespace lvr2 */
123 
124 #endif /* LVRMODEL_HPP_ */
boost::shared_ptr< LVRPointBufferBridge > PointBufferBridgePtr
MeshBufferBridgePtr m_meshBridge
Main class for conversion of LVR model instances to vtk actors. This class parses the internal model ...
Transform< double > Transformd
4x4 double precision transformation matrix
Definition: MatrixTypes.hpp:71
boost::shared_ptr< LVRMeshBufferBridge > MeshBufferBridgePtr
boost::shared_ptr< LVRModelBridge > ModelBridgePtr
PointBufferBridgePtr m_pointBridge
MeshBufferBridgePtr getMeshBridge()
std::shared_ptr< Model > ModelPtr
Definition: Model.hpp:80
PointBufferBridgePtr getPointBridge()


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