Class SKCameraNode

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSSecureCoding, NSObject, UIActivityItemsConfigurationProviding, UIFocusEnvironment, UIFocusItem, UIPasteConfigurationSupporting, UIResponderStandardEditActions, UIUserActivityRestoring

    public class SKCameraNode
    extends SKNode
    A Camera node is a full fledged SKNode that can have actions and physics applied to it. It also uses the standard SKNode transform system so modifying the camera node's position is how you translate the camera's viewport. Applying a scale to the node would zoom the viewport in or out etc. As an added benefit you can now rotate the viewport by applying a zRotation to the camera node, just as you would with any other SKNode. The camera viewport is centered on the camera's position. It uses the scene's frame and scale mode along with the node transforms to determine the size, origin and rotation of the viewport. There are some convenience functions included for testing if nodes are contained within the camera viewport. It can be used to determine if objects are no longer visible on the display. In order to use a camera; set it on the scene that contains the camera.
    See Also:
    API-Since: 9.0
    • Constructor Detail

      • SKCameraNode

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static SKCameraNode 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()
      • clearTextInputContextIdentifier

        public static void clearTextInputContextIdentifier​(@NotNull
                                                           @NotNull java.lang.String identifier)
      • debugDescription_static

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

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

        public static long hash_static()
      • 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)
      • nodeWithFileNamed

        public static SKCameraNode nodeWithFileNamed​(@NotNull
                                                     @NotNull java.lang.String filename)
      • obstaclesFromNodePhysicsBodies

        @NotNull
        public static @NotNull NSArray<? extends GKPolygonObstacle> obstaclesFromNodePhysicsBodies​(@NotNull
                                                                                                   @NotNull NSArray<? extends SKNode> nodes)
      • obstaclesFromSpriteTexturesAccuracy

        @NotNull
        public static @NotNull NSArray<? extends GKPolygonObstacle> obstaclesFromSpriteTexturesAccuracy​(@NotNull
                                                                                                        @NotNull NSArray<? extends SKNode> sprites,
                                                                                                        float accuracy)
      • 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()
      • version_static

        public static long version_static()
      • containedNodeSet

        @NotNull
        public @NotNull NSSet<? extends SKNode> containedNodeSet()
        Returns the set of nodes in the same scene as the camera that are contained within its viewport.
        Returns:
        the set of nodes contained
      • containsNode

        public boolean containsNode​(@NotNull
                                    @NotNull SKNode node)
        Checks if the node is contained inside the viewport of the camera. The camera and node must both be in the same scene and presented on a view in order to determine if the node is inside the camera viewport rectangle.
        Returns:
        YES if the node is inside the viewport. NO if node is nil or the node is outside the viewport.
      • nodeWithFileNamedSecurelyWithClassesAndError

        public static SKCameraNode nodeWithFileNamedSecurelyWithClassesAndError​(@NotNull
                                                                                @NotNull java.lang.String filename,
                                                                                @NotNull
                                                                                @NotNull NSSet<? extends org.moe.natj.objc.Class> classes,
                                                                                @Nullable
                                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
      • 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
        Overrides:
        _supportsSecureCoding in class SKNode
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.