#include <mesh.h>
Collaboration diagram for A48::Mesh:
Public Member Functions | |
Mesh (Surface *s) | |
The construtor specifies a surface class. | |
~Mesh () | |
The mesh class destructor. Destroys the mesh data structures. | |
Surface * | surf () |
Returns the surface pointer. | |
VertexIter | verts_begin () |
Returns iterator that points to the first vertex of the mesh. | |
VertexIter | verts_end () |
Returns iterador that points to the last vertex of the mesh. | |
int | num_verts () |
Returns the number of vertices. | |
EdgeIter | edges_begin () |
Returns iterator that points to the first edge of the mesh. | |
EdgeIter | edges_end () |
Returns iterador that points to the last vertex of the mesh. | |
int | num_edges () |
Returns the number of egdes. | |
FaceIter | faces_begin () |
Returns iterator that points to the first face of the mesh. | |
FaceIter | faces_end () |
Returns iterador that points to the last vertex of the mesh. | |
int | num_faces () |
Returns the number of faces. | |
void | adapt_refine (double t) |
Refines the mesh based on threshold t. | |
void | adapt_simplify (double t) |
Simplifies the mesh based on threshold t. | |
Vertex * | refine (Hedge *e) |
Splits an edge. | |
Hedge * | simplify (Vertex *w) |
Removes a vertex from mesh. | |
Vertex * | split (Face *f) |
Divides a face. | |
Vertex * | split (Hedge *e) |
Splits an edge. | |
Hedge * | weld (Vertex *w) |
Removes a vertex. | |
Hedge * | flip (Hedge *h) |
Flips internal edge. | |
Private Member Functions | |
Vertex * | add_vertex (void) |
Adds a new vertex. | |
bool | add_vertex (Vertex *v) |
Adds an existing vertex. | |
void | del_vertex (Vertex *v) |
Removes a vertex from mesh. | |
Hedge * | add_edge (Vertex *v0, Vertex *v1) |
Adds a new edge. | |
bool | add_edge (Edge *e) |
Add an existing edge. | |
void | del_edge (Edge *e) |
Removes an edge from mesh. | |
Face * | add_face (Hedge *e0, Hedge *e1, Hedge *e2) |
Adds a new face. | |
bool | add_face (Face *f) |
Adds an existing face. | |
void | del_face (Face *f) |
Removes a face from mesh. | |
void | link_mesh () |
Creates links among faces, egdes and verticess. | |
Vertex * | bisect (Hedge *e, Hedge **el, Hedge **er) |
Splits an edge in two sub-edges. | |
Hedge * | bisect (Face *f, Hedge *e1, Hedge *e2, Hedge *el, Hedge *er) |
Splits a face in two sub-faces. | |
void | new_front () |
Creates the simplifying and refining queues. | |
void | update_ref_front (Edge *e) |
Inserts an edge in the refining priority queue. | |
void | update_ref_front (Vertex *v) |
Inserts a vertex in the refining priority queue. | |
void | update_simpl_front (Vertex *v) |
Inserts a vertex in the simplifying priority queue. | |
void | update_simpl_front (Edge *e) |
Inserts an edge in the simplifying priority queue. | |
bool | is_triquad (void) |
Returns true if the mesh is a triangulated-quadrangulation, else return false. | |
void | make_triquad (void) |
Converts the mesh to a triagulated-quadrangulation. | |
void | set_base_mesh (int np, int *tris, int nf) |
Specifies a base mesh. | |
Hedge * | get_hedge (int i0, int i1, Vertex *verts[], HedgeMap *edges) |
Returns half-edge pointer identified by the vertices of index i0 and i1. | |
void | put_face (int i0, int i1, int i2, Vertex *verts[], HedgeMap *edges) |
Creates a face from half-edges. The half-edges are specified by vertices of index i0, i1 and i2. | |
Private Attributes | |
Surface * | surf_ |
Surface pointer. | |
FaceContainer | fc_ |
Set of faces. | |
EdgeContainer | ec_ |
Set of edges. | |
VertexContainer | vc_ |
Set of vertices. | |
MxHeap | sf_ |
Priority queue for simplification front. | |
MxHeap | rf_ |
Priority queue for refinement front. |
Definition at line 74 of file mesh.h.
|
The construtor specifies a surface class. Receives a surface object that determines the mesh.
Definition at line 16 of file mesh.cpp. References A48::Surface::base_mesh(), is_triquad(), make_triquad(), new_front(), set_base_mesh(), and surf().
|
|
The mesh class destructor. Destroys the mesh data structures. Dealocates all data (vertices, faces, edges and half-edges) of the mesh. Definition at line 29 of file mesh.cpp.
|
|
Refines the mesh based on threshold t. Updates the refinement queue and inserts a half-edge based on rank. The adge is inserted in the queue if its rank is less than a threshold.
Definition at line 61 of file adapt.cpp. References ec_, A48::Edge::hedge(), refine(), rf_, and surf().
|
|
Simplifies the mesh based on threshold t. Updates the simplifying queue and inserts a vertex based on rank. The edge is inserted in the queue if its rank is less than a threshold.
Definition at line 82 of file adapt.cpp. References sf_, simplify(), surf(), and vc_.
|
|
Add an existing edge.
Definition at line 174 of file mesh.h. References ec_.
|
|
Adds a new edge. Adds a new edge in the mesh.
Definition at line 62 of file mesh.cpp. References add_edge(), and A48::Edge::hedge(). Referenced by add_edge(), bisect(), get_hedge(), and split().
|
|
Adds an existing face.
Definition at line 187 of file mesh.h. References fc_.
|
|
Adds a new face. Adds a new face in the mesh
Definition at line 49 of file mesh.cpp. References add_face(). Referenced by add_face(), bisect(), put_face(), and split().
|
|
Adds an existing vertex.
Definition at line 161 of file mesh.h. References vc_.
|
|
Adds a new vertex. Adds a new vertex in the mesh.
Definition at line 73 of file mesh.cpp. References A48::Surface::new_vertex(), and surf(). Referenced by bisect(), set_base_mesh(), and split().
|
|
Splits a face in two sub-faces. Splits a face into two new faces. The face is splitted through vertex m.
Definition at line 72 of file stellar.cpp. References add_edge(), add_face(), A48::Hedge::mate(), A48::Hedge::org(), and A48::Face::reuse().
|
|
Splits an edge in two sub-edges. Bisects a half-edge into two new sub half-edges. The old half-edge is divided by inserting a new vertex.
Definition at line 48 of file stellar.cpp. References add_edge(), add_vertex(), A48::Hedge::dst(), A48::Hedge::edge(), A48::Hedge::level(), A48::Hedge::org(), A48::Hedge::reuse(), A48::Surface::sample(), A48::Vertex::set_level(), A48::Vertex::set_star(), A48::Vertex::star_first(), and surf(). Referenced by split().
|
|
Removes an edge from mesh.
Definition at line 179 of file mesh.h. References del_edge(), and ec_. Referenced by del_edge(), and weld().
|
|
Removes a vertex from mesh.
Definition at line 166 of file mesh.h. References A48::Surface::del_vertex(), del_vertex(), surf(), and vc_. Referenced by del_vertex(), and weld().
|
|
Returns iterator that points to the first edge of the mesh.
Definition at line 107 of file mesh.h. References ec_. Referenced by new_front().
|
|
Returns iterador that points to the last vertex of the mesh.
Definition at line 111 of file mesh.h. References ec_. Referenced by new_front().
|
|
Returns iterator that points to the first face of the mesh.
Definition at line 119 of file mesh.h. References fc_.
|
|
Returns iterador that points to the last vertex of the mesh.
Definition at line 123 of file mesh.h. References fc_.
|
|
Flips internal edge. Changes the connectivity of an edge shared by two faces.
Definition at line 164 of file stellar.cpp. References A48::Hedge::dst(), A48::Hedge::face(), A48::Hedge::mate(), A48::Hedge::next(), A48::Hedge::org(), A48::Hedge::prev(), A48::Face::reuse(), A48::Hedge::reuse(), A48::Vertex::set_star(), and A48::Vertex::star_first().
|
|
Returns half-edge pointer identified by the vertices of index i0 and i1. Returns a half-edge specified by vertices of index i0 and i1. If the vertices don't exist, a new edge is created with two new vertices.
Definition at line 103 of file mesh.cpp. References add_edge(). Referenced by put_face().
|
|
Returns true if the mesh is a triangulated-quadrangulation, else return false. Verifies if a mesh is a triangulated-quadrangulation. Definition at line 94 of file triquad.cpp. References ec_, A48::Hedge::face(), A48::Edge::hedge(), A48::Edge::is_bdry(), and A48::Face::subd_edge(). Referenced by Mesh().
|
|
Creates links among faces, egdes and verticess. Links stars of mesh Definition at line 83 of file mesh.cpp. References A48::Hedge::dst(), ec_, fc_, A48::Hedge::is_bdry(), and A48::Vertex::set_star(). Referenced by set_base_mesh().
|
|
Converts the mesh to a triagulated-quadrangulation. Transforms a general mesh into a triangulated-quadrangulation. Definition at line 63 of file triquad.cpp. References ec_, node::edge, A48::Hedge::face(), fc_, A48::Edge::hedge(), A48::Markable::is_marked(), split(), and vc_. Referenced by Mesh().
|
|
Creates the simplifying and refining queues. Creates simplification and refinement fronts. Insert vertices that can be removed from mesh and edges that can be splitted. Definition at line 16 of file front.cpp. References edges_begin(), edges_end(), rf_, sf_, surf(), verts_begin(), and verts_end(). Referenced by Mesh().
|
|
Returns the number of egdes.
Definition at line 115 of file mesh.h. References ec_.
|
|
Returns the number of faces.
Definition at line 127 of file mesh.h. References fc_.
|
|
Returns the number of vertices.
Definition at line 103 of file mesh.h. References vc_.
|
|
Creates a face from half-edges. The half-edges are specified by vertices of index i0, i1 and i2. Adds a new face specified by the vertices of index i1, i2, i3. If any vertex doesn't exist, than it is created.
Definition at line 127 of file mesh.cpp. References add_face(), and get_hedge(). Referenced by set_base_mesh().
|
|
Splits an edge. Refines a region specified by a half-edge, recursively.
Definition at line 16 of file adapt.cpp. References A48::Hedge::edge(), A48::Hedge::face(), A48::Hedge::mate(), refine(), split(), A48::Face::subd_edge(), and update_ref_front(). Referenced by adapt_refine(), and refine().
|
|
Specifies a base mesh. Receives all data information to build the base mesh.
Definition at line 141 of file mesh.cpp. References add_vertex(), link_mesh(), A48::Surface::new_vertex(), put_face(), A48::Surface::sample(), and surf(). Referenced by Mesh().
|
|
Removes a vertex from mesh. Simplifies a region specified by a vertex.
Definition at line 36 of file adapt.cpp. References A48::Hedge::edge(), A48::Vertex::is_bdry(), A48::Vertex::level(), A48::Hedge::org(), simplify(), A48::Vertex::star_first(), A48::Vertex::star_next(), update_simpl_front(), and weld(). Referenced by adapt_simplify(), and simplify().
|
|
Splits an edge. Splits a half-edge into two sub-half-edges.
Definition at line 19 of file stellar.cpp. References bisect(), A48::Hedge::face(), A48::Face::level(), A48::Hedge::mate(), A48::Hedge::next(), A48::Hedge::prev(), A48::Vertex::set_level(), and A48::Vertex::set_star().
|
|
Divides a face. Divides a face into three new faces. The new vertex is inserted inside the face and new faces are built.
Definition at line 138 of file stellar.cpp. References add_edge(), add_face(), add_vertex(), A48::Face::hedge(), A48::Face::level(), A48::Hedge::mate(), A48::Face::reuse(), A48::Surface::sample(), A48::Vertex::set_level(), A48::Vertex::set_star(), surf(), and A48::Face::vertex(). Referenced by make_triquad(), and refine().
|
|
Returns the surface pointer.
Definition at line 91 of file mesh.h. References surf_. Referenced by adapt_refine(), adapt_simplify(), add_vertex(), bisect(), del_vertex(), Mesh(), new_front(), node::node(), set_base_mesh(), split(), update_ref_front(), and update_simpl_front().
|
|
Inserts a vertex in the refining priority queue. Updates the refinement front (insertion phase)
Definition at line 56 of file front.cpp. References A48::Hedge::edge(), A48::Edge::is_subdiv(), A48::Hedge::prev(), rf_, sf_, A48::Vertex::star_first(), A48::Vertex::star_next(), and surf().
|
|
Inserts an edge in the refining priority queue. Updates the refinement front (deletion phase)
Definition at line 35 of file front.cpp. References A48::Hedge::dst(), A48::Hedge::face(), A48::Edge::hedge(), A48::Vertex::is_weld(), A48::Hedge::next(), rf_, and sf_. Referenced by refine().
|
|
Inserts an edge in the simplifying priority queue. Updates the siplification front (insertion phase)
Definition at line 88 of file front.cpp. References A48::Hedge::dst(), A48::Edge::hedge(), A48::Vertex::is_weld(), A48::Hedge::next(), rf_, sf_, and surf().
|
|
Inserts a vertex in the simplifying priority queue. Updates the siplification front (deletion phase)
Definition at line 71 of file front.cpp. References A48::Hedge::edge(), A48::Hedge::is_subdiv_itself(), A48::Hedge::mate(), A48::Hedge::prev(), rf_, sf_, A48::Vertex::star_first(), and A48::Vertex::star_next(). Referenced by simplify().
|
|
Returns iterator that points to the first vertex of the mesh.
Definition at line 95 of file mesh.h. References vc_. Referenced by new_front().
|
|
Returns iterador that points to the last vertex of the mesh.
Definition at line 99 of file mesh.h. References vc_. Referenced by new_front().
|
|
Removes a vertex. Removes a vertex from mesh. This operation welds two half-edges into one half-edge.
Definition at line 87 of file stellar.cpp. References del_edge(), del_face(), del_vertex(), A48::Vertex::level(), A48::Hedge::mate(), A48::Hedge::next(), A48::Hedge::prev(), A48::Face::reuse(), A48::Hedge::reuse(), A48::Vertex::set_star(), A48::Vertex::star_first(), and A48::Vertex::star_next(). Referenced by simplify().
|