• 大小: 3.45MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-14
  • 语言: 其他
  • 标签: openGL  cloud  point  C++  

资源简介

opengl实现三维点云的显示,放大,缩小,旋转,多角度浏览等功能。

资源截图

代码片段和文件信息

//////////////////////////////////////////////////////////////////////////

#include “StdAfx.h“
#include “math.h“
#include “CPoint3D.h“

POINT3D::POINT3D(): x(0)  y(0)  z(0)  w(1)
{
   
}

POINT3D::~POINT3D()
{

}

POINT3D POINT3D::operator + (const POINT3D &point3d)
{
   POINT3D p;
   p.x = x + point3d.x;
   p.y = y + point3d.y;
   p.z = z + point3d.z;
   return p;
}

POINT3D POINT3D::operator - (const POINT3D &point3d)
{
   POINT3D p;
   p.x = x - point3d.x;
   p.y = y - point3d.y;
   p.z = z - point3d.z;
   return p;
}

POINT3D POINT3D::operator / (const int &sum)
{
if (sum <= 0)
   return (*this);
POINT3D p;
p.x = x / sum;
p.y = y / sum;
p.z = z / sum;
return p;
}

POINT3D POINT3D::operator * (const int &sum)
{
POINT3D p;
p.x = x * sum;
p.y = y * sum;
p.z = z * sum;
return p;
}

POINT3D POINT3D::operator += (const POINT3D &point3d)
{
   x = x + point3d.x;
   y = y + point3d.y;
   z = z + point3d.z;
   return (*this);
}

POINT3D POINT3D::operator -= (const POINT3D &point3d)
{
   x = x - point3d.x;
   y = y - point3d.y;
   z = z - point3d.z;
   return (*this);
}

POINT3D POINT3D::operator /= (const int &sum)
{
if (sum <= 0)
   return (*this);
x = x / sum;
y = y / sum;
z = z / sum;
    return (*this);
}

POINT3D POINT3D::operator *= (const int &sum)
{
x = x * sum;
y = y * sum;
z = z * sum;
    return (*this);
}

//////////////////////////////////////////////////////////////////////////
POINT7D::POINT7D() : nx(0.0)  ny(0.0)  nz(0.0)
{

}

POINT7D::~POINT7D()
{

}



//////////////////////////////////////////////////////////////////////////
double Distance(const POINT3D &p1  const POINT3D &p2)
{
return (double)sqrt((p1.x - p2.x) * (p1.x - p2.x) +(p1.y - p2.y) * (p1.y - p2.y) +(p1.z - p2.z) * (p1.z - p2.z));
}

POINT7D POINT7D::operator =(const POINT3D &point3d)
{
    x = point3d.x;
y = point3d.y;
z = point3d.z;
w = point3d.w;
return (*this);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-03-18 13:11  OpenGLcloudpoint\
     目录           0  2014-03-18 13:11  OpenGLcloudpoint\CPoint3DCloud\
     文件       57344  2005-09-10 14:14  OpenGLcloudpoint\CPoint3DCloud\COpenGL.dll
     文件       11879  2005-03-17 16:02  OpenGLcloudpoint\CPoint3DCloud\COpenGL.h
     文件       44140  2005-09-10 14:14  OpenGLcloudpoint\CPoint3DCloud\COpenGL.lib
     文件      163930  2005-09-10 14:14  OpenGLcloudpoint\CPoint3DCloud\COpenGLd.dll
     文件       25907  2005-09-10 13:36  OpenGLcloudpoint\CPoint3DCloud\COpenGLd.exp
     文件       44140  2005-09-10 14:14  OpenGLcloudpoint\CPoint3DCloud\COpenGLd.lib
     文件        2021  2005-09-14 13:08  OpenGLcloudpoint\CPoint3DCloud\CPoint3D.cpp
     文件        1137  2005-09-14 13:09  OpenGLcloudpoint\CPoint3DCloud\CPoint3D.h
     文件       29144  2014-03-16 15:13  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.aps
     文件        2432  2014-03-16 15:33  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.clw
     文件        4497  2005-09-10 14:15  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.cpp
     文件        4963  2005-09-14 13:32  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.dsp
     文件         549  2005-09-10 11:44  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.dsw
     文件       40960  2006-03-28 09:38  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.exe
     文件        1433  2005-09-10 11:44  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.h
     文件      132096  2014-03-16 15:33  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.ncb
     文件       51712  2014-03-16 15:33  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.opt
     文件         901  2014-03-16 15:32  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.plg
     文件       10803  2005-09-10 11:44  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.rc
     文件         729  2005-09-10 11:44  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloud.reg
     文件       11088  2005-09-14 13:12  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloudDoc.cpp
     文件        1739  2005-09-14 11:09  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloudDoc.h
     文件        5808  2005-09-10 13:57  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloudView.cpp
     文件        2533  2005-09-10 13:05  OpenGLcloudpoint\CPoint3DCloud\CPoint3DCloudView.h
     文件      580627  2005-09-03 15:06  OpenGLcloudpoint\CPoint3DCloud\crown.asc
     文件      515180  1997-07-26 04:11  OpenGLcloudpoint\CPoint3DCloud\GLUT.DLL
     文件       16619  1997-07-16 20:16  OpenGLcloudpoint\CPoint3DCloud\GLUT.H
     文件       69360  1997-07-26 04:11  OpenGLcloudpoint\CPoint3DCloud\GLUT.LIB
     文件      520660  1997-07-27 13:03  OpenGLcloudpoint\CPoint3DCloud\GLUT32.DLL
............此处省略28个文件信息

评论

共有 条评论