OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Class representing the special graph constructed from two polygons that is used to perform boolean operation on polygons (polygon clipping in current implementation). More...
#include <geotoolbox.h>
Classes | |
struct | node |
Public Member Functions | |
Graph () | |
~Graph () | |
void | clip (Polygon &result, const Polygon &a, const Polygon &b) |
Protected Types | |
enum | nodeStatus { NS_Vertex, NS_IntersectionVertex, NS_Intersection } |
Protected Member Functions | |
void | insert (node *ins, node *first, node *last) |
node * | createNode (double x, double y, node *next, node *prev, node *nextPoly, node *neighbor, nodeStatus st, int entry, int visited, double alpha) |
Create new node struct. More... | |
node * | next_node (node *p) |
node * | prev_node (node *p) |
node * | last_node (node *p) |
node * | first (node *p) |
void | remove (node *n) |
double | dist (double x1, double y1, double x2, double y2) |
int | testIfIntersect (node *p1, node *p2, node *q1, node *q2, double *alpha_p, double *alpha_q, double *xint, double *yint) |
int | testIfCoincident (node *p1, node *p2, node *q1, node *q2, double *alpha_1, double *alpha_2) |
int | testPoint (node *poly, double x, double y) const |
bool | belongs (node *n, node *v1, node *v2) |
bool | intersectionExist (node *p1, node *p2, node *q1, node *q2) |
void | removeIntersectionIfExist (node *p1, node *p2, node *q1, node *q2) |
int | vertex2IntersectionVertex (node *v, node *l1, node *l2) |
void | testNewIntersectionVertexEdgeCollapse (node *v, node *l1, node *l2) |
bool | testCollapsedEdge (node *p1, node *p2) |
void | merge2vertex (node *v1, node *v2) |
void | printYourself () |
void | clear () |
Protected Attributes | |
node * | s |
node * | c |
Class representing the special graph constructed from two polygons that is used to perform boolean operation on polygons (polygon clipping in current implementation).
In short, the graph contains polygon vertices and intersections of polygon edges. Then graph edges represent the edges between graph nodes (graph edge correspond to polygon edge if this edge has no intersection with other edges of second polygon, or single polygon edge can be represented by two or more graph edges if intersections are present). Each polygon vertex representing intersection contain link to its twin representing the same intersection on second polygon. This allows to perform traversal walk over graph edges and vertices that can represent various boolean operations. This class is a part of geometry toolbox.
Definition at line 191 of file geotoolbox.h.
|
protected |
Enumerator | |
---|---|
NS_Vertex | |
NS_IntersectionVertex | |
NS_Intersection |
Definition at line 194 of file geotoolbox.h.
|
inline |
Definition at line 211 of file geotoolbox.h.
oofem::Graph::~Graph | ( | ) |
Definition at line 224 of file geotoolbox.C.
References oofem::Polygon::clear().
Definition at line 1415 of file geotoolbox.C.
References oofem::Graph::node::neighbor, and oofem::Graph::node::status.
|
protected |
Definition at line 231 of file geotoolbox.C.
References oofem::Graph::node::next.
Definition at line 575 of file geotoolbox.C.
References oofem::Polygon::addVertex(), oofem::Polygon::clear(), oofem::Vertex::coords, oofem::Graph::node::entry, oofem::Polygon::PolygonVertexIterator::giveNext(), oofem::Polygon::PolygonVertexIterator::init(), oofem::Graph::node::neighbor, oofem::Graph::node::next, oofem::Graph::node::prev, oofem::Vertex::setCoords(), oofem::Graph::node::status, oofem::Polygon::testPoint(), THROW_GT_EXCEPTIONM, oofem::Graph::node::visited, oofem::Graph::node::x, and oofem::Graph::node::y.
Referenced by oofem::TR1_2D_CBS::truncateMatVolume(), oofem::TR1_2D_SUPG2_AXI::truncateMatVolume(), oofem::TR1_2D_SUPG2::truncateMatVolume(), and oofem::TR1_2D_SUPG::truncateMatVolume().
|
protected |
Create new node struct.
Definition at line 1444 of file geotoolbox.C.
References oofem::Graph::node::alpha, oofem::Graph::node::entry, oofem::Graph::node::neighbor, oofem::Graph::node::next, oofem::Graph::node::nextPoly, oofem::Graph::node::prev, oofem::Graph::node::status, oofem::Graph::node::visited, oofem::Graph::node::x, and oofem::Graph::node::y.
|
protected |
Definition at line 1438 of file geotoolbox.C.
|
protected |
Definition at line 1391 of file geotoolbox.C.
References oofem::Graph::node::entry, oofem::Graph::node::next, oofem::Graph::node::status, and oofem::Graph::node::visited.
Definition at line 1470 of file geotoolbox.C.
References oofem::Graph::node::alpha, oofem::Graph::node::next, and oofem::Graph::node::prev.
Definition at line 1496 of file geotoolbox.C.
References oofem::Graph::node::neighbor, oofem::Graph::node::next, oofem::Graph::node::prev, and oofem::Graph::node::status.
|
protected |
Definition at line 1378 of file geotoolbox.C.
References oofem::Graph::node::next.
Definition at line 1670 of file geotoolbox.C.
References oofem::Graph::node::entry, oofem::Graph::node::neighbor, oofem::Graph::node::status, and THROW_GT_EXCEPTIONM.
|
protected |
Definition at line 1367 of file geotoolbox.C.
References oofem::Graph::node::next, and oofem::Graph::node::status.
|
protected |
Definition at line 1355 of file geotoolbox.C.
References oofem::Graph::node::prev, and oofem::Graph::node::status.
|
protected |
Definition at line 1747 of file geotoolbox.C.
References oofem::Graph::node::entry, oofem::Graph::node::next, oofem::Graph::node::status, oofem::Graph::node::x, and oofem::Graph::node::y.
|
protected |
Definition at line 1484 of file geotoolbox.C.
References oofem::Graph::node::entry, oofem::Graph::node::neighbor, oofem::Graph::node::next, and oofem::Graph::node::prev.
|
protected |
Definition at line 1524 of file geotoolbox.C.
References oofem::Graph::node::neighbor, oofem::Graph::node::next, oofem::Graph::node::prev, and oofem::Graph::node::status.
Definition at line 1514 of file geotoolbox.C.
References GT_EPS, oofem::Graph::node::x, and oofem::Graph::node::y.
|
protected |
Definition at line 255 of file geotoolbox.C.
References GT_EPS, GT_TEPS, oofem::min(), oofem::sgn(), oofem::Graph::node::x, and oofem::Graph::node::y.
|
protected |
Definition at line 463 of file geotoolbox.C.
References GT_EPS, GT_TEPS, oofem::Graph::node::x, and oofem::Graph::node::y.
|
protected |
Definition at line 1594 of file geotoolbox.C.
References oofem::Graph::node::alpha, oofem::Graph::node::entry, oofem::Graph::node::neighbor, oofem::Graph::node::next, oofem::Graph::node::prev, and oofem::Graph::node::status.
|
protected |
Definition at line 1718 of file geotoolbox.C.
References oofem::Graph::node::next, oofem::Graph::node::x, and oofem::Graph::node::y.
Definition at line 1549 of file geotoolbox.C.
References oofem::Graph::node::neighbor, oofem::Graph::node::next, oofem::Graph::node::prev, oofem::Graph::node::status, and THROW_GT_EXCEPTIONM.
|
protected |
Definition at line 209 of file geotoolbox.h.
|
protected |
Definition at line 209 of file geotoolbox.h.