ug4
|
#include <delaunay_info.h>
Classes | |
struct | CompareFaceInfo |
struct | FaceInfo |
Public Types | |
enum | Mark { NONE , INNER , NEW_INNER , SEGMENT , NEW_SEGMENT , DART , SHELL } |
Public Member Functions | |
DelaunayInfo (Grid &g, TAAPos &aaPos, Grid::edge_traits::callback cbConstrainedEdge) | |
virtual void | edge_created (Grid *grid, Edge *e, GridObject *pParent, bool replacesParent) |
Notified whenever a new element of the given type is created in the given grid. More... | |
virtual void | edge_to_be_erased (Grid *grid, Edge *e, Edge *replacedBy) |
Notified whenever an element of the given type is erased from the given grid. More... | |
virtual void | face_created (Grid *grid, Face *f, GridObject *pParent, bool replacesParent) |
Notified whenever a new element of the given type is created in the given grid. More... | |
virtual void | face_to_be_erased (Grid *grid, Face *f, Face *replacedBy) |
Notified whenever an element of the given type is erased from the given grid. More... | |
Grid & | grid () |
template<class TIter > | |
void | init_marks (TIter trisBegin, TIter trisEnd, bool pushFlipCandidates) |
bool | is_classifiable (Face *f) |
returns true if the face can be classified More... | |
bool | is_dart_segment (Edge *e) |
returns true if the specified edge is a segment and is connected to a DART vertex More... | |
bool | is_dart_shell_segment (Edge *e) |
returns true if the specified edge is a segment and connects a DART and a SHELL vertex More... | |
template<class TElem > | |
bool | is_inner (TElem *e) |
returns true if the specified element is either marked as INNER or as NEW_INNER More... | |
bool | is_new_dart_segment (Edge *e) |
returns true if the specified edge is a new segment and is connected to a DART vertex More... | |
template<class TElem > | |
bool | is_segment (TElem *e) |
returns true if the specified element is either marked as SEGMENT, NEW_SEGMENT, DART or SHELL More... | |
Mark | mark (Edge *e) const |
Mark | mark (Face *f) const |
Mark | mark (Vertex *v) const |
AAPos & | position_accessor () |
void | set_mark (Edge *e, Mark m) |
void | set_mark (Face *f, Mark m) |
template<class TAAPos > | |
void | set_mark (Face *f, typename DelaunayInfo< TAAPos >::Mark mark) |
template<class TIter > | |
void | set_mark (TIter begin, TIter end, Mark m) |
void | set_mark (Vertex *v, Mark m) |
void | start_candidate_recording () |
newly created edges will be recorded as possible new candidates More... | |
void | stop_candidate_recording () |
stops candidate recording and pushes all valid recorded edges to the list of real candidates More... | |
virtual void | vertex_created (Grid *grid, Vertex *vrt, GridObject *pParent, bool replacesParent) |
Notified whenever a new element of the given type is created in the given grid. More... | |
~DelaunayInfo () | |
bool | is_candidate (Edge *e) |
void | push_candidate (Edge *e) |
Edge * | pop_candidate () |
bool | candidates_left () |
bool | classified_faces_left () |
Face * | pop_classified_face () |
bool | face_classification_enabled () |
void | enable_face_classification (number minAngle) |
number | min_angle () const |
number | max_dot () const |
Public Member Functions inherited from ug::GridObserver | |
virtual void | elements_to_be_cleared (Grid *grid) |
virtual void | grid_to_be_destroyed (Grid *grid) |
virtual | ~GridObserver () |
virtual void | volume_created (Grid *grid, Volume *vol, GridObject *pParent=NULL, bool replacesParent=false) |
Notified whenever a new element of the given type is created in the given grid. More... | |
virtual void | vertex_to_be_erased (Grid *grid, Vertex *vrt, Vertex *replacedBy=NULL) |
Notified whenever an element of the given type is erased from the given grid. More... | |
virtual void | volume_to_be_erased (Grid *grid, Volume *vol, Volume *replacedBy=NULL) |
Notified whenever an element of the given type is erased from the given grid. More... | |
virtual void | vertices_to_be_merged (Grid *grid, Vertex *target, Vertex *elem1, Vertex *elem2) |
Notified when two elements of the same type are going to be merged. More... | |
virtual void | edges_to_be_merged (Grid *grid, Edge *target, Edge *elem1, Edge *elem2) |
Notified when two elements of the same type are going to be merged. More... | |
virtual void | faces_to_be_merged (Grid *grid, Face *target, Face *elem1, Face *elem2) |
Notified when two elements of the same type are going to be merged. More... | |
virtual void | volumes_to_be_merged (Grid *grid, Volume *target, Volume *elem1, Volume *elem2) |
Notified when two elements of the same type are going to be merged. More... | |
Private Types | |
typedef TAAPos | AAPos |
typedef Attachment< FaceInfo * > | AFaceInfo |
typedef std::priority_queue< FaceInfo *, std::vector< FaceInfo * >, CompareFaceInfo > | FacePriorityQueue |
typedef TAAPos::ValueType | vector_t |
Private Member Functions | |
bool | classify_face (Face *f) |
bool | is_classified (Face *f) |
Private Attributes | |
Grid::AttachmentAccessor< Edge, ABool > | m_aaCandidateEDGE |
Grid::AttachmentAccessor< Face, AFaceInfo > | m_aaFaceInfo |
MultiElementAttachmentAccessor< AByte > | m_aaMark |
AAPos | m_aaPos |
ABool | m_aCandidate |
AFaceInfo | m_aFaceInfo |
AByte | m_aMark |
bool | m_candidateRecordingEnabled |
Grid::edge_traits::callback | m_cbConstrainedEdge |
FacePriorityQueue | m_faceQueue |
Grid & | m_grid |
number | m_maxDot |
number | m_minAngle |
std::queue< Edge * > | m_qEdgeCandidates |
std::vector< Edge * > | m_recordedCandidates |
This class intended for internal use in delaunay related algorithms.
|
private |
|
private |
|
private |
|
private |
enum ug::DelaunayInfo::Mark |
ug::DelaunayInfo< TAAPos >::DelaunayInfo | ( | Grid & | g, |
TAAPos & | aaPos, | ||
Grid::edge_traits::callback | cbConstrainedEdge | ||
) |
References ug::Grid::attach_to_edges_dv(), ug::Grid::attach_to_faces_dv(), ug::Grid::attach_to_vertices_dv(), ug::Grid::enable_options(), ug::FACEOPT_AUTOGENERATE_EDGES, ug::DelaunayInfo< TAAPos >::m_aaCandidateEDGE, ug::DelaunayInfo< TAAPos >::m_aaMark, ug::DelaunayInfo< TAAPos >::m_aCandidate, ug::DelaunayInfo< TAAPos >::m_aMark, ug::DelaunayInfo< TAAPos >::NONE, ug::Grid::option_is_enabled(), ug::OT_EDGE_OBSERVER, ug::OT_FACE_OBSERVER, ug::OT_VERTEX_OBSERVER, ug::Grid::register_observer(), and UG_LOG.
ug::DelaunayInfo< TAAPos >::~DelaunayInfo |
|
inline |
candidates are used during MakeDelaunay to define the set of edges which may have to be swapped to obtain a delaunay triangulation.
Referenced by ug::MakeDelaunay().
bool ug::DelaunayInfo< TAAPos >::classified_faces_left |
Face classification is used to define and order the set of faces which whose circumcenter may have to be inserted in order to obtain a delaunay- triangulation with prescribed minimal angle during QualityGridGeneration. Face classification is not required for MakeDelaunay.
References ug::DelaunayInfo< TAAPos >::FaceInfo::f.
Referenced by ug::QualityGridGeneration().
|
private |
|
virtual |
Notified whenever a new element of the given type is created in the given grid.
Creation callbacks are called in the order in which the GridObservers were registered at the given grid.
If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.
Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).
Reimplemented from ug::GridObserver.
References ug::GridObject::base_object_id(), and ug::EDGE.
|
virtual |
Notified whenever an element of the given type is erased from the given grid.
Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.
if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).
Reimplemented from ug::GridObserver.
void ug::DelaunayInfo< TAAPos >::enable_face_classification | ( | number | minAngle | ) |
Face classification is used to define and order the set of faces which whose circumcenter may have to be inserted in order to obtain a delaunay- triangulation with prescribed minimal angle during QualityGridGeneration. Face classification is not required for MakeDelaunay.
References ug::deg_to_rad(), and ug::DelaunayInfo< TAAPos >::FaceInfo::f.
Referenced by ug::QualityGridGeneration().
|
inline |
|
virtual |
Notified whenever a new element of the given type is created in the given grid.
Creation callbacks are called in the order in which the GridObservers were registered at the given grid.
If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.
Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).
Reimplemented from ug::GridObserver.
References ug::GridObject::base_object_id(), and ug::FACE.
|
virtual |
Notified whenever an element of the given type is erased from the given grid.
Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.
if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).
Reimplemented from ug::GridObserver.
References ug::NONE.
|
inline |
Referenced by ug::MakeDelaunay().
void ug::DelaunayInfo< TAAPos >::init_marks | ( | TIter | trisBegin, |
TIter | trisEnd, | ||
bool | pushFlipCandidates | ||
) |
References ug::GetAssociatedFaces(), ug::GetConnectedVertex(), ug::NONE, ug::FaceVertices::num_vertices(), ug::PI, ug::PointerConstArray< TPtr >::size(), ug::SMALL, ug::VecAngle(), ug::VecSubtract(), ug::EdgeVertices::vertex(), ug::FaceVertices::vertex(), and ug::FaceVertices::vertices().
Referenced by ug::QualityGridGeneration().
|
inline |
candidates are used during MakeDelaunay to define the set of edges which may have to be swapped to obtain a delaunay triangulation.
Referenced by ug::MakeDelaunay(), and ug::QualityGridGeneration().
bool ug::DelaunayInfo< TAAPos >::is_classifiable | ( | Face * | f | ) |
returns true if the face can be classified
Faces which contain two shell vertices whose subtended angle is small are not classifiable.
References ug::PI, ug::SMALL, ug::VecAngle(), ug::VecDistanceSq(), ug::VecSubtract(), and ug::FaceVertices::vertex().
|
private |
bool ug::DelaunayInfo< TAAPos >::is_dart_segment | ( | Edge * | e | ) |
returns true if the specified edge is a segment and is connected to a DART vertex
References ug::EdgeVertices::vertices().
bool ug::DelaunayInfo< TAAPos >::is_dart_shell_segment | ( | Edge * | e | ) |
returns true if the specified edge is a segment and connects a DART and a SHELL vertex
References ug::EdgeVertices::vertices().
bool ug::DelaunayInfo< TAAPos >::is_inner | ( | TElem * | e | ) |
returns true if the specified element is either marked as INNER or as NEW_INNER
Referenced by ug::QualityGridGeneration().
bool ug::DelaunayInfo< TAAPos >::is_new_dart_segment | ( | Edge * | e | ) |
returns true if the specified edge is a new segment and is connected to a DART vertex
References ug::EdgeVertices::vertices().
bool ug::DelaunayInfo< TAAPos >::is_segment | ( | TElem * | e | ) |
returns true if the specified element is either marked as SEGMENT, NEW_SEGMENT, DART or SHELL
Referenced by ug::MakeDelaunay(), and ug::QualityGridGeneration().
|
inline |
|
inline |
|
inline |
Referenced by ug::QualityGridGeneration(), and ug::DelaunayDebugSaver::save().
|
inline |
|
inline |
Edge * ug::DelaunayInfo< TAAPos >::pop_candidate |
candidates are used during MakeDelaunay to define the set of edges which may have to be swapped to obtain a delaunay triangulation.
Referenced by ug::MakeDelaunay().
Face * ug::DelaunayInfo< TAAPos >::pop_classified_face |
Face classification is used to define and order the set of faces which whose circumcenter may have to be inserted in order to obtain a delaunay- triangulation with prescribed minimal angle during QualityGridGeneration. Face classification is not required for MakeDelaunay.
References ug::DelaunayInfo< TAAPos >::FaceInfo::classified, and ug::DelaunayInfo< TAAPos >::FaceInfo::f.
Referenced by ug::QualityGridGeneration().
|
inline |
Referenced by ug::MakeDelaunay(), and ug::QualityGridGeneration().
void ug::DelaunayInfo< TAAPos >::push_candidate | ( | Edge * | e | ) |
candidates are used during MakeDelaunay to define the set of edges which may have to be swapped to obtain a delaunay triangulation.
Referenced by ug::MakeDelaunay(), and ug::QualityGridGeneration().
|
inline |
void ug::DelaunayInfo< TAAPos >::set_mark | ( | Face * | f, |
Mark | m | ||
) |
void ug::DelaunayInfo< TAAPos >::set_mark | ( | Face * | f, |
typename DelaunayInfo< TAAPos >::Mark | mark | ||
) |
|
inline |
|
inline |
Referenced by ug::QualityGridGeneration().
void ug::DelaunayInfo< TAAPos >::start_candidate_recording |
newly created edges will be recorded as possible new candidates
All newly created edges will be added to a list of possible candidates, however, they are not added to the list of candidates until stop_candidate_recording() has been called. This is important since recorded possible candidates may be erased again from the grid (opposed to real candidates, which may not be erased).
References UG_COND_THROW.
Referenced by ug::QualityGridGeneration().
void ug::DelaunayInfo< TAAPos >::stop_candidate_recording |
stops candidate recording and pushes all valid recorded edges to the list of real candidates
Referenced by ug::QualityGridGeneration().
|
virtual |
Notified whenever a new element of the given type is created in the given grid.
Creation callbacks are called in the order in which the GridObservers were registered at the given grid.
If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.
Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).
Reimplemented from ug::GridObserver.
References ug::GridObject::base_object_id(), and ug::EDGE.
|
private |
Referenced by ug::DelaunayInfo< TAAPos >::DelaunayInfo().
|
private |
|
private |
Referenced by ug::DelaunayInfo< TAAPos >::DelaunayInfo().
|
private |
|
private |
Referenced by ug::DelaunayInfo< TAAPos >::DelaunayInfo().
|
private |
|
private |
Referenced by ug::DelaunayInfo< TAAPos >::DelaunayInfo().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |