RobWorkProject  24.5.15-
Public Types | Public Member Functions | List of all members
ProximityFilterStrategy Class Referenceabstract

describe the interface of a broad phase proximity strategy or proximity culler. More...

#include <ProximityFilterStrategy.hpp>

Inherited by BasicFilterStrategy, and SAPFilterStrategy.

Public Types

typedef rw::core::Ptr< ProximityFilterStrategyPtr
 smart pointer type to this class
 
typedef rw::core::Ptr< const ProximityFilterStrategyCPtr
 smart pointer type to this const class
 

Public Member Functions

virtual ~ProximityFilterStrategy ()
 Destructor.
 
virtual void reset (const rw::kinematics::State &state)=0
 Reset. More...
 
virtual rw::core::Ptr< rw::proximity::ProximityCachecreateProximityCache ()=0
 creates a FilterData object. This is used for caching relavant data between calls to update More...
 
virtual rw::core::Ptr< rw::proximity::ProximityFilterupdate (const rw::kinematics::State &state)=0
 Do an update. More...
 
virtual rw::core::Ptr< rw::proximity::ProximityFilterupdate (const rw::kinematics::State &state, rw::core::Ptr< rw::proximity::ProximityCache > data)=0
 called once before acquirering all possibly colliding frame pairs in the workcell More...
 
virtual rw::proximity::ProximitySetupgetProximitySetup ()=0
 get the proximity setup that describe the include/exclude rules of this BroadPhaseStrategy More...
 
virtual void addGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::core::Ptr< rw::geometry::Geometry > geo)=0
 Adds geometry associated to frame. More...
 
virtual void removeGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::core::Ptr< rw::geometry::Geometry > geo)=0
 Removes the geometric model geo associated with Frame frame from this strategy. More...
 
virtual void removeGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const std::string &geoName)=0
 Removes the geometric model with name geoName and which is associated with frame. More...
 
virtual void addRule (const rw::proximity::ProximitySetupRule &rule)=0
 Adds a ProximitySetupRule. More...
 
virtual void removeRule (const rw::proximity::ProximitySetupRule &rule)=0
 Removes a ProximitySetupRule If the rule cannot be found, then noting happens. More...
 

Detailed Description

describe the interface of a broad phase proximity strategy or proximity culler.

A broadphase strategy implement heuristics or rules for finding frame pairs that are possibly overlapping and excluding framepairs that are definitely not overlapping.

The interface supports early exiting by returning frame-pairs in an iterative manor. This enables efficient collision filtering at the cost of ease of use. Before acquiring sets of framepairs the update function need be called. Thereafter multiple calls to next will return possibly colliding frame pairs.

Filter f = bpstrategy->update(state)
while(f->hasNext()){
FramePair fpair = f->next();
// do collision with narrowphase strategy
...
}
std::pair< rw::kinematics::Frame *, rw::kinematics::Frame * > FramePair
A pair of frames.
Definition: Frame.hpp:397

Member Function Documentation

◆ addGeometry()

virtual void addGeometry ( rw::core::Ptr< rw::kinematics::Frame frame,
const rw::core::Ptr< rw::geometry::Geometry geo 
)
pure virtual

Adds geometry associated to frame.

Parameters
frame[in] Frame which has the geometry associated
geo[in] Geometry

Implemented in BasicFilterStrategy.

◆ addRule()

virtual void addRule ( const rw::proximity::ProximitySetupRule rule)
pure virtual

Adds a ProximitySetupRule.

Parameters
rule[in] the rule to add.

Implemented in BasicFilterStrategy, and SAPFilterStrategy.

◆ createProximityCache()

virtual rw::core::Ptr<rw::proximity::ProximityCache> createProximityCache ( )
pure virtual

creates a FilterData object. This is used for caching relavant data between calls to update

Returns

Implemented in SAPFilterStrategy, and BasicFilterStrategy.

◆ getProximitySetup()

virtual rw::proximity::ProximitySetup& getProximitySetup ( )
pure virtual

get the proximity setup that describe the include/exclude rules of this BroadPhaseStrategy

Returns
a reference to the ProximitySetup

Implemented in SAPFilterStrategy, and BasicFilterStrategy.

◆ removeGeometry() [1/2]

virtual void removeGeometry ( rw::core::Ptr< rw::kinematics::Frame frame,
const rw::core::Ptr< rw::geometry::Geometry geo 
)
pure virtual

Removes the geometric model geo associated with Frame frame from this strategy.

Parameters
frame[in] Frame which has the geometry associated
geo[in] Geometry

Implemented in BasicFilterStrategy.

◆ removeGeometry() [2/2]

virtual void removeGeometry ( rw::core::Ptr< rw::kinematics::Frame frame,
const std::string &  geoName 
)
pure virtual

Removes the geometric model with name geoName and which is associated with frame.

Parameters
frame[in] Frame which has the geometry associated
geoName[in] Name of geometry

Implemented in SAPFilterStrategy, and BasicFilterStrategy.

◆ removeRule()

virtual void removeRule ( const rw::proximity::ProximitySetupRule rule)
pure virtual

Removes a ProximitySetupRule If the rule cannot be found, then noting happens.

Parameters
rule[in] the rule to remove.

Implemented in BasicFilterStrategy, and SAPFilterStrategy.

◆ reset()

virtual void reset ( const rw::kinematics::State state)
pure virtual

Reset.

Parameters
state[in] the state.

Implemented in SAPFilterStrategy, and BasicFilterStrategy.

◆ update() [1/2]

virtual rw::core::Ptr<rw::proximity::ProximityFilter> update ( const rw::kinematics::State state)
pure virtual

Do an update.

Parameters
state[in] the state.
Returns

Implemented in SAPFilterStrategy, and BasicFilterStrategy.

◆ update() [2/2]

called once before acquirering all possibly colliding frame pairs in the workcell

Parameters
state[in] the state for which collision detection is performed.
data

Implemented in SAPFilterStrategy, and BasicFilterStrategy.


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