Package org.robwork.sdurw_proximity
Class BasicFilterStrategy
- java.lang.Object
-
- org.robwork.sdurw_proximity.ProximityFilterStrategy
-
- org.robwork.sdurw_proximity.BasicFilterStrategy
-
public class BasicFilterStrategy extends ProximityFilterStrategy
a simple rule based broadphase filter strategy. A static frame pair list of
frame pairs that is to be checked for collision is maintained. The list is static in
the sense that it is not optimized to be changed. However the user can both add and remove
new geometries and rules.
Note: The framepair list is explicitly kept in this class which makes this broadphase
strategy infeasible for workcells with many objects. Consider a workcell with 100 objects,
this will in worst case make a list of 10000 framepairs.
-
-
Constructor Summary
Constructors Constructor Description BasicFilterStrategy(long cPtr, boolean cMemoryOwn)
BasicFilterStrategy(WorkCellPtr workcell)
constructor - the ProximitySetup will be extracted from
the workcell description if possible.
BasicFilterStrategy(WorkCellPtr workcell, ProximitySetup setup)
constructor - constructs frame pairs based on the setup
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGeometry(FramePtr frame, GeometryPtr arg1)
Adds geometry associated to framevoid
addRule(ProximitySetupRule rule)
Adds a ProximitySetupRuleProximityCachePtr
createProximityCache()
creates a FilterData object.void
delete()
static long
getCPtr(BasicFilterStrategy obj)
ProximitySetup
getProximitySetup()
get the proximity setup that describe the include/exclude rules of this
BroadPhaseStrategyvoid
removeGeometry(FramePtr frame, java.lang.String geometryId)
Removes the geometric model geo associated with
Frame frame from this strategy.
void
removeGeometry(FramePtr frame, GeometryPtr arg1)
Removes the geometric model geo associated with
Frame frame from this strategy.
void
removeRule(ProximitySetupRule rule)
Removes a ProximitySetupRule
If the rule cannot be found, then noting happens.void
reset(State state)
ResetProximityFilterPtr
update(State state)
Do an updateProximityFilterPtr
update(State state, ProximityCachePtr data)
called once before acquirering all possibly colliding
frame pairs in the workcell-
Methods inherited from class org.robwork.sdurw_proximity.ProximityFilterStrategy
getCPtr
-
-
-
-
Constructor Detail
-
BasicFilterStrategy
public BasicFilterStrategy(long cPtr, boolean cMemoryOwn)
-
BasicFilterStrategy
public BasicFilterStrategy(WorkCellPtr workcell)
constructor - the ProximitySetup will be extracted from
the workcell description if possible.
- Parameters:
workcell
- [in] the workcell.
-
BasicFilterStrategy
public BasicFilterStrategy(WorkCellPtr workcell, ProximitySetup setup)
constructor - constructs frame pairs based on the setup- Parameters:
workcell
- [in] the workcellsetup
- [in] the ProximitySetup describing exclude/include relations
-
-
Method Detail
-
getCPtr
public static long getCPtr(BasicFilterStrategy obj)
-
delete
public void delete()
- Overrides:
delete
in classProximityFilterStrategy
-
reset
public void reset(State state)
Description copied from class:ProximityFilterStrategy
Reset- Overrides:
reset
in classProximityFilterStrategy
- Parameters:
state
- [in] the state.
-
createProximityCache
public ProximityCachePtr createProximityCache()
Description copied from class:ProximityFilterStrategy
creates a FilterData object. This is used for caching relavant data between calls
to update
- Overrides:
createProximityCache
in classProximityFilterStrategy
- Returns:
-
update
public ProximityFilterPtr update(State state)
Description copied from class:ProximityFilterStrategy
Do an update- Overrides:
update
in classProximityFilterStrategy
- Parameters:
state
- [in] the state.- Returns:
-
update
public ProximityFilterPtr update(State state, ProximityCachePtr data)
Description copied from class:ProximityFilterStrategy
called once before acquirering all possibly colliding
frame pairs in the workcell- Overrides:
update
in classProximityFilterStrategy
- Parameters:
state
- [in] the state for which collision detection is performed.
-
getProximitySetup
public ProximitySetup getProximitySetup()
Description copied from class:ProximityFilterStrategy
get the proximity setup that describe the include/exclude rules of this
BroadPhaseStrategy- Overrides:
getProximitySetup
in classProximityFilterStrategy
- Returns:
- a reference to the ProximitySetup
-
addGeometry
public void addGeometry(FramePtr frame, GeometryPtr arg1)
Adds geometry associated to frame- Overrides:
addGeometry
in classProximityFilterStrategy
- Parameters:
frame
- [in] Frame which has the geometry associatedarg1
- [in] Geometry
-
removeGeometry
public void removeGeometry(FramePtr frame, GeometryPtr arg1)
Removes the geometric model geo associated with
Frame frame from this strategy.
- Overrides:
removeGeometry
in classProximityFilterStrategy
- Parameters:
frame
- [in] Frame which has the geometry associatedarg1
- [in] Geometry
-
removeGeometry
public void removeGeometry(FramePtr frame, java.lang.String geometryId)
Removes the geometric model geo associated with
Frame frame from this strategy.
- Overrides:
removeGeometry
in classProximityFilterStrategy
- Parameters:
frame
- [in] Frame which has the geometry associatedgeometryId
- [in] Geometry
-
addRule
public void addRule(ProximitySetupRule rule)
Description copied from class:ProximityFilterStrategy
Adds a ProximitySetupRule- Overrides:
addRule
in classProximityFilterStrategy
- Parameters:
rule
- [in] the rule to add.
-
removeRule
public void removeRule(ProximitySetupRule rule)
Description copied from class:ProximityFilterStrategy
Removes a ProximitySetupRule
If the rule cannot be found, then noting happens.- Overrides:
removeRule
in classProximityFilterStrategy
- Parameters:
rule
- [in] the rule to remove.
-
-