Represents the possibly nested layers of a polygon as a hierarchical structure. More...
#include <PolygonTree.h>
Public Member Functions | |
| std::vector< PolygonTree * > & | getChildren () |
| Retrieves the direct child nodes of this PolygonTree node. More... | |
| void | getChildrenRecursive (std::vector< PolygonTree * > &vChildNodesRec) |
| Retrieves all child nodes recursively. More... | |
| int | getLayer () const |
| Retrieves the layer number of this PolygonTree node. More... | |
| void | getSegments_CCW (std::vector< Segment2 > &vSegments) const |
| Retrieves globally counter-clockwise ordered and oriented segments. More... | |
| void | getSegments_CW (std::vector< Segment2 > &vSegments) const |
| Retrieves clockwise ordered and oriented segments. More... | |
| void | getSegments_regionOriented (std::vector< Segment2 > &vSegments) const |
| Retrieves region-oriented segments. More... | |
The PolygonTree organizes nested polygon layers as a hierarchical, tree-like structure.
PolygonTree on the rightDetails
| std::vector<PolygonTree*>& GEOM_FADE25D::PolygonTree::getChildren | ( | ) |
Returns the direct children of the current PolygonTree node as a vector of pointers.
| void GEOM_FADE25D::PolygonTree::getChildrenRecursive | ( | std::vector< PolygonTree * > & | vChildNodesRec | ) |
Populates the provided vector with all descendant nodes of this PolygonTree node, traversing the hierarchy recursively.
| vChildNodesRec | A vector to be filled with pointers to all descendant nodes. |
| int GEOM_FADE25D::PolygonTree::getLayer | ( | ) | const |
Returns the layer number associated with the current PolygonTree node.
Details
| void GEOM_FADE25D::PolygonTree::getSegments_CCW | ( | std::vector< Segment2 > & | vSegments | ) | const |
This method fills the provided vector with segments that are ordered and oriented in a globally counter-clockwise (CCW) direction.
| vSegments | A vector to be filled with CCW-oriented segments. |
| void GEOM_FADE25D::PolygonTree::getSegments_CW | ( | std::vector< Segment2 > & | vSegments | ) | const |
This method fills the provided vector with segments ordered and oriented in a globally clockwise direction.
| vSegments | A vector to be filled with CW-oriented segments. |
| void GEOM_FADE25D::PolygonTree::getSegments_regionOriented | ( | std::vector< Segment2 > & | vSegments | ) | const |
Retrieves the segments of this node, oriented counter-clockwise around the inside regions of the polygon.
Observe:
| vSegments | A vector to be filled with the region-oriented segments. |