Context : We are working on the 3D modelling project where the lidar camera data is used to view 3D object on the Web Portal, the processing of the 3D model happens at the desktop CPP application. The Desktop CPP application is responsible for reconstruction of the models, optimization and decimation etc.
Problem Statement : We received a e57 file format data from the Lidar camera as an output. The CPP application takes the e57 as an input to extract the PCD data and images for scan. CPP application makes use of the OpenGL Lib to display the 3D models for processing and viewing purpose. When we trying to plot the PCD data on Open GL after parsing via e57 lib.
Can anyone help to understand what is the mistake in below code, also question does this PCD data needs to be converted in which is understood by the Open GL lib.
C++ Code Snippet :
void Display() {
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set background color to black and opaque
glClear(GL_COLOR_BUFFER_BIT); // Clear the color buffer(background)
glEnable(GL_STENCIL_TEST);
glBegin(GL_TRIANGLES);
glColor3d(0.61f, 0.65f, 0.70f);
glColor3f(0.61f, 0.65f, 0.70f);
glVertex3f(-3712089.00f, -8772.00f, 797511.00f);
glColor3f(0.34f, 0.37f, 0.37f);
glVertex3f(-3718649.00f, -8674.00f, 790862.00f);
glColor3f(0.32f, 0.33f, 0.30f);
glVertex3f(-3723328.00f, -8505.00f, 777755.00f);
glColor3f(0.29f, 0.29f, 0.25f);
glVertex3f(-3723866.00f, -8436.00f, 773824.00f);
glColor3f(0.30f, 0.30f, 0.28f);
glVertex3f(-3735966.00f, -7801.00f, 725951.00f);
glColor3f(0.27f, 0.29f, 0.23f);
glVertex3f(-3770613.00f, -7039.00f, 669964.00f);
glColor3f(0.25f, 0.27f, 0.27f);
glVertex3f(-3779137.00f, -6773.00f, 651281.00f);
glEnd();
glFlush()
}
int main (int* argc, char** argv){
glutInit(&argc, argv); // Initialize GLUTconst char* title = "OpenGL Test";
glutCreateWindow(title); // Create a window with the given
titleglutInitWindowSize(320, 320); // Set the window's initial width & height
glutInitWindowPosition(50, 50); // Position the window's initial top-left
cornerglutDisplayFunc(Display); // Register display callback handler for window re-
paintglutMainLoop();
return 0;
}