Skip to content

Commit 56c5474

Browse files
bug fixed with reshape func
1 parent 21d2f10 commit 56c5474

File tree

7 files changed

+39
-4
lines changed

7 files changed

+39
-4
lines changed

tutorial/lesson_0/src/lesson_0_main.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ bool initGL(int *argc, char **argv)
111111

112112
return true;
113113
}
114+
114115
void reshape(int width, int height) {
115116
glViewport(0, 0, width, height);
116117
glMatrixMode(GL_PROJECTION);

tutorial/lesson_12/src/lesson_12_main.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -740,3 +740,10 @@ void register_obs2_to_obs1()
740740
Eigen::Vector3f xyz2_res(obs.tx, obs.ty, obs.tz);
741741
cudaWrapper.EulerToMatrix(omfika2_res, xyz2_res, m_pose2);
742742
}
743+
744+
void reshape(int width, int height) {
745+
glViewport(0, 0, width, height);
746+
glMatrixMode(GL_PROJECTION);
747+
glLoadIdentity();
748+
gluPerspective(60.0, (GLfloat)width / (GLfloat) height, 0.01, 10000.0);
749+
}

tutorial/lesson_14/src/lesson_14_main.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -503,4 +503,9 @@ void registerAllScans()
503503
transformAllpointcloudsForRender();
504504
}
505505

506-
506+
void reshape(int width, int height) {
507+
glViewport(0, 0, width, height);
508+
glMatrixMode(GL_PROJECTION);
509+
glLoadIdentity();
510+
gluPerspective(60.0, (GLfloat)width / (GLfloat) height, 0.01, 10000.0);
511+
}

tutorial/lesson_15/src/lesson_15_main.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -456,4 +456,9 @@ void registerAllScans()
456456
transformAllpointcloudsForRender();
457457
}
458458

459-
459+
void reshape(int width, int height) {
460+
glViewport(0, 0, width, height);
461+
glMatrixMode(GL_PROJECTION);
462+
glLoadIdentity();
463+
gluPerspective(60.0, (GLfloat)width / (GLfloat) height, 0.01, 10000.0);
464+
}

tutorial/lesson_16/src/lesson_16_main.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -540,4 +540,9 @@ void registerAllScans()
540540
transformAllpointcloudsForRender();
541541
}
542542

543-
543+
void reshape(int width, int height) {
544+
glViewport(0, 0, width, height);
545+
glMatrixMode(GL_PROJECTION);
546+
glLoadIdentity();
547+
gluPerspective(60.0, (GLfloat)width / (GLfloat) height, 0.01, 10000.0);
548+
}

tutorial/lesson_18/src/lesson_18_main.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,10 @@ void printHelp()
162162
std::cout << "press 'r': show ROI on|off" << std::endl;
163163
std::cout << "press 'Esc': EXIT" << std::endl;
164164
}
165+
166+
void reshape(int width, int height) {
167+
glViewport(0, 0, width, height);
168+
glMatrixMode(GL_PROJECTION);
169+
glLoadIdentity();
170+
gluPerspective(60.0, (GLfloat)width / (GLfloat) height, 0.01, 10000.0);
171+
}

tutorial/lesson_19/src/lesson_19_main.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -572,4 +572,9 @@ bool pointInPolygon(simple_point3D p, simple_point3D v0, simple_point3D v1, simp
572572
return false;
573573
}
574574

575-
575+
void reshape(int width, int height) {
576+
glViewport(0, 0, width, height);
577+
glMatrixMode(GL_PROJECTION);
578+
glLoadIdentity();
579+
gluPerspective(60.0, (GLfloat)width / (GLfloat) height, 0.01, 10000.0);
580+
}

0 commit comments

Comments
 (0)