This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ea0f2a
commit 899b250
Showing
8 changed files
with
331 additions
and
11 deletions.
There are no files selected for viewing
Submodule libgeometry
updated
11 files
+1 −1 | geometry/CMakeLists.txt | |
+1 −1 | geometry/detail/hybrid-decimater.hpp | |
+63 −36 | geometry/mesh-voxelizer.cpp | |
+18 −3 | geometry/mesh-voxelizer.hpp | |
+13 −2 | geometry/mesh.hpp | |
+3 −3 | geometry/meshop-openmesh.cpp | |
+10 −4 | geometry/meshop.cpp | |
+22 −6 | geometry/meshop.hpp | |
+48 −3 | geometry/python/geometrymodule.cpp | |
+133 −98 | geometry/volume.hpp | |
+3 −3 | geometry/volumeop.hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
/** | ||
* Copyright (c) 2017 Melown Technologies SE | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* | ||
* * Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#ifndef mapproxy_generator_interface_hpp_included_ | ||
#define mapproxy_generator_interface_hpp_included_ | ||
|
||
#include <boost/optional.hpp> | ||
|
||
#include "vts-libs/registry/extensions.hpp" | ||
#include "vts-libs/vts/tileset/properties.hpp" | ||
#include "vts-libs/vts/mesh.hpp" | ||
|
||
#include "../heightfunction.hpp" | ||
#include "../support/mesh.hpp" | ||
#include "../support/mmapped/tilesetindex.hpp" | ||
#include "../generator.hpp" | ||
#include "../definition.hpp" | ||
|
||
namespace vts = vtslibs::vts; | ||
namespace vre = vtslibs::registry::extensions; | ||
|
||
namespace generator { | ||
|
||
class VtsTilesetProvider { | ||
public: | ||
virtual ~VtsTilesetProvider() {} | ||
|
||
/** Generates mesh and sends it to the output. | ||
*/ | ||
Generator::Task generateMesh(const vts::TileId &tileId | ||
, Sink &sink | ||
, const SurfaceFileInfo &fileInfo | ||
, Arsenal &arsenal | ||
, vts::SubMesh::TextureMode textureMode | ||
= vts::SubMesh::external) const; | ||
|
||
/** Alias for surface file generation. | ||
*/ | ||
Generator::Task generateFile(const FileInfo &fileInfo, Sink sink) const; | ||
|
||
/** Returns path to VTS file if supported. | ||
*/ | ||
boost::optional<boost::filesystem::path> path(vts::File file) const; | ||
|
||
private: | ||
virtual Generator::Task | ||
generateMesh_impl(const vts::TileId &tileId | ||
, Sink &sink | ||
, const SurfaceFileInfo &fileInfo | ||
, Arsenal &arsenal | ||
, vts::SubMesh::TextureMode textureMode) | ||
const = 0; | ||
|
||
virtual Generator::Task | ||
generateFile_impl(const FileInfo &fileInfo, Sink sink) const = 0; | ||
|
||
virtual boost::optional<boost::filesystem::path> path_impl(vts::File file) | ||
const = 0; | ||
}; | ||
|
||
// inlines | ||
|
||
/** Generates mesh and sends it to the output. | ||
*/ | ||
Generator::Task | ||
VtsTilesetProvider::generateMesh(const vts::TileId &tileId | ||
, Sink &sink | ||
, const SurfaceFileInfo &fileInfo | ||
, Arsenal &arsenal | ||
, vts::SubMesh::TextureMode textureMode | ||
= vts::SubMesh::external) const | ||
{ | ||
return generateMesh_impl(tileId, sink, fileInfo, arsenal, textureMode); | ||
} | ||
|
||
Generator::Task | ||
VtsTilesetProvider::generateFile(const FileInfo &fileInfo, Sink sink) | ||
const | ||
{ | ||
return generatorFile_impl(fileInfo, sink); | ||
} | ||
|
||
boost::optional<boost::filesystem::path> | ||
VtsTilesetProvider::path(vts::File file) const | ||
{ | ||
return path_impl(file); | ||
} | ||
|
||
} // namespace generator | ||
|
||
#endif // mapproxy_generator_interface_hpp_included_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/** | ||
* Copyright (c) 2017 Melown Technologies SE | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* | ||
* * Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#ifndef mapproxy_generator_providers_hpp_included_ | ||
#define mapproxy_generator_providers_hpp_included_ | ||
|
||
#include <boost/optional.hpp> | ||
|
||
#include "vts-libs/registry/extensions.hpp" | ||
#include "vts-libs/vts/tileset/properties.hpp" | ||
#include "vts-libs/vts/mesh.hpp" | ||
|
||
#include "../heightfunction.hpp" | ||
#include "../support/mesh.hpp" | ||
#include "../support/mmapped/tilesetindex.hpp" | ||
#include "../generator.hpp" | ||
#include "../definition.hpp" | ||
|
||
namespace vts = vtslibs::vts; | ||
namespace vre = vtslibs::registry::extensions; | ||
|
||
namespace generator { | ||
|
||
class VtsTilesetProvider { | ||
public: | ||
virtual ~VtsTilesetProvider() {} | ||
|
||
/** Generates mesh and sends it to the output. | ||
*/ | ||
Generator::Task generateMesh(const vts::TileId &tileId | ||
, Sink &sink | ||
, const SurfaceFileInfo &fileInfo | ||
, Arsenal &arsenal | ||
, vts::SubMesh::TextureMode textureMode | ||
= vts::SubMesh::external) const; | ||
|
||
/** Alias for surface file generation. | ||
*/ | ||
Generator::Task generateFile(const FileInfo &fileInfo, Sink sink) const; | ||
|
||
/** Returns path to VTS file if supported. | ||
*/ | ||
boost::optional<boost::filesystem::path> path(vts::File file) const; | ||
|
||
private: | ||
virtual Generator::Task | ||
generateMesh_impl(const vts::TileId &tileId | ||
, Sink &sink | ||
, const SurfaceFileInfo &fileInfo | ||
, Arsenal &arsenal | ||
, vts::SubMesh::TextureMode textureMode) | ||
const = 0; | ||
|
||
virtual Generator::Task | ||
generateFile_impl(const FileInfo &fileInfo, Sink sink) const = 0; | ||
|
||
virtual boost::optional<boost::filesystem::path> path_impl(vts::File file) | ||
const = 0; | ||
}; | ||
|
||
// inlines | ||
|
||
/** Generates mesh and sends it to the output. | ||
*/ | ||
Generator::Task | ||
VtsTilesetProvider::generateMesh(const vts::TileId &tileId | ||
, Sink &sink | ||
, const SurfaceFileInfo &fileInfo | ||
, Arsenal &arsenal | ||
, vts::SubMesh::TextureMode textureMode) const | ||
{ | ||
return generateMesh_impl(tileId, sink, fileInfo, arsenal, textureMode); | ||
} | ||
|
||
Generator::Task | ||
VtsTilesetProvider::generateFile(const FileInfo &fileInfo, Sink sink) | ||
const | ||
{ | ||
return generateFile_impl(fileInfo, sink); | ||
} | ||
|
||
boost::optional<boost::filesystem::path> | ||
VtsTilesetProvider::path(vts::File file) const | ||
{ | ||
return path_impl(file); | ||
} | ||
|
||
} // namespace generator | ||
|
||
#endif // mapproxy_generator_providers_hpp_included_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.