Class SCNRenderer

    • Constructor Detail

      • SCNRenderer

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • 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()
      • 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

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

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

        public static SCNRenderer rendererWithContextOptions​(EAGLContext context,
                                                             NSDictionary<?,​?> options)
        rendererWithContext:options: Creates a new renderer object.
        Parameters:
        context - The context to render into.
        options - An optional dictionary for future extensions.
      • rendererWithDeviceOptions

        public static SCNRenderer rendererWithDeviceOptions​(MTLDevice device,
                                                            NSDictionary<?,​?> options)
        rendererWithDevice:options: Creates a new renderer object that renders using Metal.
        Parameters:
        device - The metal device to use. Pass nil to let SceneKit choose a default device.
        options - An optional dictionary for future extensions.
      • 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()
      • audioEngine

        public AVAudioEngine audioEngine()
        Description copied from interface: SCNSceneRenderer
        [@property] audioEngine Contains the instance of audio engine used by the scene. The audio engine can be used to add custom nodes to the audio graph.
        Specified by:
        audioEngine in interface SCNSceneRenderer
      • audioListener

        public SCNNode audioListener()
        Description copied from interface: SCNSceneRenderer
        [@property] audioListener Use this property to set the audio node to use as the listener position and orientation when rendering positional audio for this scene. The default is nil which means that the current point of view will be used dynamically.
        Specified by:
        audioListener in interface SCNSceneRenderer
      • autoenablesDefaultLighting

        public boolean autoenablesDefaultLighting()
        Description copied from interface: SCNSceneRenderer
        [@property] autoenablesDefaultLighting Specifies whether the receiver should automatically light up scenes that have no light source. The default is NO. When enabled, a diffuse light is automatically added and placed while rendering scenes that have no light or only ambient lights.
        Specified by:
        autoenablesDefaultLighting in interface SCNSceneRenderer
      • colorPixelFormat

        public long colorPixelFormat()
        Description copied from interface: SCNSceneRenderer
        [@property] colorPixelFormat The pixel format of the color attachment 0 of the renderer. This property is only valid on a renderer created with a Metal device.
        Specified by:
        colorPixelFormat in interface SCNSceneRenderer
      • commandQueue

        public MTLCommandQueue commandQueue()
        Description copied from interface: SCNSceneRenderer
        [@property] commandQueue The command queue of the renderer. This property is only valid on a renderer created with a Metal device. Otherwise it is set to nil.
        Specified by:
        commandQueue in interface SCNSceneRenderer
      • context

        public org.moe.natj.general.ptr.VoidPtr context()
        Description copied from interface: SCNSceneRenderer
        [@property] context A Core OpenGL render context that is used as the render target (a CGLContextObj on macOS, an EAGLContext on iOS).
        Specified by:
        context in interface SCNSceneRenderer
      • currentRenderCommandEncoder

        public MTLRenderCommandEncoder currentRenderCommandEncoder()
        Description copied from interface: SCNSceneRenderer
        [@property] currentRenderCommandEncoder The current render command encoder if any. This property is only valid within the SCNSceneRendererDelegate methods and when rendering with Metal. Otherwise it is set to nil.
        Specified by:
        currentRenderCommandEncoder in interface SCNSceneRenderer
      • debugOptions

        public long debugOptions()
        Description copied from interface: SCNSceneRenderer
        [@property] debugOptions Specifies the debug options of the receiver. Defaults to SCNDebugOptionNone.
        Specified by:
        debugOptions in interface SCNSceneRenderer
      • delegate

        public java.lang.Object delegate()
        Description copied from interface: SCNSceneRenderer
        [@property] delegate Specifies the renderer delegate.
        Specified by:
        delegate in interface SCNSceneRenderer
      • depthPixelFormat

        public long depthPixelFormat()
        Description copied from interface: SCNSceneRenderer
        [@property] depthPixelFormat The pixel format of the depth attachment of the renderer. This property is only valid on a renderer created with a Metal device.
        Specified by:
        depthPixelFormat in interface SCNSceneRenderer
      • device

        public MTLDevice device()
        Description copied from interface: SCNSceneRenderer
        [@property] device The metal device of the renderer. This property is only valid on a renderer created with a Metal device. Otherwise it is set to nil.
        Specified by:
        device in interface SCNSceneRenderer
      • hitTestOptions

        public NSArray<? extends SCNHitTestResult> hitTestOptions​(CGPoint point,
                                                                  NSDictionary<java.lang.String,​?> options)
        Description copied from interface: SCNSceneRenderer
        hitTest:options: Returns an array of SCNHitTestResult for each node that contains a specified point.
        Specified by:
        hitTestOptions in interface SCNSceneRenderer
        Parameters:
        point - A point in the coordinate system of the receiver.
        options - Optional parameters (see the "Hit test options" group for the available options).
      • isJitteringEnabled

        public boolean isJitteringEnabled()
        Description copied from interface: SCNSceneRenderer
        [@property] jitteringEnabled Specifies whether the receiver should jitter the rendered scene to reduce aliasing artifacts. When enabled, the jittering is performed asynchronously and automatically by SCNView and SCNLayer. It is done synchronously by SCNRenderer.
        Specified by:
        isJitteringEnabled in interface SCNSceneRenderer
      • setJitteringEnabled

        public void setJitteringEnabled​(boolean value)
        Description copied from interface: SCNSceneRenderer
        [@property] jitteringEnabled Specifies whether the receiver should jitter the rendered scene to reduce aliasing artifacts. When enabled, the jittering is performed asynchronously and automatically by SCNView and SCNLayer. It is done synchronously by SCNRenderer.
        Specified by:
        setJitteringEnabled in interface SCNSceneRenderer
      • isNodeInsideFrustumWithPointOfView

        public boolean isNodeInsideFrustumWithPointOfView​(SCNNode node,
                                                          SCNNode pointOfView)
        Description copied from interface: SCNSceneRenderer
        isNodeInsideFrustum:withPointOfView: Test whether node is visible from the specified point of view. Return YES if the node is inside or intersects the clipping planes of the point of view. This method doesn't test if 'node' is occluded by another node.
        Specified by:
        isNodeInsideFrustumWithPointOfView in interface SCNSceneRenderer
        Parameters:
        node - The node to test the visibility of.
        pointOfView - The point of view used to test the visibility.
      • isPlaying

        public boolean isPlaying()
        Description copied from interface: SCNSceneRenderer
        [@property] playing Returns YES if the scene is playing, NO otherwise.
        Specified by:
        isPlaying in interface SCNSceneRenderer
      • setPlaying

        public void setPlaying​(boolean value)
        Description copied from interface: SCNSceneRenderer
        [@property] playing Returns YES if the scene is playing, NO otherwise.
        Specified by:
        setPlaying in interface SCNSceneRenderer
      • loops

        public boolean loops()
        Description copied from interface: SCNSceneRenderer
        [@property] loops Indicates whether the receiver restarts playback when it reaches the end of its content. Default: YES. YES when the receiver restarts playback when it finishes, NO otherwise.
        Specified by:
        loops in interface SCNSceneRenderer
      • nextFrameTime

        public double nextFrameTime()
        [@property] nextFrameTime Returns the time at which the next update should happen. If infinite no update needs to be scheduled yet. If the current frame time, a continuous animation is running and an update should be scheduled after a "natural" delay.
      • nodesInsideFrustumWithPointOfView

        public NSArray<? extends SCNNode> nodesInsideFrustumWithPointOfView​(SCNNode pointOfView)
        Description copied from interface: SCNSceneRenderer
        nodesInsideFrustumWithPointOfView: Returns an array containing the nodes visible from the specified point of view. Returns an array of all the nodes that are inside or intersects the clipping planes of the point of view. Starting in macOS10.13/iOS11 this method work with the presentation tree.
        Specified by:
        nodesInsideFrustumWithPointOfView in interface SCNSceneRenderer
        Parameters:
        pointOfView - The point of view used to test the visibility.
      • overlaySKScene

        public SKScene overlaySKScene()
        Description copied from interface: SCNSceneRenderer
        [@property] overlaySKScene Specifies the overlay of the receiver as a SpriteKit scene instance. Defaults to nil.
        Specified by:
        overlaySKScene in interface SCNSceneRenderer
      • pointOfView

        public SCNNode pointOfView()
        Description copied from interface: SCNSceneRenderer
        [@property] pointOfView Specifies the point of view used to render the scene. A point of view must have either a camera or a spot light attached.
        Specified by:
        pointOfView in interface SCNSceneRenderer
      • prepareObjectShouldAbortBlock

        public boolean prepareObjectShouldAbortBlock​(java.lang.Object object,
                                                     SCNSceneRenderer.Block_prepareObjectShouldAbortBlock block)
        Description copied from interface: SCNSceneRenderer
        prepareObject:shouldAbortBlock: Prepare the specified object for drawing. Returns YES if the object was prepared successfully, NO if it was canceled. This method may be triggered from a secondary thread. This method is observable using NSProgress.
        Specified by:
        prepareObjectShouldAbortBlock in interface SCNSceneRenderer
        Parameters:
        object - The object to prepare. It can be an instance of SCNScene, SCNNode, SCNGeometry, or SCNMaterial
        block - This block will be called repeatedly while the object is prepared. Return YES if you want the operation to abort.
      • prepareObjectsWithCompletionHandler

        public void prepareObjectsWithCompletionHandler​(NSArray<?> objects,
                                                        SCNSceneRenderer.Block_prepareObjectsWithCompletionHandler completionHandler)
        Description copied from interface: SCNSceneRenderer
        prepareObjects:withCompletionHandler: Prepare the specified objects for drawing on the background. This method is observable using NSProgress.
        Specified by:
        prepareObjectsWithCompletionHandler in interface SCNSceneRenderer
        Parameters:
        objects - The objects to prepare. It can be one or more instances of SCNScene, SCNNode, SCNGeometry, or SCNMaterial
        completionHandler - This block will be called when all objects has been prepared, or on failure.
      • projectPoint

        public SCNVector3 projectPoint​(SCNVector3 point)
        Description copied from interface: SCNSceneRenderer
        projectPoint Projects a point in the world coordinate system using the receiver's current point of view and viewport. A point projected from the near (resp. far) clip plane will have a z component of 0 (resp. 1). Starting in macOS 11.0, iOS 14, tvOS 14 and watchOS 7 the range of z component will be reversed (from 1 to 0) if the receiver uses 'reverseZ'.
        Specified by:
        projectPoint in interface SCNSceneRenderer
        Parameters:
        point - The world position to be projected.
      • render

        @Deprecated
        public void render()
        Deprecated.
        Deprecated render renders the receiver's scene at the current system time. This method only work if the receiver was allocated with an OpenGL context and it is deprecated (use renderAtTime: instead). Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
      • renderAtTime

        public void renderAtTime​(double time)
        renderAtTime: updates and renders the receiver's scene at the specified time (system time). This method only work if the receiver was allocated with an OpenGL context. Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
      • renderAtTimeViewportCommandBufferPassDescriptor

        public void renderAtTimeViewportCommandBufferPassDescriptor​(double time,
                                                                    CGRect viewport,
                                                                    MTLCommandBuffer commandBuffer,
                                                                    MTLRenderPassDescriptor renderPassDescriptor)
        renderAtTime:viewport:commandBuffer:passDescriptor: updates and renders the receiver's scene at the specified time (system time) viewport, Metal command buffer and pass descriptor. Use this method to render using Metal.
      • renderingAPI

        public long renderingAPI()
        Description copied from interface: SCNSceneRenderer
        [@property] renderingAPI Specifies the rendering API associated to the receiver. This is the rendering API effectively used by the receiver. You can specify a preferred rendering API when initializing a view programmatically (see SCNPreferredRenderingAPI in SCNSceneRenderer.h) or using Interface Builder's SCNView inspector.
        Specified by:
        renderingAPI in interface SCNSceneRenderer
      • sceneTime

        public double sceneTime()
        Description copied from interface: SCNSceneRenderer
        [@property] sceneTime Specifies the current "scene time" to display the scene. The scene time only affect scene time based animations (see SCNAnimation.h "usesSceneTimeBase" and SCNSceneSource.h "SCNSceneSourceAnimationImportPolicyKey" for how to create scene time based animations). Scene time based animations and this property are typically used by tools and viewer to ease seeking in time while previewing a scene.
        Specified by:
        sceneTime in interface SCNSceneRenderer
      • setAudioListener

        public void setAudioListener​(SCNNode value)
        Description copied from interface: SCNSceneRenderer
        [@property] audioListener Use this property to set the audio node to use as the listener position and orientation when rendering positional audio for this scene. The default is nil which means that the current point of view will be used dynamically.
        Specified by:
        setAudioListener in interface SCNSceneRenderer
      • setAutoenablesDefaultLighting

        public void setAutoenablesDefaultLighting​(boolean value)
        Description copied from interface: SCNSceneRenderer
        [@property] autoenablesDefaultLighting Specifies whether the receiver should automatically light up scenes that have no light source. The default is NO. When enabled, a diffuse light is automatically added and placed while rendering scenes that have no light or only ambient lights.
        Specified by:
        setAutoenablesDefaultLighting in interface SCNSceneRenderer
      • setDebugOptions

        public void setDebugOptions​(long value)
        Description copied from interface: SCNSceneRenderer
        [@property] debugOptions Specifies the debug options of the receiver. Defaults to SCNDebugOptionNone.
        Specified by:
        setDebugOptions in interface SCNSceneRenderer
      • setDelegate_unsafe

        public void setDelegate_unsafe​(java.lang.Object value)
      • setDelegate

        public void setDelegate​(java.lang.Object value)
        Description copied from interface: SCNSceneRenderer
        [@property] delegate Specifies the renderer delegate.
        Specified by:
        setDelegate in interface SCNSceneRenderer
      • setLoops

        public void setLoops​(boolean value)
        Description copied from interface: SCNSceneRenderer
        [@property] loops Indicates whether the receiver restarts playback when it reaches the end of its content. Default: YES. YES when the receiver restarts playback when it finishes, NO otherwise.
        Specified by:
        setLoops in interface SCNSceneRenderer
      • setOverlaySKScene

        public void setOverlaySKScene​(SKScene value)
        Description copied from interface: SCNSceneRenderer
        [@property] overlaySKScene Specifies the overlay of the receiver as a SpriteKit scene instance. Defaults to nil.
        Specified by:
        setOverlaySKScene in interface SCNSceneRenderer
      • setPointOfView

        public void setPointOfView​(SCNNode value)
        Description copied from interface: SCNSceneRenderer
        [@property] pointOfView Specifies the point of view used to render the scene. A point of view must have either a camera or a spot light attached.
        Specified by:
        setPointOfView in interface SCNSceneRenderer
      • setSceneTime

        public void setSceneTime​(double value)
        Description copied from interface: SCNSceneRenderer
        [@property] sceneTime Specifies the current "scene time" to display the scene. The scene time only affect scene time based animations (see SCNAnimation.h "usesSceneTimeBase" and SCNSceneSource.h "SCNSceneSourceAnimationImportPolicyKey" for how to create scene time based animations). Scene time based animations and this property are typically used by tools and viewer to ease seeking in time while previewing a scene.
        Specified by:
        setSceneTime in interface SCNSceneRenderer
      • setShowsStatistics

        public void setShowsStatistics​(boolean value)
        Description copied from interface: SCNSceneRenderer
        [@property] showsStatistics Determines whether the receiver should display statistics info like FPS. Defaults to NO. When set to YES, statistics are displayed in a overlay on top of the rendered scene.
        Specified by:
        setShowsStatistics in interface SCNSceneRenderer
      • showsStatistics

        public boolean showsStatistics()
        Description copied from interface: SCNSceneRenderer
        [@property] showsStatistics Determines whether the receiver should display statistics info like FPS. Defaults to NO. When set to YES, statistics are displayed in a overlay on top of the rendered scene.
        Specified by:
        showsStatistics in interface SCNSceneRenderer
      • snapshotAtTimeWithSizeAntialiasingMode

        public UIImage snapshotAtTimeWithSizeAntialiasingMode​(double time,
                                                              CGSize size,
                                                              long antialiasingMode)
        snapshotAtTime:withSize:antialiasingMode: renders the receiver's scene at the specified time (system time) into an image.
      • stencilPixelFormat

        public long stencilPixelFormat()
        Description copied from interface: SCNSceneRenderer
        [@property] stencilPixelFormat The pixel format of the stencil attachment of the renderer. This property is only valid on a renderer created with a Metal device.
        Specified by:
        stencilPixelFormat in interface SCNSceneRenderer
      • unprojectPoint

        public SCNVector3 unprojectPoint​(SCNVector3 point)
        Description copied from interface: SCNSceneRenderer
        unprojectPoint Unprojects a screenspace 2D point with depth info using the receiver's current point of view and viewport. A point whose z component is 0 (resp. 1) is unprojected on the near (resp. far) clip plane. Starting in macOS 11.0, iOS 14, tvOS 14 and watchOS 7 the range of the z component will be reversed (from 1 to 0) if the receiver uses 'reverseZ'.
        Specified by:
        unprojectPoint in interface SCNSceneRenderer
        Parameters:
        point - The screenspace position to be unprojected.
      • updateProbesAtTime

        public void updateProbesAtTime​(NSArray<? extends SCNNode> lightProbes,
                                       double time)
        updateProbes:atTime: Update the specified probes by computing their incoming irradiance in the receiver's scene at the specified time. Light probes are only supported with Metal. This method is observable using NSProgress.
        Parameters:
        lightProbes - An array of nodes that must have a light probe attached.
        time - The time used to render the scene when computing the light probes irradiance.
      • renderWithViewportCommandBufferPassDescriptor

        public void renderWithViewportCommandBufferPassDescriptor​(CGRect viewport,
                                                                  MTLCommandBuffer commandBuffer,
                                                                  MTLRenderPassDescriptor renderPassDescriptor)
        renderWithViewport:viewport:commandBuffer:passDescriptor: renders the receiver's scene with the specified viewport, Metal command buffer and pass descriptor. Use this method to render using Metal. This method doesn't update the scene's animations, physics, particles etc... It's up to you to call "updateAtTime:" to update the scene.
      • updateAtTime

        public void updateAtTime​(double time)
        updateAtTime: updates the receiver's scene at the specified time (system time).
      • currentViewport

        public CGRect currentViewport()
        Description copied from interface: SCNSceneRenderer
        [@property] currentViewport Returns the current viewport for this renderer, can be used to get the actual viewport from within the delegate callback during a live resize.
        Specified by:
        currentViewport in interface SCNSceneRenderer
      • isTemporalAntialiasingEnabled

        public boolean isTemporalAntialiasingEnabled()
        Description copied from interface: SCNSceneRenderer
        [@property] temporalAntialiasingEnabled Specifies whether the receiver should reduce aliasing artifacts in real time based on temporal coherency. Defaults to NO.
        Specified by:
        isTemporalAntialiasingEnabled in interface SCNSceneRenderer
      • setTemporalAntialiasingEnabled

        public void setTemporalAntialiasingEnabled​(boolean value)
        Description copied from interface: SCNSceneRenderer
        [@property] temporalAntialiasingEnabled Specifies whether the receiver should reduce aliasing artifacts in real time based on temporal coherency. Defaults to NO.
        Specified by:
        setTemporalAntialiasingEnabled in interface SCNSceneRenderer
      • setUsesReverseZ

        public void setUsesReverseZ​(boolean value)
        Description copied from interface: SCNSceneRenderer
        [@property] usesReverseZ Specifies if the renderer should use the reverse Z technique. Defaults to YES. This property is only valid on a renderer created with a Metal device.
        Specified by:
        setUsesReverseZ in interface SCNSceneRenderer
      • usesReverseZ

        public boolean usesReverseZ()
        Description copied from interface: SCNSceneRenderer
        [@property] usesReverseZ Specifies if the renderer should use the reverse Z technique. Defaults to YES. This property is only valid on a renderer created with a Metal device.
        Specified by:
        usesReverseZ in interface SCNSceneRenderer
      • currentRenderPassDescriptor

        public MTLRenderPassDescriptor currentRenderPassDescriptor()
        Description copied from interface: SCNSceneRenderer
        [@property] currentRenderPassDescriptor The render pass descriptor of the receiver. This property is only valid within the SCNSceneRendererDelegate methods and when rendering with Metal. Otherwise it is set to nil.
        Specified by:
        currentRenderPassDescriptor in interface SCNSceneRenderer