mesh representations and data structures
play

Mesh representations and data structures Luca Castelli Aleardi - PowerPoint PPT Presentation

Mesh representations and data structures Luca Castelli Aleardi Shared vertex representation Half-edge DS Winged edge Triangle based DS Corner Table easy to implement Shared vertex representation quite compact not efficient for traversal 8


  1. Mesh representations and data structures Luca Castelli Aleardi

  2. Shared vertex representation Half-edge DS Winged edge Triangle based DS Corner Table

  3. easy to implement Shared vertex representation quite compact not efficient for traversal 8 5 6 9 for each face (of degree d ), store: 7 • d references to incident vertices 3 0 f for each vertex, store: 4 2 11 • 1 reference to its coordinates 10 1 faces vertex locations ( x 0 , y 0 , z 0 ) t 0 v 0 v 1 v 3 . . . Memory cost class Point{ ( x 1 , y 1 , z 1 ) t 1 v 1 v 3 v 1 v 2 double x; double y; 3 × f = 6 n t 2 v 2 v 2 v 3 . . . . . . } t 3 v 3 . . . Size (number of references) geometric information t 4 t 5 . . . . . . . . . Queries/Operations class Vertex{ Point p; List all vertices or faces } Test adjacency between u and v class Face{ Vertex[] vertices; . . . . . . . . . Find the 3 neighboring faces of f } v n − 1 combinatorial information List the neighbors of vertex v t f

  4. Half-edge data structure: polygonal (orientable) meshes 8 5 6 9 7 3 0 e 4 2 11 10 1 class Point{ double x; f + 5 × h + n ≈ 2 n + 5 × (2 e ) + n = 32 n + n double y; } Size (number of references) geometric information opposite ( e ) vertex ( e ) class Halfedge{ Halfedge prev, next, opposite; Vertex v; e Face f; next ( e ) } class Vertex{ Halfedge e; prev ( e ) face ( e ) Point p; } class Face{ Halfedge e; } combinatorial information

  5. Half-edge data structure: polygonal (orientable) meshes 8 5 6 9 7 3 0 e 4 2 11 10 1 class Point{ double x; 3 × h + n ≈ 3 × (2 e ) + n = 18 n + n double y; } Size (number of references) geometric information opposite ( e ) vertex ( e ) class Halfedge{ Halfedge prev, next, opposite; Vertex v; e Face f; next ( e ) } class Vertex{ Halfedge e; Point p; } class Face{ Halfedge e; } combinatorial information

  6. Half-edge data structure: efficient traversal e = v . halfedge v e . next opposite ( e ) vertex ( e ) e next ( e ) prev ( e )

  7. Half-edge data structure: efficient traversal e e . next e . next . opposite opposite ( e ) vertex ( e ) e next ( e ) prev ( e )

  8. Half-edge data structure: efficient traversal e e . next . opposite e . next . opposite . next opposite ( e ) vertex ( e ) e next ( e ) prev ( e )

  9. Half-edge data structure: polygonal manifold meshes opposite ( e ) vertex ( e ) e can we represent them? next ( e ) prev ( e ) yes

  10. Triangle based DS: for triangle meshes (used in CGAL) class Point{ class Triangle{ for each triangle, store: float x; Triangle t1, t2, t3; • 3 references to neighboring faces float y; Vertex v1, v2, v3; float z; } • 3 references to incident vertices class Vertex{ } for each vertex, store: Triangle root; Point p; • 1 reference to an incident face } connectivity T V ( x 0 , y 0 , z 0 ) t 2 t 0 v 0 . . . . . . . . . v 1 v 3 . . . ( x 1 , y 1 , z 1 ) t 1 v 1 t 5 t 2 t 0 v 3 v 1 v 2 . . . t 2 v 2 v 2 v 3 . . . . . . . . . v 0 t 2 t 3 v 3 . . . . . . t 4 . . . . . . . . . t 5 v 1 t 5 . . . . . . . . . . . . . . . . . . t 1 v 2 t 0 t 2 v 3 . . . . . . . . . . . . . . . . . . (3 + 3) × f + n = 6 × 2 n + n = 13 n v n − 1 Size (number of references) t f

  11. Triangle based DS: mesh traversal operators class Point{ class Triangle{ the data structure supports the following operators float x; Triangle t1, t2, t3; float y; Vertex v1, v2, v3; int cw ( int i ) { return ( i + 2 )% 3 ; } v = vertex ( △ , i ) float z; } int ccw ( int i ) { return ( i + 1 )% 3 ; } △ = face ( v ) class Vertex{ } v Triangle root; i = vertexIndex ( v, △ ) z Point p; g 0 = neighbor ( △ , i ) g 2 i g 1 } g 1 = neighbor ( △ , ccw ( i )) connectivity △ g 2 = neighbor ( △ , cw ( i )) z = vertex ( g 2 , faceIndex ( g 2 , △ )) i+1 i+2 g 0 q int degree ( int v ) { we can turn around int d = 1 ; a vertex, by com- int f = face ( v ); int g = neighbor ( f , cw ( vertexIndex ( v , f ))); bining the operators p while ( g ! = f ) { above int next = neighbor ( g , cw ( faceIndex ( f , g ))); int i = faceIndex ( g , next ); we can locate a point, by per- g = next ; forming a walk in the triangula- d + +; } tion return d ; }

  12. Triangle based DS: mesh update operators class Point{ class Triangle{ the data structure supports the following operators float x; Triangle t1, t2, t3; float y; Vertex v1, v2, v3; removeVertex ( v ) float z; } } class Vertex{ splitFace ( f ) Triangle root; removeVertex ( v ) Point p; } edgeFlip ( e ) g 0 connectivity splitFace ( f ) v the data structure is modifiable all these operators can be performed in O (1) time g 1 g 1 e edgeFlip ( e ) g 2 g 2

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend