PPL API Reference |
|
---|
Public Member Functions | |
Construction | |
AbstractBoundingSphericalShell (const size_t _n, const double _outer=std::numeric_limits< double >::max(), const double _inner=0) | |
AbstractBoundingSphericalShell (const std::vector< double > &_center, const double _outer=std::numeric_limits< double >::max(), const double _inner=0) | |
AbstractBoundingSphericalShell (XMLNode &_node) | |
virtual | ~AbstractBoundingSphericalShell () noexcept |
Boundary Properties | |
virtual size_t | GetDimension () const noexcept override |
Get the dimension of this boundary. More... | |
virtual double | GetMaxDist (const double _r1=2.0, const double _r2=0.5) const override |
virtual const Range< double > & | GetRange (const size_t _i) const override |
virtual const std::vector< double > & | GetCenter () const noexcept override |
Get the boundary's center point. More... | |
virtual double | GetVolume () const noexcept override |
Get the boundary's volume (Lebesgue Measure). More... | |
Sampling | |
virtual std::vector< double > | GetRandomPoint () const override |
Get a random point inside the boundary. More... | |
virtual void | PushInside (std::vector< double > &_sample) const noexcept override |
Containment Testing | |
virtual bool | InBoundary (const std::vector< double > &_p) const override |
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 override |
virtual Vector3d | GetClearancePoint (const Vector3d &_p) const override |
Modifiers | |
virtual void | SetCenter (const std::vector< double > &_c) noexcept override |
virtual void | Translate (const Vector3d &_v) override |
virtual void | Translate (const std::vector< double > &_t) override |
virtual void | ResetBoundary (const std::vector< std::pair< double, double > > &_bbx, const double _margin) override |
I/O | |
virtual void | Read (std::istream &_is, CountingStreamBuffer &_cbs) override |
virtual void | Write (std::ostream &_os) const override |
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... | |
Scaling | |
virtual void | ScalePoint (std::vector< double > &_point) const noexcept |
virtual void | UnscalePoint (std::vector< double > &_point) const noexcept |
Accessors | |
double | GetOuterRadius () const noexcept |
Get the outer radius. | |
double | GetInnerRadius () const noexcept |
Get the inner radius. | |
void | SetOuterRadius (const double _r) noexcept |
Set the outer radius. | |
void | SetInnerRadius (const double _r) noexcept |
Set the inner radius. | |
Point Testing | |
If the sphere and point have different dimensions, the missing values will be assumed to be 0. | |
bool | Contains (const std::vector< double > &_p) const noexcept |
double | Clearance (std::vector< double > _p) const noexcept |
std::vector< double > | ClearancePoint (std::vector< double > _p) const noexcept |
Sampling | |
std::vector< double > | Sample () const |
Public Types | |
Local Types | |
enum | Space { Workspace , CSpace } |
The types of space that can be modeled with boundaries. | |
Protected Member Functions | |
Containment Helpers | |
bool | InWorkspace (const Cfg &_c) const |
bool | InCSpace (const Cfg &_c) const |
Construction | |
virtual std::unique_ptr< Boundary > | Clone () const =0 |
static std::unique_ptr< Boundary > | Factory (XMLNode &_node) |
Polyhedron Representations | |
virtual CGALPolyhedron | CGAL () const |
Create a CGAL polyhedron representation of this. More... | |
virtual GMSPolyhedron | MakePolyhedron () const |
typedef CGAL::Exact_predicates_exact_constructions_kernel | CGALKernel |
typedef CGAL::Polyhedron_3< CGALKernel > | CGALPolyhedron |
An n-dimensional bounding spherical shell.
|
explicit |
Construct a bounding spherical shell at the origin with a fixed number of dimensions and radius.
_n | The number of dimensions to use. |
_outer | The outer radius (infinite by default). |
_inner | The inner radius (0 by default). |
|
explicit |
Construct a bounding spherical shell with a given center point and radius.
_center | The center point, which is assumed to be of full dimension. |
_outer | The outer radius (infinite by default). |
_inner | The inner radius (0 by default). |
AbstractBoundingSphericalShell::AbstractBoundingSphericalShell | ( | XMLNode & | _node | ) |
Construct a bounding spherical shell from an XML node.
_node | The XML node to parse. |
|
overridevirtualnoexcept |
Get the dimension of this boundary.
Implements Boundary.
|
overridevirtual |
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. |
Implements Boundary.
|
overridevirtual |
Get the boundary range for a specific dimension.
_i | The dimension index. |
Implements Boundary.
|
overridevirtualnoexcept |
Get the boundary's center point.
Implements Boundary.
|
overridevirtualnoexcept |
Get the boundary's volume (Lebesgue Measure).
Implements Boundary.
|
overridevirtual |
Get a random point inside the boundary.
Implements Boundary.
|
overridevirtualnoexcept |
Minimally push a point so that it lies within the boundary.
_point | The point to push. |
Implements Boundary.
|
overridevirtual |
Test if a specific n-dimensional point lies within the boundary.
_v | The point to test. |
Implements Boundary.
Reimplemented in WorkspaceBoundingSphericalShell.
|
overridevirtual |
Get the distance from a test point to the nearest point on the boundary.
_p | The test point. |
Implements Boundary.
|
overridevirtual |
Get the nearest point on the boundary to a test point.
_p | The test point. |
Implements Boundary.
|
overridevirtualnoexcept |
Move the boundary to a new center point.
_c | The new center point for the boundary. |
Implements Boundary.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
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. |
Implements Boundary.
|
overridevirtual |
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. |
Implements Boundary.
|
overridevirtual |
|
virtual |
Test if a specific point lies within the boundary.
_p | The point to test. |
Reimplemented from Boundary.
Reimplemented in WorkspaceBoundingSphericalShell.
|
virtual |
Test if a specific n-dimensional point lies within the boundary.
_v | The point to test. |
Implements Boundary.
Reimplemented in WorkspaceBoundingSphericalShell.
|
virtual |
Test if a configuration lies within the boundary.
_cfg | The configuration to test. |
Implements Boundary.
Reimplemented in WorkspaceBoundingSphericalShell.
Construct a boundary as described by an XML node.
_node | The XML node. |
|
pure virtualinherited |
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 CSpaceBoundingBox, CSpaceBoundingSphere, TetrahedralBoundary, WorkspaceBoundingBox, WorkspaceBoundingSphere, and WorkspaceBoundingSphericalShell.
|
pure virtualnoexceptinherited |
Get the space type.
Implemented in CSpaceBoundingBox, CSpaceBoundingSphere, TetrahedralBoundary, WorkspaceBoundingBox, WorkspaceBoundingSphere, and WorkspaceBoundingSphericalShell.
|
pure virtualnoexceptinherited |
Get the name of the boundary type.
Implemented in CSpaceBoundingBox, CSpaceBoundingSphere, TetrahedralBoundary, WorkspaceBoundingBox, WorkspaceBoundingSphere, and WorkspaceBoundingSphericalShell.
|
virtualnoexceptinherited |
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. |
|
virtualnoexceptinherited |
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. |
|
virtualinherited |
Create a CGAL polyhedron representation of this.
Reimplemented in TetrahedralBoundary, and WorkspaceBoundingBox.
|
virtualinherited |
Create a GMSPolyhedron representation of this. The polyhedron will be inside-out (normals facing inward) to properly represent the contact normals.
Reimplemented in TetrahedralBoundary, WorkspaceBoundingBox, WorkspaceBoundingSphere, and WorkspaceBoundingSphericalShell.
|
protectedinherited |
Check that a configuration lies entirely within a workspace boundary.
_c | The configuration of interest. |
|
protectedinherited |
Check that a configuration's DOF values lie entirely within a CSpace boundary.
_c | The configuration of interest. |
|
noexceptinherited |
Test if a given point lies within the n-spherical shell.
_p | The point to test. |
|
noexceptinherited |
Compute the minimum distance to the sphere's surface from a given point. This is bounding-sphere style, so clearance is positive if the point is inside the sphere and negative if it is outside.
_p | The point of interest. |
|
noexceptinherited |
Find the point on the sphere that is nearest to a given reference point.
_p | The reference point. |
|
inherited |
Sample a random point in the n-spherical shell with uniform probability via the Muller/Marsaglia method.