C++ 中的几何库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9149392/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 12:23:31  来源:igfitidea点击:

Geometry library in C++

c++geometry

提问by Rasoul

I am looking for an easy to use and well documented geometry library in c++. I would like to use it in 3D perception that I am dealing with point clouds. Coordinate transformations, rotations and translations are my special concern now. Any suggestion?

我正在寻找一个易于使用且文档齐全的 C++ 几何库。我想在处理点云的 3D 感知中使用它。坐标变换、旋转和平移现在是我特别关心的问题。有什么建议吗?

采纳答案by Ivaylo Strandjev

A very powerful library is cgal. Some of the functions in openglmay also be of use.

一个非常强大的库是cgalopengl 中的一些函数也可能有用。

回答by tpg2114

Check out Boost::Geometry

查看Boost::Geometry

It has some basic point definitions and coordinate systems as well as distance calculations. From there you can extend it as needed.

它有一些基本的点定义和坐标系以及距离计算。从那里您可以根据需要扩展它。

There's also some intersection routines and things to find convex hulls from clouds of points.

还有一些交叉例程和从点云中找到凸包的东西。

回答by Fei

Check out this site. It gives you a very good overview about existing geometry libraries, even with some pros and cons.

看看这个网站。它为您提供了关于现有几何库的非常好的概述,即使有一些优点和缺点。

Update:And you may also have a look at the Point Cloud Library. It's quite a new library for working with point clouds, easy to understand and has plenty of good tutorials to get started with!

更新:您还可以查看点云库。这是一个用于处理点云的新库,易于理解,并且有很多很好的入门教程!

回答by U?ur Gümü?han

PLIB: A Suite of Portable Game Libraries

PLIB:一套便携式游戏库

Note: Just because it says "game" it doesnt mean you cant use it in anything other than developing games.

注意:仅仅因为它说“游戏”并不意味着你不能在开发游戏之外的任何地方使用它。

回答by Kaje

If you're going to render your geometries in a VGA screen, I strongly recommend you to use microsoft DirectX library which is the best one for graphics rendering. Otherwise, just go with Boost::Geometry library which would be enough for your purpose.

如果您打算在 VGA 屏幕中渲染几何图形,我强烈建议您使用 microsoft DirectX 库,它是图形渲染的最佳库。否则,只需使用 Boost::Geometry 库就足够了。

回答by Ainsworth

If you're looking for a lightweight yet powerful library have a look at:

如果您正在寻找轻量级但功能强大的库,请查看:

http://www.renishaw.com/geometricmodelling/

http://www.renishaw.com/geometricmodelling/