From 667d5b8a8757aaa7f74b8feee2354834b8b2da24 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Sun, 2 Oct 2022 13:34:30 -0400 Subject: [PATCH] avoid subtraction on indices --- main.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/main.cpp b/main.cpp index 81dcc8633..ac7e83680 100644 --- a/main.cpp +++ b/main.cpp @@ -13,18 +13,18 @@ int main(int argc, char *argv[]) 1.0,1.0,0.0, 1.0,1.0,1.0).finished(); const Eigen::MatrixXi F = (Eigen::MatrixXi(12,3)<< - 1,7,5, - 1,3,7, - 1,4,3, - 1,2,4, - 3,8,7, - 3,4,8, - 5,7,8, - 5,8,6, - 1,5,6, - 1,6,2, - 2,6,8, - 2,8,4).finished().array()-1; + 0,6,4, + 0,2,6, + 0,3,2, + 0,1,3, + 2,7,6, + 2,3,7, + 4,6,7, + 4,7,5, + 0,4,5, + 0,5,1, + 1,5,7, + 1,7,3).finished(); // Plot the mesh igl::opengl::glfw::Viewer viewer;