Download vendor/libigl/tests/include/igl/heat_geodesics.cpp from AVSim/simulation-package: direct link, hf CLI and curl.
- Browser
- Download file 703 Bytes
-
https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tests/include/igl/heat_geodesics.cpp
- Command line
-
hf download hf://datasets/AVSim/simulation-package/vendor/libigl/tests/include/igl/heat_geodesics.cpp
-
curl -L -o heat_geodesics.cpp https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tests/include/igl/heat_geodesics.cpp
703 Bytes
| TEST_CASE("heat_geodesic: upsampled cube", "[igl]") | |
| { | |
| Eigen::MatrixXd V; | |
| Eigen::MatrixXi F; | |
| igl::read_triangle_mesh(test_common::data_path("cube.obj"), V, F); | |
| igl::upsample(V,F,3); | |
| int vid = 0; | |
| igl::HeatGeodesicsData<double> data; | |
| igl::heat_geodesics_precompute(V,F,data); | |
| Eigen::VectorXd dist; | |
| igl::heat_geodesics_solve(data, (Eigen::VectorXi(1,1)<<vid).finished(), dist); | |
| double avg_edge = igl::avg_edge_length(V,F); | |
| // Check the adjacent corners | |
| for (int i=0; i<6; i++) { | |
| REQUIRE((V.row(i)-V.row(0)).norm() == Approx(dist(i)).margin(avg_edge)); | |
| } | |
| } |