资源简介
可以完美实现点云数据的读取和显示,通过MFC和OpenGL实现。还要详细点?我想我表达的已经够清楚了吧

代码片段和文件信息
/*
* This Code Was Created By Pet & Commented/Cleaned Up By Jeff Molofee
* If You‘ve Found This Code Useful Please Let Me Know.
* Visit NeHe Productions At http://nehe.gamedev.net
* Conversion to Visual Studio.NET done by GRANT JAMES(ZEUS)
*/
#include // Header File For Windows
#include // Math Library Header File
#include // Header File For Standard Input/Output
#include // Header File For The OpenGL32 Library
#include // Header File For The GLu32 Library
HDC hDC=NULL; // Device Context Handle
HGLRC hRC=NULL; // Rendering Context Handle
HWND hWnd=NULL; // Window Handle
HINSTANCE hInstance; // Instance Handle
bool keys[256]; // Key Array
bool active=TRUE; // Program‘s Active
bool fullscreen=TRUE; // Default Fullscreen To True
GLfloat xrotyrotzrot // X Y & Z Rotation
xspeedyspeedzspeed // X Y & Z Spin Speed
cxcycz=-15; // X Y & Z Position
int key=1; // Used To Make Sure Same Morph Key Is Not Pressed
int step=0steps=200; // Step Counter And Maximum Number Of Steps
bool morph=FALSE; // Default morph To False (Not Morphing)
typedef struct // Structure For 3D Points
{
float x y z; // X Y & Z Points
} VERTEX; // Called VERTEX
typedef struct // Structure For An object
{
int verts; // Number Of Vertices For The object
VERTEX *points; // One Vertice (Vertex xy & z)
} object; // Called object
int maxver; // Will Eventually Hold The Maximum Number Of Vertices
object morph1morph2morph3morph4 // Our 4 Morphable objects (morph123 & 4)
helper*sour*dest; // Helper object Source object Destination object
LRESULT CALLBACK WndProc(HWND UINT WPARAM LPARAM); // Declaration
void objallocate(object *kint n) // Allocate Memory For Each object
{ // And Defines points
k->points=(VERTEX*)malloc(sizeof(VERTEX)*n); // Sets points Equal To VERTEX * Number Of Vertices
} // (3 Points For Each Vertice)
void objfree(object *k) // Frees The object (Releasing The Memory)
{
free(k->points); // Frees Points
}
void readstr(FILE *fchar *string) // Reads A String From File (f)
{
do // Do This
{
fgets(string 255 f); // Gets A String Of 255 Chars Max From f (File)
} while ((string[0] == ‘/‘) || (string[0] == ‘\n‘));// Until End Of Line Is Reached
return; // Return
}
void objload(char *nameobject *k) // Loads object From File (name)
{
int ver; // Will Hold Vertice Count
float rxryrz; // Hold Vertex X Y & Z Position
FILE *filein; // Filename To Open
char oneline[255]; // Holds One Line Of Text (255 Chars Max)
filein = fopen(name
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13710 2000-08-24 01:02 Data\Sphere.txt
文件 13875 2000-08-24 01:02 Data\Torus.txt
文件 14126 2000-08-24 01:02 Data\Tube.txt
文件 26010 2003-03-17 08:14 Lesson25.cpp
文件 53248 2002-04-23 18:34 Lesson25.exe
文件 134144 2003-03-17 08:14 Lesson25.ncb
文件 916 2003-03-17 08:14 Lesson25.sln
文件 3954 2003-03-17 08:14 Lesson25.vcproj
文件 672 2002-04-23 18:33 NeHe‘s Readme.txt
- 上一篇:CWMPPla
yer4类做的视频播放器 - 下一篇:p2p技术C语言源码
相关资源
- 安卓c语言开发SDL2+opengles
- 三维点云边界提取
- 交互式计算机图形学 第六版 OpenGL源代
- VC++基于OpenGL模拟的一个3维空间模型
- opengl绘制汽车.cpp
- opengl实现水流效果sph
- opengl源代码,全是精华!
- OpenGL迷宫山东大学图形学实验三
- opengl的立方体消隐算法
- vc++ opengl代码爆炸
- 我见过最漂亮的CS仿真程序openGL和C+
- 广东某工业大学的openGL课程设计
- 三维点云的圆柱面拟合
- 使用OpenGL实现多个小球在密闭空间内
- 利用openGL和C++实现光线跟踪绘图的完
- OpenGl C++太阳系小行星运行系统 可切换
- vc++和OpenGL实现三维地形实时动态显示
- C++实现利用OpenGL实现三维绘图
- 太阳、地球、月亮之间的运动图Open
- MFC 单文档 实现opengl 三维旋转 缩放
- OPENGL的烟花程序(代码)
- MFC+OpenGL三维建模与动画显示
- 基于opengl粒子系统实现喷泉的模拟
- 一个基于openGL的太阳系模型,太阳地
- vc6.0+opengl纯色五角星填充
- vc6.0+opengl动态绘制五角星
- NeHe_OpenGL教程完整版 里面有地址可以
- OpenGL简单——实现立方体贴上不同纹
- MFC实现dem的读取与现实
- VC++ OpenGL三维地形漫游
评论
共有 条评论