early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,82 @@
cmake_minimum_required(VERSION 3.12)
project(PoissonRecon LANGUAGES NONE)
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/poissonrecon" CACHE PATH "Path where cmake configs will be installed")
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
set(PoissonRecon_HEADERS
"Src/Allocator.h"
"Src/Array.h"
"Src/BinaryNode.h"
"Src/BlockedVector.h"
"Src/BSplineData.h"
"Src/CmdLineParser.h"
"Src/Factor.h"
"Src/FEMTree.h"
"Src/FunctionData.h"
"Src/Geometry.h"
"Src/Image.h"
"Src/JPEG.h"
"Src/LinearSolvers.h"
"Src/MarchingCubes.h"
"Src/MAT.h"
"Src/MyMiscellany.h"
"Src/Ply.h"
"Src/PlyFile.h"
"Src/PNG.h"
"Src/Polynomial.h"
"Src/PPolynomial.h"
"Src/PreProcessor.h"
"Src/RegularTree.h"
"Src/SparseMatrix.h"
"Src/SparseMatrixInterface.h"
"Src/Window.h"
)
set(PoissonRecon_INLINES
"Src/Array.inl"
"Src/BMPStream.inl"
"Src/BSplineData.inl"
"Src/CmdLineParser.inl"
"Src/FEMTree.Evaluation.inl"
"Src/FEMTree.Initialize.inl"
"Src/FEMTree.inl"
"Src/FEMTree.IsoSurface.specialized.inl"
"Src/FEMTree.SortedTreeNodes.inl"
"Src/FEMTree.System.inl"
"Src/FEMTree.WeightedSamples.inl"
"Src/FunctionData.inl"
"Src/Geometry.inl"
"Src/JPEG.inl"
"Src/MAT.inl"
"Src/PlyFile.inl"
"Src/PNG.inl"
"Src/Polynomial.inl"
"Src/PPolynomial.inl"
"Src/RegularTree.inl"
"Src/SparseMatrix.inl"
"Src/SparseMatrixInterface.inl"
"Src/Window.inl"
)
add_library(PoissonRecon INTERFACE)
target_link_libraries(PoissonRecon INTERFACE PNG::PNG JPEG::JPEG)
set_target_properties(PoissonRecon PROPERTIES PUBLIC_HEADER "${PoissonRecon_HEADERS};${PoissonRecon_INLINES}")
target_include_directories(PoissonRecon INTERFACE $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>)
install(TARGETS PoissonRecon EXPORT PoissonReconTargets
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}"
)
install(EXPORT PoissonReconTargets
NAMESPACE PoissonRecon::
DESTINATION ${INSTALL_CMAKE_DIR}
)

View File

