Subversion Repositories gelsvn

Rev

Rev 518 | Rev 520 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 518 Rev 519
Line 79... Line 79...
79
        void set_out(VertexID id, HalfEdgeID out);
79
        void set_out(VertexID id, HalfEdgeID out);
80
        void set_last(FaceID id, HalfEdgeID last);
80
        void set_last(FaceID id, HalfEdgeID last);
81
        void set_vert(HalfEdgeID id, VertexID vert);
81
        void set_vert(HalfEdgeID id, VertexID vert);
82
        void set_face(HalfEdgeID id, FaceID face);
82
        void set_face(HalfEdgeID id, FaceID face);
83
 
83
 
-
 
84
        size_t active_vertices() const;
-
 
85
        size_t active_faces() const;
-
 
86
        size_t active_halfedges() const;
-
 
87
 
84
        size_t no_vertices(bool active = true) const;
88
        size_t total_vertices() const;
85
        size_t no_faces(bool active = true) const;
89
        size_t total_faces() const;
86
        size_t no_halfedges(bool active = true) const;
90
        size_t total_halfedges() const;
87
 
91
 
88
        bool in_use(VertexID id) const;
92
        bool in_use(VertexID id) const;
89
        bool in_use(FaceID id) const;
93
        bool in_use(FaceID id) const;
90
        bool in_use(HalfEdgeID id) const;
94
        bool in_use(HalfEdgeID id) const;
91
 
95
 
Line 118... Line 122...
118
    };
122
    };
119
 
123
 
120
    inline VertexID ConnectivityKernel::add_vertex()
124
    inline VertexID ConnectivityKernel::add_vertex()
121
    {
125
    {
122
        vertices.add(Vertex());
126
        vertices.add(Vertex());
123
        return VertexID(vertices.size() - 1);
127
        return VertexID(vertices.total_size() - 1);
124
    }
128
    }
125
 
129
 
126
    inline FaceID ConnectivityKernel::add_face()
130
    inline FaceID ConnectivityKernel::add_face()
127
    {
131
    {
128
        faces.add(Face());
132
        faces.add(Face());
129
        return FaceID(faces.size() - 1);
133
        return FaceID(faces.total_size() - 1);
130
    }
134
    }
131
 
135
 
132
    inline HalfEdgeID ConnectivityKernel::add_halfedge()
136
    inline HalfEdgeID ConnectivityKernel::add_halfedge()
133
    {
137
    {
134
        halfedges.add(HalfEdge());
138
        halfedges.add(HalfEdge());
135
        return HalfEdgeID(halfedges.size() - 1);
139
        return HalfEdgeID(halfedges.total_size() - 1);
136
    }
140
    }
137
 
141
 
138
 
142
 
139
 
143
 
140
 
144
 
Line 199... Line 203...
199
    { halfedges[id.index].vert = vert; }
203
    { halfedges[id.index].vert = vert; }
200
 
204
 
201
    inline void ConnectivityKernel::set_face(HalfEdgeID id, FaceID face)
205
    inline void ConnectivityKernel::set_face(HalfEdgeID id, FaceID face)
202
    { halfedges[id.index].face = face; }
206
    { halfedges[id.index].face = face; }
203
 
207
 
204
    inline size_t ConnectivityKernel::no_vertices(bool active) const
-
 
205
    { return vertices.size(active); }
-
 
206
 
208
 
207
    inline size_t ConnectivityKernel::no_faces(bool active) const
-
 
208
    { return faces.size(active); }
-
 
209
 
209
 
-
 
210
    inline size_t ConnectivityKernel::active_vertices() const
-
 
211
    { return vertices.active_size(); }
-
 
212
 
-
 
213
    inline size_t ConnectivityKernel::active_faces() const
-
 
214
    { return faces.active_size(); }
-
 
215
 
-
 
216
    inline size_t ConnectivityKernel::active_halfedges() const
-
 
217
    { return halfedges.active_size(); }
-
 
218
 
-
 
219
 
-
 
220
 
-
 
221
    inline size_t ConnectivityKernel::total_vertices() const
-
 
222
    { return vertices.total_size(); }
-
 
223
 
-
 
224
    inline size_t ConnectivityKernel::total_faces() const
-
 
225
    { return faces.total_size(); }
-
 
226
 
210
    inline size_t ConnectivityKernel::no_halfedges(bool active) const
227
    inline size_t ConnectivityKernel::total_halfedges() const
211
    { return halfedges.size(active); }
228
    { return halfedges.total_size(); }
212
 
229
 
213
 
230
 
214
 
231
 
215
    inline bool ConnectivityKernel::in_use(VertexID id) const
232
    inline bool ConnectivityKernel::in_use(VertexID id) const
216
    { return vertices.in_use(id.index); }
233
    { return vertices.in_use(id.index); }