Rumba C++ SDK
MeshEdit.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2018
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 #pragma once
16 
17 #include "Mesh.h"
18 
19  namespace maquina
20  {
22  class MAQUINA_EXPORT MeshEdit : public Value
23  {
24  public:
25  MeshEdit(const Mesh& mesh);
26 
27  struct Corner
28  {
29  Corner() {}
30  Corner(int v, int f) : vertex(v), face_vertex(f) {}
31  int vertex;
33  };
34 
35  int polygon_count() const;
36  std::vector<int> polygons_by_edge(int v0, int v1) const;
37  int polygon_count_by_edge(int v0, int v1) const;
38  int polygon_vertex_count(int p) const;
39  Corner polygon_vertex(int p, int i) const;
40  int polygon_vertex_index(int p, int v) const;
41  Corner polygon_next_vertex(int p, int v) const;
42  Corner polygon_previous_vertex(int p, int v) const;
43 
44  void merge_polygons(int p0, int p1, int v0, int v1);
45  void merge_vertex(int dest, int src);
46  void delete_polygon(int p);
47  void set_vertex(int v, const Imath::V3f& p);
48  Corner new_vertex(const Corner& copy_corner, const Imath::V3f& p);
49  void rebuild_polyon(int p, const gsl::span<const Corner>& vertices);
50  int new_polyon(int original_polygon, const gsl::span<const Corner>& vertices);
51 
52  Mesh make_mesh() const;
53 
55  MeshEdit(const std::shared_ptr<Impl>& impl) { _impl=impl; }
56  };
57  }
int vertex
Definition: MeshEdit.h:31
Corner(int v, int f)
Definition: MeshEdit.h:30
Definition: ImathFrame.h:42
A mesh value.
Definition: Mesh.h:33
int face_vertex
Definition: MeshEdit.h:32
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
Definition: MeshEdit.h:27
Corner()
Definition: MeshEdit.h:29
#define MAQUINA_EXPORT
Definition: Export.h:31
MeshEdit provide tools to modify a mesh topology.
Definition: MeshEdit.h:22
Base class of all Rumba values.
Definition: Value.h:34