【问题标题】:Delaunay Trangulation for VS2012 C++? [closed]VS2012 C++的德劳内三角剖分? [关闭]
【发布时间】:2014-02-13 01:54:53
【问题描述】:

是否有适用于 VS2012 C++ 的 Delaunay Triangulation 代码/库?我希望在不使用第三方二进制文件的情况下得到一些轻量级的东西。

我已经尝试了很多(TriangleA Delaunay triangulation function in Cpoly2triGeom Fade 2D)。很多只是不好用,不然不兼容vs2012;

有人有什么建议吗?非常感谢

编辑:三角形问题:

有一个三角形网格生成器(Shewchuk,CMU),“Triangle”,因其轻量级而被人们推荐。它是用 C 编写的。但是我不能在我的 VS2012 C++ 项目中使用它。我正在使用 x64 平台编译它。我在 Windows 7 64 位上。

基本上,我将 triangle.c 编译为所描述的 makefile。因此,生成了一个 triangle.o。我那时 1.在我的解决方案中添加了 triangle.o 作为附加依赖项, 2.在我的项目中添加了 triangle.c 和 triangle.h 。 3.将C/C++预编译头选项中的triangle.c更改为“不使用预编译头”

然后我遇到了很多这样的错误:

1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h(430): error C2143: syntax error : missing ';' before '*'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h(430): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h(497): error C2143: syntax error : missing ';' before '*'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h(497): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h(498): error C2143: syntax error : missing ';' before '*'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h(498): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\winnt.h(2517): warning C4391: 'SHORT _InterlockedIncrement16(volatile SHORT *)' : incorrect return type for intrinsic function, expected 'short'

【问题讨论】:

    标签: c++ visual-studio visual-studio-2012 graphics computer-vision


    【解决方案1】:

    我已经好几年没用VS了,但上次我很高兴地将我的应用程序与Triangle链接起来,我们对结果非常满意。

    您遇到了哪些兼容性问题?

    【讨论】:

    • 我实际上使用了 s-hull,它似乎可以工作,尽管当点数变大时会出现异常,例如 1024。你有使用 s-hull 的经验吗?如果是这样,您认为它与三角形相比如何?就我而言,Triangle 的问题是编译错误,很多。
    • 我添加了一些信息,因此您可能会看到我对 Triangle 的问题。如果您需要更多信息,请与我们联系。谢谢。
    • 我手边没有一台 Windows 机器(已经转移到 Linux 和 MacOSX 很长一段时间了),但我会大胆猜测 - triangle.h 是否有 C++ 兼容性标头保护? stackoverflow.com/questions/3789340/…
    • 它没有改变任何东西。我仍然有很多错误。真的很困惑如何用 VS2012 编译三角形。
    猜你喜欢
    • 2012-04-27
    • 2020-05-12
    • 2017-10-18
    • 2012-05-06
    • 1970-01-01
    • 1970-01-01
    • 2022-01-09
    • 2013-11-18
    相关资源
    最近更新 更多