Download vendor/libigl/tests/include/igl/direct_delta_mush.cpp from AVSim/simulation-package: direct link, hf CLI and curl.
- Browser
- Download file 978 Bytes
-
https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tests/include/igl/direct_delta_mush.cpp
- Command line
-
hf download hf://datasets/AVSim/simulation-package/vendor/libigl/tests/include/igl/direct_delta_mush.cpp
-
curl -L -o direct_delta_mush.cpp https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tests/include/igl/direct_delta_mush.cpp
978 Bytes
| TEST_CASE("direct_delta_mush: cube", "[igl]") | |
| { | |
| Eigen::MatrixXd V, W, U, Omega; | |
| Eigen::MatrixXi F; | |
| // Test that direct delta mush with identity transform reproduces the rest state of the mesh. | |
| // For simplicity, testing on a cube of dimensions 1.0 x 1.0 x 1.0, | |
| // with all vertices bound strictly to one and only one imaginary bone (weight is a column of 1s) | |
| igl::read_triangle_mesh(test_common::data_path("cube.off"), V, F); | |
| W = Eigen::MatrixXd::Ones(V.rows(), 1); | |
| // Parameters such as p, lambda, kappa, alpha do not matter given identity transform | |
| igl::direct_delta_mush_precomputation(V, F, W, 1, 1., 0.5, 0.5, Omega); | |
| std::vector<Eigen::Affine3d, Eigen::aligned_allocator<Eigen::Affine3d>> T_list; | |
| T_list.push_back(Eigen::Affine3d::Identity()); | |
| igl::direct_delta_mush(V, T_list, Omega, U); | |
| test_common::assert_near(U, V, 1e-4); | |
| } | |