Class CollisionDetectorCPtr


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

      • CollisionDetectorCPtr

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

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

        public CollisionDetectorCPtr​(CollisionDetector 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
      • inCollision

        public boolean inCollision​(State state,
                                   CollisionDetector.CollisionDetectorQueryResult result,
                                   boolean stopAtFirstContact)
        Check the workcell for collisions.

        Parameters:
        state - [in] The state for which to check for collisions.
        result - [out] If non-NULL, the pairs of colliding frames are
        inserted in result.
        stopAtFirstContact - [in] If result is non-NULL and
        stopAtFirstContact is true, then only the first colliding pair is
        inserted in result. By default all colliding pairs are inserted.

        Returns:
        true if a collision is detected; false otherwise.
      • inCollision

        public boolean inCollision​(State state,
                                   CollisionDetector.CollisionDetectorQueryResult result)
        Check the workcell for collisions.

        Parameters:
        state - [in] The state for which to check for collisions.
        result - [out] If non-NULL, the pairs of colliding frames are
        inserted in result.


        Returns:
        true if a collision is detected; false otherwise.
      • inCollision

        public boolean inCollision​(State state)
        Check the workcell for collisions.

        Parameters:
        state - [in] The state for which to check for collisions.



        Returns:
        true if a collision is detected; false otherwise.
      • inCollision

        public boolean inCollision​(State state,
                                   ProximityData data)
        Check the workcell for collisions.
        Parameters:
        state - [in] The state for which to check for collisions.
        data - [in/out] Defines parameters for the collision check, the results and also
        enables caching inbetween calls to incollision
        Returns:
        true if a collision is detected; false otherwise.
      • getCollisionStrategy

        public CollisionStrategyPtr getCollisionStrategy()
        Get the narrow-phase collision strategy.
        Returns:
        the strategy if set, otherwise NULL.
      • getProximityFilterStrategy

        public ProximityFilterStrategyPtr getProximityFilterStrategy()
        The Proximity Filter strategy of the ProximityCalculator.
      • getStrategy

        public CollisionStrategyPtr getStrategy()
        Get the ProximityStrategy.
        Returns:
        the strategy if set, otherwise NULL.
      • getComputationTime

        public double getComputationTime()
        Get the computation time used in the inCollision functions.
        Returns:
        the total computation time.
      • getNoOfCalls

        public long getNoOfCalls()
        Get the number of times the inCollision functions have been called.
        Returns:
        number of calls to inCollision functions.