MeshKit
1.0
|
#include <AF2Front.hpp>
Public Member Functions | |
AF2Front () | |
Constructor. | |
virtual | ~AF2Front () |
Destructor. | |
AF2Front (const AF2Front &toCopy) | |
Copy constructor (throws exception) | |
AF2Front & | operator= (const AF2Front &rhs) |
Assignment operator (throws exception) | |
void | addPoint (AF2Point3D *pointPtr) |
Add a point to the front. | |
void | advanceFront (std::list< AF2Edge3D * > edgeList) |
Initialize or advance the front with a list of half edges. | |
bool | isEmpty () const |
Check whether the front is empty. | |
unsigned int | getMaximumQuality () const |
Get the maximum quality of edges on the front. | |
AF2Neighborhood * | selectNeighborhood (const AF2LocalTransformMaker *const &transformMaker) const |
Select a baseline edge. Then build and return the neighborhood of that baseline edge. | |
Private Member Functions | |
void | qualityDecreased (const AF2Edge3D *const &anEdge) |
Notify this advancing front that the quality has been decreased for the specified edge. | |
Private Attributes | |
std::map< AF2Point3D *, int > | points |
std::set< AF2Edge3D *, EndPointLess > | edges |
std::vector< unsigned int > | qualityCount |
Friends | |
void | AF2Edge3D::decreaseQuality () |
Definition at line 51 of file AF2Front.hpp.
AF2Front | ( | ) |
Constructor.
Definition at line 30 of file AF2Front.cpp.
~AF2Front | ( | ) | [virtual] |
Destructor.
Deletes any remaining edges that this front owns due to calls to advanceFront.
Definition at line 34 of file AF2Front.cpp.
Copy constructor (throws exception)
This object does not currently support copying, so this method is implemented to throw an exception.
Definition at line 43 of file AF2Front.cpp.
void addPoint | ( | AF2Point3D * | pointPtr | ) |
Add a point to the front.
Adds a point to the advancing front. The added point may be an isolated point or an endpoint of an edge that the user is planning to add to the front.
This object does not take ownership of the point. It is the responsiblity of the context to manage the memory for the point and keep the point available in memory as long as this AF2Front is in memory. This object requires permission to update the point's distance to the boundary.
pointPtr | a pointer to the point that should be added to the front |
Definition at line 68 of file AF2Front.cpp.
void advanceFront | ( | std::list< AF2Edge3D * > | edgeList | ) |
Initialize or advance the front with a list of half edges.
Each endpoint of each edge must have been added to the to the advancing front already. The half edges must be at quality level 1, i.e., their quality must not have been decreased after they were constructed. If either of these conditions is violated, an exception will be thrown.
The half edges must be oriented such that the area that still has to be meshed or the half edges that are already on the advancing front are to the left when the edge is traversed from its start toward its end. Other than initialization, the targeted use case is to advance the front with a list of edges that bound a face. In this use case the edges should be oriented such that the bounded face is to the right.
If the area that has to be meshed is on both sides of an edge, both half edges of the edge should be passed to this method in the same method call.
If the opposite half edge of an edge in the list already exists on the front, having been added by a previous call to advanceFront, then that half edge will be removed from the front. Also, if this reduces the number of edges incident to a point on the front to zero, that point will be removed from the front. If the opposite half edge of an edge in the list does not yet exist on the front, then that half edge will be added to the advancing front.
This object takes ownership of the edges that are passed to this method and deletes the edges when they are no longer needed. Edges may be deleted during execution of this method. It is assumed that the edges were allocated with a call to new.
This object manages the quality level of edges on the advancing front, so it requires permission to modify the AF2Edge3D that are passed to the method.
edgeList | a list of edges that will be used to initialize or advance the front |
Definition at line 79 of file AF2Front.cpp.
unsigned int getMaximumQuality | ( | ) | const |
Get the maximum quality of edges on the front.
In other words, get the smallest integer value among the quality level values for edges.
If there are no edges on the front, this method will return zero.
Definition at line 190 of file AF2Front.cpp.
bool isEmpty | ( | ) | const |
Check whether the front is empty.
The front is considered empty if it has no remaining points and no remaining half edges
Definition at line 185 of file AF2Front.cpp.
Assignment operator (throws exception)
This object does not currently support assignment, so this method is implemented to throw an exception.
Definition at line 50 of file AF2Front.cpp.
void qualityDecreased | ( | const AF2Edge3D *const & | anEdge | ) | [private, virtual] |
Notify this advancing front that the quality has been decreased for the specified edge.
anEdge | the edge for which the quality level number has increased |
Implements QualityDecreaseObserver.
Definition at line 57 of file AF2Front.cpp.
AF2Neighborhood * selectNeighborhood | ( | const AF2LocalTransformMaker *const & | transformMaker | ) | const |
Select a baseline edge. Then build and return the neighborhood of that baseline edge.
The neighborhood returned from this method is allocated with a call to new. It is the responsibility of the user to delete the neighborhood. Since advancing the front may invalidate some of the pointers to edges and points in a neighborhood, a neighborhood returned by this method should be deleted before or in conjunction with advancing the front.
If there are no edges on the front, this method throws an exception.
transformMaker | an object responsible for making the local transform that will be used by the selected neighborhood |
Definition at line 204 of file AF2Front.cpp.
void AF2Edge3D::decreaseQuality | ( | ) | [friend] |
Reimplemented from QualityDecreaseObserver.
std::set<AF2Edge3D*, EndPointLess> edges [private] |
Definition at line 61 of file AF2Front.hpp.
std::map<AF2Point3D*, int> points [private] |
Definition at line 59 of file AF2Front.hpp.
std::vector<unsigned int> qualityCount [private] |
Definition at line 64 of file AF2Front.hpp.