Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-30 08:28:21

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2025 Siddharth Kumar, Roorkee, India.
0004 // Copyright (c) 2025 Oracle and/or its affiliates.
0005 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0006 
0007 // Use, modification and distribution is subject to the Boost Software License,
0008 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 
0011 
0012 #ifndef BOOST_GEOMETRY_GEOMETRIES_POLYHEDRAL_SURFACE_HPP
0013 #define BOOST_GEOMETRY_GEOMETRIES_POLYHEDRAL_SURFACE_HPP
0014 
0015 #include <memory>
0016 #include <vector>
0017 #include <boost/concept/assert.hpp>
0018 #include <boost/geometry/geometries/concepts/point_concept.hpp>
0019 #include <boost/geometry/geometries/concepts/polygon_concept.hpp>
0020 #include <boost/geometry/core/tag.hpp>
0021 #include <boost/geometry/core/tags.hpp>
0022 #include <boost/config.hpp>
0023 
0024 namespace boost { namespace geometry
0025 {
0026 namespace model
0027 {
0028 
0029 /*!
0030 \brief A Polyhedral Surface is a contiguous collection of polygons in 3-dimensional space,
0031     which share common boundary segments. The concepts and the constructors don't check if the
0032     boundary segments are common but is_valid() does.
0033 \ingroup geometries
0034 \tparam Polygon polygon type
0035 \tparam Container container type for polygons,
0036     default std::vector
0037 \tparam Allocator container-allocator-type, for the polygons
0038 
0039 \qbk{[include reference/geometries/polyhedral_surface.qbk]}
0040 \qbk{before.synopsis,
0041 [heading Model of]
0042 [link geometry.reference.concepts.concept_polyhedral_surface PolyhedralSurface Concept]
0043 }
0044 
0045 */
0046 
0047 template
0048 <
0049     typename Polygon,
0050     template<typename, typename> class Container = std::vector,
0051     template<typename> class Allocator = std::allocator
0052 
0053 >
0054 class polyhedral_surface : public Container<Polygon, Allocator<Polygon> >
0055 {
0056     BOOST_CONCEPT_ASSERT( (concepts::Polygon<Polygon>) );
0057 
0058 public :
0059     using polygon_type = Polygon;
0060     using polygon_container = Container<Polygon, Allocator<Polygon> >;
0061 
0062     /// \constructor_default{polyhedron}
0063     inline polyhedral_surface()
0064         : polygon_container()
0065     {}
0066 
0067     /// \constructor_initialized_list{polyhedron}
0068     inline polyhedral_surface(std::initializer_list<Polygon> l)
0069         : polygon_container(l.begin(), l.end())
0070     {}
0071 
0072 };
0073 } // namespace model
0074 
0075 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
0076 namespace traits
0077 {
0078 
0079 template
0080 <
0081     typename Polygon,
0082     template<typename, typename> class Container,
0083     template<typename> class Allocator
0084 >
0085 struct tag
0086 <
0087     model::polyhedral_surface
0088         <
0089             Polygon,
0090             Container, Allocator
0091         >
0092 >
0093 {
0094     using type = polyhedral_surface_tag;
0095 };
0096 
0097 } // namespace traits
0098 #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
0099 
0100 }} // namespace boost::geometry
0101 
0102 #endif // BOOST_GEOMETRY_GEOMETRIES_POLYHEDRAL_SURFACE_HPP