github上的位置

## 简单介绍

libigl - A simple C++ geometry processing library

libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB.

It is a header-only library. You do not need to compile anything to use, just include igl headers (e.g. #include "igl/cotmatrix.h") and run. Each header file contains a single function (e.g. igl/cotmatrix.h contains igl::cotmatrix()). Most are tailored to operate on a generic triangle mesh stored in an n×3$n\times 3$ matrix of vertex positions V$V$ and an m×3$m\times 3$ matrix of triangle indices F$F$.

Optionally the library may also be pre-compiled into a statically linked library, for faster compile times with your projects. This only effects compile time (run-time performance and behavior is identical). If in doubt, use the header-only default mode: (i.e. just include the headers you want to use).

We use the Eigen library heavily in our code. Our group prototypes a lot in MATLAB, and we have a useful MATLAB to libigl+Eigen conversion table.

## 如何使用

Libigl is a header-only library. You do not need to build anything to install. Simply add libigl/include to your include path and include relevant headers. Here is a small “Hello, World” program:

#include <igl/cotmatrix.h>
#include <Eigen/Dense>
#include <Eigen/Sparse>
#include <iostream>
int main()
{
Eigen::MatrixXd V(4,2);
V<<0,0,
1,0,
1,1,
0,1;
Eigen::MatrixXi F(2,3);
F<<0,1,2,
0,2,3;
Eigen::SparseMatrix<double> L;
igl::cotmatrix(V,F,L);
std::cout<<"Hello, mesh: "<<std::endl<<L*V<<std::endl;
return 0;
}

If you save this in hello.cpp, then you could compile this with (assuming Eigen is installed in /usr/local/include/eigen3):

Running it would then produce:

Hello, mesh:
0.5  0.5
-0.5  0.5
-0.5 -0.5
0.5 -0.5

## 注意事项

1. Dependencies are on a per-include basis and the majority of the functions in libigl depends only on the Eigen library. For more information see our tutorial.
.

2. Some of our functions will take advantage of OpenMP if available. However, it has come to our attention that Visual Studio + Eigen + OpenMP does NOT work properly. Since we use OpenMP only to improve performance, we recommend avoiding OpenMP on Windows or proceeding with caution.

#### C++计算几何算法大全

2016-11-23 19:37:40

#### 二维计算几何库（C++源码）

2014年01月06日 18KB 下载

#### 转（C++计算几何函数库 ）

2012-07-12 09:10:31

#### C++常用计算几何算法

2015-06-29 10:24:57

#### 开源几何计算数学库

2016-08-03 17:49:28

#### 计算几何库

2008-05-02 16:17:00

#### Opengl绘制计算几何库CGAL三角剖分结果的Demo

2015-03-13 22:29:30

#### 计算几何几何函数库

2008-03-16 14:48:00

#### C++数学计算库与软件

2013-12-17 13:04:56

#### 三维计算几何库（C++源码）

2014年01月06日 7KB 下载