RobWorkProject  24.5.15-
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
DistanceMultiStrategy Class Referenceabstract

This interface allows the definition of computing all points between two geometric objects that are closer than a specified tolerance. See ProxmityStrategy on how to add geometry to the strategy. More...

#include <DistanceMultiStrategy.hpp>

Inherits ProximityStrategy.

Inherited by ProximityStrategyBullet, ProximityStrategyFCL, and ProximityStrategyPQP.

Classes

class  Factory
 A factory for a DistanceMultiStrategy. This factory also defines an ExtensionPoint. More...
 
struct  Result
 DistanceResult contains basic information about the distance result between two frames. More...
 

Public Types

typedef rw::core::Ptr< DistanceMultiStrategyPtr
 smart pointer type to this class
 
- Public Types inherited from ProximityStrategy
typedef rw::core::Ptr< ProximityStrategyPtr
 smart pointer type to this class
 

Public Member Functions

virtual ~DistanceMultiStrategy ()
 Destroys object.
 
Result distances (const rw::core::Ptr< kinematics::Frame > a, const math::Transform3D< double > &wTa, const rw::core::Ptr< kinematics::Frame > b, const math::Transform3D< double > &wTb, double tolerance)
 Calculates all distances between geometry of two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \). More...
 
Resultdistances (const rw::core::Ptr< kinematics::Frame > a, const math::Transform3D< double > &wTa, const rw::core::Ptr< kinematics::Frame > b, const math::Transform3D< double > &wTb, double tolerance, class ProximityStrategyData &data)
 Calculates all distances between geometry of two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \). More...
 
Resultdistances (ProximityModel::Ptr a, const math::Transform3D< double > &wTa, ProximityModel::Ptr b, const math::Transform3D< double > &wTb, double tolerance, class ProximityStrategyData &data)
 Calculates all distances between two given objects \( \mathcal{F}_a \) and \( \mathcal{F}_b \) where the distances are below a certain threshold. More...
 
virtual std::pair< rw::math::Vector3D< double >, rw::math::Vector3D< double > > getSurfaceNormals (rw::proximity::DistanceMultiStrategy::Result &res, int idx)=0
 Get the Surface Normals. More...
 
- Public Member Functions inherited from ProximityStrategy
virtual ~ProximityStrategy ()
 Destructor.
 
virtual bool addModel (rw::core::Ptr< rw::models::Object > object)
 Adds a Proximity model of a frame to this strategy. More...
 
virtual bool addModel (const rw::core::Ptr< rw::kinematics::Frame > frame, const rw::geometry::Geometry &faces)
 Adds a Proximity model to a frame where the geometry is copied in the underlying proximity strategy. More...
 
virtual bool addModel (const rw::core::Ptr< rw::kinematics::Frame > frame, rw::core::Ptr< rw::geometry::Geometry > faces, bool forceCopy=false)
 Adds a Proximity model to a frame. More...
 
virtual bool hasModel (const rw::core::Ptr< rw::kinematics::Frame > frame)
 Tells whether the frame has a proximity model in the strategy. More...
 
virtual void clearFrame (const rw::core::Ptr< rw::kinematics::Frame > frame)
 Clear (remove all) model information for frame frame.
 
virtual void clearFrames ()
 Clear (remove all) model information for all frames.
 
ProximityModel::Ptr getModel (const rw::core::Ptr< rw::kinematics::Frame > frame)
 get the proximitymodel associated to frame. If no model has been associated to frame then NULL is returned. More...
 
virtual ProximityModel::Ptr createModel ()=0
 creates an empty ProximityModel
 
virtual void destroyModel (ProximityModel *model)=0
 deallocates the memory used for model More...
 
virtual bool addGeometry (ProximityModel *model, const rw::geometry::Geometry &geom)=0
 adds geometry to a specific proximity model. The proximity strategy copies all data of the geometry. More...
 
virtual bool addGeometry (ProximityModel *model, rw::core::Ptr< rw::geometry::Geometry > geom, bool forceCopy=false)=0
 adds geometry to a specific model. Depending on the option forceCopy the proximity strategy may choose to copy the geometry data or use it directly. More...
 
virtual bool removeGeometry (ProximityModel *model, const std::string &geomId)=0
 removes a geometry from a specific proximity model
 
virtual std::vector< std::string > getGeometryIDs (ProximityModel *model)=0
 the list of all geometry ids that are associated to the proximity model model is returned More...
 
virtual std::vector< rw::core::Ptr< rw::geometry::Geometry > > getGeometries (rw::proximity::ProximityModel *model)=0
 the list of all geometry that are associated to the proximity model model is returned More...
 
 DEPRECATED ("This function is deprecated due to a spelling mistake, use the correct " "spelling \"getGeometries\" instead") std
 
