資源簡介
可實現(xiàn)點云ptx和txt文件導入,框選,提取截面線功能

代碼片段和文件信息
//?Laser3DView.cpp?:?implementation?of?the?CLaser3DView?class
//
#include?“stdafx.h“
#include?“LaserConvert.h“
#include?“LaserConvertDoc.h“
#include?“Laser3DView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CLaser3DView
IMPLEMENT_DYNCREATE(CLaser3DView?CView)
BEGIN_MESSAGE_MAP(CLaser3DView?CView)
//{{AFX_MSG_MAP(CLaser3DView)
ON_WM_CREATE()
ON_WM_DESTROY()
ON_WM_SIZE()
ON_WM_ERASEBKGND()
ON_WM_PAINT()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_MOUSEMOVE()
ON_WM_RBUTTONDOWN()
ON_WM_RBUTTONUP()
ON_COMMAND(ID_RECTANGLE_ADDPOINTS?OnRectangleAddpoints)
ON_COMMAND(ID_RECTANGLE_SUBPOINTS?OnRectangleSubpoints)
ON_COMMAND(ID_DRAWPLANEX?OnDrawplanex)
ON_COMMAND(ID_ONEPLANE_EXTRACT?OnOneplaneExtract)
ON_COMMAND(ID_DRAWPLANEY?OnDrawplaney)
ON_COMMAND(ID_DRAWPLANEZ?OnDrawplanez)
//}}AFX_MSG_MAP
//?Standard?printing?commands
ON_COMMAND(ID_FILE_PRINT?CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT?CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW?CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CLaser3DView?construction/destruction
CLaser3DView::CLaser3DView()
{
//?TODO:?add?construction?code?here
//?OpenGL
m_hGLContext?=?NULL;???????????//?長期渲染環(huán)境
m_GLPixelIndex?=?0;
m_OperationMode=1;
//?Mouse
m_LeftButtonDown?=?FALSE;
m_RightButtonDown?=?FALSE;
//?Colors
m_ClearColorRed???=?0.5f;
m_ClearColorGreen?=?0.5f;
m_ClearColorBlue??=?0.5f;
InitGeometry();
}
CLaser3DView::~CLaser3DView()
{
}
void?CLaser3DView::InitGeometry(void)
{
m_xRotation?=?0.0f;
m_yRotation?=?0.0f;
m_zRotation?=?0.0f;
m_xyRotation?=?1;
m_SpeedRotation?=?1.0f?/?30.0f;
m_SpeedTranslation?=?1.0f?/?50.0f;
m_xTranslation?=?0.0f;
m_yTranslation?=?0.0f;
m_zTranslation?=?-5.0f;??//
m_xScaling?=?10.0f;
m_yScaling?=?10.0f;
m_zScaling?=?10.0f;
}
BOOL?CLaser3DView::PreCreateWindow(CREATESTRUCT&?cs)
{
//?TODO:?Modify?the?Window?class?or?styles?here?by?modifying
//??the?CREATESTRUCT?cs
????cs.style|=WS_CLIPSIBLINGS|WS_CLIPCHILDREN;?????//風格設置
return?CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
//?CLaser3DView?drawing
void?CLaser3DView::OnDraw(CDC*?pDC)
{
CLaserConvertDoc*?pDoc?=?GetDocument();
ASSERT_VALID(pDoc);
//?TODO:?add?draw?code?for?native?data?here
}
/////////////////////////////////////////////////////////////////////////////
//?CLaser3DView?printing
BOOL?CLaser3DView::OnPreparePrinting(CPrintInfo*?pInfo)
{
//?default?preparation
return?DoPreparePrinting(pInfo);
}
void?CLaser3DView::OnBeginPrinting(CDC*?/*pDC*/?CPrintInfo*?/*pInfo*/)
{
//?TODO:?add?extra?initialization?before?printing
}
void?CLaser3DView::
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????888??2009-06-06?22:11??LaserConvert.sln
?????文件???????9983??2009-06-24?10:30??LaserConvert.vcproj
?????文件???????1411??2009-06-24?10:43??LaserConvert.vcproj.CGCAD.hah.user
?????文件???????6813??2009-05-31?19:03??LaserConvertDoc.cpp
?????文件???????1964??2009-05-27?09:47??LaserConvertDoc.h
?????文件???????2394??2009-05-31?15:41??MainFrm.cpp
?????文件???????1440??2009-05-31?15:41??MainFrm.h
?????文件????????828??2009-02-19?22:41??ob
?????文件???????5685??2009-05-20?08:57??ob
?????文件???????1974??2009-04-22?21:40??Plane.cpp
?????文件???????2004??2009-04-29?20:43??PlaneDlg.cpp
?????文件???????1674??2009-04-27?16:09??PlaneDlg.h
?????文件???????1436??2009-02-22?00:09??Point3d.cpp
?????文件????????997??2009-04-10?16:48??Point3d.h
?????文件???????8479??2009-06-24?10:43??PtxManager.cpp
?????文件???????1434??2009-06-22?10:11??PtxManager.h
?????文件???????4435??2006-11-09?19:16??ReadMe.txt
?????文件???????1249??2009-06-02?08:37??resource.h
?????文件?????108205??2009-05-27?13:50??shengmudian.ptx
?????文件??????33738??2006-03-03?15:42??simulateData.ptx
?????文件????????214??2006-11-09?19:16??StdAfx.cpp
?????文件???????1143??2006-11-09?19:17??StdAfx.h
?????文件?????291492??2009-03-17?09:33??z.ptx
?????文件???????1078??2006-11-09?19:16??res\LaserConvert.ico
?????文件????????404??2006-11-09?19:16??res\LaserConvert.rc2
?????文件???????1078??2006-11-09?19:16??res\LaserConvertDoc.ico
????..A.SH.??????6656??2009-05-31?22:03??res\Thumbs.db
?????文件???????1078??2009-05-31?15:09??res\Toolbar.bmp
?????文件??????14373??2009-05-31?15:53??Laser3DView.cpp
?????文件???????3319??2009-05-27?10:30??Laser3DView.h
............此處省略88個文件信息
評論
共有 條評論