Line 50... |
Line 50... |
50 |
};
|
50 |
};
|
51 |
|
51 |
|
52 |
class ConnectivityKernel
|
52 |
class ConnectivityKernel
|
53 |
{
|
53 |
{
|
54 |
public:
|
54 |
public:
|
- |
|
55 |
/// add vertex to kernel
|
55 |
VertexID add_vertex();
|
56 |
VertexID add_vertex();
|
- |
|
57 |
/// add face to kernel
|
56 |
FaceID add_face();
|
58 |
FaceID add_face();
|
- |
|
59 |
/// add halfedge to kernel
|
57 |
HalfEdgeID add_halfedge();
|
60 |
HalfEdgeID add_halfedge();
|
58 |
|
61 |
|
59 |
|
- |
|
- |
|
62 |
/// remove vertex from kernel, given by ID
|
60 |
void remove_vertex(VertexID id);
|
63 |
void remove_vertex(VertexID id);
|
- |
|
64 |
/// remove face from kernel, given by ID
|
61 |
void remove_face(FaceID id);
|
65 |
void remove_face(FaceID id);
|
- |
|
66 |
/// remove halfedge from kernel, given by ID
|
62 |
void remove_halfedge(HalfEdgeID id);
|
67 |
void remove_halfedge(HalfEdgeID id);
|
63 |
|
68 |
|
- |
|
69 |
/// resize kernel vertices container to size
|
64 |
void resize_vertices(size_t size);
|
70 |
void resize_vertices(size_t size);
|
- |
|
71 |
/// resize kernel faces container to size
|
65 |
void resize_faces(size_t size);
|
72 |
void resize_faces(size_t size);
|
- |
|
73 |
/// resize kernel halfedges container to size
|
66 |
void resize_halfedges(size_t size);
|
74 |
void resize_halfedges(size_t size);
|
67 |
|
75 |
|
- |
|
76 |
/// get the ID of next halfedge, given by current halfedge ID
|
68 |
HalfEdgeID next(HalfEdgeID id) const;
|
77 |
HalfEdgeID next(HalfEdgeID current) const;
|
- |
|
78 |
/// get the ID of previous halfedge, given by current halfedge ID
|
69 |
HalfEdgeID prev(HalfEdgeID id) const;
|
79 |
HalfEdgeID prev(HalfEdgeID current) const;
|
- |
|
80 |
/// get the ID of opposite halfedge, given by current halfedge ID
|
70 |
HalfEdgeID opp(HalfEdgeID id) const;
|
81 |
HalfEdgeID opp(HalfEdgeID current) const;
|
- |
|
82 |
/// get the ID of outgoing halfedge, given by current vertex ID
|
71 |
HalfEdgeID out(VertexID id) const;
|
83 |
HalfEdgeID out(VertexID current) const;
|
- |
|
84 |
/// get the ID of last halfedge of current face ID
|
72 |
HalfEdgeID last(FaceID id) const;
|
85 |
HalfEdgeID last(FaceID current) const;
|
- |
|
86 |
/// get the ID of vertex pointed to by current halfedge ID
|
73 |
VertexID vert(HalfEdgeID id) const;
|
87 |
VertexID vert(HalfEdgeID id) const;
|
- |
|
88 |
/// get the ID of face owning current halfedge ID
|
74 |
FaceID face(HalfEdgeID id) const;
|
89 |
FaceID face(HalfEdgeID id) const;
|
75 |
|
90 |
|
- |
|
91 |
/// set the ID of next halfedge of current halfedge to next
|
76 |
void set_next(HalfEdgeID id, HalfEdgeID next);
|
92 |
void set_next(HalfEdgeID current, HalfEdgeID next);
|
- |
|
93 |
/// set the ID of previous halfedge of current halfedge to prev
|
77 |
void set_prev(HalfEdgeID id, HalfEdgeID prev);
|
94 |
void set_prev(HalfEdgeID current, HalfEdgeID prev);
|
- |
|
95 |
/// set the ID of opposite halfedge of current halfedge to opp
|
78 |
void set_opp(HalfEdgeID id, HalfEdgeID opp);
|
96 |
void set_opp(HalfEdgeID current, HalfEdgeID opp);
|
- |
|
97 |
/// set the ID of outgoing halfedge of current vertex to out
|
79 |
void set_out(VertexID id, HalfEdgeID out);
|
98 |
void set_out(VertexID current, HalfEdgeID out);
|
- |
|
99 |
/// set the ID of last halfedge of current face to last
|
80 |
void set_last(FaceID id, HalfEdgeID last);
|
100 |
void set_last(FaceID current, HalfEdgeID last);
|
- |
|
101 |
/// set the ID of vertex pointed to by current halfedge to vert
|
81 |
void set_vert(HalfEdgeID id, VertexID vert);
|
102 |
void set_vert(HalfEdgeID current, VertexID vert);
|
- |
|
103 |
/// set the ID of face owning current halfedge to face
|
82 |
void set_face(HalfEdgeID id, FaceID face);
|
104 |
void set_face(HalfEdgeID current, FaceID face);
|
83 |
|
105 |
|
- |
|
106 |
/// number of active vertices in kernel
|
84 |
size_t active_vertices() const;
|
107 |
size_t active_vertices() const;
|
- |
|
108 |
/// number of active faces in kernel
|
85 |
size_t active_faces() const;
|
109 |
size_t active_faces() const;
|
- |
|
110 |
/// number of active halfedges in kernel
|
86 |
size_t active_halfedges() const;
|
111 |
size_t active_halfedges() const;
|
87 |
|
112 |
|
- |
|
113 |
/// number of total vertices in kernel
|
88 |
size_t total_vertices() const;
|
114 |
size_t total_vertices() const;
|
- |
|
115 |
/// number of total faces in kernel
|
89 |
size_t total_faces() const;
|
116 |
size_t total_faces() const;
|
- |
|
117 |
/// number of total halfedges in kernel
|
90 |
size_t total_halfedges() const;
|
118 |
size_t total_halfedges() const;
|
91 |
|
119 |
|
- |
|
120 |
/// check if ID of vertex is in use
|
92 |
bool in_use(VertexID id) const;
|
121 |
bool in_use(VertexID id) const;
|
- |
|
122 |
/// check if ID of face is in use
|
93 |
bool in_use(FaceID id) const;
|
123 |
bool in_use(FaceID id) const;
|
- |
|
124 |
/// check if ID of halfedge is in use
|
94 |
bool in_use(HalfEdgeID id) const;
|
125 |
bool in_use(HalfEdgeID id) const;
|
95 |
|
126 |
|
96 |
|
- |
|
- |
|
127 |
/// get the ID of next vertex in container (default: skip unused IDs)
|
97 |
VertexID vertices_next(VertexID id, bool skip = true) const;
|
128 |
VertexID vertices_next(VertexID id, bool skip = true) const;
|
- |
|
129 |
/// get the ID of next face in container (default: skip unused IDs)
|
98 |
HalfEdgeID halfedges_next(HalfEdgeID id, bool skip = true) const;
|
130 |
HalfEdgeID halfedges_next(HalfEdgeID id, bool skip = true) const;
|
- |
|
131 |
/// get the ID of next halfedge in container (default: skip unused IDs)
|
99 |
FaceID faces_next(FaceID id, bool skip = true) const;
|
132 |
FaceID faces_next(FaceID id, bool skip = true) const;
|
100 |
|
133 |
|
- |
|
134 |
/// get the ID of previous vertex in container (default: skip unused IDs)
|
101 |
VertexID vertices_prev(VertexID id, bool skip = true) const;
|
135 |
VertexID vertices_prev(VertexID id, bool skip = true) const;
|
- |
|
136 |
/// get the ID of previous face in container (default: skip unused IDs)
|
102 |
HalfEdgeID halfedges_prev(HalfEdgeID id, bool skip = true) const;
|
137 |
HalfEdgeID halfedges_prev(HalfEdgeID id, bool skip = true) const;
|
- |
|
138 |
/// get the ID of previous halfedge in container (default: skip unused IDs)
|
103 |
FaceID faces_prev(FaceID id, bool skip = true) const;
|
139 |
FaceID faces_prev(FaceID id, bool skip = true) const;
|
104 |
|
140 |
|
- |
|
141 |
/// get the ID of first vertex in container (default: skip unused IDs)
|
105 |
VertexID vertices_begin(bool skip = true) const;
|
142 |
VertexID vertices_begin(bool skip = true) const;
|
- |
|
143 |
/// get the ID of first vertex in container (default: skip unused IDs)
|
106 |
HalfEdgeID halfedges_begin(bool skip = true) const;
|
144 |
HalfEdgeID halfedges_begin(bool skip = true) const;
|
- |
|
145 |
/// get the ID of first vertex in container (default: skip unused IDs)
|
107 |
FaceID faces_begin(bool skip = true) const;
|
146 |
FaceID faces_begin(bool skip = true) const;
|
108 |
|
147 |
|
- |
|
148 |
/// get the ID of one past the end vertex in container
|
109 |
VertexID vertices_end() const;
|
149 |
VertexID vertices_end() const;
|
- |
|
150 |
/// get the ID of one past the end face in container
|
110 |
HalfEdgeID halfedges_end() const;
|
151 |
HalfEdgeID halfedges_end() const;
|
- |
|
152 |
/// get the ID of one past the end halfedge in container
|
111 |
FaceID faces_end() const;
|
153 |
FaceID faces_end() const;
|
112 |
|
154 |
|
113 |
/// Clean up unused space in vectors - WARNING! Invalidates existing handles!
|
155 |
/// Clean up unused space in vectors - WARNING! Invalidates existing handles!
|
114 |
void cleanup(IDRemap& map);
|
156 |
void cleanup(IDRemap& map);
|
115 |
|
157 |
|
- |
|
158 |
/// clear the kernel
|
116 |
void clear();
|
159 |
void clear();
|
117 |
|
160 |
|
118 |
private:
|
161 |
private:
|
119 |
ItemVector<Vertex> vertices;
|
162 |
ItemVector<Vertex> vertices;
|
120 |
ItemVector<Face> faces;
|
163 |
ItemVector<Face> faces;
|