Subversion Repositories gelsvn

Rev

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

Rev 588 Rev 589
Line 74... Line 74...
74
    /** The connectivity kernel is basically an aggregate of ItemVectors for vertices, faces, and halfedges.
74
    /** The connectivity kernel is basically an aggregate of ItemVectors for vertices, faces, and halfedges.
75
     This class contains no geometry information - only information about connectivitiy. Arguably it abstracts
75
     This class contains no geometry information - only information about connectivitiy. Arguably it abstracts
76
     away the implementation from the ConnectivityKernel class making it possible, for instance, to use a different kernel. */
76
     away the implementation from the ConnectivityKernel class making it possible, for instance, to use a different kernel. */
77
    class ConnectivityKernel
77
    class ConnectivityKernel
78
    {
78
    {
79
        friend class Walker;
-
 
80
        
-
 
81
    public:
79
    public:
82
        
80
        
83
        /// number of active vertices in kernel
81
        /// number of active vertices in kernel
84
        size_t no_vertices() const;
82
        size_t no_vertices() const;
85
        /// number of active faces in kernel
83
        /// number of active faces in kernel
Line 128... Line 126...
128
        /// get the ID of vertex pointed to by current halfedge ID
126
        /// get the ID of vertex pointed to by current halfedge ID
129
        VertexID vert(HalfEdgeID id) const;
127
        VertexID vert(HalfEdgeID id) const;
130
        /// get the ID of face owning current halfedge ID
128
        /// get the ID of face owning current halfedge ID
131
        FaceID face(HalfEdgeID id) const;
129
        FaceID face(HalfEdgeID id) const;
132
 
130
 
133
    protected:
-
 
134
        /// add vertex to kernel
131
        /// add vertex to kernel
135
        VertexID add_vertex();
132
        VertexID add_vertex();
136
        /// add face to kernel
133
        /// add face to kernel
137
        FaceID add_face();
134
        FaceID add_face();
138
        /// add halfedge to kernel
135
        /// add halfedge to kernel
Line 158... Line 155...
158
        /// set the ID of vertex pointed to by current halfedge to vert
155
        /// set the ID of vertex pointed to by current halfedge to vert
159
        void set_vert(HalfEdgeID current, VertexID vert);
156
        void set_vert(HalfEdgeID current, VertexID vert);
160
        /// set the ID of face owning current halfedge to face
157
        /// set the ID of face owning current halfedge to face
161
        void set_face(HalfEdgeID current, FaceID face);
158
        void set_face(HalfEdgeID current, FaceID face);
162
 
159
 
163
 
-
 
164
        /// Clean up unused space in vectors - WARNING! Invalidates existing handles!
160
        /// Clean up unused space in vectors - WARNING! Invalidates existing handles!
165
        void cleanup(IDRemap& map);
161
        void cleanup(IDRemap& map);
166
 
162
 
167
        /// clear the kernel
163
        /// clear the kernel
168
        void clear();
164
        void clear();
-
 
165
        
-
 
166
    private:
169
 
167
 
170
        ItemVector<Vertex> vertices;
168
        ItemVector<Vertex> vertices;
171
        ItemVector<Face> faces;
169
        ItemVector<Face> faces;
172
        ItemVector<HalfEdge> halfedges;
170
        ItemVector<HalfEdge> halfedges;
173
    };
171
    };