Mesh::Hedge Class Reference

The Hedge class represents Half-edge topological entity of surface. More...

#include <mesh.h>

Collaboration diagram for Mesh::Hedge:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Hedge ()
 The construtor specifies a Hedge class.
 ~Hedge ()
 The Hedge class destructor.
Faceface ()
 Returns the half-egde's face.
Vertexorg ()
 Returns the half-edge's origin vertex.
Vertexdst ()
 Returns the end vertex of the half-edge.
Edgeedge ()
 Returns the half-edges's parent edge.
Hedgemate ()
 Returns the opposite half-edge.
Hedgeprev ()
 Returns the previous half-edge.
Hedgenext ()
 Returns the next half-edge.
Hedgeprev_on_bdry ()
 Returns the previous half-edge in boundary.
Edgeget_bdry ()
 Returns the boundary it belongs.
void set_face (Face *f)
 Links half-edge to face.
void set_org (Vertex *v)
 Links half-edge to vertex.
void set_next (Hedge *h)
 Updates next half-edge.
void set_edge (Edge *e)
 Links half-edge to edge.
void set_prev_on_bdry (Hedge *e)
 Updates previous half-edge in boundary.
Hedgereuse (Vertex *v0, Vertex *v1)
 Redefines the vertices of the half-edge.

Private Attributes

Vertexo_
 Origin vertex pointer.
Hedgen_
 Next half-edge pointer.
Facef_
 Face pointer.
Edgee_
 Edge pointer.

Detailed Description

The Hedge class represents Half-edge topological entity of surface.

OBS: for boundary hedges h

h.mate.face == NULL

h.mate.edge: points to the edge representative of the boundary curve

h.mate.next: points to the previous half-edge on the boundary

Definition at line 368 of file mesh.h.


Constructor & Destructor Documentation

Mesh::Hedge::Hedge  )  [inline]
 

The construtor specifies a Hedge class.

Definition at line 377 of file mesh.h.

00377 {};

Mesh::Hedge::~Hedge  )  [inline]
 

The Hedge class destructor.

Definition at line 379 of file mesh.h.

00379 {};


Member Function Documentation

Vertex* Mesh::Hedge::dst  )  [inline]
 

Returns the end vertex of the half-edge.

Returns:
vertex pointer.

Definition at line 391 of file mesh.h.

References mate(), and org().

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::bisect(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Surf::detach_handle_4(), Mesh::Surf::flip(), Mesh::Surf::glue(), and Mesh::Surf::unglue().

00391 { return mate()->org(); };

Edge* Mesh::Hedge::edge  )  [inline]
 

Returns the half-edges's parent edge.

Returns:
edge pointer.

Definition at line 395 of file mesh.h.

References e_.

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::attach_handle_4(), Mesh::Surf::bisect(), Mesh::Surf::destroy(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Surf::detach_handle_4(), get_bdry(), Mesh::Vertex::is_bdry(), Mesh::Point::on_bdry(), and Mesh::Surf::unglue().

00395 { return e_; };

Face* Mesh::Hedge::face  )  [inline]
 

Returns the half-egde's face.

Returns:
face pointer.

Definition at line 383 of file mesh.h.

References f_.

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::attach_handle_4(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Surf::detach_handle_4(), Mesh::Surf::flip(), get_bdry(), Mesh::Surf::glue(), set_prev_on_bdry(), Mesh::Surf::split(), and Mesh::Vertex::star_next().

00383 { return f_; };

Edge* Mesh::Hedge::get_bdry  )  [inline]
 

Returns the boundary it belongs.

Returns:
edge pointer.

Definition at line 415 of file mesh.h.

References edge(), face(), and mate().

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::attach_handle_4(), Mesh::Surf::bisect(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), and Mesh::Surf::glue().

00415 { return (mate()->face()==NULL)? mate()->edge() : NULL; };

Hedge * Hedge::mate  ) 
 

Returns the opposite half-edge.

Returns:
half-edge pointer.

Definition at line 43 of file edge.cpp.

References e_, and Mesh::Edge::hedge().

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::attach_handle_4(), Mesh::Surf::bisect(), Mesh::Surf::destroy(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), dst(), Mesh::Surf::flip(), get_bdry(), Mesh::Surf::lookup_hedge(), prev_on_bdry(), reuse(), set_prev_on_bdry(), Mesh::Surf::split(), Mesh::Vertex::star_next(), and Mesh::Surf::unglue().

00044 { 
00045   return (this == e_->hedge(0))? e_->hedge(1): e_->hedge(0);
00046 };

Hedge* Mesh::Hedge::next  )  [inline]
 

Returns the next half-edge.

Returns:
half-edge pointer.

Definition at line 407 of file mesh.h.

