PointCorrespondences.cpp
Go to the documentation of this file.
1 
29 
30 namespace lvr2
31 {
32 
33 PointCorrespondences::PointCorrespondences(std::vector<float> points1, std::vector<float> points2)
34 {
35  m_displayList = glGenLists(1);
36  glNewList(m_displayList, GL_COMPILE);
37 
38  glBegin(GL_POINTS);
39  // Render points
40  for(size_t i = 0; i < points1.size() / 3; i++)
41  {
42  glColor3f(1.0f, 0.0f, 0.0f);
43  glVertex3f(points1[i * 3], points1[i * 3 + 1], points1[i * 3 + 2]);
44  glColor3f(0.0f, 1.0f, 0.0f);
45  glVertex3f(points2[i * 3], points2[i * 3 + 1], points2[i * 3 + 2]);
46  }
47  glEnd();
48  for(size_t i = 0; i < points1.size() / 3; i++)
49  {
50  glBegin(GL_LINES);
51  glColor3f(0.0f, 0.0f, 1.0f);
52  glVertex3f(points1[i * 3], points1[i * 3 + 1], points1[i * 3 + 2]);
53  glVertex3f(points2[i * 3], points2[i * 3 + 1], points2[i * 3 + 2]);
54  glEnd();
55  }
56  glEndList();
57 
58 
59 }
60 
62 {
63  glLineWidth(1.0);
64  glPointSize(5.0);
65  glCallList(m_displayList);
66 }
67 
68 } // namespace lvr2
PointCorrespondences.hpp
render
void render()
lvr2::PointCorrespondences::PointCorrespondences
PointCorrespondences(std::vector< float > points1, std::vector< float > points2)
Definition: PointCorrespondences.cpp:33
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::PointCorrespondences::m_displayList
GLuint m_displayList
Definition: PointCorrespondences.hpp:44


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