一个好的 3D 网格库 [英] A Good 3D mesh library

查看:23
本文介绍了一个好的 3D 网格库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个好的 3D Mesh 库

I'm looking for a good 3D Mesh library

  • 应该能够读取流行的格式(OFF、OBJ...)
  • 应同时支持半边结构和三角汤
  • 应该能够容忍错误和非法网格.
  • 基本几何运算 - 交点、法线计算等'
  • 最重要的是 - 不应被无休止的模板和继承层次结构所困扰.

我尝试了 CGAL 和 OpenMesh,但在最后一点都失败了.

I've tried both CGAL and OpenMesh but both fail miserably in the last point.

特别是 CGAL,即使使用最先进的代码分析工具也无法遵循.

Specifically CGAL which is impossible to follow even with the most advanced code analysis tools.

到目前为止,我正在认真考虑自己开发.

So far I'm seriously considering to pull my own.

我的偏好是 C++,但我也愿意接受其他选择.

My preference is C++ but I'm open to other options.

推荐答案

请问为什么最后一点是必须的?

May I ask why the last point is a requirement?

为公共消费而编写的图书馆旨在尽可能通用,以便尽可能多的受众使用.在 C++ 中,这通常最好使用模板来完成.如果找到一个好的库,那会非常糟糕,结果却发现它对您的目的毫无用处,因为它使用的是浮点数而不是双精度数.

Libraries written for public consumption are designed to be as generic as possible so that it is usable by the widest possible audience. In C++, this is often best done using templates. It would suck tremendously if found a good library, only to discover it was useless for your purposes because it used floats instead of doubles.

例如,CGAL 似乎采用了众所周知且经过充分测试的 STL 范式来编写通用和可扩展的 C++ 库.这确实使代码分析工具难以遵循;我怀疑他们也很擅长跟踪 STL 标头.

CGAL, for example, appears to have adopted the well-known and well-tested STL paradigm of writing generic and extensible C++ libraries. This does indeed make it difficult to follow with code analysis tools; I doubt they're much good at following STL headers either.

但是您是在尝试使用该库还是对其进行修改?无论哪种方式,他们似乎都有一些非常高质量的文档(例如 内核手册),应该可以相对简单地找出您需要做什么,而不必求助于阅读他们的代码.

But are you trying to use the library or modify it? Either way, they seem to have some extremely high-quality documentation (e.g. Kernel Manual) that should make it relatively simple to figure out what you need to do, without having to resort to reading their code.

免责声明:我知道这不是您要的.但我认为你要找的东西不存在.找到与我在 CGAL 中看到的一样好的带有文档的开源代码是非常的.我强烈建议你再看一遍.

Disclaimer: I know this isn't what you're asking for. But I don't think what you're looking for exists. It is extraordinarily rare to find open source code with documentation as good as what I've seen scanning through CGAL. I would strongly suggest that you take another look at it.

这篇关于一个好的 3D 网格库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