Parasol Planning Library (PPL)
WorkspaceBoundingSphere Class Reference

A 2 or 3 dimensional bounding sphere in workspace. More...

#include <WorkspaceBoundingSphere.h>

Inheritance diagram for WorkspaceBoundingSphere:
Inheritance graph
[legend]
Collaboration diagram for WorkspaceBoundingSphere:
Collaboration graph
[legend]

Public Member Functions

Construction
 WorkspaceBoundingSphere (const size_t _n, const double _radius=std::numeric_limits< double >::max())
 
 WorkspaceBoundingSphere (const std::vector< double > &_center, const double _radius=std::numeric_limits< double >::max())
 
 WorkspaceBoundingSphere (const Vector3d &_center, const double _radius=std::numeric_limits< double >::max())
 
 WorkspaceBoundingSphere (XMLNode &_node)
 
virtual ~WorkspaceBoundingSphere () noexcept
 
virtual std::unique_ptr< BoundaryClone () const override
 
Property Accessors
virtual Boundary::Space Type () const noexcept override
 Get the space type. More...
 
virtual std::string Name () const noexcept override
 Get the name of the boundary type. More...
 
Containment Testing
virtual bool InBoundary (const Cfg &_cfg) 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
 
Polyhedron Representations
virtual GMSPolyhedron MakePolyhedron () const override
 This will be an approximate sphere with 480 faces. More...
 
- Public Member Functions inherited from AbstractBoundingSphere
 AbstractBoundingSphere (const size_t _n, const double _radius=std::numeric_limits< double >::max())
 
 AbstractBoundingSphere (const std::vector< double > &_center, const double _radius=std::numeric_limits< double >::max())
 
 AbstractBoundingSphere (XMLNode &_node)
 
virtual ~AbstractBoundingSphere () noexcept
 
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...
 
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
 
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
 
virtual double GetClearance (const Vector3d &_p) const override
 
virtual Vector3d GetClearancePoint (const Vector3d &_p) const override
 
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
 
virtual void Read (std::istream &_is, CountingStreamBuffer &_cbs) override
 
virtual void Write (std::ostream &_os) const override
 
- Public Member Functions inherited from Boundary
virtual void ScalePoint (std::vector< double > &_point) const noexcept
 
virtual void UnscalePoint (std::vector< double > &_point) const noexcept
 
virtual bool InBoundary (const Vector3d &_p) const
 
virtual CGALPolyhedron CGAL () const
 Create a CGAL polyhedron representation of this. More...
 
virtual ~Boundary () noexcept
 
- Public Member Functions inherited from NSphere
 NSphere (const size_t _n, const double _r=std::numeric_limits< double >::max())
 
 NSphere (const std::vector< double > &_center, const double _r=std::numeric_limits< double >::max())
 
virtual ~NSphere () noexcept
 
size_t GetDimension () const noexcept
 Get the dimension of this sphere. More...
 
void SetCenter (const std::vector< double > &_c) noexcept
 
const std::vector< double > & GetCenter () const noexcept
 Get the center point. More...
 
double GetRadius () const noexcept
 Get the radius. More...
 
void SetRadius (const double _r) noexcept
 Set the radius. More...
 
void Translate (const std::vector< double > &_v) noexcept
 
double GetVolume () const noexcept
 Compute the (hyper)volume or Lebesgue measure. More...
 
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
 
std::vector< double > Sample () const
 

Additional Inherited Members

- Public Types inherited from Boundary
enum  Space { Workspace , CSpace }
 The types of space that can be modeled with boundaries. More...
 
typedef CGAL::Exact_predicates_exact_constructions_kernel CGALKernel
 
typedef CGAL::Polyhedron_3< CGALKernelCGALPolyhedron
 
- Static Public Member Functions inherited from Boundary
static std::unique_ptr< BoundaryFactory (XMLNode &_node)
 
- Protected Member Functions inherited from Boundary
bool InWorkspace (const Cfg &_c) const
 
bool InCSpace (const Cfg &_c) const
 

Detailed Description

A 2 or 3 dimensional bounding sphere in workspace.

Constructor & Destructor Documentation

◆ WorkspaceBoundingSphere() [1/4]

WorkspaceBoundingSphere::WorkspaceBoundingSphere ( const size_t  _n,
const double  _radius = std::numeric_limits<double>::max() 
)
explicit

◆ WorkspaceBoundingSphere() [2/4]

WorkspaceBoundingSphere::WorkspaceBoundingSphere ( const std::vector< double > &  _center,
const double  _radius = std::numeric_limits<double>::max() 
)
explicit

◆ WorkspaceBoundingSphere() [3/4]

WorkspaceBoundingSphere::WorkspaceBoundingSphere ( const Vector3d &  _center,
const double  _radius = std::numeric_limits<double>::max() 
)
explicit

◆ WorkspaceBoundingSphere() [4/4]

WorkspaceBoundingSphere::WorkspaceBoundingSphere ( XMLNode _node)

◆ ~WorkspaceBoundingSphere()

WorkspaceBoundingSphere::~WorkspaceBoundingSphere ( )
virtualdefaultnoexcept

Member Function Documentation

◆ Clone()

std::unique_ptr< Boundary > WorkspaceBoundingSphere::Clone ( ) const
overridevirtual

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.

Returns
A dynamically-allocated copy of this with the same type.

Implements Boundary.

◆ InBoundary() [1/4]

virtual bool Boundary::InBoundary

Test if a configuration lies within the boundary.

Parameters
_cfgThe configuration to test.
Returns
True if the configuration is considered to lie inside the boundary.

◆ InBoundary() [2/4]

bool WorkspaceBoundingSphere::InBoundary ( const Cfg _c) const
overridevirtual

Test if a configuration lies within the boundary.

Parameters
_cfgThe configuration to test.
Returns
True if the configuration is considered to lie inside the boundary.

Implements Boundary.

◆ InBoundary() [3/4]

virtual bool Boundary::InBoundary

Test if a specific n-dimensional point lies within the boundary.

Parameters
_vThe point to test.
Returns
True if _v lies inside this boundary.

◆ InBoundary() [4/4]

bool Boundary::InBoundary

Test if a specific point lies within the boundary.

Parameters
_pThe point to test.
Returns
True if _p lies inside this boundary.

◆ MakePolyhedron()

GMSPolyhedron WorkspaceBoundingSphere::MakePolyhedron ( ) const
overridevirtual

This will be an approximate sphere with 480 faces.

Reimplemented from Boundary.

◆ Name()

std::string WorkspaceBoundingSphere::Name ( ) const
overridevirtualnoexcept

Get the name of the boundary type.

Implements Boundary.

◆ Type()

Boundary::Space WorkspaceBoundingSphere::Type ( ) const
overridevirtualnoexcept

Get the space type.

Implements Boundary.


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