This class encapsulate a halfedge over a window manifold. More...
#include <Manifold_2.h>
Public Member Functions | |
Halfedge () | |
Halfedge (const Pane_manifold_2 *pm, Edge_ID e, Access_Mode mode) | |
Construct a Halfedge object from a pane manifold and its edge ID. More... | |
Halfedge | opposite () const |
Get the ID of the opposite edge of a given edge. More... | |
Halfedge | prev () const |
Get the previous halfedge of its owner element. More... | |
Halfedge | next () const |
Get the next halfedge of its owner element. More... | |
Node | origin () const |
Obtain the (primary copy of the) origin of the edge. More... | |
Node | destination () const |
Obtain the (primary copy of the) destination of the edge. More... | |
bool | is_border () const |
Is the edge a border edge? More... | |
bool | is_physical_border () const |
Is the edge on the physical boundary? More... | |
Vector_3< Real > | tangent () const |
Get the tangent of the given halfedge. More... | |
Vector_3< Real > | normal () const |
Get the normal of the incident facet. More... | |
Vector_3< Real > | deformed_normal (const COM::Attribute *disp) const |
Get the normal of the deformed shape (coordinates plus given displacements) of the incident facet of the halfedge. More... | |
void | edge_center (Point_3< Real > &mid) const |
Get the edge center of the given halfedge. More... | |
void | face_center (Point_3< Real > &cnt) const |
Get the face center of the incident face of a given halfedge. More... | |
template<class Value > | |
void | edge_average (const COM::Attribute *attr, Value &val) const |
Get the avarage value of the nodes of a given halfedge. More... | |
template<class Value > | |
void | face_average (const COM::Attribute *attr, Value &val) const |
Get the average value of the nodes of the incident face of a given halfedge. More... | |
double | dihedral_angle () const |
Return the dihedral angle at the edge. More... | |
const Pane_manifold_2 * | pane_manifold () const |
Obtain the pane manifold that owns the edge. More... | |
const COM::Pane * | pane () const |
Obtain the owner Pane_manifold_2 of the node. More... | |
Edge_ID | id () const |
Obtain the ID of the edge. More... | |
const void * | addr (const COM::Attribute *attr) const |
Obtain the address of an attribute associated with its bounded element. More... | |
const COM::Attribute * | attr (const COM::Attribute *a) const |
Obtain the attribute on the parent pane of the node. More... | |
bool | operator== (const Halfedge &h) const |
Are two halfedges the same? More... | |
bool | operator!= (const Halfedge &h) const |
Are two halfedges different? More... | |
bool | operator< (const Halfedge &h) const |
Does the current halfedge has a smaller ID then the given one? More... | |
Protected Attributes | |
const Pane_manifold_2 * | _pm |
Edge_ID | _eID |
Access_Mode | _mode |
This class encapsulate a halfedge over a window manifold.
Definition at line 446 of file Manifold_2.h.
|
inline |
Definition at line 448 of file Manifold_2.h.
|
inline |
Construct a Halfedge object from a pane manifold and its edge ID.
Definition at line 450 of file Manifold_2.h.
const void * addr | ( | const COM::Attribute * | attr | ) | const |
Obtain the address of an attribute associated with its bounded element.
Note: This function can be slow O(1) if the attribute is not on the current pane, and is even slower (O(log(#panes)) if not owned by the owner window of the pane.
Definition at line 1215 of file Manifold_2.C.
References _eID, _pm, attr(), COM_assertion, COM_assertion_msg, COM_get_sizeof(), is_border(), and Simple_manifold_2::pane().
|
inline |
Obtain the attribute on the parent pane of the node.
Definition at line 556 of file Manifold_2.h.
References _pm, COM_assertion_msg, and Simple_manifold_2::pane().
Referenced by addr().
Get the normal of the deformed shape (coordinates plus given displacements) of the incident facet of the halfedge.
Definition at line 1290 of file Manifold_2.C.
References get_deformed_normal().
|
inline |
Obtain the (primary copy of the) destination of the edge.
Definition at line 472 of file Manifold_2.h.
References _eID, _mode, _pm, Simple_manifold_2::get_destination(), and Pane_manifold_2::get_primary().
Referenced by edge_average(), and tangent().
double dihedral_angle | ( | ) | const |
Return the dihedral angle at the edge.
If the edge is a border edge, then return pi.
If the edge is a border edge, then return pi. Note that this must be called after update_bd_normals has been called.
Definition at line 1297 of file Manifold_2.C.
References cimg_library::acos(), is_physical_border(), normal(), opposite(), pi, and sqrt().
|
inline |
Get the avarage value of the nodes of a given halfedge.
Value must have operators + and * defined.
Definition at line 508 of file Manifold_2.h.
References Node::addr(), destination(), and origin().
Referenced by edge_center(), and face_average().
Get the edge center of the given halfedge.
Definition at line 495 of file Manifold_2.h.
References _pm, COM_NC, edge_average(), and Simple_manifold_2::pane().
|
inline |
Get the average value of the nodes of the incident face of a given halfedge.
If this is a border halfedge, then return its edge averagd. Value must have operators + and * defined.
Definition at line 517 of file Manifold_2.h.
References Node::addr(), edge_average(), is_border(), next(), and origin().
Referenced by face_center().
Get the face center of the incident face of a given halfedge.
If this is a border halfedge, then return its midpoint.
Definition at line 501 of file Manifold_2.h.
References _pm, COM_NC, face_average(), and Simple_manifold_2::pane().
|
inline |
Obtain the ID of the edge.
Definition at line 547 of file Manifold_2.h.
References _eID.
Referenced by get_normal().
|
inline |
Is the edge a border edge?
Definition at line 476 of file Manifold_2.h.
References _eID, _mode, _pm, and Pane_manifold_2::is_border_edge().
Referenced by Halfedge_data_structure_decorator< _HDS >::add_facet_to_border(), Polyhedron_incremental_builder_3< HDS >::add_vertex_to_facet(), addr(), Rocsurf::compute_edge_lengths(), Window_manifold_2::determine_primaries(), Halfedge_data_structure_decorator< _HDS >::erase_facet(), face_average(), Halfedge_data_structure_decorator< _HDS >::fill_hole(), Pane_manifold_2::get_next_edge(), get_normal(), Pane_manifold_2::get_prev_edge(), Node::is_border(), Halfedge_data_structure_decorator< _HDS >::join_vertex(), Polyhedron_incremental_builder_3< HDS >::lookup_halfedge(), Polyhedron_incremental_builder_3< HDS >::lookup_hole(), and Halfedge_data_structure_decorator< _HDS >::make_hole().
|
inline |
Is the edge on the physical boundary?
Definition at line 480 of file Manifold_2.h.
References _eID, _pm, and Pane_manifold_2::is_physical_border_edge().
Referenced by dihedral_angle().
|
inline |
Get the next halfedge of its owner element.
If the current edge is a border edges, it returns the next border edge along the boundary.
Definition at line 465 of file Manifold_2.h.
References _eID, _mode, _pm, and Pane_manifold_2::get_next_edge().
Referenced by Polyhedron_incremental_builder_3< HDS >::add_vertex_to_facet(), Rocsurf::compute_edge_lengths(), Halfedge_data_structure_decorator< _HDS >::erase_connected_component(), Halfedge_data_structure_decorator< _HDS >::erase_connected_component_face_cycle(), Halfedge_data_structure_decorator< _HDS >::erase_facet(), face_average(), Halfedge_data_structure_decorator< _HDS >::find_prev(), Halfedge_data_structure_decorator< _HDS >::find_prev_around_vertex(), Halfedge_data_structure_decorator< _HDS >::flip_edge(), get_deformed_normal(), Pane_manifold_2::get_prev_edge(), Halfedge_data_structure_decorator< _HDS >::insert_halfedge(), Halfedge_data_structure_decorator< _HDS >::insert_tip(), Halfedge_data_structure_decorator< _HDS >::inside_out(), Halfedge_data_structure_decorator< _HDS >::is_valid(), Halfedge_data_structure_decorator< _HDS >::join_facet(), Halfedge_data_structure_decorator< _HDS >::join_loop(), Halfedge_data_structure_decorator< _HDS >::join_vertex(), Polyhedron_incremental_builder_3< HDS >::lookup_halfedge(), Polyhedron_incremental_builder_3< HDS >::lookup_hole(), Halfedge_data_structure_decorator< _HDS >::remove_halfedge(), Halfedge_data_structure_decorator< _HDS >::remove_tip(), Halfedge_data_structure_decorator< _HDS >::reorient_facet(), Halfedge_data_structure_decorator< _HDS >::set_facet_in_facet_loop(), Halfedge_data_structure_decorator< _HDS >::set_vertex_in_vertex_loop(), and Halfedge_data_structure_decorator< _HDS >::split_loop().
Get the normal of the incident facet.
Definition at line 1259 of file Manifold_2.C.
References get_normal().
Referenced by c3d6nm(), and dihedral_angle().
|
inline |
|
inline |
Does the current halfedge has a smaller ID then the given one?
Definition at line 570 of file Manifold_2.h.
References _eID, _pm, and Simple_manifold_2::pane().
|
inline |
|
inline |
Get the ID of the opposite edge of a given edge.
Definition at line 454 of file Manifold_2.h.
References _eID, _mode, _pm, and Pane_manifold_2::get_opposite_edge().
Referenced by Polyhedron_incremental_builder_3< HDS >::add_vertex_to_facet(), Halfedge_data_structure_decorator< _HDS >::close_tip(), Rocsurf::compute_edge_lengths(), Halfedge_data_structure_decorator< _HDS >::create_loop(), Halfedge_data_structure_decorator< _HDS >::create_segment(), dihedral_angle(), Halfedge_data_structure_decorator< _HDS >::erase_connected_component(), Halfedge_data_structure_decorator< _HDS >::erase_connected_component_face_cycle(), Halfedge_data_structure_decorator< _HDS >::erase_facet(), Halfedge_data_structure_decorator< _HDS >::find_prev_around_vertex(), Halfedge_data_structure_decorator< _HDS >::flip_edge(), Pane_manifold_2::get_next_edge(), Pane_manifold_2::get_prev_edge(), Halfedge_data_structure_decorator< _HDS >::insert_tip(), Halfedge_data_structure_decorator< _HDS >::is_valid(), Halfedge_data_structure_decorator< _HDS >::join_facet(), Halfedge_data_structure_decorator< _HDS >::join_loop(), Halfedge_data_structure_decorator< _HDS >::join_vertex(), Polyhedron_incremental_builder_3< HDS >::lookup_halfedge(), Polyhedron_incremental_builder_3< HDS >::lookup_hole(), Halfedge_data_structure_decorator< _HDS >::remove_tip(), Halfedge_data_structure_decorator< _HDS >::set_vertex_in_vertex_loop(), Halfedge_data_structure_decorator< _HDS >::split_facet(), Halfedge_data_structure_decorator< _HDS >::split_loop(), and Halfedge_data_structure_decorator< _HDS >::split_vertex().
|
inline |
Obtain the (primary copy of the) origin of the edge.
Definition at line 468 of file Manifold_2.h.
References _eID, _mode, _pm, Simple_manifold_2::get_origin(), and Pane_manifold_2::get_primary().
Referenced by edge_average(), face_average(), get_deformed_normal(), and tangent().
|
inline |
Obtain the owner Pane_manifold_2 of the node.
Definition at line 543 of file Manifold_2.h.
References _pm, and Simple_manifold_2::pane().
Referenced by get_normal(), and Pane_manifold_2::size_of_edges().
|
inline |
Obtain the pane manifold that owns the edge.
Definition at line 540 of file Manifold_2.h.
References _pm.
Referenced by get_normal(), Pane_manifold_2::get_opposite_edge(), Node::halfedge(), Pane_manifold_2::is_border_edge(), and Pane_manifold_2::size_of_edges().
|
inline |
Get the previous halfedge of its owner element.
If the current edge is a border edges, it returns the previous border edge along the boundary.
Definition at line 460 of file Manifold_2.h.
References _eID, _mode, _pm, and Pane_manifold_2::get_prev_edge().
Referenced by Halfedge_data_structure_decorator< _HDS >::find_prev(), Halfedge_data_structure_decorator< _HDS >::find_prev_around_vertex(), Pane_manifold_2::get_next_edge(), and Halfedge_data_structure_decorator< _HDS >::get_prev().
Get the tangent of the given halfedge.
Definition at line 484 of file Manifold_2.h.
References destination(), origin(), and Node::point().
Referenced by Rocsurf::compute_edge_lengths(), and get_tangent().
|
protected |
Definition at line 577 of file Manifold_2.h.
Referenced by addr(), destination(), id(), is_border(), is_physical_border(), next(), operator!=(), operator<(), operator==(), opposite(), origin(), and prev().
|
protected |
Definition at line 578 of file Manifold_2.h.
Referenced by destination(), is_border(), next(), opposite(), origin(), and prev().
|
protected |
Definition at line 576 of file Manifold_2.h.
Referenced by addr(), attr(), destination(), edge_center(), face_center(), is_border(), is_physical_border(), next(), operator!=(), operator<(), operator==(), opposite(), origin(), pane(), pane_manifold(), and prev().