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. API-Since: 14.0
    • 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 VNPoint allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

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

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

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

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

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

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable 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

        @Deprecated
        public static double distanceBetweenPointPoint​(@NotNull
                                                       @NotNull VNPoint point1,
                                                       @NotNull
                                                       @NotNull VNPoint point2)
        Deprecated.
        Returns the Euclidean distance between two VNPoint objects. API-Since: 14.0 Deprecated-Since: 14.0
      • distanceToPoint

        public double distanceToPoint​(@NotNull
                                      @NotNull 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull 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 VNPoint new_objc()
      • pointByApplyingVectorToPoint

        @NotNull
        public static @NotNull VNPoint pointByApplyingVectorToPoint​(@NotNull
                                                                    @NotNull VNVector vector,
                                                                    @NotNull
                                                                    @NotNull 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

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

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.