├── ui ├── vendor │ └── efsw │ │ ├── project │ │ ├── qtcreator-osx │ │ │ ├── efsw.creator │ │ │ ├── efsw.includes │ │ │ └── efsw.config │ │ ├── qtcreator-win │ │ │ ├── efsw.creator │ │ │ ├── efsw.config │ │ │ └── efsw.includes │ │ ├── qtcreator-linux │ │ │ ├── efsw.creator │ │ │ ├── efsw.config │ │ │ └── efsw.includes │ │ └── build.reldbginfo.sh │ │ ├── .hgignore │ │ ├── .hg_archival.txt │ │ ├── src │ │ └── efsw │ │ │ ├── Mutex.cpp │ │ │ ├── Watcher.cpp │ │ │ ├── Mutex.hpp │ │ │ ├── platform │ │ │ ├── posix │ │ │ │ ├── SystemImpl.hpp │ │ │ │ ├── MutexImpl.hpp │ │ │ │ ├── FileSystemImpl.hpp │ │ │ │ ├── ThreadImpl.hpp │ │ │ │ ├── MutexImpl.cpp │ │ │ │ └── ThreadImpl.cpp │ │ │ ├── win │ │ │ │ ├── SystemImpl.hpp │ │ │ │ ├── MutexImpl.cpp │ │ │ │ ├── MutexImpl.hpp │ │ │ │ ├── FileSystemImpl.hpp │ │ │ │ ├── ThreadImpl.hpp │ │ │ │ ├── SystemImpl.cpp │ │ │ │ ├── ThreadImpl.cpp │ │ │ │ └── FileSystemImpl.cpp │ │ │ └── platformimpl.hpp │ │ │ ├── System.cpp │ │ │ ├── WatcherInotify.hpp │ │ │ ├── System.hpp │ │ │ ├── Watcher.hpp │ │ │ ├── WatcherGeneric.hpp │ │ │ ├── DirectorySnapshotDiff.cpp │ │ │ ├── FileWatcherImpl.cpp │ │ │ ├── WatcherInotify.cpp │ │ │ ├── Log.cpp │ │ │ ├── Thread.cpp │ │ │ ├── DirectorySnapshotDiff.hpp │ │ │ ├── WatcherGeneric.cpp │ │ │ ├── DirectorySnapshot.hpp │ │ │ ├── FileSystem.hpp │ │ │ ├── Debug.hpp │ │ │ ├── FileInfo.hpp │ │ │ ├── DirWatcherGeneric.hpp │ │ │ ├── WatcherFSEvents.hpp │ │ │ ├── FileWatcherGeneric.hpp │ │ │ ├── FileWatcherImpl.hpp │ │ │ ├── Debug.cpp │ │ │ ├── WatcherWin32.hpp │ │ │ ├── FileWatcherWin32.hpp │ │ │ └── FileWatcherKqueue.hpp │ │ └── LICENSE ├── src │ ├── task.cpp │ ├── gl │ │ └── texture.cpp │ └── watcher.cpp ├── include │ └── ao │ │ └── ui │ │ ├── gl │ │ ├── texture.hpp │ │ ├── shader.hpp │ │ ├── axes.hpp │ │ └── core.hpp │ │ └── task.hpp ├── CMakeLists.txt └── test │ └── gl.cpp ├── vendor ├── Eigen │ ├── Eigen │ ├── src │ │ ├── Core │ │ │ ├── util │ │ │ │ ├── NonMPL2.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── ReenableStupidWarnings.h │ │ │ ├── arch │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── SSE │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── NEON │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── AltiVec │ │ │ │ │ └── CMakeLists.txt │ │ │ │ └── Default │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── Settings.h │ │ │ ├── products │ │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ │ ├── QR │ │ │ └── CMakeLists.txt │ │ ├── SVD │ │ │ └── CMakeLists.txt │ │ ├── misc │ │ │ └── CMakeLists.txt │ │ ├── Jacobi │ │ │ └── CMakeLists.txt │ │ ├── LU │ │ │ ├── arch │ │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ │ ├── plugins │ │ │ └── CMakeLists.txt │ │ ├── Cholesky │ │ │ └── CMakeLists.txt │ │ ├── SparseLU │ │ │ └── CMakeLists.txt │ │ ├── SparseQR │ │ │ └── CMakeLists.txt │ │ ├── SparseCore │ │ │ ├── CMakeLists.txt │ │ │ ├── SparseFuzzy.h │ │ │ └── SparseRedux.h │ │ ├── StlSupport │ │ │ └── CMakeLists.txt │ │ ├── Eigenvalues │ │ │ └── CMakeLists.txt │ │ ├── Householder │ │ │ └── CMakeLists.txt │ │ ├── SPQRSupport │ │ │ └── CMakeLists.txt │ │ ├── Geometry │ │ │ ├── arch │ │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ │ ├── MetisSupport │ │ │ └── CMakeLists.txt │ │ ├── PaStiXSupport │ │ │ └── CMakeLists.txt │ │ ├── CholmodSupport │ │ │ └── CMakeLists.txt │ │ ├── PardisoSupport │ │ │ └── CMakeLists.txt │ │ ├── SparseCholesky │ │ │ └── CMakeLists.txt │ │ ├── SuperLUSupport │ │ │ └── CMakeLists.txt │ │ ├── UmfPackSupport │ │ │ └── CMakeLists.txt │ │ ├── OrderingMethods │ │ │ └── CMakeLists.txt │ │ ├── Eigen2Support │ │ │ ├── Geometry │ │ │ │ └── CMakeLists.txt │ │ │ ├── CMakeLists.txt │ │ │ ├── Macros.h │ │ │ ├── TriangularSolver.h │ │ │ ├── Memory.h │ │ │ └── QR.h │ │ ├── IterativeLinearSolvers │ │ │ └── CMakeLists.txt │ │ └── CMakeLists.txt │ ├── Dense │ ├── Array │ ├── Householder │ ├── CMakeLists.txt │ ├── Sparse │ ├── Jacobi │ ├── StdList │ ├── QtAlignedMalloc │ ├── MetisSupport │ ├── COPYING.README │ ├── LeastSquares │ ├── StdDeque │ ├── StdVector │ ├── Cholesky │ ├── PardisoSupport │ ├── SVD │ ├── SPQRSupport │ ├── QR │ ├── SparseQR │ ├── LU │ ├── UmfPackSupport │ ├── Eigenvalues │ ├── COPYING.BSD │ ├── SparseCholesky │ ├── PaStiXSupport │ ├── IterativeLinearSolvers │ ├── Geometry │ ├── CholmodSupport │ └── SparseLU ├── catch │ └── LICENSE_1_0.txt └── glm │ ├── detail │ ├── intrinsic_exponential.inl │ ├── intrinsic_trigonometric.inl │ ├── type_vec.inl │ ├── type_mat.inl │ ├── type_vec4_avx.inl │ ├── type_vec4_avx2.inl │ ├── precision.hpp │ ├── intrinsic_trigonometric.hpp │ ├── intrinsic_vector_relational.hpp │ ├── intrinsic_integer.hpp │ └── type_half.hpp │ ├── gtc │ ├── vec1.inl │ └── type_precision.inl │ ├── gtx │ ├── raw_data.inl │ ├── type_aligned.inl │ ├── std_based_type.inl │ ├── number_precision.inl │ ├── perpendicular.inl │ ├── projection.inl │ ├── mixed_product.inl │ └── normal.inl │ ├── vec2.hpp │ ├── vec3.hpp │ ├── vec4.hpp │ ├── common.hpp │ ├── matrix.hpp │ ├── integer.hpp │ ├── packing.hpp │ ├── geometric.hpp │ ├── exponential.hpp │ ├── trigonometric.hpp │ └── vector_relational.hpp ├── .gitignore ├── test ├── main.cpp ├── CMakeLists.txt └── api.cpp ├── bind ├── guile │ ├── test │ │ ├── README.md │ │ └── ggspec │ │ │ └── LICENSE │ └── ao │ │ └── export.scm └── CMakeLists.txt ├── examples ├── charm.scm └── menger.scm ├── kernel ├── CMakeLists.txt ├── test │ ├── shapes.hpp │ └── glm.hpp ├── include │ └── ao │ │ └── kernel │ │ ├── format │ │ ├── image.hpp │ │ ├── contours.hpp │ │ └── mesh.hpp │ │ ├── render │ │ ├── heightmap.hpp │ │ ├── quadtree.hpp │ │ └── octree.hpp │ │ └── tree │ │ ├── opcode.hpp │ │ └── atom.hpp └── src │ └── eval │ ├── result.cpp │ └── row.cpp ├── doc └── references.md ├── CMakeLists.txt ├── COPYING.md └── README.md /ui/vendor/efsw/project/qtcreator-osx/efsw.creator: -------------------------------------------------------------------------------- 1 | [General] 2 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/qtcreator-win/efsw.creator: -------------------------------------------------------------------------------- 1 | [General] 2 | -------------------------------------------------------------------------------- /vendor/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | //#include "Sparse" 3 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/qtcreator-linux/efsw.creator: -------------------------------------------------------------------------------- 1 | [General] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .ycm_extra_conf.py* 2 | build/* 3 | lib/libao.* 4 | ao-guile 5 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/qtcreator-osx/efsw.includes: -------------------------------------------------------------------------------- 1 | ../../src 2 | ../../include 3 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/qtcreator-win/efsw.config: -------------------------------------------------------------------------------- 1 | // ADD PREDEFINED MACROS HERE! 2 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/qtcreator-win/efsw.includes: -------------------------------------------------------------------------------- 1 | ../../src 2 | ../../include 3 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/qtcreator-linux/efsw.config: -------------------------------------------------------------------------------- 1 | // ADD PREDEFINED MACROS HERE! 2 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/qtcreator-linux/efsw.includes: -------------------------------------------------------------------------------- 1 | ../../include 2 | ../../src 3 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/qtcreator-osx/efsw.config: -------------------------------------------------------------------------------- 1 | // ADD PREDEFINED MACROS HERE! 2 | #define EFSW_FSEVENTS_SUPPORTED 3 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/util/NonMPL2.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_MPL2_ONLY 2 | #error Including non-MPL2 code in EIGEN_MPL2_ONLY mode 3 | #endif 4 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(SSE) 2 | ADD_SUBDIRECTORY(AltiVec) 3 | ADD_SUBDIRECTORY(NEON) 4 | ADD_SUBDIRECTORY(Default) 5 | -------------------------------------------------------------------------------- /vendor/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /test/main.cpp: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_RUNNER 2 | #include 3 | 4 | int main(int argc, char** argv) 5 | { 6 | return Catch::Session().run(argc, argv); 7 | } 8 | 9 | -------------------------------------------------------------------------------- /vendor/Eigen/src/QR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_QR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_QR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/QR COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /ui/vendor/efsw/.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | bin/* 3 | obj/* 4 | make/* 5 | lib/* 6 | *.DS_Store* 7 | project/qtcreator-osx/efsw.creator.user.2.6pre1 8 | project/qtcreator-osx/efsw.creator.user.4bdfc43 -------------------------------------------------------------------------------- /vendor/Eigen/src/SVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SVD_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SVD_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SVD COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_misc_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_misc_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/misc COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Jacobi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Jacobi_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Jacobi_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Jacobi COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/LU/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_plugins_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_plugins_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/plugins COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /bind/guile/test/README.md: -------------------------------------------------------------------------------- 1 | Run the test suite with 2 | 3 | ``` 4 | guile ao-guile-test.scm 5 | ``` 6 | 7 | The `ggspec` subfolder is from commit `8c0a371` of [this repository](https://github.com/yawaramin/ggspec). 8 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Cholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Cholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Cholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Cholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/SparseLU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseLU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseLU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseLU COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/SparseQR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseQR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseQR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseQR/ COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_util_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_util_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/util COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/LU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /vendor/Eigen/src/SparseCore/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseCore_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseCore_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCore COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/StlSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_StlSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_StlSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/StlSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /ui/vendor/efsw/.hg_archival.txt: -------------------------------------------------------------------------------- 1 | repo: 78c2ea8c48b213ee0078d6326a1dd719d0844764 2 | node: f2aac6b6d9defbdd7eaf7d505c2da9d097f3b624 3 | branch: default 4 | latesttag: null 5 | latesttagdistance: 146 6 | changessincelatesttag: 150 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Eigenvalues/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_EIGENVALUES_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_EIGENVALUES_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigenvalues COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Householder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Householder_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Householder_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Householder COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/SPQRSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SPQRSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SPQRSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SPQRSupport/ COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB SRC_FILES ../ui/test/*.cpp ../kernel/test/*.cpp) 2 | 3 | add_executable(ao-test ${SRC_FILES} main.cpp api.cpp) 4 | target_include_directories(ao-test PUBLIC ../bind) 5 | target_link_libraries(ao-test ao) 6 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/arch/SSE/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_SSE_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_SSE_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/SSE COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/products/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_Product_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_Product_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/products COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Geometry/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/MetisSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_MetisSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_MetisSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/MetisSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/PaStiXSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_PastixSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_PastixSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PaStiXSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/CholmodSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_CholmodSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_CholmodSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/CholmodSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/arch/NEON/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_NEON_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_NEON_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/NEON COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/PardisoSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_PardisoSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_PardisoSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PardisoSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/SparseCholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseCholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseCholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/SuperLUSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SuperLUSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SuperLUSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SuperLUSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/UmfPackSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_UmfPackSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_UmfPackSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/UmfPackSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/OrderingMethods/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_OrderingMethods_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_OrderingMethods_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/OrderingMethods COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/arch/AltiVec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_AltiVec_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_AltiVec_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/AltiVec COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/arch/Default/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_Default_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_Default_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/Default COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Eigen2Support/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support/Geometry 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Eigen2Support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(Geometry) -------------------------------------------------------------------------------- /vendor/Eigen/src/IterativeLinearSolvers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_IterativeLinearSolvers_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_IterativeLinearSolvers_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/IterativeLinearSolvers COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(products) 9 | ADD_SUBDIRECTORY(util) 10 | ADD_SUBDIRECTORY(arch) 11 | -------------------------------------------------------------------------------- /ui/vendor/efsw/project/build.reldbginfo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd ../../lib 3 | ln -s libefsw.so.$1.$2.$3 libefsw.so.$1 4 | ln -s libefsw.so.$1 libefsw.so 5 | 6 | if [ "$4" == "strip-symbols" ]; then 7 | objcopy --only-keep-debug libefsw.so.$1.$2.$3 libefsw.debug 8 | objcopy --strip-debug libefsw.so.$1.$2.$3 9 | fi 10 | -------------------------------------------------------------------------------- /vendor/Eigen/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB Eigen_src_subdirectories "*") 2 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 3 | foreach(f ${Eigen_src_subdirectories}) 4 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" ) 5 | add_subdirectory(${f}) 6 | endif() 7 | endforeach() 8 | -------------------------------------------------------------------------------- /vendor/Eigen/Array: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ARRAY_MODULE_H 2 | #define EIGEN_ARRAY_MODULE_H 3 | 4 | // include Core first to handle Eigen2 support macros 5 | #include "Core" 6 | 7 | #ifndef EIGEN2_SUPPORT 8 | #error The Eigen/Array header does no longer exist in Eigen3. All that functionality has moved to Eigen/Core. 9 | #endif 10 | 11 | #endif // EIGEN_ARRAY_MODULE_H 12 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/util/ReenableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_WARNINGS_DISABLED 2 | #undef EIGEN_WARNINGS_DISABLED 3 | 4 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 5 | #ifdef _MSC_VER 6 | #pragma warning( pop ) 7 | #elif defined __INTEL_COMPILER 8 | #pragma warning pop 9 | #elif defined __clang__ 10 | #pragma clang diagnostic pop 11 | #endif 12 | #endif 13 | 14 | #endif // EIGEN_WARNINGS_DISABLED 15 | -------------------------------------------------------------------------------- /bind/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(ao SHARED api.cpp) 2 | target_link_libraries(ao ao-kernel ao-ui ${GUILE_LIBRARY}) 3 | target_include_directories(ao SYSTEM PRIVATE ${GUILE_INCLUDE_DIR}) 4 | target_include_directories(ao PRIVATE .) 5 | 6 | add_custom_command( 7 | TARGET ao POST_BUILD 8 | COMMAND mkdir -p ${PROJECT_SOURCE_DIR}/lib 9 | COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libao* 10 | ${PROJECT_SOURCE_DIR}/lib 11 | ) 12 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/Mutex.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace efsw { 5 | 6 | Mutex::Mutex() : 7 | mMutexImpl( new Platform::MutexImpl() ) 8 | { 9 | } 10 | 11 | Mutex::~Mutex() 12 | { 13 | efSAFE_DELETE( mMutexImpl ); 14 | } 15 | 16 | void Mutex::lock() 17 | { 18 | mMutexImpl->lock(); 19 | } 20 | 21 | void Mutex::unlock() 22 | { 23 | mMutexImpl->unlock(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/Watcher.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace efsw { 4 | 5 | Watcher::Watcher() : 6 | ID(0), 7 | Directory(""), 8 | Listener(NULL), 9 | Recursive(false) 10 | { 11 | } 12 | 13 | Watcher::Watcher( WatchID id, std::string directory, FileWatchListener * listener, bool recursive ) : 14 | ID( id ), 15 | Directory( directory ), 16 | Listener( listener ), 17 | Recursive( recursive ) 18 | { 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /examples/charm.scm: -------------------------------------------------------------------------------- 1 | (define ro 1) ; Outer radius 2 | (define ri 0.7) ; Inner radius 3 | (define t 0.2) ; Extrusion thickness 4 | 5 | ; Initial 2D model 6 | (define s (difference (circle '(0 0) ro) 7 | (circle '(0 0) ri))) 8 | 9 | ; Extruded into 3D 10 | (define e (extrude-z s (- t) t)) 11 | 12 | ; And rotated a few times 13 | (define model (union e (rotate-x e (/ pi 2)) 14 | (rotate-y e (/ pi 2)))) 15 | 16 | (ao-show model) 17 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/Mutex.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_MUTEX_HPP 2 | #define EFSW_MUTEX_HPP 3 | 4 | #include 5 | 6 | namespace efsw { 7 | 8 | namespace Platform { class MutexImpl; } 9 | 10 | /** Simple mutex class */ 11 | class Mutex { 12 | public: 13 | Mutex(); 14 | 15 | ~Mutex(); 16 | 17 | /** Lock the mutex */ 18 | void lock(); 19 | 20 | /** Unlock the mutex */ 21 | void unlock(); 22 | private: 23 | Platform::MutexImpl * mMutexImpl; 24 | }; 25 | 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/posix/SystemImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_SYSTEMIMPLPOSIX_HPP 2 | #define EFSW_SYSTEMIMPLPOSIX_HPP 3 | 4 | #include 5 | 6 | #if defined( EFSW_PLATFORM_POSIX ) 7 | 8 | namespace efsw { namespace Platform { 9 | 10 | class System 11 | { 12 | public: 13 | static void sleep( const unsigned long& ms ); 14 | 15 | static std::string getProcessPath(); 16 | 17 | static void maxFD(); 18 | 19 | static Uint64 getMaxFD(); 20 | }; 21 | 22 | }} 23 | 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/win/SystemImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_SYSTEMIMPLWIN_HPP 2 | #define EFSW_SYSTEMIMPLWIN_HPP 3 | 4 | #include 5 | 6 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 7 | 8 | namespace efsw { namespace Platform { 9 | 10 | class System 11 | { 12 | public: 13 | static void sleep( const unsigned long& ms ); 14 | 15 | static std::string getProcessPath(); 16 | 17 | static void maxFD(); 18 | 19 | static Uint64 getMaxFD(); 20 | }; 21 | 22 | }} 23 | 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/System.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace efsw { 5 | 6 | void System::sleep( const unsigned long& ms ) 7 | { 8 | Platform::System::sleep( ms ); 9 | } 10 | 11 | std::string System::getProcessPath() 12 | { 13 | return Platform::System::getProcessPath(); 14 | } 15 | 16 | void System::maxFD() 17 | { 18 | Platform::System::maxFD(); 19 | } 20 | 21 | Uint64 System::getMaxFD() 22 | { 23 | return Platform::System::getMaxFD(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/posix/MutexImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_MUTEXIMPLPOSIX_HPP 2 | #define EFSW_MUTEXIMPLPOSIX_HPP 3 | 4 | #include 5 | 6 | #if defined( EFSW_PLATFORM_POSIX ) 7 | 8 | #include 9 | 10 | namespace efsw { namespace Platform { 11 | 12 | class MutexImpl 13 | { 14 | public: 15 | MutexImpl(); 16 | 17 | ~MutexImpl(); 18 | 19 | void lock(); 20 | 21 | void unlock(); 22 | private: 23 | pthread_mutex_t mMutex; 24 | }; 25 | 26 | }} 27 | 28 | #endif 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/win/MutexImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 4 | 5 | namespace efsw { namespace Platform { 6 | 7 | MutexImpl::MutexImpl() 8 | { 9 | InitializeCriticalSection(&mMutex); 10 | } 11 | 12 | MutexImpl::~MutexImpl() 13 | { 14 | DeleteCriticalSection(&mMutex); 15 | } 16 | 17 | void MutexImpl::lock() 18 | { 19 | EnterCriticalSection(&mMutex); 20 | } 21 | 22 | void MutexImpl::unlock() 23 | { 24 | LeaveCriticalSection(&mMutex); 25 | } 26 | 27 | }} 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /kernel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(Boost QUIET REQUIRED) 2 | find_package(PNG REQUIRED) 3 | 4 | ################################################################################ 5 | 6 | file(GLOB SRC_FILES src/tree/*.cpp src/format/*.cpp 7 | src/render/*.cpp src/eval/*.cpp) 8 | add_library(ao-kernel STATIC ${SRC_FILES}) 9 | 10 | target_include_directories(ao-kernel SYSTEM PRIVATE 11 | ${BOOST_INCLUDE_DIR} 12 | ${PNG_INCLUDE_DIR}) 13 | target_include_directories(ao-kernel PUBLIC include) 14 | 15 | target_link_libraries(ao-kernel ${PNG_LIBRARIES}) 16 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/win/MutexImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_MUTEXIMPLWIN_HPP 2 | #define EFSW_MUTEXIMPLWIN_HPP 3 | 4 | #include 5 | 6 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 7 | 8 | #ifndef WIN32_LEAN_AND_MEAN 9 | #define WIN32_LEAN_AND_MEAN 10 | #endif 11 | #include 12 | 13 | namespace efsw { namespace Platform { 14 | 15 | class MutexImpl 16 | { 17 | public: 18 | MutexImpl(); 19 | 20 | ~MutexImpl(); 21 | 22 | void lock(); 23 | 24 | void unlock(); 25 | private: 26 | CRITICAL_SECTION mMutex; 27 | }; 28 | 29 | }} 30 | 31 | #endif 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/WatcherInotify.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_WATCHERINOTIFY_HPP 2 | #define EFSW_WATCHERINOTIFY_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace efsw { 8 | 9 | class WatcherInotify : public Watcher 10 | { 11 | public: 12 | WatcherInotify(); 13 | 14 | WatcherInotify( WatchID id, std::string directory, FileWatchListener * listener, bool recursive, WatcherInotify * parent = NULL ); 15 | 16 | bool inParentTree( WatcherInotify * parent ); 17 | 18 | WatcherInotify * Parent; 19 | 20 | FileInfo DirInfo; 21 | }; 22 | 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/System.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_SYSTEM_HPP 2 | #define EFSW_SYSTEM_HPP 3 | 4 | #include 5 | 6 | namespace efsw { 7 | 8 | class System 9 | { 10 | public: 11 | /// Sleep for x milliseconds 12 | static void sleep( const unsigned long& ms ); 13 | 14 | /// @return The process binary path 15 | static std::string getProcessPath(); 16 | 17 | /// Maximize the number of file descriptors allowed per process in the current OS 18 | static void maxFD(); 19 | 20 | /// @return The number of supported file descriptors for the process 21 | static Uint64 getMaxFD(); 22 | }; 23 | 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/posix/FileSystemImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_FILESYSTEMIMPLPOSIX_HPP 2 | #define EFSW_FILESYSTEMIMPLPOSIX_HPP 3 | 4 | #include 5 | #include 6 | 7 | #if defined( EFSW_PLATFORM_POSIX ) 8 | 9 | namespace efsw { namespace Platform { 10 | 11 | class FileSystem 12 | { 13 | public: 14 | static FileInfoMap filesInfoFromPath( const std::string& path ); 15 | 16 | static char getOSSlash(); 17 | 18 | static bool isDirectory( const std::string& path ); 19 | 20 | static bool isRemoteFS( const std::string& directory ); 21 | }; 22 | 23 | }} 24 | 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/posix/ThreadImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_THREADIMPLPOSIX_HPP 2 | #define EFSW_THREADIMPLPOSIX_HPP 3 | 4 | #include 5 | 6 | #if defined( EFSW_PLATFORM_POSIX ) 7 | 8 | #include 9 | 10 | namespace efsw { 11 | 12 | class Thread; 13 | 14 | namespace Platform { 15 | 16 | class ThreadImpl 17 | { 18 | public: 19 | ThreadImpl( Thread * owner ); 20 | 21 | void wait(); 22 | 23 | void terminate(); 24 | protected: 25 | static void * entryPoint( void* userData ); 26 | 27 | pthread_t mThread; 28 | bool mIsActive; 29 | }; 30 | 31 | }} 32 | 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/Watcher.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_WATCHERIMPL_HPP 2 | #define EFSW_WATCHERIMPL_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace efsw { 8 | 9 | /** @brief Base Watcher class */ 10 | class Watcher 11 | { 12 | public: 13 | Watcher(); 14 | 15 | Watcher( WatchID id, std::string directory, FileWatchListener * listener, bool recursive ); 16 | 17 | virtual ~Watcher() {} 18 | 19 | virtual void watch() {} 20 | 21 | WatchID ID; 22 | std::string Directory; 23 | FileWatchListener * Listener; 24 | bool Recursive; 25 | std::string OldFileName; 26 | }; 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/win/FileSystemImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_FILESYSTEMIMPLWIN_HPP 2 | #define EFSW_FILESYSTEMIMPLWIN_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 9 | 10 | namespace efsw { namespace Platform { 11 | 12 | class FileSystem 13 | { 14 | public: 15 | static FileInfoMap filesInfoFromPath( const std::string& path ); 16 | 17 | static char getOSSlash(); 18 | 19 | static bool isDirectory( const std::string& path ); 20 | 21 | static bool isRemoteFS( const std::string& directory ); 22 | }; 23 | 24 | }} 25 | 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /doc/references.md: -------------------------------------------------------------------------------- 1 | Gerstner, T., and Pajarola, R. 2000. 2 | "Topology preserving and controlled topology simplifying multiresolution isosurface extraction." 3 | IEEE Visualization 2000, 259–266. 4 | 5 | T. Ju, F. Losasso, S. Schaefer, and J. Warren, 6 | "Dual contouring of hermite data," 7 | ACM Transactions on Graphics, vol. 21, no. 3, pp. 339– 346, 8 | July 2002, iSSN 0730-0301 (Proceedings of ACM SIGGRAPH 2002). 9 | 10 | Kobbelt, L. P., Botsch, M., Schwanecke, U., and Seidel, H.-P. 2001. 11 | "Feature-sensitive surface extraction from volume data," 12 | Proceedings of SIGGRAPH 2001, ACM Press / ACM SIGGRAPH, 13 | Computer Graphics Proceedings, Annual Conference Series, 57–66. 14 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/WatcherGeneric.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_WATCHERGENERIC_HPP 2 | #define EFSW_WATCHERGENERIC_HPP 3 | 4 | #include 5 | 6 | namespace efsw 7 | { 8 | 9 | class DirWatcherGeneric; 10 | 11 | class WatcherGeneric : public Watcher 12 | { 13 | public: 14 | FileWatcherImpl * WatcherImpl; 15 | DirWatcherGeneric * DirWatch; 16 | 17 | WatcherGeneric( WatchID id, const std::string& directory, FileWatchListener * fwl, FileWatcherImpl * fw, bool recursive ); 18 | 19 | ~WatcherGeneric(); 20 | 21 | void watch(); 22 | 23 | void watchDir( std::string dir ); 24 | 25 | bool pathInWatches( std::string path ); 26 | }; 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /vendor/Eigen/Householder: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 2 | #define EIGEN_HOUSEHOLDER_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Householder_Module Householder module 9 | * This module provides Householder transformations. 10 | * 11 | * \code 12 | * #include 13 | * \endcode 14 | */ 15 | 16 | #include "src/Householder/Householder.h" 17 | #include "src/Householder/HouseholderSequence.h" 18 | #include "src/Householder/BlockHouseholder.h" 19 | 20 | #include "src/Core/util/ReenableStupidWarnings.h" 21 | 22 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 23 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 24 | -------------------------------------------------------------------------------- /vendor/Eigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(RegexUtils) 2 | test_escape_string_as_regex() 3 | 4 | file(GLOB Eigen_directory_files "*") 5 | 6 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 7 | 8 | foreach(f ${Eigen_directory_files}) 9 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src") 10 | list(APPEND Eigen_directory_files_to_install ${f}) 11 | endif() 12 | endforeach(f ${Eigen_directory_files}) 13 | 14 | install(FILES 15 | ${Eigen_directory_files_to_install} 16 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel 17 | ) 18 | 19 | add_subdirectory(src) 20 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/posix/MutexImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if defined( EFSW_PLATFORM_POSIX ) 4 | 5 | namespace efsw { namespace Platform { 6 | 7 | MutexImpl::MutexImpl() 8 | { 9 | pthread_mutexattr_t attributes; 10 | pthread_mutexattr_init(&attributes); 11 | pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_RECURSIVE); 12 | pthread_mutex_init(&mMutex, &attributes); 13 | } 14 | 15 | MutexImpl::~MutexImpl() 16 | { 17 | pthread_mutex_destroy(&mMutex); 18 | } 19 | 20 | void MutexImpl::lock() 21 | { 22 | pthread_mutex_lock(&mMutex); 23 | } 24 | 25 | void MutexImpl::unlock() 26 | { 27 | pthread_mutex_unlock(&mMutex); 28 | } 29 | 30 | }} 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/DirectorySnapshotDiff.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace efsw { 4 | 5 | void DirectorySnapshotDiff::clear() 6 | { 7 | FilesCreated.clear(); 8 | FilesModified.clear(); 9 | FilesMoved.clear(); 10 | FilesDeleted.clear(); 11 | DirsCreated.clear(); 12 | DirsModified.clear(); 13 | DirsMoved.clear(); 14 | DirsDeleted.clear(); 15 | } 16 | 17 | bool DirectorySnapshotDiff::changed() 18 | { 19 | return !FilesCreated.empty() || 20 | !FilesModified.empty() || 21 | !FilesMoved.empty() || 22 | !FilesDeleted.empty() || 23 | !DirsCreated.empty() || 24 | !DirsModified.empty() || 25 | !DirsMoved.empty() || 26 | !DirsDeleted.empty(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /vendor/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSE_MODULE_H 2 | #define EIGEN_SPARSE_MODULE_H 3 | 4 | /** \defgroup Sparse_Module Sparse meta-module 5 | * 6 | * Meta-module including all related modules: 7 | * - \ref SparseCore_Module 8 | * - \ref OrderingMethods_Module 9 | * - \ref SparseCholesky_Module 10 | * - \ref SparseLU_Module 11 | * - \ref SparseQR_Module 12 | * - \ref IterativeLinearSolvers_Module 13 | * 14 | * \code 15 | * #include 16 | * \endcode 17 | */ 18 | 19 | #include "SparseCore" 20 | #include "OrderingMethods" 21 | #include "SparseCholesky" 22 | #include "SparseLU" 23 | #include "SparseQR" 24 | #include "IterativeLinearSolvers" 25 | 26 | #endif // EIGEN_SPARSE_MODULE_H 27 | 28 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Eigen2Support/Macros.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2011 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN2_MACROS_H 11 | #define EIGEN2_MACROS_H 12 | 13 | #define ei_assert eigen_assert 14 | #define ei_internal_assert eigen_internal_assert 15 | 16 | #define EIGEN_ALIGN_128 EIGEN_ALIGN16 17 | 18 | #define EIGEN_ARCH_WANTS_ALIGNMENT EIGEN_ALIGN_STATICALLY 19 | 20 | #endif // EIGEN2_MACROS_H 21 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/FileWatcherImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace efsw { 6 | 7 | FileWatcherImpl::FileWatcherImpl( FileWatcher * parent ) : 8 | mFileWatcher( parent ), 9 | mInitOK( false ), 10 | mIsGeneric( false ) 11 | { 12 | System::maxFD(); 13 | } 14 | 15 | FileWatcherImpl::~FileWatcherImpl() 16 | { 17 | } 18 | 19 | bool FileWatcherImpl::initOK() 20 | { 21 | return mInitOK; 22 | } 23 | 24 | bool FileWatcherImpl::linkAllowed( const std::string& curPath, const std::string& link ) 25 | { 26 | return ( mFileWatcher->followSymlinks() && mFileWatcher->allowOutOfScopeLinks() ) || -1 != String::strStartsWith( curPath, link ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/platformimpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_PLATFORMIMPL_HPP 2 | #define EFSW_PLATFORMIMPL_HPP 3 | 4 | #include 5 | 6 | #if defined( EFSW_PLATFORM_POSIX ) 7 | #include 8 | #include 9 | #include 10 | #include 11 | #elif EFSW_PLATFORM == EFSW_PLATFORM_WIN32 12 | #include 13 | #include 14 | #include 15 | #include 16 | #else 17 | #error Thread, Mutex, and System not implemented for this platform. 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/win/ThreadImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_THREADIMPLWIN_HPP 2 | #define EFSW_THREADIMPLWIN_HPP 3 | 4 | #include 5 | 6 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 7 | 8 | #ifndef WIN32_LEAN_AND_MEAN 9 | #define WIN32_LEAN_AND_MEAN 10 | #endif 11 | #include 12 | #include 13 | 14 | namespace efsw { 15 | 16 | class Thread; 17 | 18 | namespace Platform { 19 | 20 | class ThreadImpl 21 | { 22 | public: 23 | ThreadImpl( Thread * owner ); 24 | 25 | void wait(); 26 | 27 | void terminate(); 28 | protected: 29 | static unsigned int __stdcall entryPoint(void* userData); 30 | 31 | HANDLE mThread; 32 | unsigned int mThreadId; 33 | }; 34 | 35 | }} 36 | 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /vendor/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_JACOBI_MODULE_H 2 | #define EIGEN_JACOBI_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Jacobi_Module Jacobi module 9 | * This module provides Jacobi and Givens rotations. 10 | * 11 | * \code 12 | * #include 13 | * \endcode 14 | * 15 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 16 | * - MatrixBase::applyOnTheLeft() 17 | * - MatrixBase::applyOnTheRight(). 18 | */ 19 | 20 | #include "src/Jacobi/Jacobi.h" 21 | 22 | #include "src/Core/util/ReenableStupidWarnings.h" 23 | 24 | #endif // EIGEN_JACOBI_MODULE_H 25 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 26 | 27 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/WatcherInotify.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace efsw { 4 | 5 | WatcherInotify::WatcherInotify() : 6 | Watcher(), 7 | Parent( NULL ) 8 | { 9 | } 10 | 11 | WatcherInotify::WatcherInotify( WatchID id, std::string directory, FileWatchListener * listener, bool recursive, WatcherInotify * parent ) : 12 | Watcher( id, directory, listener, recursive ), 13 | Parent( parent ), 14 | DirInfo( directory ) 15 | { 16 | } 17 | 18 | bool WatcherInotify::inParentTree( WatcherInotify * parent ) 19 | { 20 | WatcherInotify * tNext = Parent; 21 | 22 | while ( NULL != tNext ) 23 | { 24 | if ( tNext == parent ) 25 | { 26 | return true; 27 | } 28 | 29 | tNext = tNext->Parent; 30 | } 31 | 32 | return false; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /vendor/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_STDLIST_MODULE_H 11 | #define EIGEN_STDLIST_MODULE_H 12 | 13 | #include "Core" 14 | #include 15 | 16 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 17 | 18 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 19 | 20 | #else 21 | 22 | #include "src/StlSupport/StdList.h" 23 | 24 | #endif 25 | 26 | #endif // EIGEN_STDLIST_MODULE_H 27 | -------------------------------------------------------------------------------- /vendor/Eigen/QtAlignedMalloc: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EIGEN_QTMALLOC_MODULE_H 3 | #define EIGEN_QTMALLOC_MODULE_H 4 | 5 | #include "Core" 6 | 7 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED) 8 | 9 | #include "src/Core/util/DisableStupidWarnings.h" 10 | 11 | void *qMalloc(size_t size) 12 | { 13 | return Eigen::internal::aligned_malloc(size); 14 | } 15 | 16 | void qFree(void *ptr) 17 | { 18 | Eigen::internal::aligned_free(ptr); 19 | } 20 | 21 | void *qRealloc(void *ptr, size_t size) 22 | { 23 | void* newPtr = Eigen::internal::aligned_malloc(size); 24 | memcpy(newPtr, ptr, size); 25 | Eigen::internal::aligned_free(ptr); 26 | return newPtr; 27 | } 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif 32 | 33 | #endif // EIGEN_QTMALLOC_MODULE_H 34 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 35 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/Log.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace efsw { namespace Errors { 4 | 5 | static std::string LastError; 6 | 7 | std::string Log::getLastErrorLog() 8 | { 9 | return LastError; 10 | } 11 | 12 | Error Log::createLastError( Error err, std::string log ) 13 | { 14 | switch ( err ) 15 | { 16 | case FileNotFound: LastError = "File not found ( " + log + " )"; break; 17 | case FileRepeated: LastError = "File reapeated in watches ( " + log + " )"; break; 18 | case FileOutOfScope: LastError = "Symlink file out of scope ( " + log + " )"; break; 19 | case FileRemote: LastError = "File is located in a remote file system, use a generic watcher. ( " + log + " )"; break; 20 | case Unspecified: 21 | default: LastError = log; 22 | } 23 | 24 | return err; 25 | } 26 | 27 | }} 28 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/Thread.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace efsw { 5 | 6 | Thread::Thread() : 7 | mThreadImpl(NULL), 8 | mEntryPoint(NULL) 9 | { 10 | } 11 | 12 | Thread::~Thread() 13 | { 14 | wait(); 15 | 16 | efSAFE_DELETE( mEntryPoint ); 17 | } 18 | 19 | void Thread::launch() 20 | { 21 | wait(); 22 | 23 | mThreadImpl = new Platform::ThreadImpl( this ); 24 | } 25 | 26 | void Thread::wait() 27 | { 28 | if ( mThreadImpl ) 29 | { 30 | mThreadImpl->wait(); 31 | 32 | efSAFE_DELETE( mThreadImpl ); 33 | } 34 | } 35 | 36 | void Thread::terminate() 37 | { 38 | if ( mThreadImpl ) 39 | { 40 | mThreadImpl->terminate(); 41 | 42 | efSAFE_DELETE( mThreadImpl ); 43 | } 44 | } 45 | 46 | void Thread::run() 47 | { 48 | mEntryPoint->run(); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /vendor/Eigen/MetisSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_METISSUPPORT_MODULE_H 2 | #define EIGEN_METISSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | 13 | /** \ingroup Support_modules 14 | * \defgroup MetisSupport_Module MetisSupport module 15 | * 16 | * \code 17 | * #include 18 | * \endcode 19 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). 20 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink 21 | */ 22 | 23 | 24 | #include "src/MetisSupport/MetisSupport.h" 25 | 26 | #include "src/Core/util/ReenableStupidWarnings.h" 27 | 28 | #endif // EIGEN_METISSUPPORT_MODULE_H 29 | -------------------------------------------------------------------------------- /vendor/Eigen/COPYING.README: -------------------------------------------------------------------------------- 1 | Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links: 2 | http://www.mozilla.org/MPL/2.0/ 3 | http://www.mozilla.org/MPL/2.0/FAQ.html 4 | 5 | Some files contain third-party code under BSD or LGPL licenses, whence the other 6 | COPYING.* files here. 7 | 8 | All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later. 9 | For this reason, the COPYING.LGPL file contains the LGPL 2.1 text. 10 | 11 | If you want to guarantee that the Eigen code that you are #including is licensed 12 | under the MPL2 and possibly more permissive licenses (like BSD), #define this 13 | preprocessor symbol: 14 | EIGEN_MPL2_ONLY 15 | For example, with most compilers, you could add this to your project CXXFLAGS: 16 | -DEIGEN_MPL2_ONLY 17 | This will cause a compilation error to be generated if you #include any code that is 18 | LGPL licensed. 19 | -------------------------------------------------------------------------------- /vendor/Eigen/LeastSquares: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_REGRESSION_MODULE_H 2 | #define EIGEN_REGRESSION_MODULE_H 3 | 4 | #ifndef EIGEN2_SUPPORT 5 | #error LeastSquares is only available in Eigen2 support mode (define EIGEN2_SUPPORT) 6 | #endif 7 | 8 | // exclude from normal eigen3-only documentation 9 | #ifdef EIGEN2_SUPPORT 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Eigenvalues" 16 | #include "Geometry" 17 | 18 | /** \defgroup LeastSquares_Module LeastSquares module 19 | * This module provides linear regression and related features. 20 | * 21 | * \code 22 | * #include 23 | * \endcode 24 | */ 25 | 26 | #include "src/Eigen2Support/LeastSquares.h" 27 | 28 | #include "src/Core/util/ReenableStupidWarnings.h" 29 | 30 | #endif // EIGEN2_SUPPORT 31 | 32 | #endif // EIGEN_REGRESSION_MODULE_H 33 | -------------------------------------------------------------------------------- /vendor/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDDEQUE_MODULE_H 12 | #define EIGEN_STDDEQUE_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdDeque.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDDEQUE_MODULE_H 28 | -------------------------------------------------------------------------------- /vendor/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDVECTOR_MODULE_H 12 | #define EIGEN_STDVECTOR_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdVector.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDVECTOR_MODULE_H 28 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | project(ao) 3 | set(CMAKE_BUILD_TYPE RELEASE) 4 | 5 | ################################################################################ 6 | 7 | set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -fPIC -pedantic -std=c++11 -Werror=switch -march=native") 8 | set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DRELEASE") 9 | set(CMAKE_CXX_FLAGS_DEBUG "-O0") 10 | 11 | include_directories(SYSTEM vendor) 12 | 13 | ################################################################################ 14 | 15 | if (APPLE) 16 | set(CMAKE_MACOSX_RPATH ON) 17 | endif() 18 | 19 | ################################################################################ 20 | 21 | # Build the ao kernel and ui libraries 22 | add_subdirectory(kernel) 23 | add_subdirectory(ui) 24 | 25 | # Build the test suite 26 | add_subdirectory(test) 27 | 28 | # Build the ao-guile binding 29 | add_subdirectory(bind) 30 | -------------------------------------------------------------------------------- /kernel/test/shapes.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | class Tree; 22 | 23 | Tree* menger(int i); 24 | -------------------------------------------------------------------------------- /vendor/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLESKY_MODULE_H 2 | #define EIGEN_CHOLESKY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Cholesky_Module Cholesky module 9 | * 10 | * 11 | * 12 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 13 | * Those decompositions are accessible via the following MatrixBase methods: 14 | * - MatrixBase::llt(), 15 | * - MatrixBase::ldlt() 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | */ 21 | 22 | #include "src/misc/Solve.h" 23 | #include "src/Cholesky/LLT.h" 24 | #include "src/Cholesky/LDLT.h" 25 | #ifdef EIGEN_USE_LAPACKE 26 | #include "src/Cholesky/LLT_MKL.h" 27 | #endif 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif // EIGEN_CHOLESKY_MODULE_H 32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 33 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/DirectorySnapshotDiff.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_DIRECTORYSNAPSHOTDIFF_HPP 2 | #define EFSW_DIRECTORYSNAPSHOTDIFF_HPP 3 | 4 | #include 5 | 6 | namespace efsw { 7 | 8 | class DirectorySnapshotDiff 9 | { 10 | public: 11 | FileInfoList FilesDeleted; 12 | FileInfoList FilesCreated; 13 | FileInfoList FilesModified; 14 | MovedList FilesMoved; 15 | FileInfoList DirsDeleted; 16 | FileInfoList DirsCreated; 17 | FileInfoList DirsModified; 18 | MovedList DirsMoved; 19 | bool DirChanged; 20 | 21 | void clear(); 22 | 23 | bool changed(); 24 | }; 25 | 26 | #define DiffIterator( FileInfoListName ) it = Diff.FileInfoListName.begin(); \ 27 | for ( ; it != Diff.FileInfoListName.end(); it++ ) 28 | 29 | #define DiffMovedIterator( MovedListName ) mit = Diff.MovedListName.begin(); \ 30 | for ( ; mit != Diff.MovedListName.end(); mit++ ) 31 | 32 | } 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /vendor/Eigen/PardisoSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H 2 | #define EIGEN_PARDISOSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | 10 | #include 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup PardisoSupport_Module PardisoSupport module 14 | * 15 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | * 21 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. 22 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. 23 | * 24 | */ 25 | 26 | #include "src/PardisoSupport/PardisoSupport.h" 27 | 28 | #include "src/Core/util/ReenableStupidWarnings.h" 29 | 30 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H 31 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/WatcherGeneric.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace efsw 6 | { 7 | 8 | WatcherGeneric::WatcherGeneric( WatchID id, const std::string& directory, FileWatchListener * fwl, FileWatcherImpl * fw, bool recursive ) : 9 | Watcher( id, directory, fwl, recursive ), 10 | WatcherImpl( fw ), 11 | DirWatch( NULL ) 12 | { 13 | FileSystem::dirAddSlashAtEnd( Directory ); 14 | 15 | DirWatch = new DirWatcherGeneric( NULL, this, directory, recursive, false ); 16 | 17 | DirWatch->addChilds( false ); 18 | } 19 | 20 | WatcherGeneric::~WatcherGeneric() 21 | { 22 | efSAFE_DELETE( DirWatch ); 23 | } 24 | 25 | void WatcherGeneric::watch() 26 | { 27 | DirWatch->watch(); 28 | } 29 | 30 | void WatcherGeneric::watchDir( std::string dir ) 31 | { 32 | DirWatch->watchDir( dir ); 33 | } 34 | 35 | bool WatcherGeneric::pathInWatches( std::string path ) 36 | { 37 | return DirWatch->pathInWatches( path ); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/DirectorySnapshot.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_DIRECTORYSNAPSHOT_HPP 2 | #define EFSW_DIRECTORYSNAPSHOT_HPP 3 | 4 | #include 5 | 6 | namespace efsw { 7 | 8 | class DirectorySnapshot 9 | { 10 | public: 11 | FileInfo DirectoryInfo; 12 | FileInfoMap Files; 13 | 14 | void setDirectoryInfo( std::string directory ); 15 | 16 | DirectorySnapshot(); 17 | 18 | DirectorySnapshot( std::string directory ); 19 | 20 | ~DirectorySnapshot(); 21 | 22 | void init( std::string directory ); 23 | 24 | bool exists(); 25 | 26 | DirectorySnapshotDiff scan(); 27 | 28 | FileInfoMap::iterator nodeInFiles( FileInfo& fi ); 29 | 30 | void addFile( std::string path ); 31 | 32 | void removeFile( std::string path ); 33 | 34 | void moveFile( std::string oldPath, std::string newPath ); 35 | 36 | void updateFile( std::string path ); 37 | protected: 38 | void initFiles(); 39 | 40 | void deleteAll( DirectorySnapshotDiff &Diff ); 41 | }; 42 | 43 | } 44 | 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /vendor/Eigen/SVD: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SVD_MODULE_H 2 | #define EIGEN_SVD_MODULE_H 3 | 4 | #include "QR" 5 | #include "Householder" 6 | #include "Jacobi" 7 | 8 | #include "src/Core/util/DisableStupidWarnings.h" 9 | 10 | /** \defgroup SVD_Module SVD module 11 | * 12 | * 13 | * 14 | * This module provides SVD decomposition for matrices (both real and complex). 15 | * This decomposition is accessible via the following MatrixBase method: 16 | * - MatrixBase::jacobiSvd() 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | */ 22 | 23 | #include "src/misc/Solve.h" 24 | #include "src/SVD/JacobiSVD.h" 25 | #if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT) 26 | #include "src/SVD/JacobiSVD_MKL.h" 27 | #endif 28 | #include "src/SVD/UpperBidiagonalization.h" 29 | 30 | #ifdef EIGEN2_SUPPORT 31 | #include "src/Eigen2Support/SVD.h" 32 | #endif 33 | 34 | #include "src/Core/util/ReenableStupidWarnings.h" 35 | 36 | #endif // EIGEN_SVD_MODULE_H 37 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 38 | -------------------------------------------------------------------------------- /COPYING.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2016 Matthew Keeter 2 | 3 | Ao is free software, with the core library licensed under the LGPL 4 | and bindings licensed under the GPL. 5 | 6 | The Ao shared library (named `libao` and built from the `kernel` and `ui` 7 | subfolders, plus `bind/api.cpp`) can be redistributed and/or modified 8 | under the terms of the GNU Lesser General Public License as published 9 | by the Free Software Foundation, either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | The Guile buildings and library of shapes (in the `bind/guile` subfolder) 13 | can be redistributed and/or modified under the terms of the GNU General 14 | Public License as published by the Free Software Foundation, either 15 | version 2 of the License, or (at your option) any later version. 16 | 17 | Ao is distributed in the hope that it will be useful, 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | specific license files for details. 21 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/FileSystem.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_FILESYSTEM_HPP 2 | #define EFSW_FILESYSTEM_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace efsw { 9 | 10 | class FileSystem 11 | { 12 | public: 13 | static bool isDirectory( const std::string& path ); 14 | 15 | static FileInfoMap filesInfoFromPath( std::string path ); 16 | 17 | static char getOSSlash(); 18 | 19 | static bool slashAtEnd( std::string& dir ); 20 | 21 | static void dirAddSlashAtEnd( std::string& dir ); 22 | 23 | static void dirRemoveSlashAtEnd( std::string& dir ); 24 | 25 | static std::string fileNameFromPath( std::string filepath ); 26 | 27 | static std::string pathRemoveFileName( std::string filepath ); 28 | 29 | static void realPath( std::string curdir, std::string& path ); 30 | 31 | static std::string getLinkRealPath( std::string dir, std::string& curPath ); 32 | 33 | static std::string precomposeFileName(const std::string& name); 34 | 35 | static bool isRemoteFS( const std::string& directory ); 36 | }; 37 | 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /vendor/Eigen/SPQRSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H 2 | #define EIGEN_SPQRSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "SuiteSparseQR.hpp" 9 | 10 | /** \ingroup Support_modules 11 | * \defgroup SPQRSupport_Module SuiteSparseQR module 12 | * 13 | * This module provides an interface to the SPQR library, which is part of the suitesparse package. 14 | * 15 | * \code 16 | * #include 17 | * \endcode 18 | * 19 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). 20 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules 21 | * 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/misc/SparseSolve.h" 26 | #include "src/CholmodSupport/CholmodSupport.h" 27 | #include "src/SPQRSupport/SuiteSparseQRSupport.h" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /bind/guile/test/ggspec/LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy of 2 | this software and associated documentation files (the "Software"), to deal in 3 | the Software without restriction, including without limitation the rights to 4 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 5 | the Software, and to permit persons to whom the Software is furnished to do so, 6 | subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all 9 | copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 13 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 15 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 16 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | -------------------------------------------------------------------------------- /vendor/Eigen/src/SparseCore/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSE_FUZZY_H 11 | #define EIGEN_SPARSE_FUZZY_H 12 | 13 | // template 14 | // template 15 | // bool SparseMatrixBase::isApprox( 16 | // const OtherDerived& other, 17 | // typename NumTraits::Real prec 18 | // ) const 19 | // { 20 | // const typename internal::nested::type nested(derived()); 21 | // const typename internal::nested::type otherNested(other.derived()); 22 | // return (nested - otherNested).cwise().abs2().sum() 23 | // <= prec * prec * (std::min)(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum()); 24 | // } 25 | 26 | #endif // EIGEN_SPARSE_FUZZY_H 27 | -------------------------------------------------------------------------------- /vendor/Eigen/QR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_QR_MODULE_H 2 | #define EIGEN_QR_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | 12 | /** \defgroup QR_Module QR module 13 | * 14 | * 15 | * 16 | * This module provides various QR decompositions 17 | * This module also provides some MatrixBase methods, including: 18 | * - MatrixBase::qr(), 19 | * 20 | * \code 21 | * #include 22 | * \endcode 23 | */ 24 | 25 | #include "src/misc/Solve.h" 26 | #include "src/QR/HouseholderQR.h" 27 | #include "src/QR/FullPivHouseholderQR.h" 28 | #include "src/QR/ColPivHouseholderQR.h" 29 | #ifdef EIGEN_USE_LAPACKE 30 | #include "src/QR/HouseholderQR_MKL.h" 31 | #include "src/QR/ColPivHouseholderQR_MKL.h" 32 | #endif 33 | 34 | #ifdef EIGEN2_SUPPORT 35 | #include "src/Eigen2Support/QR.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #ifdef EIGEN2_SUPPORT 41 | #include "Eigenvalues" 42 | #endif 43 | 44 | #endif // EIGEN_QR_MODULE_H 45 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 46 | -------------------------------------------------------------------------------- /vendor/Eigen/SparseQR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSEQR_MODULE_H 2 | #define EIGEN_SPARSEQR_MODULE_H 3 | 4 | #include "SparseCore" 5 | #include "OrderingMethods" 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup SparseQR_Module SparseQR module 9 | * \brief Provides QR decomposition for sparse matrices 10 | * 11 | * This module provides a simplicial version of the left-looking Sparse QR decomposition. 12 | * The columns of the input matrix should be reordered to limit the fill-in during the 13 | * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. 14 | * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list 15 | * of built-in and external ordering methods. 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | * 21 | * 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/misc/SparseSolve.h" 26 | 27 | #include "OrderingMethods" 28 | #include "src/SparseCore/SparseColEtree.h" 29 | #include "src/SparseQR/SparseQR.h" 30 | 31 | #include "src/Core/util/ReenableStupidWarnings.h" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /vendor/Eigen/LU: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_LU_MODULE_H 2 | #define EIGEN_LU_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup LU_Module LU module 9 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 10 | * This module defines the following MatrixBase methods: 11 | * - MatrixBase::inverse() 12 | * - MatrixBase::determinant() 13 | * 14 | * \code 15 | * #include 16 | * \endcode 17 | */ 18 | 19 | #include "src/misc/Solve.h" 20 | #include "src/misc/Kernel.h" 21 | #include "src/misc/Image.h" 22 | #include "src/LU/FullPivLU.h" 23 | #include "src/LU/PartialPivLU.h" 24 | #ifdef EIGEN_USE_LAPACKE 25 | #include "src/LU/PartialPivLU_MKL.h" 26 | #endif 27 | #include "src/LU/Determinant.h" 28 | #include "src/LU/Inverse.h" 29 | 30 | #if defined EIGEN_VECTORIZE_SSE 31 | #include "src/LU/arch/Inverse_SSE.h" 32 | #endif 33 | 34 | #ifdef EIGEN2_SUPPORT 35 | #include "src/Eigen2Support/LU.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_LU_MODULE_H 41 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 42 | -------------------------------------------------------------------------------- /examples/menger.scm: -------------------------------------------------------------------------------- 1 | ;; Menger sponge fractal 2 | (use-modules (ao shapes) (ao transforms) (ao csg)) 3 | 4 | (define (recurse x y scale i) 5 | (let* ((s (/ scale 2)) 6 | (this (rectangle (list (- x s) (- y s)) 7 | (list (+ x s) (+ y s))))) 8 | (if (= i 0) 9 | this 10 | (let ((j (- i 1)) 11 | (t (/ scale 3))) 12 | (union this (recurse (+ x scale) y t j) (recurse (- x scale) y t j) 13 | (recurse x (+ y scale) t j) (recurse x (- y scale) t j) 14 | (recurse (+ x scale) (+ y scale) t j) 15 | (recurse (+ x scale) (- y scale) t j) 16 | (recurse (- x scale) (+ y scale) t j) 17 | (recurse (- x scale) (- y scale) t j)))))) 18 | 19 | ;; Increase this value to make the sponge more intricate 20 | (define iterations 2) 21 | 22 | (define menger-2d (recurse 0 0 1 iterations)) 23 | (define menger-3d (difference (cube '(-1.5 -1.5 -1.5) '(1.5 1.5 1.5)) 24 | menger-2d (reflect-xz menger-2d) 25 | (reflect-yz menger-2d))) 26 | (ao-show menger-3d) 27 | -------------------------------------------------------------------------------- /kernel/include/ao/kernel/format/image.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | typedef Eigen::Array DepthImage; 25 | typedef Eigen::Array NormalImage; 26 | 27 | namespace Image 28 | { 29 | bool SavePng(std::string filename, const DepthImage& img); 30 | } 31 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/win/SystemImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 5 | 6 | #ifndef WIN32_LEAN_AND_MEAN 7 | #define WIN32_LEAN_AND_MEAN 8 | #endif 9 | #include 10 | #include 11 | 12 | namespace efsw { namespace Platform { 13 | 14 | void System::sleep( const unsigned long& ms ) 15 | { 16 | ::Sleep( ms ); 17 | } 18 | 19 | std::string System::getProcessPath() 20 | { 21 | // Get path to executable: 22 | WCHAR szDrive[_MAX_DRIVE]; 23 | WCHAR szDir[_MAX_DIR]; 24 | WCHAR szFilename[_MAX_DIR]; 25 | WCHAR szExt[_MAX_DIR]; 26 | std::wstring dllName( _MAX_DIR, 0 ); 27 | 28 | GetModuleFileNameW(0, &dllName[0], _MAX_PATH); 29 | 30 | #ifdef EFSW_COMPILER_MSVC 31 | _wsplitpath_s( dllName.c_str(), szDrive, _MAX_DRIVE, szDir, _MAX_DIR, szFilename, _MAX_DIR, szExt, _MAX_DIR ); 32 | #else 33 | _wsplitpath( dllName.c_str(), szDrive, szDir, szFilename, szExt); 34 | #endif 35 | 36 | return String( szDrive ).toUtf8() + String( szDir ).toUtf8(); 37 | } 38 | 39 | void System::maxFD() 40 | { 41 | } 42 | 43 | Uint64 System::getMaxFD() 44 | { // Number of ReadDirectory per thread 45 | return 60; 46 | } 47 | 48 | }} 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /ui/vendor/efsw/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Martín Lucas Golini 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | This software is a fork of the "simplefilewatcher" by James Wynn (james@jameswynn.com) 22 | http://code.google.com/p/simplefilewatcher/ also MIT licensed. -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/win/ThreadImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 6 | 7 | #include 8 | 9 | namespace efsw { namespace Platform { 10 | 11 | ThreadImpl::ThreadImpl( Thread *owner ) 12 | { 13 | mThread = reinterpret_cast( _beginthreadex( NULL, 0, &ThreadImpl::entryPoint, owner, 0, &mThreadId ) ); 14 | 15 | if ( !mThread ) 16 | { 17 | efDEBUG( "Failed to create thread\n" ); 18 | } 19 | } 20 | 21 | void ThreadImpl::wait() 22 | { 23 | // Wait for the thread to finish, no timeout 24 | if ( mThread ) 25 | { 26 | assert( mThreadId != GetCurrentThreadId() ); // A thread cannot wait for itself! 27 | 28 | WaitForSingleObject( mThread, INFINITE ); 29 | } 30 | } 31 | 32 | void ThreadImpl::terminate() 33 | { 34 | if ( mThread ) 35 | { 36 | TerminateThread( mThread, 0 ); 37 | } 38 | } 39 | 40 | unsigned int __stdcall ThreadImpl::entryPoint( void * userData ) 41 | { 42 | // The Thread instance is stored in the user data 43 | Thread * owner = static_cast( userData ); 44 | 45 | // Forward to the owner 46 | owner->run(); 47 | 48 | // Optional, but it is cleaner 49 | _endthreadex(0); 50 | 51 | return 0; 52 | } 53 | 54 | }} 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /vendor/Eigen/UmfPackSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H 2 | #define EIGEN_UMFPACKSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup UmfPackSupport_Module UmfPackSupport module 14 | * 15 | * This module provides an interface to the UmfPack library which is part of the suitesparse package. 16 | * It provides the following factorization class: 17 | * - class UmfPackLU: a multifrontal sequential LU factorization. 18 | * 19 | * \code 20 | * #include 21 | * \endcode 22 | * 23 | * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. 24 | * The dependencies depend on how umfpack has been compiled. 25 | * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. 26 | * 27 | */ 28 | 29 | #include "src/misc/Solve.h" 30 | #include "src/misc/SparseSolve.h" 31 | 32 | #include "src/UmfPackSupport/UmfPackSupport.h" 33 | 34 | #include "src/Core/util/ReenableStupidWarnings.h" 35 | 36 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H 37 | -------------------------------------------------------------------------------- /ui/src/task.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include "ao/ui/task.hpp" 20 | #include "ao/ui/worker.hpp" 21 | 22 | #include "ao/kernel/eval/evaluator.hpp" 23 | 24 | Task::Task() 25 | : ni(0), nj(0), nk(0), level(0) 26 | { 27 | // Nothing to do here 28 | } 29 | 30 | Task::Task(const glm::mat4& m, size_t ni, size_t nj, size_t nk, size_t level) 31 | : mat(m), ni(ni), nj(nj), nk(nk), level(level) 32 | { 33 | // Nothing to do here 34 | } 35 | 36 | void Task::reset() 37 | { 38 | level = 0; 39 | } 40 | 41 | bool Task::valid() const 42 | { 43 | return level > 0; 44 | } 45 | -------------------------------------------------------------------------------- /ui/include/ao/ui/gl/texture.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include "ao/ui/gl/core.hpp" 20 | #include "ao/kernel/render/heightmap.hpp" 21 | 22 | /* 23 | * Stores a DepthImage as a 1-channel depth texture in tex 24 | * 25 | * The image should already be scaled so that -1 is closest to the front 26 | * of the screen and pixels to be discarded have a depth value of 1 27 | */ 28 | void toDepthTexture(const DepthImage& img, GLuint tex); 29 | 30 | /* 31 | * Stores a NormalImage as a 4-channel 8-bit texture in tex 32 | */ 33 | void toNormalTexture(const NormalImage& img, GLuint tex); 34 | -------------------------------------------------------------------------------- /ui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_path(EPOXY_INCLUDE_DIR epoxy/gl.h) 2 | find_library(EPOXY_LIBRARY NAMES epoxy) 3 | 4 | find_package(PkgConfig REQUIRED) 5 | pkg_search_module(GLFW REQUIRED glfw3) 6 | 7 | find_library(OPENGL_LIBRARIES OpenGL) 8 | 9 | ################################################################################ 10 | 11 | add_definitions(-DGLFW_INCLUDE_GLCOREARB) 12 | 13 | ################################################################################ 14 | 15 | file(GLOB SRC_FILES src/*.cpp src/gl/*.cpp) 16 | add_library(ao-ui STATIC ${SRC_FILES}) 17 | 18 | target_include_directories(ao-ui SYSTEM PRIVATE 19 | ${GLFW_INCLUDE_DIRS} 20 | ${EPOXY_INCLUDE_DIR}) 21 | target_include_directories(ao-ui PUBLIC include) 22 | target_include_directories(ao-ui SYSTEM PUBLIC vendor) 23 | 24 | 25 | target_link_libraries(ao-ui 26 | ${GLFW_LIBRARIES} 27 | ${OPENGL_LIBRARY} 28 | ${EPOXY_LIBRARY} efsw ao-kernel) 29 | 30 | # Build efsw as a separate library 31 | add_subdirectory(vendor/efsw) 32 | set_target_properties(efsw PROPERTIES COMPILE_FLAGS -w) 33 | 34 | ################################################################################ 35 | 36 | # Mask error message that warns about including gl.h and gl3.h 37 | # (since it's actually a false positive caused by epoxy/gl.h) 38 | if (APPLE) 39 | add_definitions("-DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED") 40 | endif (APPLE) 41 | -------------------------------------------------------------------------------- /vendor/catch/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /kernel/include/ao/kernel/format/contours.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | #include "ao/kernel/render/quadtree.hpp" 25 | 26 | class Tree; 27 | class Region; 28 | 29 | struct Contours 30 | { 31 | static Contours Render(Tree* t, const Region& r, 32 | uint32_t flags=Quadtree::COLLAPSE); 33 | 34 | /* 35 | * Saves the given contours as an SVG file 36 | */ 37 | void writeSVG(std::string filename, const Region& r); 38 | 39 | /* Contours in 2D space */ 40 | std::vector> contours; 41 | }; 42 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/Debug.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_DEBUG_HPP 2 | #define EFSW_DEBUG_HPP 3 | 4 | #include 5 | 6 | namespace efsw { 7 | 8 | #ifdef DEBUG 9 | 10 | void efREPORT_ASSERT( const char * File, const int Line, const char * Exp ); 11 | 12 | #define efASSERT( expr ) if ( !(expr) ) { efREPORT_ASSERT( __FILE__, __LINE__, #expr ); } 13 | #define efASSERTM( expr, msg ) if ( !(expr) ) { efREPORT_ASSERT( __FILE__, __LINE__, #msg ); } 14 | 15 | void efPRINT ( const char * format, ... ); 16 | void efPRINTC ( unsigned int cond, const char * format, ... ); 17 | 18 | #else 19 | 20 | #define efASSERT( expr ) 21 | #define efASSERTM( expr, msg ) 22 | 23 | #ifndef EFSW_COMPILER_MSVC 24 | #ifndef __clang__ 25 | #define efPRINT( format, args... ) {} 26 | #define efPRINTC( cond, format, args... ) {} 27 | #else 28 | #define efPRINT(...) {} 29 | #define efPRINTC(...) {} 30 | #endif 31 | #else 32 | #define efPRINT 33 | #define efPRINTC 34 | #endif 35 | 36 | #endif 37 | 38 | #ifdef EFSW_VERBOSE 39 | #define efDEBUG efPRINT 40 | #define efDEBUGC efPRINTC 41 | #else 42 | 43 | #ifndef EFSW_COMPILER_MSVC 44 | #ifndef __clang__ 45 | #define efDEBUG( format, args... ) {} 46 | #define efDEBUGC( cond, format, args... ) {} 47 | #else 48 | #define efDEBUG(...) {} 49 | #define efDEBUGC(...) {} 50 | #endif 51 | #else 52 | #define efDEBUG 53 | #define efDEBUGC 54 | #endif 55 | 56 | #endif 57 | 58 | } 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /kernel/test/glm.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | /* Overload StringMaker to properly print glm::vec3 */ 26 | namespace Catch { 27 | template<> struct StringMaker { 28 | static std::string convert(glm::vec3 const& value) { 29 | return glm::to_string(value); 30 | } 31 | }; 32 | template<> struct StringMaker { 33 | static std::string convert(glm::vec4 const& value) { 34 | return glm::to_string(value); 35 | } 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/FileInfo.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_FILEINFO_HPP 2 | #define EFSW_FILEINFO_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace efsw { 10 | 11 | class FileInfo 12 | { 13 | public: 14 | static bool exists( const std::string& filePath ); 15 | 16 | static bool isLink( const std::string& filePath ); 17 | 18 | static bool inodeSupported(); 19 | 20 | FileInfo(); 21 | 22 | FileInfo( const std::string& filepath ); 23 | 24 | FileInfo( const std::string& filepath, bool linkInfo ); 25 | 26 | bool operator==( const FileInfo& Other ) const; 27 | 28 | bool operator!=( const FileInfo& Other ) const; 29 | 30 | FileInfo& operator=( const FileInfo& Other ); 31 | 32 | bool isDirectory(); 33 | 34 | bool isRegularFile(); 35 | 36 | bool isReadable(); 37 | 38 | bool sameInode( const FileInfo& Other ) const; 39 | 40 | bool isLink(); 41 | 42 | std::string linksTo(); 43 | 44 | bool exists(); 45 | 46 | void getInfo(); 47 | 48 | void getRealInfo(); 49 | 50 | std::string Filepath; 51 | Uint64 ModificationTime; 52 | Uint64 Size; 53 | Uint32 OwnerId; 54 | Uint32 GroupId; 55 | Uint32 Permissions; 56 | Uint64 Inode; 57 | }; 58 | 59 | typedef std::map FileInfoMap; 60 | typedef std::list FileInfoList; 61 | typedef std::list< std::pair< std::string, FileInfo> > MovedList; 62 | 63 | } 64 | 65 | #endif 66 | 67 | -------------------------------------------------------------------------------- /kernel/include/ao/kernel/render/heightmap.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include 22 | 23 | #include 24 | 25 | #include "ao/kernel/render/region.hpp" 26 | #include "ao/kernel/format/image.hpp" 27 | 28 | class Tree; 29 | 30 | namespace Heightmap 31 | { 32 | 33 | /* 34 | * Render a height-map image into an array of floats (representing depth) 35 | * and the height-map's normals into a shaded image with R, G, B, A packed 36 | * into int32_t pixels. 37 | */ 38 | std::pair Render( 39 | Tree* t, Region r, const std::atomic_bool& abort, 40 | glm::mat4 m=glm::mat4(), size_t threads=8); 41 | } 42 | -------------------------------------------------------------------------------- /ui/include/ao/ui/gl/shader.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "ao/ui/gl/core.hpp" 24 | 25 | namespace Shader 26 | { 27 | /* 28 | * Compile a single shader of the given type 29 | * 30 | * type must be GL_VERTEX_SHADER or GL_FRAGMENT_SHADER 31 | * 32 | * Returns the shader's value on success, 0 on failure 33 | * On failure, prints the compile error to stderr 34 | */ 35 | GLuint compile(std::string s, GLenum type); 36 | 37 | /* 38 | * Links multiple shaders into a new program 39 | * 40 | * Returns the program's value on success, 0 on failure 41 | * On failure, prints the link error to stderr 42 | */ 43 | GLuint link(GLuint vert, GLuint frag); 44 | 45 | } // namespace Shader 46 | -------------------------------------------------------------------------------- /ui/include/ao/ui/gl/axes.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "ao/ui/gl/core.hpp" 24 | 25 | class Axes 26 | { 27 | public: 28 | Axes(); 29 | ~Axes(); 30 | 31 | void draw(const glm::mat4& m) const; 32 | 33 | protected: 34 | GLuint vs; // Vertex shader 35 | GLuint fs; // Fragment shader 36 | GLuint prog; // Shader program 37 | 38 | GLuint vbo_solid; // Vertex buffer for solid axes 39 | GLuint vao_solid; // Vertex array for drawing shaded 40 | 41 | GLuint vbo_wire; // Vertex buffer for wireframe axes 42 | GLuint vao_wire; // Vertex array for drawing wireframe 43 | 44 | // Shader source strings 45 | static const std::string vert; 46 | static const std::string frag; 47 | }; 48 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/DirWatcherGeneric.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_DIRWATCHERGENERIC_HPP 2 | #define EFSW_DIRWATCHERGENERIC_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace efsw { 10 | 11 | class DirWatcherGeneric 12 | { 13 | public: 14 | typedef std::map DirWatchMap; 15 | 16 | DirWatcherGeneric * Parent; 17 | WatcherGeneric * Watch; 18 | DirectorySnapshot DirSnap; 19 | DirWatchMap Directories; 20 | bool Recursive; 21 | 22 | DirWatcherGeneric( DirWatcherGeneric * parent, WatcherGeneric * ws, const std::string& directory, bool recursive, bool reportNewFiles = false ); 23 | 24 | ~DirWatcherGeneric(); 25 | 26 | void watch( bool reportOwnChange = false ); 27 | 28 | void watchDir( std::string& dir ); 29 | 30 | static bool isDir( const std::string& directory ); 31 | 32 | bool pathInWatches( std::string path ); 33 | 34 | void addChilds( bool reportNewFiles = true ); 35 | 36 | DirWatcherGeneric * findDirWatcher( std::string dir ); 37 | 38 | DirWatcherGeneric * findDirWatcherFast( std::string dir ); 39 | protected: 40 | bool Deleted; 41 | 42 | DirWatcherGeneric * createDirectory( std::string newdir ); 43 | 44 | void removeDirectory( std::string dir ); 45 | 46 | void moveDirectory( std::string oldDir, std::string newDir ); 47 | 48 | void resetDirectory( std::string directory ); 49 | 50 | void handleAction( const std::string& filename, unsigned long action, std::string oldFilename = ""); 51 | }; 52 | 53 | } 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /vendor/Eigen/Eigenvalues: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_EIGENVALUES_MODULE_H 2 | #define EIGEN_EIGENVALUES_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | #include "LU" 12 | #include "Geometry" 13 | 14 | /** \defgroup Eigenvalues_Module Eigenvalues module 15 | * 16 | * 17 | * 18 | * This module mainly provides various eigenvalue solvers. 19 | * This module also provides some MatrixBase methods, including: 20 | * - MatrixBase::eigenvalues(), 21 | * - MatrixBase::operatorNorm() 22 | * 23 | * \code 24 | * #include 25 | * \endcode 26 | */ 27 | 28 | #include "src/Eigenvalues/Tridiagonalization.h" 29 | #include "src/Eigenvalues/RealSchur.h" 30 | #include "src/Eigenvalues/EigenSolver.h" 31 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 32 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 33 | #include "src/Eigenvalues/HessenbergDecomposition.h" 34 | #include "src/Eigenvalues/ComplexSchur.h" 35 | #include "src/Eigenvalues/ComplexEigenSolver.h" 36 | #include "src/Eigenvalues/RealQZ.h" 37 | #include "src/Eigenvalues/GeneralizedEigenSolver.h" 38 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 39 | #ifdef EIGEN_USE_LAPACKE 40 | #include "src/Eigenvalues/RealSchur_MKL.h" 41 | #include "src/Eigenvalues/ComplexSchur_MKL.h" 42 | #include "src/Eigenvalues/SelfAdjointEigenSolver_MKL.h" 43 | #endif 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_EIGENVALUES_MODULE_H 48 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 49 | -------------------------------------------------------------------------------- /vendor/Eigen/COPYING.BSD: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Intel Corporation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may 13 | be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/posix/ThreadImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #if defined( EFSW_PLATFORM_POSIX ) 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | namespace efsw { namespace Platform { 11 | 12 | ThreadImpl::ThreadImpl( Thread * owner ) : 13 | mIsActive(false) 14 | { 15 | mIsActive = pthread_create( &mThread, NULL, &ThreadImpl::entryPoint, owner ) == 0; 16 | 17 | if ( !mIsActive ) 18 | { 19 | efDEBUG( "Failed to create thread\n" ); 20 | } 21 | } 22 | 23 | void ThreadImpl::wait() 24 | { 25 | // Wait for the thread to finish, no timeout 26 | if ( mIsActive ) 27 | { 28 | assert( pthread_equal( pthread_self(), mThread ) == 0 ); 29 | 30 | pthread_join( mThread, NULL ); 31 | 32 | mIsActive = false; // Reset the thread state 33 | } 34 | } 35 | 36 | void ThreadImpl::terminate() 37 | { 38 | if ( mIsActive ) 39 | { 40 | #if !defined( __ANDROID__ ) && !defined( ANDROID ) 41 | pthread_cancel( mThread ); 42 | #else 43 | pthread_kill( mThread , SIGUSR1 ); 44 | #endif 45 | 46 | mIsActive = false; 47 | } 48 | } 49 | 50 | void * ThreadImpl::entryPoint( void * userData ) 51 | { 52 | // The Thread instance is stored in the user data 53 | Thread * owner = static_cast( userData ); 54 | 55 | // Tell the thread to handle cancel requests immediatly 56 | #ifdef PTHREAD_CANCEL_ASYNCHRONOUS 57 | pthread_setcanceltype( PTHREAD_CANCEL_ASYNCHRONOUS, NULL ); 58 | #endif 59 | 60 | // Forward to the owner 61 | owner->run(); 62 | 63 | return NULL; 64 | } 65 | 66 | }} 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /vendor/glm/detail/intrinsic_exponential.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_exponential.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /vendor/glm/detail/intrinsic_trigonometric.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_trigonometric.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /ui/include/ao/ui/gl/core.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #define GL_VERSION_MAJOR 3 22 | #define GL_VERSION_MINOR 3 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | /* 31 | * Creates a visible window and returns a pointer 32 | * (or nullptr if something failed) 33 | * 34 | * glfwInitialize is called if not already initialized. 35 | * The returned context is set to current. 36 | * Caller takes ownership of window. 37 | */ 38 | GLFWwindow* makeWindow(int width, int height, std::string title); 39 | 40 | /* 41 | * Creates an OpenGL context attached to a hidden window, 42 | * returning the window (or nullptr if something failed) 43 | * 44 | * Same caveats apply as for makeWindow 45 | */ 46 | GLFWwindow* makeContext(); 47 | -------------------------------------------------------------------------------- /kernel/include/ao/kernel/render/quadtree.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include "ao/kernel/render/xtree.hpp" 22 | 23 | class Quadtree : public XTree 24 | { 25 | Quadtree(const Subregion& r); 26 | Quadtree(Evaluator* e, const Subregion& r, uint32_t flags); 27 | Quadtree(Evaluator* e, const std::array& cs, 28 | const Subregion& r, uint32_t flags); 29 | 30 | static const std::vector& cornerTable() 31 | { return _cornerTable; } 32 | const std::vector>& cellEdges() 33 | { return _cellEdges; } 34 | bool leafTopology() const; 35 | 36 | const static std::vector> _cellEdges; 37 | const static std::vector _cornerTable; 38 | 39 | friend class XTree; 40 | }; 41 | -------------------------------------------------------------------------------- /kernel/include/ao/kernel/render/octree.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include "ao/kernel/render/xtree.hpp" 22 | 23 | class Octree : public XTree 24 | { 25 | protected: 26 | Octree(const Subregion& r); 27 | Octree(Evaluator* e, const Subregion& r, uint32_t flags); 28 | Octree(Evaluator* e, const std::array& cs, 29 | const Subregion& r, uint32_t flags); 30 | 31 | static const std::vector& cornerTable() 32 | { return _cornerTable; } 33 | static const std::vector>& cellEdges() 34 | { return _cellEdges; } 35 | bool leafTopology() const; 36 | 37 | const static std::vector> _cellEdges; 38 | const static std::vector _cornerTable; 39 | 40 | friend class XTree; 41 | }; 42 | -------------------------------------------------------------------------------- /vendor/Eigen/SparseCholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2013 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSECHOLESKY_MODULE_H 11 | #define EIGEN_SPARSECHOLESKY_MODULE_H 12 | 13 | #include "SparseCore" 14 | #include "OrderingMethods" 15 | 16 | #include "src/Core/util/DisableStupidWarnings.h" 17 | 18 | /** 19 | * \defgroup SparseCholesky_Module SparseCholesky module 20 | * 21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. 22 | * Those decompositions are accessible via the following classes: 23 | * - SimplicialLLt, 24 | * - SimplicialLDLt 25 | * 26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #ifdef EIGEN_MPL2_ONLY 34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode 35 | #endif 36 | 37 | #include "src/misc/Solve.h" 38 | #include "src/misc/SparseSolve.h" 39 | #include "src/SparseCholesky/SimplicialCholesky.h" 40 | 41 | #ifndef EIGEN_MPL2_ONLY 42 | #include "src/SparseCholesky/SimplicialCholesky_impl.h" 43 | #endif 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## About 2 | See the TURTLE of enormous girth! 3 | 4 | ## Dependencies 5 | 6 | On a Mac with [Homebrew](http://brew.sh/), run 7 | ``` 8 | brew install cmake ninja boost libpng glfw3 libepoxy guile 9 | ``` 10 | 11 | ### Compilation 12 | - [cmake](https://cmake.org/) 13 | - [Ninja](https://ninja-build.org/) (recommended) 14 | 15 | ### Kernel 16 | - [Boost](http://www.boost.org/) 17 | - [`libpng`](http://www.libpng.org/pub/png/libpng.html) 18 | 19 | ### UI 20 | - [GLFW](http://www.glfw.org/) 21 | - [`libepoxy`](https://github.com/anholt/libepoxy) 22 | 23 | ### Bindings 24 | - [Guile](http://www.gnu.org/software/guile/) 25 | 26 | ## Building 27 | ``` 28 | git clone git@github.com:mkeeter/ao 29 | cd ao 30 | mkdir build 31 | cd build 32 | cmake -G Ninja .. 33 | ninja 34 | ``` 35 | This will produce a library named `libao`. 36 | 37 | To start a shell, run the executable named `ao-guile` 38 | (in the `bin` directory). 39 | 40 | ## Usage 41 | - `(ao-shapes)` lists available shape functions. 42 | - `(ao-show ...)` shows a shape in the 3D viewport. 43 | - `(ao-watch ...)` watches a script and re-runs it on changes. 44 | 45 | ## License 46 | Copyright (C) 2016 Matthew Keeter (matt.j.keeter@gmail.com) 47 | 48 | Ao is free software, with the core library licensed under the LGPL 49 | and bindings licensed under the GPL. 50 | 51 | The Ao shared library (named `libao` and built from the `kernel` and 52 | `ui` folders plus `bind/api.cpp`) is licensed under the LGPL. 53 | 54 | The Guile buildings and library of shapes (in the `bind/guile` 55 | subfolder) are licensed under the GPL. 56 | 57 | For details, see `COPYING.md` and the specific license files. 58 | -------------------------------------------------------------------------------- /kernel/src/eval/result.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include "ao/kernel/eval/result.hpp" 20 | 21 | Result::Result() 22 | { 23 | #ifdef __AVX__ 24 | f = reinterpret_cast(mf); 25 | dx = reinterpret_cast(mdx); 26 | dy = reinterpret_cast(mdy); 27 | dz = reinterpret_cast(mdz); 28 | #endif 29 | } 30 | 31 | void Result::set(Interval V) 32 | { 33 | i = V; 34 | } 35 | 36 | void Result::fill(float v) 37 | { 38 | for (unsigned i=0; i < N; ++i) 39 | { 40 | f[i] = v; 41 | dx[i] = 0; 42 | dy[i] = 0; 43 | dz[i] = 0; 44 | } 45 | 46 | i = Interval(v, v); 47 | } 48 | 49 | void Result::deriv(float x, float y, float z) 50 | { 51 | for (size_t i=0; i < N; ++i) 52 | { 53 | dx[i] = x; 54 | dy[i] = y; 55 | dz[i] = z; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /ui/include/ao/ui/task.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | struct Worker; 25 | class Evaluator; 26 | 27 | struct Task 28 | { 29 | /* 30 | * The default constructor leaves the task in an invalid state 31 | */ 32 | Task(); 33 | Task(const glm::mat4& m, size_t ni, size_t nj, size_t nk, size_t level); 34 | 35 | /* 36 | * Mark the task as invalid 37 | */ 38 | void reset(); 39 | 40 | /* 41 | * Check if the task is valid 42 | */ 43 | bool valid() const; 44 | 45 | /* Transform matrix associated with the task */ 46 | glm::mat4 mat; 47 | 48 | /* Voxel size associated with the task */ 49 | size_t ni, nj, nk; 50 | 51 | /* Subdivision level (1 is highest resolution) */ 52 | size_t level; 53 | }; 54 | -------------------------------------------------------------------------------- /vendor/Eigen/PaStiXSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_PASTIXSUPPORT_MODULE_H 2 | #define EIGEN_PASTIXSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | extern "C" { 10 | #include 11 | #include 12 | } 13 | 14 | #ifdef complex 15 | #undef complex 16 | #endif 17 | 18 | /** \ingroup Support_modules 19 | * \defgroup PaStiXSupport_Module PaStiXSupport module 20 | * 21 | * This module provides an interface to the PaSTiX library. 22 | * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver. 23 | * It provides the two following main factorization classes: 24 | * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization. 25 | * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization. 26 | * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern). 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | * 32 | * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. 33 | * The dependencies depend on how PaSTiX has been compiled. 34 | * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. 35 | * 36 | */ 37 | 38 | #include "src/misc/Solve.h" 39 | #include "src/misc/SparseSolve.h" 40 | 41 | #include "src/PaStiXSupport/PaStiXSupport.h" 42 | 43 | 44 | #include "src/Core/util/ReenableStupidWarnings.h" 45 | 46 | #endif // EIGEN_PASTIXSUPPORT_MODULE_H 47 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/WatcherFSEvents.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_WATCHERINOTIFY_HPP 2 | #define EFSW_WATCHERINOTIFY_HPP 3 | 4 | #include 5 | 6 | #if EFSW_PLATFORM == EFSW_PLATFORM_FSEVENTS 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace efsw { 16 | 17 | class FileWatcherFSEvents; 18 | 19 | class FSEvent 20 | { 21 | public: 22 | FSEvent( std::string path, long flags, Uint64 id ) : 23 | Path( path ), 24 | Flags( flags ), 25 | Id ( id ) 26 | { 27 | } 28 | 29 | std::string Path; 30 | long Flags; 31 | Uint64 Id; 32 | }; 33 | 34 | class WatcherFSEvents : public Watcher 35 | { 36 | public: 37 | WatcherFSEvents(); 38 | 39 | WatcherFSEvents( WatchID id, std::string directory, FileWatchListener * listener, bool recursive, WatcherFSEvents * parent = NULL ); 40 | 41 | ~WatcherFSEvents(); 42 | 43 | void init(); 44 | 45 | void initAsync(); 46 | 47 | void handleActions( std::vector & events ); 48 | 49 | void process(); 50 | 51 | FileWatcherFSEvents * FWatcher; 52 | 53 | FSEventStreamRef FSStream; 54 | protected: 55 | void handleAddModDel( const Uint32 &flags, const std::string &path, std::string &dirPath, std::string &filePath ); 56 | 57 | WatcherGeneric * WatcherGen; 58 | 59 | bool initializedAsync; 60 | 61 | std::set DirsChanged; 62 | 63 | void sendFileAction( WatchID watchid, const std::string& dir, const std::string& filename, Action action, std::string oldFilename = "" ); 64 | }; 65 | 66 | } 67 | 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /vendor/glm/gtc/vec1.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtc_vec1 28 | /// @file glm/gtc/vec1.inl 29 | /// @date 2013-03-16 / 2013-03-16 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Eigen2Support/TriangularSolver.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TRIANGULAR_SOLVER2_H 11 | #define EIGEN_TRIANGULAR_SOLVER2_H 12 | 13 | namespace Eigen { 14 | 15 | const unsigned int UnitDiagBit = UnitDiag; 16 | const unsigned int SelfAdjointBit = SelfAdjoint; 17 | const unsigned int UpperTriangularBit = Upper; 18 | const unsigned int LowerTriangularBit = Lower; 19 | 20 | const unsigned int UpperTriangular = Upper; 21 | const unsigned int LowerTriangular = Lower; 22 | const unsigned int UnitUpperTriangular = UnitUpper; 23 | const unsigned int UnitLowerTriangular = UnitLower; 24 | 25 | template 26 | template 27 | typename ExpressionType::PlainObject 28 | Flagged::solveTriangular(const MatrixBase& other) const 29 | { 30 | return m_matrix.template triangularView().solve(other.derived()); 31 | } 32 | 33 | template 34 | template 35 | void Flagged::solveTriangularInPlace(const MatrixBase& other) const 36 | { 37 | m_matrix.template triangularView().solveInPlace(other.derived()); 38 | } 39 | 40 | } // end namespace Eigen 41 | 42 | #endif // EIGEN_TRIANGULAR_SOLVER2_H 43 | -------------------------------------------------------------------------------- /test/api.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include 20 | 21 | #include "ao/kernel/tree/tree.hpp" 22 | #include "ao/kernel/tree/store.hpp" 23 | 24 | #include "api.hpp" 25 | 26 | TEST_CASE("struct contours") 27 | { 28 | Store s; 29 | Tree t(&s, s.operation(OP_SUB, 30 | s.operation(OP_ADD, s.operation(OP_MUL, s.X(), s.X()), 31 | s.operation(OP_MUL, s.Y(), s.Y())), 32 | s.constant(0.5))); 33 | 34 | struct contours* cs = tree_render_slice(&t, -1, 1, -1, 1, 0, 50); 35 | REQUIRE(cs->size == 1); 36 | 37 | float min = 1; 38 | float max = 0; 39 | for (uint32_t i=0; i < cs->sizes[0]; ++i) 40 | { 41 | auto r = pow(cs->xs[0][i], 2) + pow(cs->ys[0][i], 2); 42 | min = fmin(min, r); 43 | max = fmax(max, r); 44 | } 45 | REQUIRE(max < 0.51); 46 | REQUIRE(min > 0.49); 47 | contours_delete(cs); 48 | } 49 | -------------------------------------------------------------------------------- /vendor/glm/detail/type_vec.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_vec.inl 29 | /// @date 2011-06-15 / 2011-06-15 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | -------------------------------------------------------------------------------- /vendor/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_raw_data 28 | /// @file glm/gtx/raw_data.inl 29 | /// @date 2008-11-19 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | -------------------------------------------------------------------------------- /ui/test/gl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include 20 | 21 | #include 22 | 23 | #include "ao/ui/gl/core.hpp" 24 | #include "ao/ui/gl/shader.hpp" 25 | 26 | #include "ao/kernel/tree/store.hpp" 27 | #include "ao/kernel/tree/tree.hpp" 28 | 29 | //////////////////////////////////////////////////////////////////////////////// 30 | 31 | typedef std::unique_ptr> WindowPtr; 32 | 33 | TEST_CASE("Context creation") 34 | { 35 | WindowPtr window(makeContext(), glfwDestroyWindow); 36 | REQUIRE(window != nullptr); 37 | } 38 | 39 | TEST_CASE("OpenGL version") 40 | { 41 | WindowPtr window(makeContext(), glfwDestroyWindow); 42 | 43 | auto version = glGetString(GL_VERSION); 44 | REQUIRE(version); 45 | 46 | int major = version[0] - '0'; 47 | int minor = version[2] - '0'; 48 | 49 | CAPTURE(version); 50 | REQUIRE((major * 10 + minor) >= 33); 51 | } 52 | -------------------------------------------------------------------------------- /vendor/glm/detail/type_mat.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_mat.inl 29 | /// @date 2011-06-15 / 2011-06-15 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/FileWatcherGeneric.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_FILEWATCHERGENERIC_HPP 2 | #define EFSW_FILEWATCHERGENERIC_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace efsw 10 | { 11 | 12 | /// Implementation for Generic File Watcher. 13 | /// @class FileWatcherGeneric 14 | class FileWatcherGeneric : public FileWatcherImpl 15 | { 16 | public: 17 | typedef std::list WatchList; 18 | 19 | FileWatcherGeneric( FileWatcher * parent ); 20 | 21 | virtual ~FileWatcherGeneric(); 22 | 23 | /// Add a directory watch 24 | /// On error returns WatchID with Error type. 25 | WatchID addWatch(const std::string& directory, FileWatchListener* watcher, bool recursive); 26 | 27 | /// Remove a directory watch. This is a brute force lazy search O(nlogn). 28 | void removeWatch(const std::string& directory); 29 | 30 | /// Remove a directory watch. This is a map lookup O(logn). 31 | void removeWatch(WatchID watchid); 32 | 33 | /// Updates the watcher. Must be called often. 34 | void watch(); 35 | 36 | /// Handles the action 37 | void handleAction(Watcher * watch, const std::string& filename, unsigned long action, std::string oldFilename = ""); 38 | 39 | /// @return Returns a list of the directories that are being watched 40 | std::list directories(); 41 | protected: 42 | Thread * mThread; 43 | 44 | /// The last watchid 45 | WatchID mLastWatchID; 46 | 47 | /// Map of WatchID to WatchStruct pointers 48 | WatchList mWatches; 49 | 50 | Mutex mWatchesLock; 51 | 52 | bool pathInWatches( const std::string& path ); 53 | private: 54 | void run(); 55 | }; 56 | 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /vendor/Eigen/src/SparseCore/SparseRedux.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSEREDUX_H 11 | #define EIGEN_SPARSEREDUX_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | typename internal::traits::Scalar 17 | SparseMatrixBase::sum() const 18 | { 19 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 20 | Scalar res(0); 21 | for (Index j=0; j 28 | typename internal::traits >::Scalar 29 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 30 | { 31 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 32 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 33 | } 34 | 35 | template 36 | typename internal::traits >::Scalar 37 | SparseVector<_Scalar,_Options,_Index>::sum() const 38 | { 39 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 40 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 41 | } 42 | 43 | } // end namespace Eigen 44 | 45 | #endif // EIGEN_SPARSEREDUX_H 46 | -------------------------------------------------------------------------------- /vendor/Eigen/IterativeLinearSolvers: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 2 | #define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 3 | 4 | #include "SparseCore" 5 | #include "OrderingMethods" 6 | 7 | #include "src/Core/util/DisableStupidWarnings.h" 8 | 9 | /** 10 | * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module 11 | * 12 | * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. 13 | * Those solvers are accessible via the following classes: 14 | * - ConjugateGradient for selfadjoint (hermitian) matrices, 15 | * - BiCGSTAB for general square matrices. 16 | * 17 | * These iterative solvers are associated with some preconditioners: 18 | * - IdentityPreconditioner - not really useful 19 | * - DiagonalPreconditioner - also called JAcobi preconditioner, work very well on diagonal dominant matrices. 20 | * - IncompleteILUT - incomplete LU factorization with dual thresholding 21 | * 22 | * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport. 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | */ 28 | 29 | #include "src/misc/Solve.h" 30 | #include "src/misc/SparseSolve.h" 31 | 32 | #include "src/IterativeLinearSolvers/IterativeSolverBase.h" 33 | #include "src/IterativeLinearSolvers/BasicPreconditioners.h" 34 | #include "src/IterativeLinearSolvers/ConjugateGradient.h" 35 | #include "src/IterativeLinearSolvers/BiCGSTAB.h" 36 | #include "src/IterativeLinearSolvers/IncompleteLUT.h" 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 41 | -------------------------------------------------------------------------------- /vendor/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/vec2.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/type_vec2.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/vec3.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/type_vec3.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/vec4.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/type_vec4.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/common.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/common.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_common.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtc_swizzle 28 | /// @file glm/gtc/swizzle.inl 29 | /// @date 2009-06-14 / 2011-06-15 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /vendor/glm/matrix.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/matrix.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_matrix.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/integer.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/integer.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_integer.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/packing.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/packing.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_packing.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/geometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/geometric.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_geometric.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtc_type_aligned 28 | /// @file glm/gtc/type_aligned.inl 29 | /// @date 2014-11-23 / 2014-11-23 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /vendor/glm/exponential.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/exponential.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_exponential.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_std_based_type 28 | /// @file glm/gtx/std_based_type.inl 29 | /// @date 2008-06-08 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /vendor/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_number_precision 28 | /// @file glm/gtx/number_precision.inl 29 | /// @date 2007-05-10 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /vendor/glm/trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/trigonometric.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_trigonometric.hpp" 36 | -------------------------------------------------------------------------------- /vendor/glm/vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/vector_relational.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_vector_relational.hpp" 36 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/FileWatcherImpl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_FILEWATCHERIMPL_HPP 2 | #define EFSW_FILEWATCHERIMPL_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace efsw { 11 | 12 | class FileWatcherImpl 13 | { 14 | public: 15 | FileWatcherImpl( FileWatcher * parent ); 16 | 17 | virtual ~FileWatcherImpl(); 18 | 19 | /// Add a directory watch 20 | /// On error returns WatchID with Error type. 21 | virtual WatchID addWatch(const std::string& directory, FileWatchListener* watcher, bool recursive) = 0; 22 | 23 | /// Remove a directory watch. This is a brute force lazy search O(nlogn). 24 | virtual void removeWatch(const std::string& directory) = 0; 25 | 26 | /// Remove a directory watch. This is a map lookup O(logn). 27 | virtual void removeWatch(WatchID watchid) = 0; 28 | 29 | /// Updates the watcher. Must be called often. 30 | virtual void watch() = 0; 31 | 32 | /// Handles the action 33 | virtual void handleAction(Watcher * watch, const std::string& filename, unsigned long action, std::string oldFilename = "") = 0; 34 | 35 | /// @return Returns a list of the directories that are being watched 36 | virtual std::list directories() = 0; 37 | 38 | /// @return true if the backend init successfully 39 | virtual bool initOK(); 40 | 41 | /// @return If the link is allowed according to the current path and the state of out scope links 42 | virtual bool linkAllowed( const std::string& curPath, const std::string& link ); 43 | 44 | /// Search if a directory already exists in the watches 45 | virtual bool pathInWatches( const std::string& path ) = 0; 46 | 47 | FileWatcher * mFileWatcher; 48 | bool mInitOK; 49 | bool mIsGeneric; 50 | }; 51 | 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /ui/src/gl/texture.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include "ao/ui/gl/texture.hpp" 20 | 21 | void toDepthTexture(const DepthImage& img, GLuint tex) 22 | { 23 | glPixelStorei(GL_UNPACK_ALIGNMENT, 4); // Floats are 4-byte aligned 24 | glBindTexture(GL_TEXTURE_2D, tex); 25 | glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, img.rows(), img.cols(), 26 | 0, GL_DEPTH_COMPONENT, GL_FLOAT, img.data()); 27 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 28 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 29 | } 30 | 31 | void toNormalTexture(const NormalImage& img, GLuint tex) 32 | { 33 | glPixelStorei(GL_UNPACK_ALIGNMENT, 4); // Int32s are 4-byte aligned 34 | glBindTexture(GL_TEXTURE_2D, tex); 35 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.rows(), img.cols(), 36 | 0, GL_RGBA, GL_UNSIGNED_BYTE, img.data()); 37 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 38 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 39 | } 40 | -------------------------------------------------------------------------------- /bind/guile/ao/export.scm: -------------------------------------------------------------------------------- 1 | #| 2 | Copyright (C) 2016 Matthew Keeter 3 | 4 | This file is part of Ao. 5 | 6 | Ao is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | Ao is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with Ao. If not, see . 18 | |# 19 | (define-module (ao export)) 20 | 21 | (use-modules (ao bind) (ao jit)) 22 | 23 | (define-public (ao-export-heightmap shape file a b res) 24 | "ao-export-heightmap shape file '(x0 y0 z0) '(x1 y1 z1) res 25 | Renders a shape and saves it to an image. 26 | bounds are three-element lists; res is a resolution in voxels per unit." 27 | (tree-export-heightmap (jit shape) file a b res)) 28 | 29 | (define-public (ao-export-mesh shape file a b res) 30 | "ao-export-mesh shape file '(x0 y0 z0) '(x1 y1 z1) res 31 | Renders a shape and saves it to an mesh 32 | bounds are three-element lists; res is a resolution in voxels per unit." 33 | (tree-export-mesh (jit shape) file a b res)) 34 | 35 | (define-public (ao-export-slice shape file a b z res) 36 | "ao-export-slice shape file '(x0 y0) '(x1 y1) z res 37 | Renders a 2D slice of a model and saves it to an svg file 38 | bounds are two-element lists 39 | z is a single number 40 | res is a resolution in voxels per unit" 41 | (tree-export-slice (jit shape) file a b z res)) 42 | -------------------------------------------------------------------------------- /vendor/glm/detail/type_vec4_avx.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_tvec4_avx.inl 29 | /// @date 2014-12-01 / 2014-12-01 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm{ 34 | namespace detail 35 | { 36 | 37 | }//namespace detail 38 | 39 | 40 | 41 | }//namespace glm 42 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Eigen2Support/Memory.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2011 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN2_MEMORY_H 11 | #define EIGEN2_MEMORY_H 12 | 13 | namespace Eigen { 14 | 15 | inline void* ei_aligned_malloc(size_t size) { return internal::aligned_malloc(size); } 16 | inline void ei_aligned_free(void *ptr) { internal::aligned_free(ptr); } 17 | inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size) { return internal::aligned_realloc(ptr, new_size, old_size); } 18 | inline void* ei_handmade_aligned_malloc(size_t size) { return internal::handmade_aligned_malloc(size); } 19 | inline void ei_handmade_aligned_free(void *ptr) { internal::handmade_aligned_free(ptr); } 20 | 21 | template inline void* ei_conditional_aligned_malloc(size_t size) 22 | { 23 | return internal::conditional_aligned_malloc(size); 24 | } 25 | template inline void ei_conditional_aligned_free(void *ptr) 26 | { 27 | internal::conditional_aligned_free(ptr); 28 | } 29 | template inline void* ei_conditional_aligned_realloc(void* ptr, size_t new_size, size_t old_size) 30 | { 31 | return internal::conditional_aligned_realloc(ptr, new_size, old_size); 32 | } 33 | 34 | template inline T* ei_aligned_new(size_t size) 35 | { 36 | return internal::aligned_new(size); 37 | } 38 | template inline void ei_aligned_delete(T *ptr, size_t size) 39 | { 40 | return internal::aligned_delete(ptr, size); 41 | } 42 | 43 | } // end namespace Eigen 44 | 45 | #endif // EIGEN2_MACROS_H 46 | -------------------------------------------------------------------------------- /vendor/glm/detail/type_vec4_avx2.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_tvec4_avx2.inl 29 | /// @date 2014-12-01 / 2014-12-01 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm{ 34 | namespace detail 35 | { 36 | 37 | }//namespace detail 38 | 39 | 40 | 41 | }//namespace glm 42 | -------------------------------------------------------------------------------- /vendor/Eigen/Geometry: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_GEOMETRY_MODULE_H 2 | #define EIGEN_GEOMETRY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "SVD" 9 | #include "LU" 10 | #include 11 | 12 | #ifndef M_PI 13 | #define M_PI 3.14159265358979323846 14 | #endif 15 | 16 | /** \defgroup Geometry_Module Geometry module 17 | * 18 | * 19 | * 20 | * This module provides support for: 21 | * - fixed-size homogeneous transformations 22 | * - translation, scaling, 2D and 3D rotations 23 | * - quaternions 24 | * - \ref MatrixBase::cross() "cross product" 25 | * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation" 26 | * - some linear components: parametrized-lines and hyperplanes 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #include "src/Geometry/OrthoMethods.h" 34 | #include "src/Geometry/EulerAngles.h" 35 | 36 | #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS 37 | #include "src/Geometry/Homogeneous.h" 38 | #include "src/Geometry/RotationBase.h" 39 | #include "src/Geometry/Rotation2D.h" 40 | #include "src/Geometry/Quaternion.h" 41 | #include "src/Geometry/AngleAxis.h" 42 | #include "src/Geometry/Transform.h" 43 | #include "src/Geometry/Translation.h" 44 | #include "src/Geometry/Scaling.h" 45 | #include "src/Geometry/Hyperplane.h" 46 | #include "src/Geometry/ParametrizedLine.h" 47 | #include "src/Geometry/AlignedBox.h" 48 | #include "src/Geometry/Umeyama.h" 49 | 50 | #if defined EIGEN_VECTORIZE_SSE 51 | #include "src/Geometry/arch/Geometry_SSE.h" 52 | #endif 53 | #endif 54 | 55 | #ifdef EIGEN2_SUPPORT 56 | #include "src/Eigen2Support/Geometry/All.h" 57 | #endif 58 | 59 | #include "src/Core/util/ReenableStupidWarnings.h" 60 | 61 | #endif // EIGEN_GEOMETRY_MODULE_H 62 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 63 | 64 | -------------------------------------------------------------------------------- /vendor/Eigen/CholmodSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H 2 | #define EIGEN_CHOLMODSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup CholmodSupport_Module CholmodSupport module 14 | * 15 | * This module provides an interface to the Cholmod library which is part of the suitesparse package. 16 | * It provides the two following main factorization classes: 17 | * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization. 18 | * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial). 19 | * 20 | * For the sake of completeness, this module also propose the two following classes: 21 | * - class CholmodSimplicialLLT 22 | * - class CholmodSimplicialLDLT 23 | * Note that these classes does not bring any particular advantage compared to the built-in 24 | * SimplicialLLT and SimplicialLDLT factorization classes. 25 | * 26 | * \code 27 | * #include 28 | * \endcode 29 | * 30 | * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies. 31 | * The dependencies depend on how cholmod has been compiled. 32 | * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. 33 | * 34 | */ 35 | 36 | #include "src/misc/Solve.h" 37 | #include "src/misc/SparseSolve.h" 38 | 39 | #include "src/CholmodSupport/CholmodSupport.h" 40 | 41 | 42 | #include "src/Core/util/ReenableStupidWarnings.h" 43 | 44 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H 45 | 46 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/Debug.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifdef EFSW_COMPILER_MSVC 5 | #define WIN32_LEAN_AND_MEAN 6 | #include 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace efsw { 15 | 16 | #ifdef DEBUG 17 | 18 | void efREPORT_ASSERT( const char * File, int Line, const char * Exp ) 19 | { 20 | #ifdef EFSW_COMPILER_MSVC 21 | _CrtDbgReport( _CRT_ASSERT, File, Line, "", Exp); 22 | 23 | DebugBreak(); 24 | #else 25 | std::cout << "ASSERT: " << Exp << " file: " << File << " line: " << Line << std::endl; 26 | 27 | #if defined(EFSW_COMPILER_GCC) && defined(EFSW_32BIT) && !defined(EFSW_ARM) 28 | asm("int3"); 29 | #else 30 | assert( false ); 31 | #endif 32 | #endif 33 | } 34 | 35 | void efPRINT( const char * format, ... ) 36 | { 37 | char buf[2048]; 38 | va_list args; 39 | 40 | va_start( args, format ); 41 | 42 | #ifdef EFSW_COMPILER_MSVC 43 | _vsnprintf_s( buf, sizeof( buf ), sizeof( buf ) / sizeof( buf[0]), format, args ); 44 | #else 45 | vsnprintf( buf, sizeof( buf ) / sizeof( buf[0]), format, args ); 46 | #endif 47 | 48 | va_end( args ); 49 | 50 | #ifdef EFSW_COMPILER_MSVC 51 | OutputDebugStringA( buf ); 52 | #else 53 | std::cout << buf; 54 | #endif 55 | } 56 | 57 | void efPRINTC( unsigned int cond, const char * format, ...) 58 | { 59 | if ( 0 == cond ) 60 | return; 61 | 62 | char buf[2048]; 63 | va_list args; 64 | 65 | va_start( args, format ); 66 | 67 | #ifdef EFSW_COMPILER_MSVC 68 | _vsnprintf_s( buf, efARRAY_SIZE( buf ), efARRAY_SIZE( buf ), format, args ); 69 | #else 70 | vsnprintf( buf, sizeof( buf ) / sizeof( buf[0]), format, args ); 71 | #endif 72 | 73 | va_end( args ); 74 | 75 | #ifdef EFSW_COMPILER_MSVC 76 | OutputDebugStringA( buf ); 77 | #else 78 | std::cout << buf; 79 | #endif 80 | } 81 | 82 | #endif 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /vendor/glm/detail/precision.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/precision.hpp 29 | /// @date 2013-04-01 / 2013-04-01 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | namespace glm 36 | { 37 | enum precision 38 | { 39 | highp, 40 | mediump, 41 | lowp, 42 | simd, 43 | defaultp = highp 44 | }; 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /kernel/include/ao/kernel/tree/opcode.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | enum Opcode 22 | { 23 | INVALID, 24 | 25 | CONST, 26 | VAR_X, 27 | VAR_Y, 28 | VAR_Z, 29 | 30 | OP_SQUARE, 31 | OP_SQRT, 32 | OP_NEG, 33 | OP_ABS, 34 | OP_SIN, 35 | OP_COS, 36 | OP_TAN, 37 | OP_ASIN, 38 | OP_ACOS, 39 | OP_ATAN, 40 | OP_EXP, 41 | 42 | OP_ADD, 43 | OP_MUL, 44 | OP_MIN, 45 | OP_MAX, 46 | OP_SUB, 47 | OP_DIV, 48 | OP_ATAN2, 49 | OP_MOD, 50 | OP_NANFILL, 51 | 52 | // Affine trees must have the form 53 | // AFFINE 54 | // / \ 55 | // OP_ADD OP_ADD 56 | // / \ / \ 57 | // MUL MUL MUL C 58 | // / \ / \ / \ 59 | // X C Y C Z C 60 | // (where X, Y, Z are base coordinates and C is CONST) 61 | AFFINE_VEC, 62 | 63 | // Dummy opcodes used to select the left or right-hand side of a function 64 | // (used when one of the children is disabled) 65 | DUMMY_A, 66 | DUMMY_B, 67 | 68 | LAST_OP, 69 | }; 70 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/WatcherWin32.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_WATCHERWIN32_HPP 2 | #define EFSW_WATCHERWIN32_HPP 3 | 4 | #include 5 | #include 6 | 7 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 8 | 9 | #include 10 | 11 | #ifdef EFSW_COMPILER_MSVC 12 | #pragma comment(lib, "comctl32.lib") 13 | #pragma comment(lib, "user32.lib") 14 | #pragma comment(lib, "ole32.lib") 15 | 16 | // disable secure warnings 17 | #pragma warning (disable: 4996) 18 | #endif 19 | 20 | namespace efsw 21 | { 22 | 23 | class WatcherWin32; 24 | 25 | /// Internal watch data 26 | struct WatcherStructWin32 27 | { 28 | OVERLAPPED Overlapped; 29 | WatcherWin32 * Watch; 30 | }; 31 | 32 | class cLastModifiedEvent 33 | { 34 | public: 35 | cLastModifiedEvent() {} 36 | FileInfo file; 37 | std::string fileName; 38 | }; 39 | 40 | bool RefreshWatch(WatcherStructWin32* pWatch); 41 | 42 | void CALLBACK WatchCallback(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped); 43 | 44 | void DestroyWatch(WatcherStructWin32* pWatch); 45 | 46 | WatcherStructWin32* CreateWatch(LPCWSTR szDirectory, bool recursive, DWORD NotifyFilter); 47 | 48 | class WatcherWin32 : public Watcher 49 | { 50 | public: 51 | WatcherWin32() : 52 | Struct( NULL ), 53 | DirHandle( NULL ), 54 | lParam( 0 ), 55 | NotifyFilter( 0 ), 56 | StopNow( false ), 57 | Watch( NULL ), 58 | DirName( NULL ) 59 | { 60 | } 61 | 62 | WatcherStructWin32 * Struct; 63 | HANDLE DirHandle; 64 | BYTE mBuffer[63 * 1024]; // do NOT make this bigger than 64K because it will fail if the folder being watched is on the network! (see http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465(v=vs.85).aspx) 65 | LPARAM lParam; 66 | DWORD NotifyFilter; 67 | bool StopNow; 68 | FileWatcherImpl* Watch; 69 | char* DirName; 70 | cLastModifiedEvent LastModifiedEvent; 71 | }; 72 | 73 | } 74 | 75 | #endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /kernel/include/ao/kernel/format/mesh.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include 22 | 23 | #include 24 | 25 | #include "ao/kernel/render/octree.hpp" 26 | 27 | class Tree; 28 | class Region; 29 | 30 | struct Mesh 31 | { 32 | /* 33 | * Run dual contouring on the given evaluator, returning a Mesh 34 | * 35 | * This involves sampling the evaluator on an octree (with QEF 36 | * simplification to collapse leaf cells), then using DC to generate 37 | * a triangle mesh. 38 | */ 39 | static Mesh Render(Tree* t, const Region& r, 40 | uint32_t flags=Octree::COLLAPSE); 41 | 42 | /* 43 | * Saves the given mesh as a .stl file 44 | */ 45 | void writeSTL(std::string filename); 46 | void writeSTL(std::ostream& out); 47 | 48 | /* 49 | * Returns the unit-length normal of the i'th triangle 50 | */ 51 | glm::vec3 norm(unsigned i) const; 52 | 53 | /* Vertices in 3D space */ 54 | std::vector verts; 55 | 56 | /* Triangles in the mesh (as indices in verts list) */ 57 | std::vector tris; 58 | }; 59 | -------------------------------------------------------------------------------- /vendor/glm/detail/intrinsic_trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_trigonometric.hpp 25 | /// @date 2009-06-09 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #pragma once 30 | 31 | #include "setup.hpp" 32 | 33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 34 | # error "SSE2 instructions not supported or enabled" 35 | #else 36 | 37 | namespace glm{ 38 | namespace detail 39 | { 40 | 41 | }//namespace detail 42 | }//namespace glm 43 | 44 | #include "intrinsic_trigonometric.inl" 45 | 46 | #endif//GLM_ARCH 47 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Core/arch/Default/Settings.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | 12 | /* All the parameters defined in this file can be specialized in the 13 | * architecture specific files, and/or by the user. 14 | * More to come... */ 15 | 16 | #ifndef EIGEN_DEFAULT_SETTINGS_H 17 | #define EIGEN_DEFAULT_SETTINGS_H 18 | 19 | /** Defines the maximal loop size to enable meta unrolling of loops. 20 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 21 | * it does not correspond to the number of iterations or the number of instructions 22 | */ 23 | #ifndef EIGEN_UNROLLING_LIMIT 24 | #define EIGEN_UNROLLING_LIMIT 100 25 | #endif 26 | 27 | /** Defines the threshold between a "small" and a "large" matrix. 28 | * This threshold is mainly used to select the proper product implementation. 29 | */ 30 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 31 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 32 | #endif 33 | 34 | /** Defines the maximal width of the blocks used in the triangular product and solver 35 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 36 | */ 37 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 38 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 39 | #endif 40 | 41 | 42 | /** Defines the default number of registers available for that architecture. 43 | * Currently it must be 8 or 16. Other values will fail. 44 | */ 45 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 46 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 47 | #endif 48 | 49 | #endif // EIGEN_DEFAULT_SETTINGS_H 50 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/FileWatcherWin32.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_FILEWATCHERWIN32_HPP 2 | #define EFSW_FILEWATCHERWIN32_HPP 3 | 4 | #include 5 | 6 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | namespace efsw 13 | { 14 | 15 | /// Implementation for Win32 based on ReadDirectoryChangesW. 16 | /// @class FileWatcherWin32 17 | class FileWatcherWin32 : public FileWatcherImpl 18 | { 19 | public: 20 | /// type for a map from WatchID to WatcherWin32 pointer 21 | typedef std::vector WatchVector; 22 | typedef std::vector HandleVector; 23 | 24 | FileWatcherWin32( FileWatcher * parent ); 25 | 26 | virtual ~FileWatcherWin32(); 27 | 28 | /// Add a directory watch 29 | /// On error returns WatchID with Error type. 30 | WatchID addWatch(const std::string& directory, FileWatchListener* watcher, bool recursive); 31 | 32 | /// Remove a directory watch. This is a brute force lazy search O(nlogn). 33 | void removeWatch(const std::string& directory); 34 | 35 | /// Remove a directory watch. This is a map lookup O(logn). 36 | void removeWatch(WatchID watchid); 37 | 38 | /// Updates the watcher. Must be called often. 39 | void watch(); 40 | 41 | /// Handles the action 42 | void handleAction(Watcher* watch, const std::string& filename, unsigned long action, std::string oldFilename = ""); 43 | 44 | /// @return Returns a list of the directories that are being watched 45 | std::list directories(); 46 | protected: 47 | /// Vector of WatcherWin32 pointers 48 | WatchVector mWatches; 49 | 50 | /// Keeps an updated handles vector 51 | HandleVector mHandles; 52 | 53 | /// The last watchid 54 | WatchID mLastWatchID; 55 | 56 | Thread * mThread; 57 | 58 | Mutex mWatchesLock; 59 | 60 | bool pathInWatches( const std::string& path ); 61 | private: 62 | void run(); 63 | }; 64 | 65 | } 66 | 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /vendor/Eigen/SparseLU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // Copyright (C) 2012 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_SPARSELU_MODULE_H 12 | #define EIGEN_SPARSELU_MODULE_H 13 | 14 | #include "SparseCore" 15 | 16 | /** 17 | * \defgroup SparseLU_Module SparseLU module 18 | * This module defines a supernodal factorization of general sparse matrices. 19 | * The code is fully optimized for supernode-panel updates with specialized kernels. 20 | * Please, see the documentation of the SparseLU class for more details. 21 | */ 22 | 23 | #include "src/misc/Solve.h" 24 | #include "src/misc/SparseSolve.h" 25 | 26 | // Ordering interface 27 | #include "OrderingMethods" 28 | 29 | #include "src/SparseLU/SparseLU_gemm_kernel.h" 30 | 31 | #include "src/SparseLU/SparseLU_Structs.h" 32 | #include "src/SparseLU/SparseLU_SupernodalMatrix.h" 33 | #include "src/SparseLU/SparseLUImpl.h" 34 | #include "src/SparseCore/SparseColEtree.h" 35 | #include "src/SparseLU/SparseLU_Memory.h" 36 | #include "src/SparseLU/SparseLU_heap_relax_snode.h" 37 | #include "src/SparseLU/SparseLU_relax_snode.h" 38 | #include "src/SparseLU/SparseLU_pivotL.h" 39 | #include "src/SparseLU/SparseLU_panel_dfs.h" 40 | #include "src/SparseLU/SparseLU_kernel_bmod.h" 41 | #include "src/SparseLU/SparseLU_panel_bmod.h" 42 | #include "src/SparseLU/SparseLU_column_dfs.h" 43 | #include "src/SparseLU/SparseLU_column_bmod.h" 44 | #include "src/SparseLU/SparseLU_copy_to_ucol.h" 45 | #include "src/SparseLU/SparseLU_pruneL.h" 46 | #include "src/SparseLU/SparseLU_Utils.h" 47 | #include "src/SparseLU/SparseLU.h" 48 | 49 | #endif // EIGEN_SPARSELU_MODULE_H 50 | -------------------------------------------------------------------------------- /vendor/glm/detail/intrinsic_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_vector_relational.hpp 25 | /// @date 2009-06-09 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #pragma once 30 | 31 | #include "setup.hpp" 32 | 33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 34 | # error "SSE2 instructions not supported or enabled" 35 | #else 36 | 37 | namespace glm{ 38 | namespace detail 39 | { 40 | 41 | }//namespace detail 42 | }//namespace glm 43 | 44 | #include "intrinsic_vector_relational.inl" 45 | 46 | #endif//GLM_ARCH 47 | -------------------------------------------------------------------------------- /vendor/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_perpendicular 28 | /// @file glm/gtx/perpendicular.inl 29 | /// @date 2005-12-21 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER vecType perp 37 | ( 38 | vecType const & x, 39 | vecType const & Normal 40 | ) 41 | { 42 | return x - proj(x, Normal); 43 | } 44 | }//namespace glm 45 | -------------------------------------------------------------------------------- /vendor/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_projection 28 | /// @file glm/gtx/projection.inl 29 | /// @date 2005-12-21 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) 37 | { 38 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 39 | } 40 | }//namespace glm 41 | -------------------------------------------------------------------------------- /vendor/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_mixed_product 28 | /// @file glm/gtx/mixed_product.inl 29 | /// @date 2007-04-03 / 2008-09-17 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER T mixedProduct 37 | ( 38 | tvec3 const & v1, 39 | tvec3 const & v2, 40 | tvec3 const & v3 41 | ) 42 | { 43 | return dot(cross(v1, v2), v3); 44 | } 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /vendor/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_normal 28 | /// @file glm/gtx/normal.inl 29 | /// @date 2005-12-21 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER tvec3 triangleNormal 37 | ( 38 | tvec3 const & p1, 39 | tvec3 const & p2, 40 | tvec3 const & p3 41 | ) 42 | { 43 | return normalize(cross(p1 - p2, p1 - p3)); 44 | } 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/FileWatcherKqueue.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EFSW_FILEWATCHEROSX_HPP 2 | #define EFSW_FILEWATCHEROSX_HPP 3 | 4 | #include 5 | 6 | #if EFSW_PLATFORM == EFSW_PLATFORM_KQUEUE || EFSW_PLATFORM == EFSW_PLATFORM_FSEVENTS 7 | 8 | #include 9 | 10 | namespace efsw 11 | { 12 | 13 | /// Implementation for OSX based on kqueue. 14 | /// @class FileWatcherKqueue 15 | class FileWatcherKqueue : public FileWatcherImpl 16 | { 17 | friend class WatcherKqueue; 18 | public: 19 | FileWatcherKqueue( FileWatcher * parent ); 20 | 21 | virtual ~FileWatcherKqueue(); 22 | 23 | /// Add a directory watch 24 | /// On error returns WatchID with Error type. 25 | WatchID addWatch(const std::string& directory, FileWatchListener* watcher, bool recursive); 26 | 27 | /// Remove a directory watch. This is a brute force lazy search O(nlogn). 28 | void removeWatch(const std::string& directory); 29 | 30 | /// Remove a directory watch. This is a map lookup O(logn). 31 | void removeWatch(WatchID watchid); 32 | 33 | /// Updates the watcher. Must be called often. 34 | void watch(); 35 | 36 | /// Handles the action 37 | void handleAction(Watcher* watch, const std::string& filename, unsigned long action, std::string oldFilename = ""); 38 | 39 | /// @return Returns a list of the directories that are being watched 40 | std::list directories(); 41 | protected: 42 | /// Map of WatchID to WatchStruct pointers 43 | WatchMap mWatches; 44 | 45 | /// time out data 46 | struct timespec mTimeOut; 47 | 48 | /// WatchID allocator 49 | int mLastWatchID; 50 | 51 | Thread * mThread; 52 | 53 | Mutex mWatchesLock; 54 | 55 | std::list mRemoveList; 56 | 57 | long mFileDescriptorCount; 58 | 59 | bool mAddingWatcher; 60 | 61 | bool isAddingWatcher() const; 62 | 63 | bool pathInWatches( const std::string& path ); 64 | 65 | void addFD(); 66 | 67 | void removeFD(); 68 | 69 | bool availablesFD(); 70 | private: 71 | void run(); 72 | }; 73 | 74 | } 75 | 76 | #endif 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /vendor/glm/detail/intrinsic_integer.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_integer.hpp 25 | /// @date 2009-05-11 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #pragma once 30 | 31 | #include "glm/glm.hpp" 32 | 33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 34 | # error "SSE2 instructions not supported or enabled" 35 | #else 36 | 37 | namespace glm{ 38 | namespace detail 39 | { 40 | __m128i _mm_bit_interleave_si128(__m128i x); 41 | __m128i _mm_bit_interleave_si128(__m128i x, __m128i y); 42 | 43 | }//namespace detail 44 | }//namespace glm 45 | 46 | #include "intrinsic_integer.inl" 47 | 48 | #endif//GLM_ARCH 49 | -------------------------------------------------------------------------------- /vendor/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_half.hpp 29 | /// @date 2008-08-17 / 2011-09-20 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "setup.hpp" 36 | 37 | namespace glm{ 38 | namespace detail 39 | { 40 | typedef short hdata; 41 | 42 | GLM_FUNC_DECL float toFloat32(hdata value); 43 | GLM_FUNC_DECL hdata toFloat16(float const & value); 44 | 45 | }//namespace detail 46 | }//namespace glm 47 | 48 | #include "type_half.inl" 49 | -------------------------------------------------------------------------------- /kernel/include/ao/kernel/tree/atom.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #pragma once 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #include "ao/kernel/tree/opcode.hpp" 26 | 27 | class Token; 28 | 29 | /* 30 | * An Atom represent an operation in a math tree. 31 | */ 32 | class Atom 33 | { 34 | public: 35 | /* 36 | * Construct an atom from the given token, storing atoms[t] = this 37 | * 38 | * Requires that the token's children be packed into Atoms 39 | * beforehand (otherwise will throw an assertion) 40 | */ 41 | explicit Atom(const Token* t, 42 | std::unordered_map& atoms); 43 | 44 | /* 45 | * Print an Atom to an ostream 46 | */ 47 | friend std::ostream& operator<<(std::ostream& os, const Atom& atom); 48 | 49 | protected: 50 | /* Opcode for this atom */ 51 | const Opcode op; 52 | 53 | /* Populated for CONST atoms */ 54 | const float value; 55 | 56 | /* Populated for operators with arguments */ 57 | Atom* const a; 58 | Atom* const b; 59 | 60 | friend class Tree; 61 | friend class Clause; 62 | friend class Evaluator; 63 | }; 64 | 65 | std::ostream& operator<<(std::ostream& os, const Atom& atom); 66 | -------------------------------------------------------------------------------- /ui/src/watcher.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include "ao/ui/watcher.hpp" 20 | #include "ao/ui/window.hpp" 21 | 22 | static std::string join(std::string directory, std::string filename) 23 | { 24 | if (directory[directory.length() - 1] == '/') 25 | { 26 | directory = directory.substr(0, directory.length() - 1); 27 | } 28 | return directory + "/" + filename; 29 | } 30 | 31 | ScriptWatcher::ScriptWatcher(Window* window, Callback callback, 32 | std::string directory, std::string filename) 33 | : window(window), target(join(directory, filename)), callback(callback), 34 | parent(new efsw::FileWatcher()) 35 | { 36 | parent->addWatch(directory, this, false); 37 | parent->watch(); 38 | 39 | // Trigger the callback once on construction 40 | callback(target); 41 | } 42 | 43 | void ScriptWatcher::handleFileAction( 44 | efsw::WatchID watchid, const std::string& dir, 45 | const std::string& filename, efsw::Action action, 46 | std::string old_filename) 47 | { 48 | (void)watchid; 49 | (void)old_filename; 50 | 51 | if (join(dir, filename) == target && action == efsw::Actions::Modified) 52 | { 53 | window->clearFile(target); 54 | callback(target); 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /vendor/Eigen/src/Eigen2Support/QR.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // Copyright (C) 2011 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN2_QR_H 12 | #define EIGEN2_QR_H 13 | 14 | namespace Eigen { 15 | 16 | template 17 | class QR : public HouseholderQR 18 | { 19 | public: 20 | 21 | typedef HouseholderQR Base; 22 | typedef Block MatrixRBlockType; 23 | 24 | QR() : Base() {} 25 | 26 | template 27 | explicit QR(const T& t) : Base(t) {} 28 | 29 | template 30 | bool solve(const MatrixBase& b, ResultType *result) const 31 | { 32 | *result = static_cast(this)->solve(b); 33 | return true; 34 | } 35 | 36 | MatrixType matrixQ(void) const { 37 | MatrixType ret = MatrixType::Identity(this->rows(), this->cols()); 38 | ret = this->householderQ() * ret; 39 | return ret; 40 | } 41 | 42 | bool isFullRank() const { 43 | return true; 44 | } 45 | 46 | const TriangularView 47 | matrixR(void) const 48 | { 49 | int cols = this->cols(); 50 | return MatrixRBlockType(this->matrixQR(), 0, 0, cols, cols).template triangularView(); 51 | } 52 | }; 53 | 54 | /** \return the QR decomposition of \c *this. 55 | * 56 | * \sa class QR 57 | */ 58 | template 59 | const QR::PlainObject> 60 | MatrixBase::qr() const 61 | { 62 | return QR(eval()); 63 | } 64 | 65 | } // end namespace Eigen 66 | 67 | #endif // EIGEN2_QR_H 68 | -------------------------------------------------------------------------------- /ui/vendor/efsw/src/efsw/platform/win/FileSystemImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 4 | 5 | #ifndef WIN32_LEAN_AND_MEAN 6 | #define WIN32_LEAN_AND_MEAN 7 | #endif 8 | #include 9 | 10 | #ifndef EFSW_COMPILER_MSVC 11 | #include 12 | #endif 13 | 14 | namespace efsw { namespace Platform { 15 | 16 | FileInfoMap FileSystem::filesInfoFromPath( const std::string& path ) 17 | { 18 | FileInfoMap files; 19 | 20 | String tpath( path ); 21 | 22 | if ( tpath[ tpath.size() - 1 ] == '/' || tpath[ tpath.size() - 1 ] == '\\' ) 23 | { 24 | tpath += "*"; 25 | } 26 | else 27 | { 28 | tpath += "\\*"; 29 | } 30 | 31 | WIN32_FIND_DATAW findFileData; 32 | HANDLE hFind = FindFirstFileW( (LPCWSTR)tpath.toWideString().c_str(), &findFileData ); 33 | 34 | if( hFind != INVALID_HANDLE_VALUE ) 35 | { 36 | std::string name( String( findFileData.cFileName ).toUtf8() ); 37 | std::string fpath( path + name ); 38 | 39 | if ( name != "." && name != ".." ) 40 | { 41 | files[ name ] = FileInfo( fpath ); 42 | } 43 | 44 | while( FindNextFileW( hFind, &findFileData ) ) 45 | { 46 | name = String( findFileData.cFileName ).toUtf8(); 47 | fpath = path + name; 48 | 49 | if ( name != "." && name != ".." ) 50 | { 51 | files[ name ] = FileInfo( fpath ); 52 | } 53 | } 54 | 55 | FindClose( hFind ); 56 | } 57 | 58 | return files; 59 | } 60 | 61 | char FileSystem::getOSSlash() 62 | { 63 | return '\\'; 64 | } 65 | 66 | bool FileSystem::isDirectory( const std::string& path ) 67 | { 68 | return 0 != ( GetFileAttributesW( String( path ).toWideString().c_str() ) & FILE_ATTRIBUTE_DIRECTORY ); 69 | } 70 | 71 | bool FileSystem::isRemoteFS( const std::string& directory ) 72 | { 73 | if ((directory[0] == '\\' || directory[0] == '/') && 74 | (directory[1] == '\\' || directory[1] == '/')) 75 | { 76 | return true; 77 | } 78 | 79 | if ( directory.size() >= 3 ) 80 | { 81 | return 4 == GetDriveTypeA( directory.substr( 0, 3 ).c_str() ); 82 | } 83 | 84 | return false; 85 | } 86 | 87 | }} 88 | 89 | #endif 90 | -------------------------------------------------------------------------------- /kernel/src/eval/row.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Matthew Keeter 3 | * 4 | * This file is part of the Ao library. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Ao is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with Ao. If not, see . 18 | */ 19 | #include 20 | 21 | #include "ao/kernel/eval/row.hpp" 22 | #include "ao/kernel/eval/clause.hpp" 23 | 24 | void Row::push() 25 | { 26 | disabled.push(0); 27 | 28 | size_t index=0; 29 | while (index < active) 30 | { 31 | if ((*this)[index]->checkDisabled()) 32 | { 33 | disable(index); 34 | } 35 | else 36 | { 37 | index++; 38 | } 39 | } 40 | } 41 | 42 | void Row::pop() 43 | { 44 | // Walk through the most recently disabled atoms, clearing their 45 | // DISABLED flag to indicate that they should resume normal operation 46 | for (size_t i=0; i < disabled.top(); ++i) 47 | { 48 | (*this)[active++]->enable(); 49 | } 50 | disabled.pop(); 51 | } 52 | 53 | void Row::disable(size_t i) 54 | { 55 | assert(i < active); 56 | assert(disabled.size() > 0); 57 | 58 | // Mark this Clause as disabled 59 | (*this)[i]->disable(); 60 | 61 | // Swap the atom to the back of the list, decrementing active 62 | // Since we only evaluate from 0 to active, this disables the atom 63 | std::swap((*this)[i], (*this)[--active]); 64 | disabled.top()++; 65 | } 66 | 67 | void Row::setSize() 68 | { 69 | active = size(); 70 | } 71 | --------------------------------------------------------------------------------