#include <mesh.h>
Collaboration diagram for Mesh::Face:
Public Member Functions | |
Face (Surf *s, Hedge *e0, Hedge *e1, Hedge *e2) | |
The constructor creates a triangular face. | |
~Face () | |
The Obj class destructor. | |
Surf * | surf () |
Returns the surface pointer. | |
Hedge * | hedge (int k) |
Returns the half-edge of index k. | |
Vertex * | vertex (int k) |
Returns the vertex of index k. | |
void | set_hedge (int k, Hedge *h) |
Updates the half-edge of index k. | |
void | set_surf (Surf *s) |
Updates the vertex of index k. | |
void | link_edges () |
Face * | reuse (Hedge *e0, Hedge *e1, Hedge *e2) |
Redefines a face by specifing replacement half-edges. | |
int | reuse (Hedge *he, Hedge *ne) |
Private Attributes | |
Hedge * | e_ |
Points to the first half-egde of face's loop. | |
Surf * | s_ |
Points to surface it belongs. |
Definition at line 309 of file mesh.h.
|
The constructor creates a triangular face.
Definition at line 22 of file face.cpp.
|
|
The Obj class destructor.
Definition at line 324 of file mesh.h.
|
|
Returns the half-edge of index k.
Definition at line 78 of file face.cpp. References e_, and Mesh::Hedge::next(). Referenced by Mesh::Surf::destroy(), link_edges(), set_hedge(), Mesh::Surf::split(), and vertex(). 00079 { 00080 switch (k) { 00081 case 0: return e_; 00082 case 1: return e_->next(); 00083 case 2: return e_->next()->next(); 00084 } 00085 throw Error("hedge index"); 00086 }
|
|
Updates the half-edges refereces to the face Definition at line 112 of file face.cpp. References hedge(). 00113 { 00114 for (int k = 0; k < 3; k++) 00115 hedge(k)->set_face(this); 00116 }
|
|
substitutes two half-edges. Definition at line 50 of file face.cpp. References e_, Mesh::Hedge::next(), and reuse(). 00051 { 00052 Hedge *e0, *e1, *e2; 00053 e0 = e_; 00054 e1 = e_->next(); 00055 e2 = e_->next()->next(); 00056 00057 if (e0 == e){ 00058 reuse(ne, e1, e2); 00059 return 0; 00060 } 00061 if (e1 == e){ 00062 reuse(e0, ne, e2); 00063 return 1; 00064 } 00065 if (e2 == e){ 00066 reuse(e0, e1, ne); 00067 return 2; 00068 } 00069 00070 return -1; 00071 }
|
|
Redefines a face by specifing replacement half-edges. Updates the half-edges of the face. Make half-edge links to build a face loop. Links half-edges to face.
Definition at line 36 of file face.cpp. References e_, Mesh::Hedge::set_face(), and Mesh::Hedge::set_next(). Referenced by Mesh::Surf::bisect(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Surf::detach_handle_4(), Face(), Mesh::Surf::flip(), reuse(), and Mesh::Surf::split(). 00037 { 00038 e_ = e0; 00039 e0->set_next(e1); e1->set_next(e2); e2->set_next(e0); 00040 e0->set_face(this); e1->set_face(this); e2->set_face(this); 00041 return this; 00042 }
|
|
Updates the half-edge of index k. Updates the half-edge of index k.
Definition at line 101 of file face.cpp. References e_, hedge(), NEXT3, PREV3, and Mesh::Hedge::set_next(). Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), and Mesh::Surf::attach_handle_4(). 00102 { 00103 Hedge *n = hedge(NEXT3(k)); 00104 Hedge *p = hedge(PREV3(k)); 00105 h->set_next(n); 00106 p->set_next(h); 00107 if (k == 0) e_ = h; 00108 }
|
|
Updates the vertex of index k.
Definition at line 342 of file mesh.h. References s_. 00342 {s_ = s; };
|
|
Returns the surface pointer.
Definition at line 328 of file mesh.h. References s_. Referenced by Mesh::Surf::attach_handle_0(), and Mesh::Surf::glue(). 00328 { return s_;};
|
|
Returns the vertex of index k.
Definition at line 92 of file face.cpp. References hedge(), Mesh::Hedge::org(), and PREV3. Referenced by Mesh::Surf::split().
|
|
Points to the first half-egde of face's loop.
Definition at line 311 of file mesh.h. Referenced by hedge(), reuse(), and set_hedge(). |
|
Points to surface it belongs.
Definition at line 312 of file mesh.h. Referenced by Face(), set_surf(), and surf(). |