Class 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 Detail

      • ProximityFilterStrategy

        public ProximityFilterStrategy​(long cPtr,
                                       boolean cMemoryOwn)
    • Method Detail

      • 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 associated
        geo - [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 associated
        geo - [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 associated
        geoName - [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.