RobWorkProject
Public Types | Public Member Functions | List of all members
DistanceCalculator Class Reference

The DistanceCalculator implements an efficient way of calculating different distances between two objects, each represented by a frame. More...

#include <DistanceCalculator.hpp>

Public Types

typedef rw::common::Ptr< DistanceCalculatorPtr
 smart pointer type to this class
 
typedef rw::common::Ptr< const DistanceCalculatorCPtr
 smart pointer type to this const class
 

Public Member Functions

 DistanceCalculator (rw::kinematics::Frame *root, rw::common::Ptr< rw::models::WorkCell > workcell, DistanceStrategy::Ptr strategy, const rw::kinematics::State &initial_state)
 Distance calculations for a given tree, collision setup and primitive distance calculator. Uses proximity strategy given by the workcell. More...
 
 DistanceCalculator (rw::common::Ptr< rw::models::WorkCell > workcell, DistanceStrategy::Ptr strategy)
 Construct distance calculator for a WorkCell with an associated distance calculator strategy. More...
 
 DistanceCalculator (const kinematics::FramePairList &pairs, DistanceStrategy::Ptr strategy)
 Constructs distance calculator for a selected set of frames. More...
 
virtual ~DistanceCalculator ()
 Destructor.
 
DistanceStrategy::Result distance (const kinematics::State &state, std::vector< DistanceStrategy::Result > *result=0) const
 Calculates the distances between frames in the tree. More...
 
DistanceStrategy::Result distanceOMP (const kinematics::State &state, std::vector< DistanceStrategy::Result > *result=0) const
 
DistanceStrategy::Result distance (const kinematics::State &state, const kinematics::Frame *frame, std::vector< DistanceStrategy::Result > *result=0) const
 Calculates the distance between frame and the rest of the tree. More...
 
void setDistanceStrategy (DistanceStrategy::Ptr strategy)
 Set the primitive distance calculator to strategy. More...
 
bool addDistanceModel (const rw::kinematics::Frame *frame, const rw::geometry::Geometry &faces)
 Adds distance model to frame. More...
 
void clearCache ()
 Clears the cache of the distance models.
 
double getComputationTime ()
 
int getCount ()
 
void resetComputationTimeAndCount ()
 
void setDistanceThresholdStrategy (DistanceStrategy::Ptr strategy)
 

Detailed Description

The DistanceCalculator implements an efficient way of calculating different distances between two objects, each represented by a frame.

A list of frame pairs is contained within the distance calculater, that specifies which frames are to be checked against each other. The method of used for distance calculation relies on the DistanceStrategy chosen.

The DistanceCalculator supports switching between multiple strategies


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