I'm looking for a concept to store (in 3 dimensional euclidian space) faces, edges and vertex such that
- information (about relation) isn't duplicated
- queries for adjecent and neighboring faces/edges/vertex are fast
- the mesh is not limited to connected faces of the same winding
definitions
- neighbor of a face: the face that shares an edge with this face
- neighbor of a vertex: the vertex that is on the other end of an edge sharing that vertex
- adjecent edge: an edge that shares the same vertex of an endpoint with this edge
I have considered the Half-Edge data structure, but queries on it only really work when all connected faces have the same winding.
For instance, consider this pseudo code to access such related entities:
face.neighbors #the neighboring faces
face.edges #the edges shared by this face (in the right winding order)
face.verts #the vertex of that face (in the right winding order)
edge.v1, edge.v2 #the two vertex making up an edge
vertex.edges #the edges this vertex shares
vertex.neighbors # the neighbors of this vertex along each shared edge