Antkeeper  0.0.1
brep-mesh.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Christopher J. Howard
3  *
4  * This file is part of Antkeeper source code.
5  *
6  * Antkeeper source code 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 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Antkeeper source code 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 Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef ANTKEEPER_GEOM_BREP_MESH_HPP
21 #define ANTKEEPER_GEOM_BREP_MESH_HPP
22 
27 
28 namespace geom {
29 
33 class brep_mesh
34 {
35 public:
39  brep_mesh() noexcept;
40 
46  brep_mesh(const brep_mesh& other);
47 
55  brep_mesh& operator=(const brep_mesh& other);
56 
59 
61  void clear() noexcept;
62 
66 
69  [[nodiscard]] inline const brep_vertex_container& vertices() const noexcept
70  {
71  return m_vertices;
72  }
73  [[nodiscard]] inline brep_vertex_container& vertices() noexcept
74  {
75  return m_vertices;
76  }
78 
81  [[nodiscard]] inline const brep_edge_container& edges() const noexcept
82  {
83  return m_edges;
84  }
85  [[nodiscard]] inline brep_edge_container& edges() noexcept
86  {
87  return m_edges;
88  }
90 
93  [[nodiscard]] inline const brep_loop_container& loops() const noexcept
94  {
95  return m_loops;
96  }
97  [[nodiscard]] inline brep_loop_container& loops() noexcept
98  {
99  return m_loops;
100  }
102 
105  [[nodiscard]] inline const brep_face_container& faces() const noexcept
106  {
107  return m_faces;
108  }
109  [[nodiscard]] inline brep_face_container& faces() noexcept
110  {
111  return m_faces;
112  }
114 
116 
117 private:
118  brep_vertex_container m_vertices;
119  brep_edge_container m_edges;
120  brep_loop_container m_loops;
121  brep_face_container m_faces;
122 };
123 
124 } // namespace geom
125 
126 #endif // ANTKEEPER_GEOM_BREP_MESH_HPP
B-rep edge container.
Definition: brep-edge.hpp:279
B-rep face container.
Definition: brep-face.hpp:275
B-rep loop container.
Definition: brep-loop.hpp:102
Boundary representation (B-rep) of a mesh.
Definition: brep-mesh.hpp:34
const brep_edge_container & edges() const noexcept
Returns the mesh edges.
Definition: brep-mesh.hpp:81
const brep_face_container & faces() const noexcept
Returns the mesh faces.
Definition: brep-mesh.hpp:105
brep_vertex_container & vertices() noexcept
Returns the mesh vertices.
Definition: brep-mesh.hpp:73
brep_face_container & faces() noexcept
Returns the mesh faces.
Definition: brep-mesh.hpp:109
brep_loop_container & loops() noexcept
Returns the mesh loops.
Definition: brep-mesh.hpp:97
void clear() noexcept
Erases all vertices, edges, loops, and faces.
Definition: brep-mesh.cpp:114
brep_mesh() noexcept
Constructs an empty mesh.
Definition: brep-mesh.cpp:29
const brep_vertex_container & vertices() const noexcept
Returns the mesh vertices.
Definition: brep-mesh.hpp:69
brep_mesh & operator=(const brep_mesh &other)
Copies another mesh into this mesh.
Definition: brep-mesh.cpp:42
const brep_loop_container & loops() const noexcept
Returns the mesh loops.
Definition: brep-mesh.hpp:93
brep_edge_container & edges() noexcept
Returns the mesh edges.
Definition: brep-mesh.hpp:85
B-rep vertex container.
Geometric algorithms.