Skip to content

Commit bdd1fb8

Browse files
committed
Added Assm library code (Adaptive Screen Space Meshing.
Removed dependencies on python, openmp, opencv, torch etc. A simple rasterizer and a gaussian blur implementation replaces them.
1 parent c41d2d6 commit bdd1fb8

20 files changed

+8112
-0
lines changed

external/assm/CMakeLists.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
2+
project(ASSM VERSION 1.0.0 LANGUAGES CXX)
3+
4+
set(CMAKE_CXX_STANDARD 17)
5+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6+
7+
find_package (Eigen3)
8+
if(NOT Eigen3_FOUND)
9+
set(EIGEN3_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../eigen-3.3.9)
10+
11+
endif()
12+
13+
include_directories(${EIGEN3_INCLUDE_DIR})
14+
15+
file(GLOB SOURCES ./*.cpp ./algorithms/*.cpp)
16+
file(GLOB HEADERS ./*.h ./algorithms/*.h)
17+
18+
add_library(assm ${SOURCES} ${HEADERS})
19+

external/assm/Exceptions.h

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Copyright 2021 the Polygon Mesh Processing Library developers.
2+
// Distributed under a MIT-style license, see LICENSE.txt for details.
3+
4+
#pragma once
5+
6+
#include <stdexcept>
7+
8+
namespace pmp {
9+
10+
//! \addtogroup core
11+
//! @{
12+
13+
//! \brief Exception indicating invalid input passed to a function.
14+
//! \details This exception should be used to signal violation of a
15+
//! precondition, e.g., if an algorithm expects a pure triangle mesh but a
16+
//! general polygon mesh is passed instead.
17+
class InvalidInputException : public std::invalid_argument
18+
{
19+
public:
20+
InvalidInputException(const std::string& what) : std::invalid_argument(what)
21+
{
22+
}
23+
};
24+
25+
//! \brief Exception indicating failure so solve an equation system.
26+
class SolverException : public std::runtime_error
27+
{
28+
public:
29+
SolverException(const std::string& what) : std::runtime_error(what) {}
30+
};
31+
32+
//! \brief Exception indicating failure to allocate a new resource.
33+
//! \details This exception signals an error resulting from an attempt to exceed
34+
//! implementation-defined allocation limits.
35+
class AllocationException : public std::length_error
36+
{
37+
public:
38+
AllocationException(const std::string& what) : std::length_error(what) {}
39+
};
40+
41+
//! \brief Exception indicating a topological error has occurred.
42+
class TopologyException : public std::logic_error
43+
{
44+
public:
45+
TopologyException(const std::string& what) : std::logic_error(what) {}
46+
};
47+
48+
//! \brief Exception indicating an error occurred while performing IO.
49+
class IOException : public std::runtime_error
50+
{
51+
public:
52+
IOException(const std::string& what) : std::runtime_error(what) {}
53+
};
54+
55+
//! @}
56+
57+
} // namespace pmp

0 commit comments

Comments
 (0)