-
二
二维图像的三维显示 详细信息 < OpenGL > 本人为了图像处理的需要,很想实现二维图像的三维显示,于是写了本代码,希望与此有兴趣的读者共享。图像的获取一是bmp图像文件,二是来自剪贴板。本代码在MFC中调用OpenGL库函数来实现二维图像的三维显示,图像的宽度、高度和象素的亮度分别为三维空间的x,z,y坐标。程序主要有初始化、绘图、资源释放和操作部分,这些功能在OGL_MFCView.cpp文件中实现。OpenGL库的初始化在该文件中的OnCreate,InitScene和DrawScene函数中实现,主要初始化OpenGL运行时的环境变量,三维物体的光照,材质等,由于介绍OpenGL库的初始化的文档很多,在这里我就不多说了,感兴趣的读者可以参考有关的文档。在DrawScene函数中调用全局函数GLDraw3DBMP完成绘图部分。编译源代码时,必须把opengl32.lib glu32.lib链到工程中。 可以通过对话框改变材质。按上下箭头键可以实现三维图像的绕x轴旋转,按左右箭头键可以实现三维图像绕z轴旋转。本代码在Windows2000下编译通过。 -two-dimensional images of three-dimensional display detailed information Image Processing himself to the needs and would like to achieve th ree-dimensional two-dimensional images, then wrote the code, with the readers are interested in sharing. Image Access First bmp image files, two from the clipboard. The MFC code Calling OpenGL library functions to achieve the three-dimensional two-dimensional image display, image width, height and pixel brightness of the three-dimensional space x, z, y co
- 2022-05-22 12:29:02下载
- 积分:1
-
三位台球模拟程序。按left和right键可以左右移动视点。up和down上下移动视点。当瞄准球以后,按住鼠标右键可以向后拖动球杆,讲球打出去...
三位台球模拟程序。按left和right键可以左右移动视点。up和down上下移动视点。当瞄准球以后,按住鼠标右键可以向后拖动球杆,讲球打出去-three billiards simulation program. By the left and right keys can move around Perspective. Up and down up and down perspective. When aiming the ball, the right mouse button is pressed backward drag clubs, stresses struck out
- 2022-09-08 03:50:02下载
- 积分:1
-
简单openGL代码,只是简单的显示一些东西
简单openGL代码,只是简单的显示一些东西-Simple openGL code, but simply display a number of things
- 2023-01-12 23:00:03下载
- 积分:1
-
OpenGL读取obj文件
应用背景OpenGL可以很好的实现三维空间的编程,而obj格式作为一种简单而又通用的格式应用十分广泛。本程序实现了对obj格式的读取,并且实现了鼠标对模型的移动旋转等操作,OpenGL读取obj后,可以在此基础上实现对obj文件的控制以及贴图等多种操作关键技术OpenGL实现对obj模型的读取,关键在于对obj格式的理解,然后根据obj的格式实现对obj的读取。使用trackball和glm,可以读取和显示obj文件,并进行旋转与缩放。运行环境:vs2010, 运行后用o或者O选择obj文件,+和-进行缩放。程序亲测可用,注意计算机上的OpenGL环境的正确配置。
- 2022-03-11 23:54:39下载
- 积分:1
-
OpenGL演示之太阳、地球、月球的运转实例
OpenGL演示之太阳、地球、月球的运转实例
-OpenGL demo Zhi sun, the earth, moon examples of the operation.
- 2023-01-05 11:40:03下载
- 积分:1
-
csc108 Assignment
Raytracing example
implement a basic ray-tracer and render a simple scene using ray casting and local shading. The starter code sets up a scene comprising of an ellipsoid and a plane, being illuminated by a point light source. Your job is to render the scene by implementing code fragments required for object intersections and Phong shading.
- 2022-07-17 14:08:05下载
- 积分:1
-
一个比较实用的OpenGL示例!采用VC++编写!可以使大家很快地进入OpenGL的世界中去!...
一个比较实用的OpenGL示例!采用VC++编写!可以使大家很快地进入OpenGL的世界中去!-a more practical example OpenGL! Using VC prepared! You can quickly enter the OpenGL world!
- 2022-07-09 13:14:26下载
- 积分:1
-
一个小动画,用VC/Open Inventor开发
一个小动画,用VC/Open Inventor开发-a small animation, VC/Open Inventor Development
- 2022-04-23 16:42:49下载
- 积分:1
-
3D circle
3D circle
- 2022-04-01 04:01:18下载
- 积分:1
-
Zooming and Panning an Orthographic Projection对OpenGL图形进行缩放和panning操作...
Zooming and Panning an Orthographic Projection对OpenGL图形进行缩放和panning操作-Orthographic projection of an OpenGL graphics for panning and zooming operation
- 2023-03-06 08:20:03下载
- 积分:1