Class ProximityCalculatorDistanceCPtr


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

      • ProximityCalculatorDistanceCPtr

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

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

        public ProximityCalculatorDistanceCPtr​(ProximityCalculatorDistance 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
      • getProximityFilterStrategy

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

        public DistanceStrategyPtr 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.