PPL API Reference |
|
---|
Public Member Functions | |
Construction | |
WorkspaceRegion () | |
WorkspaceRegion (WorkspaceDecomposition *const _wd) | |
WorkspaceRegion (const WorkspaceRegion &) | |
Copy. | |
WorkspaceRegion (WorkspaceRegion &&) | |
Move. | |
~WorkspaceRegion () | |
void | SetDecomposition (WorkspaceDecomposition *const _wd) |
Assignment | |
WorkspaceRegion & | operator= (const WorkspaceRegion &) |
Copy. | |
WorkspaceRegion & | operator= (WorkspaceRegion &&) |
Move. | |
Equality | |
bool | operator== (const WorkspaceRegion &_region) const noexcept |
bool | operator!= (const WorkspaceRegion &_region) const noexcept |
Modifiers | |
void | AddPoint (const size_t _i) |
void | AddFacet (Facet &&_f) |
void | AddBoundary (std::unique_ptr< Boundary > &&_b) |
Add a boundary and assume ownership of it. | |
Accessors | |
const size_t | GetNumPoints () const noexcept |
Get the number of points in the region. | |
const size_t | GetNumFacets () const noexcept |
Get the number of facets in the region. | |
const Point3d & | GetPoint (const size_t _i) const noexcept |
Get the _i'th point of this region. | |
const std::vector< Point3d > | GetPoints () const noexcept |
Get a list of all points in this region. | |
const std::vector< Facet > & | GetFacets () const noexcept |
Get the set of facets that border this region. | |
const Boundary * | GetBoundary () const noexcept |
Get the boundary for this region. | |
Queries | |
const bool | HasPoint (const Point3d &_p) const noexcept |
Check if a given point is part of this region's boundary. | |
const Point3d | FindCenter () const noexcept |
Find the center of this region. | |
const std::vector< Point3d > | FindSharedPoints (const WorkspaceRegion &_wr) const noexcept |
Find shared points with another workspace region. | |
const std::vector< const Facet * > | FindSharedFacets (const WorkspaceRegion &_wr) const noexcept |
Find shared facets with another workspace region. | |
Public Types | |
Local Types | |
typedef GMSPolygon | Facet |
A triangle facet. | |
A convex region of workspace represented as a triangulated mesh.
Since many regions may share the same points, this object stores only point indexes. The actual points are stored by the owning WorkspaceDecomposition.
|
default |
WorkspaceRegion::WorkspaceRegion | ( | WorkspaceDecomposition *const | _wd | ) |
Construct a workspace region attached to a specific decomposition object.
_wd | The owning workspace decomposition. |
void WorkspaceRegion::SetDecomposition | ( | WorkspaceDecomposition *const | _wd | ) |
Change the owning decomposition. This only makes sense when we are copying/moving regions from one decomposition to another.
_wd | The new owning decomposition. |