Package apple.scenekit
Class SCNScene
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.scenekit.SCNScene
-
- All Implemented Interfaces:
NSCoding,NSSecureCoding,GKSceneRootNodeType,NSObject
public class SCNScene extends NSObject implements NSSecureCoding, GKSceneRootNodeType
SCNScene SCNScene is the class that describes a 3d scene. It encapsulates a node hierarchy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSCNScene.Block_writeToURLOptionsDelegateProgressHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSCNScene(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()voidaddParticleSystemWithTransform(SCNParticleSystem system, SCNMatrix4 transform)Add a particle system at the given location.static SCNScenealloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)java.lang.ObjectattributeForKey(java.lang.String key)attributeForKey: Retrieves a scene attribute.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)SCNMaterialPropertybackground()[@property] background Specifies the background of the receiver.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidencodeWithCoder(NSCoder coder)java.lang.ObjectfogColor()[@property] fogColor Specifies the receiver's fog color (NSColor or CGColorRef).doublefogDensityExponent()[@property] fogDensityExponent Specifies the receiver's fog power exponent.doublefogEndDistance()[@property] fogEndDistance Specifies the receiver's fog end distance.doublefogStartDistance()[@property] fogStartDistance Specifies the receiver's fog start distance.static longhash_static()SCNSceneinit()SCNSceneinitWithCoder(NSCoder coder)NS_DESIGNATED_INITIALIZERstatic NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisPaused()[@property] paused Controls whether or not the scene is paused.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)SCNMaterialPropertylightingEnvironment()[@property] lightingEnvironment Specifies the receiver's environment for image-based lighting (IBL).static java.lang.Objectnew_objc()NSArray<? extends SCNParticleSystem>particleSystems()The particle systems attached to the scene that are active.SCNPhysicsWorldphysicsWorld()[@property] physicsWorld Specifies the physics world of the receiver.voidremoveAllParticleSystems()Remove all particle systems in the scene.voidremoveParticleSystem(SCNParticleSystem system)Remove the specified particle system from the receiver.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)SCNNoderootNode()[@property] root Specifies the root node of the node hierarchy.static SCNScenescene()static SCNScenesceneNamed(java.lang.String name)sceneNamed: Creates and returns a scene associated with the specified filename.static SCNScenesceneNamedInDirectoryOptions(java.lang.String name, java.lang.String directory, NSDictionary<java.lang.String,?> options)sceneNamed:options: Creates and returns a scene associated with the specified filename.static SCNScenesceneWithMDLAsset(MDLAsset mdlAsset)static SCNScenesceneWithURLOptionsError(NSURL url, NSDictionary<java.lang.String,?> options, org.moe.natj.general.ptr.Ptr<NSError> error)sceneWithURL:options:error: Creates and returns a scene from the specified URL.doublescreenSpaceReflectionMaximumDistance()[@property] screenSpaceReflectionMaximumDistance Determines the maximum distance in world units.longscreenSpaceReflectionSampleCount()[@property] screenSpaceReflectionSampleCount Determines the sample count of the screen space reflection.doublescreenSpaceReflectionStride()[@property] screenSpaceReflectionStride Raytracing step size in pixel.voidsetAttributeForKey(java.lang.Object attribute, java.lang.String key)setAttribute:forKey: Sets a scene attribute The available keys are listed in the "Scene attributes" group.voidsetFogColor(java.lang.Object value)[@property] fogColor Specifies the receiver's fog color (NSColor or CGColorRef).voidsetFogDensityExponent(double value)[@property] fogDensityExponent Specifies the receiver's fog power exponent.voidsetFogEndDistance(double value)[@property] fogEndDistance Specifies the receiver's fog end distance.voidsetFogStartDistance(double value)[@property] fogStartDistance Specifies the receiver's fog start distance.voidsetPaused(boolean value)[@property] paused Controls whether or not the scene is paused.voidsetScreenSpaceReflectionMaximumDistance(double value)[@property] screenSpaceReflectionMaximumDistance Determines the maximum distance in world units.voidsetScreenSpaceReflectionSampleCount(long value)[@property] screenSpaceReflectionSampleCount Determines the sample count of the screen space reflection.voidsetScreenSpaceReflectionStride(double value)[@property] screenSpaceReflectionStride Raytracing step size in pixel.static voidsetVersion_static(long aVersion)voidsetWantsScreenSpaceReflection(boolean value)[@property] wantsScreenSpaceReflection Determines if the scene use screen space reflection.static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()static longversion_static()booleanwantsScreenSpaceReflection()[@property] wantsScreenSpaceReflection Determines if the scene use screen space reflection.booleanwriteToURLOptionsDelegateProgressHandler(NSURL url, NSDictionary<java.lang.String,?> options, SCNSceneExportDelegate delegate, SCNScene.Block_writeToURLOptionsDelegateProgressHandler progressHandler)writeToURL:options:delegate:progressHandler: write the scene to the specified url.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static SCNScene 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()
-
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()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
scene
public static SCNScene scene()
-
sceneNamed
public static SCNScene sceneNamed(java.lang.String name)
sceneNamed: Creates and returns a scene associated with the specified filename. This method initializes with no options and does not check for errors. The resulting object is not cached.- Parameters:
name- The name of the file. The method looks for a file with the specified name in the application’s main bundle.
-
sceneNamedInDirectoryOptions
public static SCNScene sceneNamedInDirectoryOptions(java.lang.String name, java.lang.String directory, NSDictionary<java.lang.String,?> options)
sceneNamed:options: Creates and returns a scene associated with the specified filename. This method initializes with no options and does not check for errors. The resulting object is not cached.- Parameters:
name- The name of the file. The method looks for a file with the specified name in the application’s main bundle.directory- The name of the bundle sub-directory to search into.options- An options dictionary. The relevant keys are documented in the SCNSceneSource class.
-
sceneWithURLOptionsError
public static SCNScene sceneWithURLOptionsError(NSURL url, NSDictionary<java.lang.String,?> options, org.moe.natj.general.ptr.Ptr<NSError> error)
sceneWithURL:options:error: Creates and returns a scene from the specified URL. This method is here for convenience. It is equivalent to initializing a SCNSceneSource with the specified url and options, and asking it for its scene with the same options.- Parameters:
url- The URL to the 3D file.options- An options dictionary. The relevant keys are documented in the SCNSceneSource class.error- A NSError object passed by reference to get more information about the error when a nil is returned.
-
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()
-
version_static
public static long version_static()
-
addParticleSystemWithTransform
public void addParticleSystemWithTransform(SCNParticleSystem system, SCNMatrix4 transform)
Add a particle system at the given location.
-
attributeForKey
public java.lang.Object attributeForKey(java.lang.String key)
attributeForKey: Retrieves a scene attribute. The available keys are listed in the "Scene attributes" group.- Parameters:
key- An NSString object that specifies the attribute to be read
-
background
public SCNMaterialProperty background()
[@property] background Specifies the background of the receiver. The background is rendered before the rest of the scene. The background can be rendered as a skybox by setting a cube map as described in SCNMaterialProperty.h Colors are supported starting in macOS 10.12 and iOS 10. Prior to that you can use SCNView.backgroundColor. MDLSkyCubeTexture is supported starting in macOS 10.13 and iOS 11.
-
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
- Specified by:
encodeWithCoderin interfaceNSCoding
-
fogColor
public java.lang.Object fogColor()
[@property] fogColor Specifies the receiver's fog color (NSColor or CGColorRef). Animatable. Defaults to white. The initial value is a NSColor.
-
fogDensityExponent
public double fogDensityExponent()
[@property] fogDensityExponent Specifies the receiver's fog power exponent. Animatable. Defaults to 1. Controls the attenuation between the start and end fog distances. 0 means a constant fog, 1 a linear fog and 2 a quadratic fog, but any positive value will work.
-
fogEndDistance
public double fogEndDistance()
[@property] fogEndDistance Specifies the receiver's fog end distance. Animatable. Defaults to 0.
-
fogStartDistance
public double fogStartDistance()
[@property] fogStartDistance Specifies the receiver's fog start distance. Animatable. Defaults to 0.
-
initWithCoder
public SCNScene initWithCoder(NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
isPaused
public boolean isPaused()
[@property] paused Controls whether or not the scene is paused. Defaults to NO. Pausing a scene will pause animations, actions, particles and physics.
-
setPaused
public void setPaused(boolean value)
[@property] paused Controls whether or not the scene is paused. Defaults to NO. Pausing a scene will pause animations, actions, particles and physics.
-
lightingEnvironment
public SCNMaterialProperty lightingEnvironment()
[@property] lightingEnvironment Specifies the receiver's environment for image-based lighting (IBL). The environment should be a cube map as described in SCNMaterialProperty.h. MDLSkyCubeTexture is supported starting in macOS 10.13 and iOS 11.
-
particleSystems
public NSArray<? extends SCNParticleSystem> particleSystems()
The particle systems attached to the scene that are active.
-
physicsWorld
public SCNPhysicsWorld physicsWorld()
[@property] physicsWorld Specifies the physics world of the receiver. Every scene automatically creates a physics world object to simulate physics on nodes in the scene. You use this property to access the scene’s global physics properties, such as gravity. To add physics to a particular node, see physicsBody.
-
removeAllParticleSystems
public void removeAllParticleSystems()
Remove all particle systems in the scene.
-
removeParticleSystem
public void removeParticleSystem(SCNParticleSystem system)
Remove the specified particle system from the receiver.
-
rootNode
public SCNNode rootNode()
[@property] root Specifies the root node of the node hierarchy. Note that we have only one root node, whereas some file formats might have many nodes at the root of their hierarchies. The root node(s) of the imported files will therefore be children of the SCNScene's root node.
-
setAttributeForKey
public void setAttributeForKey(java.lang.Object attribute, java.lang.String key)setAttribute:forKey: Sets a scene attribute The available keys are listed in the "Scene attributes" group.- Parameters:
attribute- An object that specifies the value of the attribute to be written.key- An NSString object that specifies the attribute to be written
-
setFogColor
public void setFogColor(java.lang.Object value)
[@property] fogColor Specifies the receiver's fog color (NSColor or CGColorRef). Animatable. Defaults to white. The initial value is a NSColor.
-
setFogDensityExponent
public void setFogDensityExponent(double value)
[@property] fogDensityExponent Specifies the receiver's fog power exponent. Animatable. Defaults to 1. Controls the attenuation between the start and end fog distances. 0 means a constant fog, 1 a linear fog and 2 a quadratic fog, but any positive value will work.
-
setFogEndDistance
public void setFogEndDistance(double value)
[@property] fogEndDistance Specifies the receiver's fog end distance. Animatable. Defaults to 0.
-
setFogStartDistance
public void setFogStartDistance(double value)
[@property] fogStartDistance Specifies the receiver's fog start distance. Animatable. Defaults to 0.
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis 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:
_supportsSecureCodingin interfaceNSSecureCoding
-
writeToURLOptionsDelegateProgressHandler
public boolean writeToURLOptionsDelegateProgressHandler(NSURL url, NSDictionary<java.lang.String,?> options, SCNSceneExportDelegate delegate, SCNScene.Block_writeToURLOptionsDelegateProgressHandler progressHandler)
writeToURL:options:delegate:progressHandler: write the scene to the specified url. macOS 10.10 and lower only supports exporting to .dae files. Starting macOS 10.11 exporting supports .dae, .scn as well as file all formats supported by Model I/O. Starting iOS 10 exporting supports .scn as well as all file formats supported by Model I/O.- Parameters:
url- the destination url to write the scene to.options- A dictionary of options. The valid keys are described in the "Scene writing options" section.delegate- an optional delegate to manage external references such as images.progressHandler- an optional block to handle the progress of the operation.- Returns:
- Returns YES if the operation succeeded, NO otherwise. Errors checking can be done via the "error" parameter of the 'progressHandler'.
-
screenSpaceReflectionMaximumDistance
public double screenSpaceReflectionMaximumDistance()
[@property] screenSpaceReflectionMaximumDistance Determines the maximum distance in world units. Defaults to 1000.
-
screenSpaceReflectionSampleCount
public long screenSpaceReflectionSampleCount()
[@property] screenSpaceReflectionSampleCount Determines the sample count of the screen space reflection. Defaults to 64.
-
screenSpaceReflectionStride
public double screenSpaceReflectionStride()
[@property] screenSpaceReflectionStride Raytracing step size in pixel. The lower the better, the higher the faster. Defaults to 8.
-
setScreenSpaceReflectionMaximumDistance
public void setScreenSpaceReflectionMaximumDistance(double value)
[@property] screenSpaceReflectionMaximumDistance Determines the maximum distance in world units. Defaults to 1000.
-
setScreenSpaceReflectionSampleCount
public void setScreenSpaceReflectionSampleCount(long value)
[@property] screenSpaceReflectionSampleCount Determines the sample count of the screen space reflection. Defaults to 64.
-
setScreenSpaceReflectionStride
public void setScreenSpaceReflectionStride(double value)
[@property] screenSpaceReflectionStride Raytracing step size in pixel. The lower the better, the higher the faster. Defaults to 8.
-
setWantsScreenSpaceReflection
public void setWantsScreenSpaceReflection(boolean value)
[@property] wantsScreenSpaceReflection Determines if the scene use screen space reflection. Defaults to NO.
-
wantsScreenSpaceReflection
public boolean wantsScreenSpaceReflection()
[@property] wantsScreenSpaceReflection Determines if the scene use screen space reflection. Defaults to NO.
-
-