| 176 | } |
| 177 | |
| 178 | void TriangleMesh::init_boundary_nodes(const BoundaryPtr& bd) { |
| 179 | const size_t num_vertices = m_mesh->get_num_vertices(); |
| 180 | const size_t num_boundaries = bd->get_num_boundaries(); |
| 181 | std::set<size_t> boundary_vertices; |
| 182 | for (size_t i=0; i<num_boundaries; i++) { |
| 183 | VectorI bd_edge = bd->get_boundary(i); |
| 184 | boundary_vertices.insert(bd_edge.data(), bd_edge.data() + 2); |
| 185 | } |
| 186 | |
| 187 | m_boundary.resize(boundary_vertices.size()); |
| 188 | std::copy(boundary_vertices.begin(), boundary_vertices.end(), |
| 189 | m_boundary.data()); |
| 190 | |
| 191 | m_boundary_idx = VectorI::Ones(num_vertices); |
| 192 | m_boundary_idx *= -1; |
| 193 | const size_t num_boundary_vertices = m_boundary.size(); |
| 194 | for (size_t i=0; i<num_boundary_vertices; i++) { |
| 195 | m_boundary_idx[m_boundary[i]] = i; |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | void TriangleMesh::init_boundary_edges(const BoundaryPtr& bd) { |
| 200 | m_boundary_edges = bd->get_boundaries(); |
nothing calls this directly
no test coverage detected