- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

A HDS for template parameters or halfedge data structure (abbreviated as HalfedgeDS) is defined as an edge-centered data structure capable of maintaining incidence information of vertices, edges and faces, such as for planar maps, polyhedra, or other orientable, two-dimensional surfaces embedded in random dimension. Each edge is broken into two halfedges with opposite orientations. Each halfedge stores one incident face and one incident vertex. One incident halfedge is stored for each face and each vertex. Reduced variants of the halfedge data structure can eliminate some of this information, such as the halfedge pointers in faces or the storage of faces at all.

The halfedge data structure is defined as a combinatorial data structure, geometric interpretation is added by classes built on top of the halfedge data structure. These classes might be more known to implement than the halfedge data structure directly, since the halfedge data structure is treated as an implementation layer.

The halfedge data structure can also be displayed as one of the variants of the quad-edge data structure. In general, the non-orientable 2-manifolds can be represented by quad-edge data, but the variant here is limited to orientable 2-manifolds only.

The following example program applies the default halfedge data structure and the decorator class. The default halfedge data structure implements a list-based representation. Items' all incidences and a point type for vertices are explained. The trivial traits class gives the type implemented for the point. The program builds a loop, consisting of two halfedges, one vertex(Vertex) and two faces (Face1 and Face2), and verifies its validity.

#include <CGAL/HalfedgeDS_default.h> #include <CGAL/HalfedgeDS_decorator.h> struct Traits { typedefint Point_2; }; typedef CGAL::HalfedgeDS_default<Traits> HDS1; typedef CGAL::HalfedgeDS_decorator<HDS> Decorator1; int main() { HDS1 hds1; Decorator1 decorator(hds1); decorator.create_loop(); CGAL_assertion(decorator.is_valid()); return 0; }

- Related Questions & Answers
- Rectangle Data in Data Structure
- Deaps in Data Structure
- Quadtrees in Data Structure
- Difference between data type and data structure
- Arrays Data Structure in Javascript
- Stack Data Structure in Javascript
- Graph Data Structure in Javascript
- Queue Data Structure in Javascript
- Set Data Structure in Javascript
- Dictionary Data Structure in Javascript
- Tree Data Structure in Javascript
- Finger Searching in Data Structure
- Bucketing Methods in Data Structure
- Skip Lists in Data Structure
- Splay trees in Data Structure

Advertisements