Class CollisionToleranceStrategyPtr


  • public class CollisionToleranceStrategyPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • CollisionToleranceStrategyPtr

        public CollisionToleranceStrategyPtr​(long cPtr,
                                             boolean cMemoryOwn)
      • CollisionToleranceStrategyPtr

        public CollisionToleranceStrategyPtr()
        Default constructor yielding a NULL-pointer.
      • CollisionToleranceStrategyPtr

        public CollisionToleranceStrategyPtr​(CollisionToleranceStrategy ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • isWithinDistance

        public boolean isWithinDistance​(Frame a,
                                        Transform3Dd wTa,
                                        Frame b,
                                        Transform3Dd wTb,
                                        double tolerance)
        Checks to see if the geometry attached to two given frames \mathcal{F}_a and
        \mathcal{F}_b are closer than the specified tolerance.
        Parameters:
        a - [in] \mathcal{F}_a
        wTa - [in] \robabx{w}{a}{\mathbf{T}}
        b - [in] \mathcal{F}_b
        wTb - [in] \robabx{w}{b}{\mathbf{T}}
        tolerance - [in] frames with a distance in between them
        that is less than tolerance are in collision

        Returns:
        true if \mathcal{F}_a and \mathcal{F}_b are
        colliding, false otherwise.
      • isWithinDistance

        public boolean isWithinDistance​(Frame a,
                                        Transform3Dd wTa,
                                        Frame b,
                                        Transform3Dd wTb,
                                        double distance,
                                        ProximityStrategyData data)
        Checks to see if the geometry attached to two given frames \mathcal{F}_a and
        \mathcal{F}_b are closer than the specified tolerance. Result is cached in data
        Parameters:
        a - [in] \mathcal{F}_a
        wTa - [in] \robabx{w}{a}{\mathbf{T}}
        b - [in] \mathcal{F}_b
        wTb - [in] \robabx{w}{b}{\mathbf{T}}
        distance -
        data -

        Returns:
        true if \mathcal{F}_a and \mathcal{F}_b are
        colliding, false otherwise.
      • isWithinDistance

        public boolean isWithinDistance​(ProximityModelPtr a,
                                        Transform3Dd wTa,
                                        ProximityModelPtr b,
                                        Transform3Dd wTb,
                                        double tolerance,
                                        ProximityStrategyData data)
        Checks to see if two proximity models \mathcal{F}_a and
        \mathcal{F}_b are closer than the specified tolerance. Result is cached in data
        Parameters:
        a - [in] \mathcal{F}_a
        wTa - [in] \robabx{w}{a}{\mathbf{T}}
        b - [in] \mathcal{F}_b
        wTb - [in] \robabx{w}{b}{\mathbf{T}}
        tolerance - [in] frames with a distance in between them
        that is less than tolerance are in collision
        data -

        Returns:
        true if \mathcal{F}_a and \mathcal{F}_b are
        colliding, false otherwise.
      • addModel

        public boolean addModel​(ObjectPtr object)
        Adds a Proximity model of a frame to this strategy.

        The Proximity model is the one specified in the frames property

        Parameters:
        object - [in] the frame on which the Proximity model is to be
        created.

        Returns:
        true if a Proximity model was succesfully created and linked
        with the frame; false otherwise.
      • addModel

        public boolean addModel​(Frame frame,
                                Geometry faces)
        Adds a Proximity model to a frame where the geometry is copied
        in the underlying proximity strategy.

        The Proximity model is constructed from the list of faces

        Parameters:
        frame - [in] the frame to which the Proximity model should associate
        faces - [in] list of faces from which to construct the Proximity model
        Returns:
        true if a Proximity model was succesfully created and linked
        with the frame; false otherwise.
      • addModel

        public boolean addModel​(Frame frame,
                                GeometryPtr faces,
                                boolean forceCopy)
        Adds a Proximity model to a frame.

        The Proximity model is constructed from the list of faces

        Parameters:
        frame - [in] the frame to which the Proximity model should associate
        faces - [in] list of faces from which to construct the Proximity model
        forceCopy - [in] force the strategy to copy the geometry data, if false the
        strategy may choose to store the geometry reference or not.
        Returns:
        true if a Proximity model was succesfully created and linked
        with the frame; false otherwise.
      • addModel

        public boolean addModel​(Frame frame,
                                GeometryPtr faces)
        Adds a Proximity model to a frame.

        The Proximity model is constructed from the list of faces

        Parameters:
        frame - [in] the frame to which the Proximity model should associate
        faces - [in] list of faces from which to construct the Proximity model

        Returns:
        true if a Proximity model was succesfully created and linked
        with the frame; false otherwise.
      • hasModel

        public boolean hasModel​(Frame frame)
        Tells whether the frame has a proximity model in the strategy

        To have a proximity model does not means that it is loaded. If a GeoID string from
        which a model can be loaded it returns true as well

        Parameters:
        frame - [in] the frame to check for1.0/
        Returns:
        true if a model exists or can be created
      • clearFrame

        public void clearFrame​(Frame frame)
        Clear (remove all) model information for frame frame.
      • clearFrames

        public void clearFrames()
        Clear (remove all) model information for all frames.
      • getModel

        public ProximityModelPtr getModel​(Frame frame)
        get the proximitymodel associated to frame. If no model
        has been associated to frame then NULL is returned.
        Parameters:
        frame - [in] frame for which an proximitymodel is associated
      • createModel

        public ProximityModelPtr createModel()
        creates an empty ProximityModel
      • destroyModel

        public void destroyModel​(ProximityModel model)
        deallocates the memory used for model
        Parameters:
        model -
      • addGeometry

        public boolean addGeometry​(ProximityModel model,
                                   Geometry geom)
        adds geometry to a specific proximity model. The proximity strategy copies all
        data of the geometry.
        Parameters:
        model - [in] the proximity model to add data to
        geom - [in] the geometry that is to be added
      • addGeometry

        public boolean addGeometry​(ProximityModel model,
                                   GeometryPtr geom,
                                   boolean forceCopy)
        adds geometry to a specific model. Depending on the option forceCopy the proximity
        strategy may choose to copy the geometry data or use it directly.
        Parameters:
        model -
        geom -
        forceCopy -
        Returns:
      • addGeometry

        public boolean addGeometry​(ProximityModel model,
                                   GeometryPtr geom)
        adds geometry to a specific model. Depending on the option forceCopy the proximity
        strategy may choose to copy the geometry data or use it directly.
        Parameters:
        model -
        geom -

        Returns:
      • removeGeometry

        public boolean removeGeometry​(ProximityModel model,
                                      java.lang.String geomId)
        removes a geometry from a specific proximity model
        Returns:
        true if succesfull
      • getGeometryIDs

        public VectorString getGeometryIDs​(ProximityModel model)
        the list of all geometry ids that are associated to
        the proximity model model is returned
        Parameters:
        model - [in] the model containing the geometries
        Returns:
        all geometry ids associated to the proximity model
      • clear

        public void clear()
        Clears any stored model information