@@ -0,0 +1,20 @@
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.tex text
|
||||
*.bib text
|
||||
*.svg text
|
||||
*.py text
|
||||
*.vbs text
|
||||
*.cpp text
|
||||
*.hpp text
|
||||
Makefile text
|
||||
|
||||
# Declare files that will always have CRLF line endings on checkout.
|
||||
*.sln text eol=crlf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
+1
-18
@@ -18,24 +18,7 @@ examples/*/*.rbr
|
||||
example_static
|
||||
example_header_only
|
||||
example1
|
||||
external/yimg/.git*
|
||||
external/tinyxml2/CMakeFiles*
|
||||
external/tinyxml2/CMakeCache.txt
|
||||
external/tinyxml2/cmake_install.cmake
|
||||
external/tinyxml2/Makefile
|
||||
external/embree/build/*
|
||||
external/embree/bin/*
|
||||
external/embree/bin
|
||||
external/embree/doc/html/*
|
||||
external/embree/doc/latex/*
|
||||
external/gmp
|
||||
external/cgal
|
||||
external/cork
|
||||
external/mpfr
|
||||
external/boost
|
||||
external/.cache
|
||||
external/build
|
||||
external/pybind11
|
||||
/external
|
||||
.DS_Store
|
||||
libigl.zip
|
||||
*tags
|
||||
|
||||
@@ -68,6 +68,14 @@ function(igl_download_embree)
|
||||
)
|
||||
endfunction()
|
||||
|
||||
## glad
|
||||
function(igl_download_glad)
|
||||
igl_download_project(glad
|
||||
GIT_REPOSITORY https://github.com/libigl/libigl-glad.git
|
||||
GIT_TAG 71e35fe685a0cc160068a2f2f971c40b82d14af0
|
||||
)
|
||||
endfunction()
|
||||
|
||||
## GLFW
|
||||
function(igl_download_glfw)
|
||||
igl_download_project(glfw
|
||||
@@ -78,13 +86,14 @@ endfunction()
|
||||
|
||||
## ImGui
|
||||
function(igl_download_imgui)
|
||||
download_project(
|
||||
PROJ imgui
|
||||
SOURCE_DIR ${LIBIGL_EXTERNAL}/imgui/imgui
|
||||
DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/${name}
|
||||
igl_download_project(imgui
|
||||
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||
GIT_TAG bc6ac8b2aee0614debd940e45bc9cd0d9b355c86
|
||||
)
|
||||
igl_download_project(libigl-imgui
|
||||
GIT_REPOSITORY https://github.com/libigl/libigl-imgui.git
|
||||
GIT_TAG a37e6e59e72fb07bd787dc7e90f72b9e1928dae7
|
||||
)
|
||||
endfunction()
|
||||
|
||||
## pybind11
|
||||
@@ -95,6 +104,14 @@ function(igl_download_pybind11)
|
||||
)
|
||||
endfunction()
|
||||
|
||||
## stb_image
|
||||
function(igl_download_stb)
|
||||
igl_download_project(stb
|
||||
GIT_REPOSITORY https://github.com/libigl/libigl-stb.git
|
||||
GIT_TAG e671ceb3def5e7029a23de14c55dc16301ad4dab
|
||||
)
|
||||
endfunction()
|
||||
|
||||
## TetGen
|
||||
function(igl_download_tetgen)
|
||||
igl_download_project(tetgen
|
||||
@@ -119,7 +136,6 @@ function(igl_download_triangle)
|
||||
)
|
||||
endfunction()
|
||||
|
||||
|
||||
## Google test
|
||||
function(igl_download_googletest)
|
||||
igl_download_project(googletest
|
||||
@@ -128,8 +144,6 @@ function(igl_download_googletest)
|
||||
)
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
+4
-3
@@ -324,6 +324,7 @@ if(LIBIGL_WITH_OPENGL)
|
||||
|
||||
# glad module
|
||||
if(NOT TARGET glad)
|
||||
igl_download_glad()
|
||||
add_subdirectory(${LIBIGL_EXTERNAL}/glad glad)
|
||||
endif()
|
||||
target_link_libraries(igl_opengl ${IGL_SCOPE} glad)
|
||||
@@ -355,7 +356,7 @@ if(LIBIGL_WITH_OPENGL_GLFW_IMGUI)
|
||||
compile_igl_module("opengl/glfw/imgui")
|
||||
if(NOT TARGET imgui)
|
||||
igl_download_imgui()
|
||||
add_subdirectory(${LIBIGL_EXTERNAL}/imgui imgui)
|
||||
add_subdirectory(${LIBIGL_EXTERNAL}/libigl-imgui imgui)
|
||||
endif()
|
||||
target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui)
|
||||
endif()
|
||||
@@ -367,9 +368,9 @@ if(LIBIGL_WITH_PNG)
|
||||
# png/ module is anomalous because it also depends on opengl it really should
|
||||
# be moved into the opengl/ directory and namespace ...
|
||||
if(TARGET igl_opengl)
|
||||
set(STB_IMAGE_DIR "${LIBIGL_EXTERNAL}/stb_image")
|
||||
if(NOT TARGET stb_image)
|
||||
add_subdirectory("${STB_IMAGE_DIR}" "stb_image")
|
||||
igl_download_stb()
|
||||
add_subdirectory(${LIBIGL_EXTERNAL}/stb stb_image)
|
||||
endif()
|
||||
compile_igl_module("png" "")
|
||||
target_link_libraries(igl_png ${IGL_SCOPE} igl_stb_image igl_opengl)
|
||||
|
||||
+12
-11
@@ -1,9 +1,9 @@
|
||||
// This file is part of libigl, a simple c++ geometry processing library.
|
||||
//
|
||||
//
|
||||
// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public License
|
||||
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public License
|
||||
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
||||
// obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#include "cat.h"
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
#include <unsupported/Eigen/SparseExtra>
|
||||
|
||||
|
||||
// Sparse matrices need to be handled carefully. Because C++ does not
|
||||
// Sparse matrices need to be handled carefully. Because C++ does not
|
||||
// Template:
|
||||
// Scalar sparse matrix scalar type, e.g. double
|
||||
template <typename Scalar>
|
||||
IGL_INLINE void igl::cat(
|
||||
const int dim,
|
||||
const Eigen::SparseMatrix<Scalar> & A,
|
||||
const Eigen::SparseMatrix<Scalar> & B,
|
||||
const int dim,
|
||||
const Eigen::SparseMatrix<Scalar> & A,
|
||||
const Eigen::SparseMatrix<Scalar> & B,
|
||||
Eigen::SparseMatrix<Scalar> & C)
|
||||
{
|
||||
|
||||
@@ -108,13 +108,13 @@ IGL_INLINE void igl::cat(
|
||||
|
||||
}
|
||||
|
||||
C = SparseMatrix<Scalar>(
|
||||
C = SparseMatrix<Scalar>(
|
||||
dim == 1 ? A.rows()+B.rows() : A.rows(),
|
||||
dim == 1 ? A.cols() : A.cols()+B.cols());
|
||||
C.reserve(A.nonZeros() + B.nonZeros());
|
||||
C.setFromTriplets(CIJV.begin(),CIJV.end());
|
||||
#else
|
||||
C = SparseMatrix<Scalar>(
|
||||
C = SparseMatrix<Scalar>(
|
||||
dim == 1 ? A.rows()+B.rows() : A.rows(),
|
||||
dim == 1 ? A.cols() : A.cols()+B.cols());
|
||||
Eigen::VectorXi per_col = Eigen::VectorXi::Zero(C.cols());
|
||||
@@ -189,7 +189,7 @@ IGL_INLINE void igl::cat(
|
||||
template <typename Derived, class MatC>
|
||||
IGL_INLINE void igl::cat(
|
||||
const int dim,
|
||||
const Eigen::MatrixBase<Derived> & A,
|
||||
const Eigen::MatrixBase<Derived> & A,
|
||||
const Eigen::MatrixBase<Derived> & B,
|
||||
MatC & C)
|
||||
{
|
||||
@@ -264,4 +264,5 @@ template Eigen::Matrix<int, -1, 1, 0, -1, 1> igl::cat<Eigen::Matrix<int, -1, 1,
|
||||
template Eigen::Matrix<double, -1, 1, 0, -1, 1> igl::cat<Eigen::Matrix<double, -1, 1, 0, -1, 1> >(int, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&);
|
||||
template void igl::cat<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(int, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);
|
||||
template void igl::cat<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(int, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<int, -1, -1, 0, -1, -1>&);
|
||||
template void igl::cat<Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(int, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::Matrix<int, -1, 1, 0, -1, 1>&);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user