![]() |
RobWorkProject
21.8.23-
|
This is an interface that defines methods for computing the minimum distance between geometric objects. If geometry objects has been related to frames (see ProximityStrategy) then distance functions computing the distance between the geometry attached to frames can also be used. More...
#include <DistanceStrategy.hpp>
Inherits ProximityStrategy.
Inherited by ProximityStrategyBullet, ProximityStrategyFCL, and ProximityStrategyPQP.
Classes | |
class | Factory |
A factory for a DistanceStrategy. This factory also defines an ExtensionPoint. More... | |
struct | Result |
DistanceResult contains basic information about the distance result between two sets of geometries. These geometry sets. More... | |
Public Types | |
typedef rw::core::Ptr< DistanceStrategy > | Ptr |
smart pointer type to this class | |
![]() | |
typedef rw::core::Ptr< ProximityStrategy > | Ptr |
smart pointer type to this class | |
Public Member Functions | |
virtual | ~DistanceStrategy () |
Destroys object. | |
Result | distance (const kinematics::Frame *a, const math::Transform3D< double > &wTa, const kinematics::Frame *b, const math::Transform3D< double > &wTb) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \). More... | |
Result & | distance (const kinematics::Frame *a, const math::Transform3D< double > &wTa, const kinematics::Frame *b, const math::Transform3D< double > &wTb, class ProximityStrategyData &data) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \). More... | |
Result & | distance (ProximityModel::Ptr a, const math::Transform3D< double > &wTa, ProximityModel::Ptr b, const math::Transform3D< double > &wTb, class ProximityStrategyData &data) |
Calculates the distance between two proximity models \( \mathcal{a} \) and \( \mathcal{b} \). More... | |
Result | distance (const kinematics::Frame *a, const math::Transform3D< double > &wTa, const kinematics::Frame *b, const math::Transform3D< double > &wTb, double threshold) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. More... | |
DistanceStrategy::Result & | distance (const kinematics::Frame *a, const math::Transform3D< double > &wTa, const kinematics::Frame *b, const math::Transform3D< double > &wTb, double threshold, ProximityStrategyData &data) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. More... | |
DistanceStrategy::Result & | distance (ProximityModel::Ptr a, const math::Transform3D< double > &wTa, ProximityModel::Ptr b, const math::Transform3D< double > &wTb, double threshold, ProximityStrategyData &data) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. More... | |
![]() | |
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::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::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::kinematics::Frame *frame) |
Tells whether the frame has a proximity model in the strategy. More... | |
virtual void | clearFrame (const 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::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 > > | getGeometrys (rw::proximity::ProximityModel *model) |
the list of all geometry that are associated to the proximity model model is returned More... | |
virtual void | clear ()=0 |
Clears any stored model information. | |
Protected Member Functions | |
virtual Result & | doDistance (ProximityModel::Ptr a, const math::Transform3D< double > &wTa, ProximityModel::Ptr b, const math::Transform3D< double > &wTb, class ProximityStrategyData &data)=0 |
Calculates the distance between two proximity models \( \mathcal{a} \) and \( \mathcal{b} \). More... | |
virtual DistanceStrategy::Result & | doDistanceThreshold (ProximityModel::Ptr a, const math::Transform3D< double > &wTa, ProximityModel::Ptr b, const math::Transform3D< double > &wTb, double threshold, ProximityStrategyData &data) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate. More... | |
DistanceStrategy () | |
Creates object. | |
![]() | |
ProximityStrategy () | |
Creates object. | |
This is an interface that defines methods for computing the minimum distance between geometric objects. If geometry objects has been related to frames (see ProximityStrategy) then distance functions computing the distance between the geometry attached to frames can also be used.
Result distance | ( | const kinematics::Frame * | a, |
const math::Transform3D< double > & | wTa, | ||
const kinematics::Frame * | b, | ||
const math::Transform3D< double > & | wTb | ||
) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \).
a | [in] \( \mathcal{F}_a \) |
wTa | [in] \( \robabx{w}{a}{\mathbf{T}} \) |
b | [in] \( \mathcal{F}_b \) |
wTb | [in] \( \robabx{w}{b}{\mathbf{T}} \) |
Result& distance | ( | const kinematics::Frame * | a, |
const math::Transform3D< double > & | wTa, | ||
const kinematics::Frame * | b, | ||
const math::Transform3D< double > & | wTb, | ||
class ProximityStrategyData & | data | ||
) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \).
a | [in] \( \mathcal{F}_a \) |
wTa | [in] \( \robabx{w}{a}{\mathbf{T}} \) |
b | [in] \( \mathcal{F}_b \) |
wTb | [in] \( \robabx{w}{b}{\mathbf{T}} \) |
data |
Result distance | ( | const kinematics::Frame * | a, |
const math::Transform3D< double > & | wTa, | ||
const kinematics::Frame * | b, | ||
const math::Transform3D< double > & | wTb, | ||
double | threshold | ||
) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate.
a | [in] \( \mathcal{F}_a \) |
wTa | [in] \( \robabx{w}{a}{\mathbf{T}} \) |
b | [in] \( \mathcal{F}_b \) |
wTb | [in] \( \robabx{w}{b}{\mathbf{T}} \) |
threshold | [in] threshold for distance calculations |
DistanceStrategy::Result& distance | ( | const kinematics::Frame * | a, |
const math::Transform3D< double > & | wTa, | ||
const kinematics::Frame * | b, | ||
const math::Transform3D< double > & | wTb, | ||
double | threshold, | ||
ProximityStrategyData & | data | ||
) |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate.
a | [in] \( \mathcal{F}_a \) |
wTa | [in] \( \robabx{w}{a}{\mathbf{T}} \) |
b | [in] \( \mathcal{F}_b \) |
wTb | [in] \( \robabx{w}{b}{\mathbf{T}} \) |
threshold | [in] threshold for distance calculations |
data |
|
inline |
Calculates the distance between two proximity models \( \mathcal{a} \) and \( \mathcal{b} \).
a | [in] \( \mathcal{F}_a \) |
wTa | [in] \( \robabx{w}{a}{\mathbf{T}} \) |
b | [in] \( \mathcal{F}_b \) |
wTb | [in] \( \robabx{w}{b}{\mathbf{T}} \) |
data |
|
inline |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate.
a | [in] \( \mathcal{F}_a \) |
wTa | [in] \( \robabx{w}{a}{\mathbf{T}} \) |
b | [in] \( \mathcal{F}_b \) |
wTb | [in] \( \robabx{w}{b}{\mathbf{T}} \) |
threshold | [in] threshold for distance calculations |
data |
|
protectedpure virtual |
Calculates the distance between two proximity models \( \mathcal{a} \) and \( \mathcal{b} \).
a | [in] \( \mathcal{F}_a \) |
wTa | [in] \( \robabx{w}{a}{\mathbf{T}} \) |
b | [in] \( \mathcal{F}_b \) |
wTb | [in] \( \robabx{w}{b}{\mathbf{T}} \) |
data |
|
inlineprotectedvirtual |
Calculates the distance between two given frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) if the distance are within threshold. If the distance between the frames are larger than the threshold, the result will be inaccurate.
a | [in] \( \mathcal{F}_a \) |
wTa | [in] \( \robabx{w}{a}{\mathbf{T}} \) |
b | [in] \( \mathcal{F}_b \) |
wTb | [in] \( \robabx{w}{b}{\mathbf{T}} \) |
threshold | [in] threshold for distance calculations |
data |