References n_.

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::attach_handle_4(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Surf::flip(), Mesh::Face::hedge(), prev(), prev_on_bdry(), Mesh::Face::reuse(), Mesh::Surf::split(), and Mesh::Vertex::star_next().

00407 { return n_; };

Vertex* Mesh::Hedge::org  )  [inline]
 

Returns the half-edge's origin vertex.

Returns:
vertex pointer.

Definition at line 387 of file mesh.h.

References o_.

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::attach_handle_4(), Mesh::Surf::bisect(), Mesh::Surf::destroy(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Surf::detach_handle_3(), Mesh::Surf::detach_handle_4(), Mesh::Edge::dst(), dst(), Mesh::Surf::flip(), Mesh::Surf::glue(), Mesh::Edge::org(), Mesh::Surf::unglue(), and Mesh::Face::vertex().

00387 { return o_; };

Hedge* Mesh::Hedge::prev  )  [inline]
 

Returns the previous half-edge.

Returns:
half-edge pointer.

Definition at line 403 of file mesh.h.

References n_, and next().

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::attach_handle_4(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Surf::flip(), and Mesh::Surf::split().

00403 { return (n_)? n_->next() : NULL; };

Hedge* Mesh::Hedge::prev_on_bdry  )  [inline]
 

Returns the previous half-edge in boundary.

Returns:
half-edge pointer.

Definition at line 411 of file mesh.h.

References mate(), and next().

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::bisect(), Mesh::Surf::detach_handle_1(), and Mesh::Surf::detach_handle_2().

00411 { return mate()->next(); };

Hedge * Hedge::reuse Vertex v0,
Vertex v1
 

Redefines the vertices of the half-edge.

Updates the vertices of the half-edge.

Parameters:
v0 Pointer to origin vertex.
v1 Pointer to end vertex.
Returns:
half-edge.

Definition at line 54 of file edge.cpp.

References mate(), set_face(), set_next(), and set_org().

Referenced by Mesh::Surf::flip().

00055 {
00056   set_org(v0); mate()->set_org(v1);
00057   set_next(NULL); mate()->set_next(NULL);
00058   set_face(NULL); mate()->set_face(NULL);
00059   return this;
00060 }

void Mesh::Hedge::set_edge Edge e  )  [inline]
 

Links half-edge to edge.

Definition at line 427 of file mesh.h.

References e_.

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_4(), Mesh::Edge::Edge(), and Mesh::Edge::set_bdry().

00427 { e_ = e; };

void Mesh::Hedge::set_face Face f  )  [inline]
 

Links half-edge to face.

Definition at line 418 of file mesh.h.

References f_.

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_4(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Surf::detach_handle_4(), Mesh::Edge::Edge(), Mesh::Face::reuse(), and reuse().

00418 { f_ = f; };

void Mesh::Hedge::set_next Hedge h  )  [inline]
 

Updates next half-edge.

Definition at line 424 of file mesh.h.

References n_.

Referenced by Mesh::Edge::Edge(), Mesh::Face::reuse(), reuse(), Mesh::Face::set_hedge(), and set_prev_on_bdry().

00424 { n_ = h; };

void Mesh::Hedge::set_org Vertex v  )  [inline]
 

Links half-edge to vertex.

Definition at line 421 of file mesh.h.

References o_.

Referenced by Mesh::Surf::attach_handle_0(), Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), Mesh::Edge::Edge(), and reuse().

00421 { o_ = v; };

void Mesh::Hedge::set_prev_on_bdry Hedge e  )  [inline]
 

Updates previous half-edge in boundary.

Definition at line 430 of file mesh.h.

References face(), mate(), and set_next().

Referenced by Mesh::Surf::attach_handle_1(), Mesh::Surf::attach_handle_2(), Mesh::Surf::attach_handle_3(), Mesh::Surf::create(), Mesh::Surf::detach_handle_1(), Mesh::Surf::detach_handle_2(), and Mesh::Surf::detach_handle_4().

00430 { if (mate()->face()==NULL) mate()->set_next(e); };


Member Data Documentation

Edge* Mesh::Hedge::e_ [private]
 

Edge pointer.

Definition at line 373 of file mesh.h.

Referenced by edge(), mate(), and set_edge().

Face* Mesh::Hedge::f_ [private]
 

Face pointer.

Definition at line 372 of file mesh.h.

Referenced by face(), and set_face().

Hedge* Mesh::Hedge::n_ [private]
 

Next half-edge pointer.

Definition at line 371 of file mesh.h.

Referenced by next(), prev(), and set_next().

Vertex* Mesh::Hedge::o_ [private]
 

Origin vertex pointer.

Definition at line 370 of file mesh.h.

Referenced by org(), and set_org().


The documentation for this class was generated from the following files:
Generated on Fri Feb 24 12:23:24 2006 for TOPs by  doxygen 1.4.6-NO