Package org.robwork.sdurw
Class ProximityFilterStrategy
- java.lang.Object
-
- org.robwork.sdurw.ProximityFilterStrategy
-
public class ProximityFilterStrategy extends java.lang.Object
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 ... }
-
-
Constructor Summary
Constructors Constructor Description ProximityFilterStrategy(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGeometry(Frame frame, GeometryPtr geo)
Adds geometry associated to framevoid
addRule(ProximitySetupRule rule)
Adds a ProximitySetupRuleProximityCachePtr
createProximityCache()
creates a FilterData object.void
delete()
static long
getCPtr(ProximityFilterStrategy obj)
SWIGTYPE_p_ProximitySetup
getProximitySetup()
get the proximity setup that describe the include/exclude rules of this
BroadPhaseStrategyvoid
removeGeometry(Frame frame, java.lang.String geoName)
Removes the geometric model with name geoName and which is associated with
frame.
void
removeGeometry(Frame frame, GeometryPtr geo)
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
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(ProximityFilterStrategy obj)
-
delete
public void delete()
-
reset
public void reset(State state)
Reset- Parameters:
state
- [in] the state.
-
createProximityCache
public ProximityCachePtr createProximityCache()
creates a FilterData object. This is used for caching relavant data between calls to update
- Returns:
-
update
public ProximityFilterPtr update(State state)
Do an update- Parameters:
state
- [in] the state.- Returns:
-
update
public ProximityFilterPtr update(State state, ProximityCachePtr data)
called once before acquirering all possibly colliding
frame pairs in the workcell- Parameters:
state
- [in] the state for which collision detection is performed.data
-
-
getProximitySetup
public SWIGTYPE_p_ProximitySetup getProximitySetup()
get the proximity setup that describe the include/exclude rules of this
BroadPhaseStrategy- Returns:
- a reference to the ProximitySetup
-
addGeometry
public void addGeometry(Frame frame, GeometryPtr geo)
Adds geometry associated to frame- Parameters:
frame
- [in] Frame which has the geometry associatedgeo
- [in] Geometry
-
removeGeometry
public void removeGeometry(Frame frame, GeometryPtr geo)
Removes the geometric model geo associated with
Frame frame from this strategy.
- Parameters:
frame
- [in] Frame which has the geometry associatedgeo
- [in] Geometry
-
removeGeometry
public void removeGeometry(Frame frame, java.lang.String geoName)
Removes the geometric model with name geoName and which is associated with
frame.
- Parameters:
frame
- [in] Frame which has the geometry associatedgeoName
- [in] Name of geometry
-
addRule
public void addRule(ProximitySetupRule rule)
Adds a ProximitySetupRule- Parameters:
rule
- [in] the rule to add.
-
removeRule
public void removeRule(ProximitySetupRule rule)
Removes a ProximitySetupRule
If the rule cannot be found, then noting happens.- Parameters:
rule
- [in] the rule to remove.
-
-