virtual void clear ()=0
 Clears any stored model information.
 
void useThreads (int threads)
 setNumber of threads the strategy may use More...
 

Protected Member Functions

virtual ResultdoDistances (ProximityModel::Ptr a, const math::Transform3D< double > &wTa, ProximityModel::Ptr b, const math::Transform3D< double > &wTb, double tolerance, class ProximityStrategyData &data)=0
 Calculates all distances between two given objects \( \mathcal{F}_a \) and \( \mathcal{F}_b \) where the distances are below a certain threshold. More...
 
 DistanceMultiStrategy ()
 Creates object.
 
- Protected Member Functions inherited from ProximityStrategy
 ProximityStrategy ()
 Creates object.
 

Additional Inherited Members

- Protected Attributes inherited from ProximityStrategy
size_t _threads
 the number of threads the strategy may use
 

Detailed Description

This interface allows the definition of computing all points between two geometric objects that are closer than a specified tolerance. See ProxmityStrategy on how to add geometry to the strategy.

Member Function Documentation

◆ distances() [1/3]

Result distances ( const rw::core::Ptr< kinematics::Frame a,
const math::Transform3D< double > &  wTa,
const rw::core::Ptr< kinematics::Frame b,
const math::Transform3D< double > &  wTb,
double  tolerance 
)

Calculates all distances between geometry of two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \).

Parameters
a[in] \( \mathcal{F}_a \)
wTa[in] \( \robabx{w}{a}{\mathbf{T}} \)
b[in] \( \mathcal{F}_b \)
wTb[in] \( \robabx{w}{b}{\mathbf{T}} \)
tolerance[in] point pairs that are closer than tolerance will be included in the result.
Returns
shortest distance if \( \mathcal{F}_a \) and \( \mathcal{F}_b \) are separated and not in collision.

◆ distances() [2/3]

Result& distances ( const rw::core::Ptr< kinematics::Frame a,
const math::Transform3D< double > &  wTa,
const rw::core::Ptr< kinematics::Frame b,
const math::Transform3D< double > &  wTb,
double  tolerance,
class ProximityStrategyData data 
)

Calculates all distances between geometry of two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \).

Parameters
a[in] \( \mathcal{F}_a \)
wTa[in] \( \robabx{w}{a}{\mathbf{T}} \)
b[in] \( \mathcal{F}_b \)
wTb[in] \( \robabx{w}{b}{\mathbf{T}} \)
tolerance[in] point pairs that are closer than tolerance will be included in the result.
data
Returns
shortest distance if \( \mathcal{F}_a \) and \( \mathcal{F}_b \) are separated and not in collision.

◆ distances() [3/3]

Result& distances ( ProximityModel::Ptr  a,
const math::Transform3D< double > &  wTa,
ProximityModel::Ptr  b,
const math::Transform3D< double > &  wTb,
double  tolerance,
class ProximityStrategyData data 
)
inline

Calculates all distances between two given objects \( \mathcal{F}_a \) and \( \mathcal{F}_b \) where the distances are below a certain threshold.

Parameters
a[in] \( \mathcal{F}_a \)
wTa[in] \( \robabx{w}{a}{\mathbf{T}} \)
b[in] \( \mathcal{F}_b \)
wTb[in] \( \robabx{w}{b}{\mathbf{T}} \)
tolerance[in] point pairs that are closer than tolerance will be included in the result.
data
Returns
list of distances between all points that are closer than threshold.

◆ doDistances()

virtual Result& doDistances ( ProximityModel::Ptr  a,
const math::Transform3D< double > &  wTa,
ProximityModel::Ptr  b,
const math::Transform3D< double > &  wTb,
double  tolerance,
class ProximityStrategyData data 
)
protectedpure virtual

Calculates all distances between two given objects \( \mathcal{F}_a \) and \( \mathcal{F}_b \) where the distances are below a certain threshold.

Parameters
a[in] \( \mathcal{F}_a \)
wTa[in] \( \robabx{w}{a}{\mathbf{T}} \)
b[in] \( \mathcal{F}_b \)
wTb[in] \( \robabx{w}{b}{\mathbf{T}} \)
tolerance[in] point pairs that are closer than tolerance will be included in the result.
data
Returns
list of distances between all points that are closer than threshold.

◆ getSurfaceNormals()

virtual std::pair<rw::math::Vector3D<double>, rw::math::Vector3D<double> > getSurfaceNormals ( rw::proximity::DistanceMultiStrategy::Result res,
int  idx 
)
pure virtual

Get the Surface Normals.

Parameters
resthe result to get the normals from
idx
Returns
a pair of surface Normals

Implemented in ProximityStrategyPQP, and ProximityStrategyFCL.


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