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_ */
lvr2::LVRModelBridge::validPointBridge
bool validPointBridge()
Definition: LVRModelBridge.cpp:78
lvr2::MeshBufferBridgePtr
boost::shared_ptr< LVRMeshBufferBridge > MeshBufferBridgePtr
Definition: LVRMeshBufferBridge.hpp:106
LVRPointBufferBridge.hpp
lvr2::LVRModelBridge::m_pointBridge
PointBufferBridgePtr m_pointBridge
Definition: LVRModelBridge.hpp:115
transform
Definition: src/tools/lvr2_transform/Options.cpp:44
lvr2::LVRModelBridge::m_pose
Pose m_pose
Definition: LVRModelBridge.hpp:117
lvr2::Pose::t
float t
Definition: LVRModelBridge.hpp:53
lvr2::LVRModelBridge::addActors
void addActors(vtkSmartPointer< vtkRenderer > renderer)
Adds the generated actors to the given renderer.
Definition: LVRModelBridge.cpp:158
lvr2::Transformd
Transform< double > Transformd
4x4 double precision transformation matrix
Definition: MatrixTypes.hpp:71
lvr2::LVRModelBridge::getMeshBridge
MeshBufferBridgePtr getMeshBridge()
Definition: LVRModelBridge.hpp:103
lvr2::LVRModelBridge::m_meshBridge
MeshBufferBridgePtr m_meshBridge
Definition: LVRModelBridge.hpp:116
lvr2::LVRModelBridge::setPose
void setPose(const Pose &pose)
Definition: LVRModelBridge.cpp:88
lvr2::LVRModelBridge::validMeshBridge
bool validMeshBridge()
Definition: LVRModelBridge.cpp:83
lvr2::LVRModelBridge::getPose
Pose getPose()
Definition: LVRModelBridge.cpp:153
lvr2::ModelBridgePtr
boost::shared_ptr< LVRModelBridge > ModelBridgePtr
Definition: LVRModelBridge.hpp:120
lvr2::Pose::r
float r
Definition: LVRModelBridge.hpp:53
MatrixTypes.hpp
lvr2::LVRModelBridge::removeActors
void removeActors(vtkSmartPointer< vtkRenderer > renderer)
Removes the generated actors from the given renderer.
Definition: LVRModelBridge.cpp:189
Model.hpp
lvr2::LVRModelBridge::~LVRModelBridge
virtual ~LVRModelBridge()
Destructor.
Definition: LVRModelBridge.cpp:206
lvr2::LVRModelBridge::LVRModelBridge
LVRModelBridge(ModelPtr model)
Constructor. Parses the model information and generates vtk actor instances for the given data.
Definition: LVRModelBridge.cpp:47
lvr2::Pose::p
float p
Definition: LVRModelBridge.hpp:53
lvr2::LVRModelBridge
Main class for conversion of LVR model instances to vtk actors. This class parses the internal model ...
Definition: LVRModelBridge.hpp:61
lvr2::LVRModelItem
Definition: LVRModelItem.hpp:47
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::ModelPtr
std::shared_ptr< Model > ModelPtr
Definition: Model.hpp:80
lvr2::Pose::x
float x
Definition: LVRModelBridge.hpp:53
LVRMeshBufferBridge.hpp
lvr2::Pose::y
float y
Definition: LVRModelBridge.hpp:53
lvr2::LVRModelBridge::setNormalsVisibility
void setNormalsVisibility(bool visible)
Definition: LVRModelBridge.cpp:201
lvr2::PointBufferBridgePtr
boost::shared_ptr< LVRPointBufferBridge > PointBufferBridgePtr
Definition: LVRPointBufferBridge.hpp:116
lvr2::LVRModelBridge::setVisibility
void setVisibility(bool visible)
Definition: LVRModelBridge.cpp:195
lvr2::Pose::z
float z
Definition: LVRModelBridge.hpp:53
lvr2::LVRModelBridge::doStuff
void doStuff(vtkSmartPointer< vtkTransform > transform)
Definition: LVRModelBridge.cpp:127
lvr2::LVRModelBridge::getPointBridge
PointBufferBridgePtr getPointBridge()
Definition: LVRModelBridge.hpp:99
lvr2::Pose
Definition: LVRModelBridge.hpp:51
lvr2::LVRModelBridge::setTransform
void setTransform(const Transformd &transform)
Definition: LVRModelBridge.cpp:102


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 Wed Mar 2 2022 00:37:24