Parasol Planning Library (PPL)
WorkspaceRegion Class Referencefinal

#include <WorkspaceRegion.h>

Public Types

Local Types
typedef GMSPolygon Facet
 A triangle facet. More...
 

Public Member Functions

Construction
 WorkspaceRegion ()
 
 WorkspaceRegion (WorkspaceDecomposition *const _wd)
 
 WorkspaceRegion (const WorkspaceRegion &)
 Copy. More...
 
 WorkspaceRegion (WorkspaceRegion &&)
 Move. More...
 
 ~WorkspaceRegion ()
 
void SetDecomposition (WorkspaceDecomposition *const _wd)
 
Assignment
WorkspaceRegionoperator= (const WorkspaceRegion &)
 Copy. More...
 
WorkspaceRegionoperator= (WorkspaceRegion &&)
 Move. More...
 
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. More...
 
Accessors
const size_t GetNumPoints () const noexcept
 Get the number of points in the region. More...
 
const size_t GetNumFacets () const noexcept
 Get the number of facets in the region. More...
 
const Point3d & GetPoint (const size_t _i) const noexcept
 Get the _i'th point of this region. More...
 
const std::vector< Point3d > GetPoints () const noexcept
 Get a list of all points in this region. More...
 
const std::vector< Facet > & GetFacets () const noexcept
 Get the set of facets that border this region. More...
 
const BoundaryGetBoundary () const noexcept
 Get the boundary for this region. More...
 
Queries
const bool HasPoint (const Point3d &_p) const noexcept
 Check if a given point is part of this region's boundary. More...
 
const Point3d FindCenter () const noexcept
 Find the center of this region. More...
 
const std::vector< Point3d > FindSharedPoints (const WorkspaceRegion &_wr) const noexcept
 Find shared points with another workspace region. More...
 
const std::vector< const Facet * > FindSharedFacets (const WorkspaceRegion &_wr) const noexcept
 Find shared facets with another workspace region. More...
 

Detailed Description

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.

Member Typedef Documentation

◆ Facet

A triangle facet.

Constructor & Destructor Documentation

◆ WorkspaceRegion() [1/4]

WorkspaceRegion::WorkspaceRegion ( )
default
Warning
Default construction makes no sense for this object, but the stapl graph requires it.

◆ WorkspaceRegion() [2/4]

WorkspaceRegion::WorkspaceRegion ( WorkspaceDecomposition *const  _wd)

Construct a workspace region attached to a specific decomposition object.

Parameters
_wdThe owning workspace decomposition.

◆ WorkspaceRegion() [3/4]

WorkspaceRegion::WorkspaceRegion ( const WorkspaceRegion _other)

Copy.

◆ WorkspaceRegion() [4/4]

WorkspaceRegion::WorkspaceRegion ( WorkspaceRegion &&  _other)

Move.

◆ ~WorkspaceRegion()

WorkspaceRegion::~WorkspaceRegion ( )
default

Member Function Documentation

◆ AddBoundary()

void WorkspaceRegion::AddBoundary ( std::unique_ptr< Boundary > &&  _b)

Add a boundary and assume ownership of it.

◆ AddFacet()

void WorkspaceRegion::AddFacet ( Facet &&  _f)

◆ AddPoint()

void WorkspaceRegion::AddPoint ( const size_t  _i)

◆ FindCenter()

const Point3d WorkspaceRegion::FindCenter ( ) const
noexcept

Find the center of this region.

◆ FindSharedFacets()

const std::vector< const WorkspaceRegion::Facet * > WorkspaceRegion::FindSharedFacets ( const WorkspaceRegion _wr) const
noexcept

Find shared facets with another workspace region.

Todo:
Eliminate this extraneous copy. Perhaps check if = reverse within facet class.

◆ FindSharedPoints()

const std::vector< Point3d > WorkspaceRegion::FindSharedPoints ( const WorkspaceRegion _wr) const
noexcept

Find shared points with another workspace region.

◆ GetBoundary()

const Boundary * WorkspaceRegion::GetBoundary ( ) const
noexcept

Get the boundary for this region.

◆ GetFacets()

const std::vector< WorkspaceRegion::Facet > & WorkspaceRegion::GetFacets ( ) const
noexcept

Get the set of facets that border this region.

◆ GetNumFacets()

const size_t WorkspaceRegion::GetNumFacets ( ) const
noexcept

Get the number of facets in the region.

◆ GetNumPoints()

const size_t WorkspaceRegion::GetNumPoints ( ) const
noexcept

Get the number of points in the region.

◆ GetPoint()

const Point3d & WorkspaceRegion::GetPoint ( const size_t  _i) const
noexcept

Get the _i'th point of this region.

◆ GetPoints()

const std::vector< Point3d > WorkspaceRegion::GetPoints ( ) const
noexcept

Get a list of all points in this region.

◆ HasPoint()

const bool WorkspaceRegion::HasPoint ( const Point3d &  _p) const
noexcept

Check if a given point is part of this region's boundary.

◆ operator!=()

bool WorkspaceRegion::operator!= ( const WorkspaceRegion _region) const
noexcept

◆ operator=() [1/2]

WorkspaceRegion & WorkspaceRegion::operator= ( const WorkspaceRegion _other)

Copy.

◆ operator=() [2/2]

WorkspaceRegion & WorkspaceRegion::operator= ( WorkspaceRegion &&  )
default

Move.

◆ operator==()

bool WorkspaceRegion::operator== ( const WorkspaceRegion _region) const
noexcept

◆ SetDecomposition()

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.

Parameters
_wdThe new owning decomposition.

The documentation for this class was generated from the following files: