public interface SCNSceneRenderer
Protocol adopted by the various renderers (SCNView, SCNLayer, SCNRenderer)
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SCNSceneRenderer.Block_prepareObjectShouldAbortBlock |
static interface |
SCNSceneRenderer.Block_prepareObjectsWithCompletionHandler |
static interface |
SCNSceneRenderer.Block_presentSceneWithTransitionIncomingPointOfViewCompletionHandler |
| Modifier and Type | Method and Description |
|---|---|
AVAudioEngine |
audioEngine()
[@property] audioEngine
|
AVAudioEnvironmentNode |
audioEnvironmentNode()
[@property] audioEnvironmentNode
|
SCNNode |
audioListener()
[@property] audioListener
|
boolean |
autoenablesDefaultLighting()
[@property] autoenablesDefaultLighting
|
long |
colorPixelFormat()
[@property] colorPixelFormat
|
MTLCommandQueue |
commandQueue()
[@property] commandQueue
|
org.moe.natj.general.ptr.VoidPtr |
context()
[@property] context
|
MTLRenderCommandEncoder |
currentRenderCommandEncoder()
[@property] currentRenderCommandEncoder
|
MTLRenderPassDescriptor |
currentRenderPassDescriptor()
[@property] currentRenderPassDescriptor
|
CGRect |
currentViewport()
[@property] currentViewport
|
long |
debugOptions()
[@property] debugOptions
|
java.lang.Object |
delegate()
[@property] delegate
|
long |
depthPixelFormat()
[@property] depthPixelFormat
|
MTLDevice |
device()
[@property] device
|
NSArray<? extends SCNHitTestResult> |
hitTestOptions(CGPoint point,
NSDictionary<java.lang.String,?> options)
hitTest:options:
|
boolean |
isJitteringEnabled()
[@property] jitteringEnabled
|
boolean |
isNodeInsideFrustumWithPointOfView(SCNNode node,
SCNNode pointOfView)
isNodeInsideFrustum:withPointOfView:
|
boolean |
isPlaying()
[@property] playing
|
boolean |
isTemporalAntialiasingEnabled()
[@property] temporalAntialiasingEnabled
|
boolean |
loops()
[@property] loops
|
NSArray<? extends SCNNode> |
nodesInsideFrustumWithPointOfView(SCNNode pointOfView)
nodesInsideFrustumWithPointOfView:
|
SKScene |
overlaySKScene()
[@property] overlaySKScene
|
SCNNode |
pointOfView()
[@property] pointOfView
|
boolean |
prepareObjectShouldAbortBlock(java.lang.Object object,
SCNSceneRenderer.Block_prepareObjectShouldAbortBlock block)
prepareObject:shouldAbortBlock:
|
void |
prepareObjectsWithCompletionHandler(NSArray<?> objects,
SCNSceneRenderer.Block_prepareObjectsWithCompletionHandler completionHandler)
prepareObjects:withCompletionHandler:
|
void |
presentSceneWithTransitionIncomingPointOfViewCompletionHandler(SCNScene scene,
SKTransition transition,
SCNNode pointOfView,
SCNSceneRenderer.Block_presentSceneWithTransitionIncomingPointOfViewCompletionHandler completionHandler)
presentScene:withTransition:incomingPointOfView:
|
SCNVector3 |
projectPoint(SCNVector3 point)
projectPoint
|
long |
renderingAPI()
[@property] renderingAPI
|
SCNScene |
scene()
[@property] scene
|
double |
sceneTime()
[@property] sceneTime
|
void |
setAudioListener(SCNNode value)
[@property] audioListener
|
void |
setAutoenablesDefaultLighting(boolean value)
[@property] autoenablesDefaultLighting
|
void |
setDebugOptions(long value)
[@property] debugOptions
|
void |
setDelegate_unsafe(java.lang.Object value)
[@property] delegate
|
void |
setJitteringEnabled(boolean value)
[@property] jitteringEnabled
|
void |
setLoops(boolean value)
[@property] loops
|
void |
setOverlaySKScene(SKScene value)
[@property] overlaySKScene
|
void |
setPlaying(boolean value)
[@property] playing
|
void |
setPointOfView(SCNNode value)
[@property] pointOfView
|
void |
setScene(SCNScene value)
[@property] scene
|
void |
setSceneTime(double value)
[@property] sceneTime
|
void |
setShowsStatistics(boolean value)
[@property] showsStatistics
|
void |
setTemporalAntialiasingEnabled(boolean value)
[@property] temporalAntialiasingEnabled
|
void |
setUsesReverseZ(boolean value)
[@property] usesReverseZ
|
boolean |
showsStatistics()
[@property] showsStatistics
|
long |
stencilPixelFormat()
[@property] stencilPixelFormat
|
SCNVector3 |
unprojectPoint(SCNVector3 point)
unprojectPoint
|
boolean |
usesReverseZ()
[@property] usesReverseZ
|
AVAudioEngine 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.
AVAudioEnvironmentNode audioEnvironmentNode()
Contains the instance of audio environment node used by the scene to spacialize sounds.
SCNNode 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.
boolean 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.
long 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.
MTLCommandQueue 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.
org.moe.natj.general.ptr.VoidPtr context()
A Core OpenGL render context that is used as the render target (a CGLContextObj on macOS, an EAGLContext on iOS).
MTLRenderCommandEncoder 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.
long debugOptions()
Specifies the debug options of the receiver. Defaults to SCNDebugOptionNone.
java.lang.Object delegate()
Specifies the renderer delegate.
long depthPixelFormat()
The pixel format of the depth attachment of the renderer. This property is only valid on a renderer created with a Metal device.
MTLDevice 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.
NSArray<? extends SCNHitTestResult> hitTestOptions(CGPoint point, NSDictionary<java.lang.String,?> options)
Returns an array of SCNHitTestResult for each node that contains a specified point.
point - A point in the coordinate system of the receiver.options - Optional parameters (see the "Hit test options" group for the available options).boolean isJitteringEnabled()
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.
void setJitteringEnabled(boolean value)
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.
boolean isNodeInsideFrustumWithPointOfView(SCNNode node, SCNNode pointOfView)
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.
node - The node to test the visibility of.pointOfView - The point of view used to test the visibility.boolean isPlaying()
Returns YES if the scene is playing, NO otherwise.
void setPlaying(boolean value)
Returns YES if the scene is playing, NO otherwise.
boolean 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.
NSArray<? extends SCNNode> nodesInsideFrustumWithPointOfView(SCNNode pointOfView)
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.
pointOfView - The point of view used to test the visibility.SKScene overlaySKScene()
Specifies the overlay of the receiver as a SpriteKit scene instance. Defaults to nil.
SCNNode 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.
boolean prepareObjectShouldAbortBlock(java.lang.Object object,
SCNSceneRenderer.Block_prepareObjectShouldAbortBlock block)
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.
object - The object to prepare. It can be an instance of SCNScene, SCNNode, SCNGeometry, or SCNMaterialblock - This block will be called repeatedly while the object is prepared. Return YES if you want the operation to abort.void prepareObjectsWithCompletionHandler(NSArray<?> objects, SCNSceneRenderer.Block_prepareObjectsWithCompletionHandler completionHandler)
Prepare the specified objects for drawing on the background.
This method is observable using NSProgress.
objects - The objects to prepare. It can be one or more instances of SCNScene, SCNNode, SCNGeometry, or SCNMaterialcompletionHandler - This block will be called when all objects has been prepared, or on failure.void presentSceneWithTransitionIncomingPointOfViewCompletionHandler(SCNScene scene, SKTransition transition, SCNNode pointOfView, SCNSceneRenderer.Block_presentSceneWithTransitionIncomingPointOfViewCompletionHandler completionHandler)
Present a SCNScene in the receiver, replacing the current scene.
scene - The new scene to present.transition - the transition to use when presenting the scene.pointOfView - the point of view to use to render the new scene.completionHandler - the block invoked on completion.SCNVector3 projectPoint(SCNVector3 point)
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'.
point - The world position to be projected.long 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.
SCNScene scene()
Specifies the scene of the receiver.
double 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.
void setAudioListener(SCNNode value)
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.
void setAutoenablesDefaultLighting(boolean value)
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.
void setDebugOptions(long value)
Specifies the debug options of the receiver. Defaults to SCNDebugOptionNone.
void setDelegate_unsafe(java.lang.Object value)
Specifies the renderer delegate.
void setLoops(boolean value)
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.
void setOverlaySKScene(SKScene value)
Specifies the overlay of the receiver as a SpriteKit scene instance. Defaults to nil.
void setPointOfView(SCNNode value)
Specifies the point of view used to render the scene.
A point of view must have either a camera or a spot light attached.
void setScene(SCNScene value)
Specifies the scene of the receiver.
void setSceneTime(double value)
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.
void setShowsStatistics(boolean value)
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.
boolean 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.
long stencilPixelFormat()
The pixel format of the stencil attachment of the renderer. This property is only valid on a renderer created with a Metal device.
SCNVector3 unprojectPoint(SCNVector3 point)
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'.
point - The screenspace position to be unprojected.CGRect 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.
boolean isTemporalAntialiasingEnabled()
Specifies whether the receiver should reduce aliasing artifacts in real time based on temporal coherency. Defaults to NO.
void setTemporalAntialiasingEnabled(boolean value)
Specifies whether the receiver should reduce aliasing artifacts in real time based on temporal coherency. Defaults to NO.
void setUsesReverseZ(boolean value)
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.
boolean 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.
MTLRenderPassDescriptor 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.