Python bindings: Fixed 705 and compilation problems Former-commit-id: 67e25b0e56f883c6cef045b3da95872535cbabd1
@@ -8,6 +8,10 @@
#include <igl/viewer/ViewerData.h>
#include <igl/viewer/OpenGL_state.h>
#include <igl/serialize.h>
+#ifdef IGL_VIEWER_WITH_NANOGUI
+#include "../../../external/nanogui/include/nanogui/formhelper.h"
+#include "../../../external/nanogui/include/nanogui/screen.h"
+#endif
void python_export_igl_viewer(py::module &m)
{
@@ -45,7 +45,7 @@ if __name__ == "__main__":
res = (s * ((Vmax - Vmin) / (Vmax - Vmin).maxCoeff())).castint()
def lerp(res, Vmin, Vmax, di, d):
- return Vmin[d] + di / (res[d] - 1) * (Vmax[d] - Vmin[d])
+ return Vmin[d] + float(di) / (res[d] - 1) * (Vmax[d] - Vmin[d])
# create grid
print("Creating grid...")