1 / 30

Mesh Data Structure

Mesh Data Structure. Meshes. Corners ⊆ V x F Half-edges ⊆ E x F. Mesh: straight-line graph embedded in R 3. Boundary edge: adjacent to 1 face Regular edge: adjacent to 2 faces Singular edge: adjacent to >2 faces. Closed mesh: mesh with no boundary edges

val
Download Presentation

Mesh Data Structure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mesh Data Structure

  2. Meshes Corners ⊆ V x F Half-edges ⊆ E x F Mesh: straight-line graph embedded in R3 Boundary edge: adjacent to 1 face Regular edge: adjacent to 2 faces Singular edge: adjacent to >2 faces Closed mesh: mesh with no boundary edges Manifold mesh: mesh with no singular edges

  3. Data Structures • What should be stored? • Geometry: 3D coordinates • Connectivity • Adjacency relationships • Attributes • e.g. normal, color, texture coordinate • Per vertex, per face, per edge, per corner

  4. Data Structures • What should it support? • Rendering • Geometry queries • What are the vertices of face #2? • Is vertex A adjacent to vertex H ? • Which faces are adjacent to face #1? • Modifications • Remove/add a vertex/face • Vertex split, edge collapse

  5. Data Structures • How good is a data structure? • Time to construct (preprocessing) • Time to answer a query • Time to perform an operation • Space complexity • Redundancy

  6. Mesh Data Structures • Adjacency-blind schemes • Independent faces • Shared vertex • Adjacency-aware schemes • Adjacency lists • Face based connectivity • Edge based connectivity • Half edge • Adjacency matrix • Corner table

  7. Independent Faces • Pros • Simple • STL file • Cons • No connectivity  not for topological queries • Redundancy

  8. Shared Vertex • Pros • Convenient and efficient (memory wise) • Can represent non-manifold meshes • Cons • Too simple - not enough information on relations between vertices & faces

  9. Shared Vertex • What are the vertices of face f1? • O(1) – first triplet from face list

  10. Shared Vertex • What are the one-ring neighbors of v3? • Requires a full pass over all faces

  11. Shared Vertex • Are vertices v1 and v5 adjacent? • Requires a full pass over all faces

  12. Complete Adjacency Lists • Store all vertex, edge, and face adjacencies • Efficient topology traversal • Extra storage

  13. Partial Adjacency Lists • Can we store only some adjacency relationships and derive others?

  14. Face Based Connectivity • Manifold triangular meshes • Vertex • Position • 1 adjacent face index • Face • 3 vertex indices • 3 neighboring face indices • Pros • most adjacency queries in O(1) time • Cons • No (explicit) edge information

  15. Edge Based Connectivity(Winged Edge) • Vertex • Position • 1 adjacent edge index • Edge • 2 vertex indices • 2 neighboring face indices • 4 edges • Face • 1 edge index

  16. Edge Based Connectivity(Winged Edge) • Example

  17. Edge Based Connectivity(Winged Edge) • Pros • Most adjacencies in O(1) time • Arbitrary polygons • Cons • No edge orientation information

  18. Half Edge • Vertex record: • Coordinates • Pointer to one half-edge that has v as its origin • Face record: • Pointer to one half-edge on its boundary • Half-edge record: • Pointer to its origin, origin(e) • Pointer to its twin half-edge, twin(e) • Pointer to the face it bounds, IncidentFace(e) (face lies to left of e when traversed from origin to destination) • Next and previous edge on boundary of IncidentFace(e)

  19. Half Edge • Operations supported • Walk around boundary of given face • Visit all edges incident to vertex v • Queries • Most queries are O(1)

  20. Half Edge • Example

  21. Half Edge • Example (cont.)

  22. Half Edge • Pros • Most adjacency queries in O(1) time • Local operations are O(1) (usually) • Cons • Represents only manifold meshes

  23. Adjacency Matrix • View mesh as connected graph • Given n vertices build n*n matrix of adjacency information • Entry (i,j) is TRUE if vertices i and j are adjacent • Geometric info – list of vertex coordinates • Add faces - list of triplets of vertex indices(v1,v2,v3)

  24. Adjacency Matrix • Example

  25. Adjacency Matrix • Symmetric for undirected simple graphs • (An)ij= # paths of length n from vi to vj • Pros • Information on vertices adjacency • Stores non-manifold meshes • Cons • Connects faces to their vertices, BUT NO connection between vertex and its face • How to find the 1-ring neighboring faces for a vertex?

  26. Corner Table Corner: Coupling of vertex with one of its incident triangles • Corner c contains • Triangle – c.t • Vertex – c.v • Next corner in c.t (ccw) – c.n • Previous corner – c.p (==c.n.n) • Corner opposite c – c.o • E edge opposite c – not incident on c.v • c.o couples triangle T adjacent to c.t across E with vertex of T not incident on E • Right corner – c.r – corner opposite c.n (==c.n.o) • Left corner – c.l (== c.p.o == c.n.n.o)

  27. Corner Table • Store • Corner table • For each vertex – a list of all its corners • Corner number j*3-2, j*3-1 and j*3 matchface number j ( j = 1, 2, … ) • No need for explicit face storage

  28. Corner Table • Example

  29. Corner Table • Pros • Topological queries in O(1) time • Most operations are O(1) • Convenient for rendering (triangle fans) • Cons • Only triangular, manifold meshes • Redundancy (but not too high)

  30. Quiz • For each of the above data structure • What are the vertices of face fi? • What is the 1-ring neighbors (vertices/edges/faces) of vertex vi ? • Are vertices vi and vjadjacent? • 1-ring neighbor loop traversal as shown on the right, if half edge is used.

More Related