Parasol Planning Library (PPL)
|
#include <Boundary.h>
Public Types | |
Local Types | |
enum | Space { Workspace , CSpace } |
The types of space that can be modeled with boundaries. More... | |
Public Member Functions | |
Property Accessors | |
virtual Space | Type () const noexcept=0 |
Get the space type. More... | |
virtual std::string | Name () const noexcept=0 |
Get the name of the boundary type. More... | |
virtual size_t | GetDimension () const noexcept=0 |
Get the dimension of this boundary. More... | |
virtual double | GetMaxDist (const double _r1=2., const double _r2=.5) const =0 |
virtual const Range< double > & | GetRange (const size_t _i) const =0 |
virtual const std::vector< double > & | GetCenter () const noexcept=0 |
Get the boundary's center point. More... | |
virtual double | GetVolume () const noexcept=0 |
Get the boundary's volume (Lebesgue Measure). More... | |
Sampling | |
virtual std::vector< double > | GetRandomPoint () const =0 |
Get a random point inside the boundary. More... | |
virtual void | PushInside (std::vector< double > &_point) const noexcept=0 |
Scaling | |
virtual void | ScalePoint (std::vector< double > &_point) const noexcept |
virtual void | UnscalePoint (std::vector< double > &_point) const noexcept |
Containment Testing | |
virtual bool | InBoundary (const Vector3d &_p) const |
virtual bool | InBoundary (const std::vector< double > &_v) const =0 |
virtual bool | InBoundary (const Cfg &_c) const =0 |
Clearance Testing | |
virtual double | GetClearance (const Vector3d &_p) const =0 |
virtual Vector3d | GetClearancePoint (const Vector3d &_p) const =0 |
Modifiers | |
virtual void | SetCenter (const std::vector< double > &_c) noexcept=0 |
virtual void | Translate (const Vector3d &_v)=0 |
virtual void | Translate (const std::vector< double > &_t)=0 |
virtual void | ResetBoundary (const std::vector< std::pair< double, double >> &_bbx, const double _margin)=0 |
I/O | |
virtual void | Read (std::istream &_is, CountingStreamBuffer &_cbs)=0 |
virtual void | Write (std::ostream &_os) const =0 |
Protected Member Functions | |
Containment Helpers | |
bool | InWorkspace (const Cfg &_c) const |
bool | InCSpace (const Cfg &_c) const |
Polyhedron Representations | |
typedef CGAL::Exact_predicates_exact_constructions_kernel | CGALKernel |
typedef CGAL::Polyhedron_3< CGALKernel > | CGALPolyhedron |
virtual CGALPolyhedron | CGAL () const |
Create a CGAL polyhedron representation of this. More... | |
virtual GMSPolyhedron | MakePolyhedron () const |
Construction | |
virtual | ~Boundary () noexcept |
virtual std::unique_ptr< Boundary > | Clone () const =0 |
static std::unique_ptr< Boundary > | Factory (XMLNode &_node) |
An abstract interface for a bounding volume in workspace or c-space.
typedef CGAL::Exact_predicates_exact_constructions_kernel Boundary::CGALKernel |
typedef CGAL::Polyhedron_3<CGALKernel> Boundary::CGALPolyhedron |
enum Boundary::Space |
|
virtualdefaultnoexcept |
|
virtual |
Create a CGAL polyhedron representation of this.
Reimplemented in WorkspaceBoundingBox, and TetrahedralBoundary.
|
pure virtual |
Duplicate this boundary and return a dynamically-allocated copy with the same type. This is provided in the base class so that we can copy a boundary object without knowing its type.
Implemented in WorkspaceBoundingSphericalShell, WorkspaceBoundingSphere, WorkspaceBoundingBox, TetrahedralBoundary, CSpaceBoundingSphere, and CSpaceBoundingBox.
Construct a boundary as described by an XML node.
_node | The XML node. |
|
pure virtualnoexcept |
Get the boundary's center point.
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Get the distance from a test point to the nearest point on the boundary.
_p | The test point. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Get the nearest point on the boundary to a test point.
_p | The test point. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtualnoexcept |
Get the dimension of this boundary.
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Get the longest distance contained within the boundary. Supports any Minkowski distance.
_r1 | The term-wise power in the Minkowski difference. |
_r2 | The whole expression power in the Minkowski difference. |
Implemented in AbstractBoundingSphericalShell, AbstractBoundingSphere, TetrahedralBoundary, and AbstractBoundingBox.
|
pure virtual |
Get a random point inside the boundary.
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Get the boundary range for a specific dimension.
_i | The dimension index. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtualnoexcept |
Get the boundary's volume (Lebesgue Measure).
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Test if a configuration lies within the boundary.
_cfg | The configuration to test. |
Implemented in WorkspaceBoundingSphericalShell, WorkspaceBoundingSphere, CSpaceBoundingSphere, WorkspaceBoundingBox, TetrahedralBoundary, and CSpaceBoundingBox.
|
pure virtual |
Test if a specific n-dimensional point lies within the boundary.
_v | The point to test. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
virtual |
Test if a specific point lies within the boundary.
_p | The point to test. |
Reimplemented in TetrahedralBoundary.
|
protected |
Check that a configuration's DOF values lie entirely within a CSpace boundary.
_c | The configuration of interest. |
|
protected |
Check that a configuration lies entirely within a workspace boundary.
_c | The configuration of interest. |
|
virtual |
Create a GMSPolyhedron representation of this. The polyhedron will be inside-out (normals facing inward) to properly represent the contact normals.
Reimplemented in WorkspaceBoundingSphericalShell, WorkspaceBoundingSphere, WorkspaceBoundingBox, and TetrahedralBoundary.
|
pure virtualnoexcept |
Get the name of the boundary type.
Implemented in WorkspaceBoundingSphericalShell, WorkspaceBoundingSphere, WorkspaceBoundingBox, TetrahedralBoundary, CSpaceBoundingSphere, and CSpaceBoundingBox.
|
pure virtualnoexcept |
Minimally push a point so that it lies within the boundary.
_point | The point to push. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Read in a boundary.
_is | The input stream to read from. |
_cbs | The counting stream buffer for keeping track of where we are in the input stream. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Resize the boundary to fit inside a bounding box plus some margin.
_bbx | The new base bounding box. |
_margin | The additional margin for _bbx. Negative margins cause shrinkage. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
virtualnoexcept |
Scale a point relative to the maximum range of the boundary. Up to GetDimension() elements will be scaled so that this boundary's maximum range maps to [-1, 1]. Additional elements in the point will not be scaled.
_point | The point to unscale. |
|
pure virtualnoexcept |
Move the boundary to a new center point.
_c | The new center point for the boundary. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Translate the boundary.
_t | The offset to apply. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtual |
Translate the boundary.
_v | The offset to apply. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.
|
pure virtualnoexcept |
Get the space type.
Implemented in WorkspaceBoundingSphericalShell, WorkspaceBoundingSphere, WorkspaceBoundingBox, TetrahedralBoundary, CSpaceBoundingSphere, and CSpaceBoundingBox.
|
virtualnoexcept |
Unscale a point relative to the maximum range of the boundary. Up to GetDimension() elements will be scaled so that [-1, 1] maps to this boundary's maximum range. Additional elements in the point will not be scaled.
_point | The point to unscale. |
|
pure virtual |
Write out a boundary.
_os | The output stream to write to. |
Implemented in TetrahedralBoundary, AbstractBoundingSphericalShell, AbstractBoundingSphere, and AbstractBoundingBox.