Package apple.vision

Class VNPoint

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSSecureCoding, NSObject
    Direct Known Subclasses:
    VNDetectedPoint

    public class VNPoint
    extends NSObject
    implements NSCopying, NSSecureCoding
    VNPoint VNPoint represents a single, immutable, two-dimensional point in an image. It should be noted that VNPoint is not intended as an overall replacement of CGPoint, NSPoint or vec2, but is used by observations that need to present points which may contain additional metadata.
    • Constructor Detail

      • VNPoint

        protected VNPoint​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static VNPoint alloc()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • copyWithZone

        public java.lang.Object copyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • distanceBetweenPointPoint

        public static double distanceBetweenPointPoint​(VNPoint point1,
                                                       VNPoint point2)
        Returns the Euclidean distance between two VNPoint objects.
      • distanceToPoint

        public double distanceToPoint​(VNPoint point)
        Returns the Euclidean distance to another point.
        Parameters:
        point - The destination point.
        Returns:
        the Euclidean distance between the target and specified points.
      • hash_static

        public static long hash_static()
      • initWithLocation

        public VNPoint initWithLocation​(CGPoint location)
        Initializes a VNPoint object from a CGPoint.
      • initWithXY

        public VNPoint initWithXY​(double x,
                                  double y)
        Initializes a VNPoint object from X and Y coordinates.
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • location

        public CGPoint location()
        Returns the X and Y coordinates of the point, as CGPoint type, with respect to the origin of the coordinate system the point is defined in.
      • new_objc

        public static java.lang.Object new_objc()
      • pointByApplyingVectorToPoint

        public static VNPoint pointByApplyingVectorToPoint​(VNVector vector,
                                                           VNPoint point)
        Returns a new VNPoint object that is shifted by X and Y offsets of the vector.
        Parameters:
        vector - The vector offset to be applied to a source point.
        point - The source point.
        Returns:
        the translated point.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • version_static

        public static long version_static()
      • x

        public double x()
        Returns the X coordinate of the point with respect to the origin of the coordinate system the point is defined in.
      • y

        public double y()
        Returns the Y coordinate of the point with respect to the origin of the coordinate system the point is defined in.
      • zeroPoint

        public static VNPoint zeroPoint()
        Returns a VNPoint object that represents the location of (0.0, 0.0).