@@ -0,0 +1,47 @@
diff --git a/Src/FEMTree.WeightedSamples.inl b/Src/FEMTree.WeightedSamples.inl
index 7b0d6b4..bb3ad0f 100644
--- a/Src/FEMTree.WeightedSamples.inl
+++ b/Src/FEMTree.WeightedSamples.inl
@@ -362,7 +362,7 @@ Real FEMTree< Dim , Real >::_splatPointData( Allocator< FEMTreeNode > *nodeAlloc
// pow( width , -dim ): So that each sample is splatted with a unit volume
V _v = v * weight / Real( pow( width , dim ) ) * dx;
// V _v = v / Length(v) * dx;
-#if defined( __GNUC__ ) && __GNUC__ < 5
+#if defined( __GNUC__ ) && __GNUC__ < 5 && 0
#ifdef SHOW_WARNINGS
#warning "you've got me gcc version<5"
#endif // SHOW_WARNINGS
diff --git a/Src/FEMTree.h b/Src/FEMTree.h
index 8f00045..2faa0f4 100644
--- a/Src/FEMTree.h
+++ b/Src/FEMTree.h
@@ -231,6 +231,7 @@ template< class Data , typename Pack > struct _SparseOrDenseNodeData{};
template< class Data , unsigned int ... FEMSigs >
struct _SparseOrDenseNodeData< Data , UIntPack< FEMSigs ... > >
{
+ virtual ~_SparseOrDenseNodeData() {}
static const unsigned int Dim = sizeof ... ( FEMSigs );
typedef UIntPack< FEMSigs ... > FEMSignatures;
typedef Data data_type;
diff --git a/Src/FEMTree.inl b/Src/FEMTree.inl
index 814f1ae..405e996 100644
--- a/Src/FEMTree.inl
+++ b/Src/FEMTree.inl
@@ -425,7 +425,7 @@ SparseNodeData< OutData , UIntPack< DataSigs ... > > FEMTree< Dim , Real >::setI
AddAtomic( weightSum , sample.weight );
out *= sample.weight;
Allocator< FEMTreeNode > *nodeAllocator = nodeAllocators.size() ? nodeAllocators[ thread ] : NULL;
-#if defined( __GNUC__ ) && __GNUC__ < 5
+#if defined( __GNUC__ ) && __GNUC__ < 5 && 0
#ifdef SHOW_WARNINGS
#warning "you've got me gcc version<5"
#endif // SHOW_WARNINGS
@@ -436,7 +436,7 @@ SparseNodeData< OutData , UIntPack< DataSigs ... > > FEMTree< Dim , Real >::setI
else
{
Real width = (Real)( 1.0 / ( 1<<maxDepth ) );
-#if defined( __GNUC__ ) && __GNUC__ < 5
+#if defined( __GNUC__ ) && __GNUC__ < 5 && 0
#ifdef SHOW_WARNINGS
#warning "you've got me gcc version<5"
#endif // SHOW_WARNINGS

View File

@@ -0,0 +1,32 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mkazhdan/PoissonRecon
REF 455ea0dbe651f31bf6985ff2891becff1dd79c72
SHA512 93ef904b0a73b7650e2f1ed143444861661db74b4991182ffd0ff49c008fec9d664fb93e24825fce748576d8d6abbd1de8bfc8f8b1f7c48f57207712bf80ce9e
HEAD_REF master
PATCHES
use-external-libs.patch
disable-gcc5-checks.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TOOLS=OFF
)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/poissonrecon/PoissonRecon-config.cmake" [=[
include(CMakeFindDependencyMacro)
find_dependency(PNG)
find_dependency(JPEG)
include("${CMAKE_CURRENT_LIST_DIR}/PoissonReconTargets.cmake")
]=])
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@@ -0,0 +1,42 @@
--- a/Src/JPEG.h
+++ b/Src/JPEG.h
@@ -6,14 +6,10 @@
#ifdef _WIN32
#include <windows.h>
-#include "JPEG/jpeglib.h"
-#include "JPEG/jerror.h"
-#include "JPEG/jmorecfg.h"
-#else // !_WIN32
+#endif // _WIN32
#include <jpeglib.h>
#include <jerror.h>
#include <jmorecfg.h>
-#endif // _WIN32
struct my_error_mgr
{
--- a/Src/PNG.h
+++ b/Src/PNG.h
@@ -1,7 +1,7 @@
#ifndef PNG_INCLUDED
#define PNG_INCLUDED
-#include "PNG/png.h"
+#include <png.h>
struct PNGReader : public ImageReader
{
--- a/Src/PNG.inl
+++ b/Src/PNG.inl
@@ -1,10 +1,6 @@
#include <stdio.h>
#include <vector>
-#ifdef _WIN32
-#include "PNG/png.h"
-#else // !_WIN32
#include <png.h>
-#endif // _WIN32
inline PNGReader::PNGReader( const char* fileName , unsigned int& width , unsigned int& height , unsigned int& channels )
{

19
externals/vcpkg/ports/poissonrecon/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,19 @@
{
"name": "poissonrecon",
"version-date": "2021-09-26",
"description": "Adaptive Multigrid Solvers",
"homepage": "https://github.com/mkazhdan/PoissonRecon",
"dependencies": [
"libjpeg-turbo",
"libpng",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
]
}