• 大小: 134KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-02
  • 语言: 其他
  • 标签: delaunay  三角化  

资源简介

基于VC的Delaunay三角剖分源码,算法比较详细

资源截图

代码片段和文件信息

// ChildView.cpp
//

#include “stdafx.h“
#include “DelaunayDemo.h“
#include “ChildView.h“
#include “QPerformanceTimer.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

const int range = 1000;
#define colVertex (RGB(255 128 0))

#if(WINVER >= 0x0400)
#define FONT DEFAULT_GUI_FONT
#else
#define FONT SYSTEM_FONT
#endif

inline int Int(REAL r) { return (int) floor(r + 0.5f); } // properly round of a REAL

// Function object to draw a vertex; to be used in for_each algorithm.
class drawVertex
{
public:
drawVertex(CDC& dc REAL hScale REAL vScale) : m_DC(dc) m_hScale(hScale) m_vScale(vScale) {}
void operator()(const vertex& v) const
{
const int halfSize = 2;

CRect rc;
rc.SetRectEmpty();
rc.InflateRect(halfSize halfSize);
rc.OffsetRect(Int(m_hS

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件      225280  2005-01-15 19:38  DelaunayDemo.exe
     文件         580  2004-12-17 13:17  DelaunayDemo.h
     文件        9675  2005-01-15 19:36  DelaunayDemo.rc
     文件        4569  2005-01-15 19:38  DelaunayDemo.vcproj
     文件        1890  2004-12-17 13:17  MainFrm.cpp
     文件         795  2004-12-17 13:17  MainFrm.h
     文件        2418  2004-12-18 16:36  QPerformanceTimer.h
     文件         815  2004-12-18 16:14  resource.h
     文件         212  2004-12-17 13:17  stdafx.cpp
     文件        1809  2004-12-17 13:17  stdafx.h
     文件       21630  2001-04-20 08:48  res\DelaunayDemo.ico
     文件         702  2004-12-17 13:17  res\DelaunayDemo.manifest
     文件         403  2004-12-17 13:17  res\DelaunayDemo.rc2
     目录           0  2005-01-15 21:48  res\
     文件        5620  2004-12-18 16:36  ChildView.cpp
     文件         937  2004-12-18 16:14  ChildView.h
     文件       10112  2005-01-15 21:54  Delaunay.cpp
     文件        6656  2005-07-16 15:10  Delaunay.h
     文件        2737  2004-12-17 13:17  DelaunayDemo.cpp

评论

共有 条评论