Package apple.arkit
Class ARSession
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.arkit.ARSession
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceARSession.Block_getCurrentWorldMapWithCompletionHandlerstatic interfaceARSession.Block_trackedRaycastUpdateHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedARSession(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()voidaddAnchor(ARAnchor anchor)Adds an anchor to the session.static ARSessionalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)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()ARConfigurationconfiguration()The configuration currently being used by the session.ARFramecurrentFrame()The current frame of the session.static java.lang.StringdebugDescription_static()ARSessionDelegatedelegate()A delegate for receiving ARSession updates.NSObjectdelegateQueue()The dispatch queue on which the delegate calls are performed.static java.lang.Stringdescription_static()voidgetCurrentWorldMapWithCompletionHandler(ARSession.Block_getCurrentWorldMapWithCompletionHandler completionHandler)Copies the current state of the world being tracked by the session.static longhash_static()NSUUIDidentifier()Unique identifier of the running session.ARSessioninit()static 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)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()voidpause()Pauses the session.NSArray<? extends ARRaycastResult>raycast(ARRaycastQuery query)Perform a raycast.voidremoveAnchor(ARAnchor anchor)Removes an anchor from the session.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidrunWithConfiguration(ARConfiguration configuration)Runs the session with the provided configuration.voidrunWithConfigurationOptions(ARConfiguration configuration, long options)Runs the session with the provided configuration and options.voidsetDelegate(ARSessionDelegate value)A delegate for receiving ARSession updates.voidsetDelegate_unsafe(ARSessionDelegate value)A delegate for receiving ARSession updates.voidsetDelegateQueue(NSObject value)The dispatch queue on which the delegate calls are performed.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()ARTrackedRaycasttrackedRaycastUpdateHandler(ARRaycastQuery query, ARSession.Block_trackedRaycastUpdateHandler updateHandler)Perform a tracked raycast.voidupdateWithCollaborationData(ARCollaborationData collaborationData)Update session with collaboration data.static longversion_static()-
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()
-
addAnchor
public void addAnchor(ARAnchor anchor)
Adds an anchor to the session. The anchor will be added in the next frame update.- Parameters:
anchor- The anchor to add.
-
alloc
public static ARSession 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()
-
configuration
public ARConfiguration configuration()
The configuration currently being used by the session.
-
currentFrame
public ARFrame currentFrame()
The current frame of the session.
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
delegate
public ARSessionDelegate delegate()
A delegate for receiving ARSession updates.
-
delegateQueue
public NSObject delegateQueue()
The dispatch queue on which the delegate calls are performed. If not provided or nil, delegate calls will be performed on the main queue.
-
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()
-
pause
public void pause()
Pauses the session. Once paused, no more updates will be received from the session until run is called again.
-
removeAnchor
public void removeAnchor(ARAnchor anchor)
Removes an anchor from the session. The anchor will be removed from subsequent frame updates.- Parameters:
anchor- The anchor to remove.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
runWithConfiguration
public void runWithConfiguration(ARConfiguration configuration)
Runs the session with the provided configuration. Calling run on a session that has already started will transition immediately to using the new configuration.- Parameters:
configuration- The configuration to use.
-
runWithConfigurationOptions
public void runWithConfigurationOptions(ARConfiguration configuration, long options)
Runs the session with the provided configuration and options. Calling run on a session that has already started will transition immediately to using the new configuration. Options can be used to alter the default behavior when transitioning configurations.- Parameters:
configuration- The configuration to use.options- The run options to use.
-
setDelegate_unsafe
public void setDelegate_unsafe(ARSessionDelegate value)
A delegate for receiving ARSession updates.
-
setDelegate
public void setDelegate(ARSessionDelegate value)
A delegate for receiving ARSession updates.
-
setDelegateQueue
public void setDelegateQueue(NSObject value)
The dispatch queue on which the delegate calls are performed. If not provided or nil, delegate calls will be performed on the main queue.
-
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()
-
getCurrentWorldMapWithCompletionHandler
public void getCurrentWorldMapWithCompletionHandler(ARSession.Block_getCurrentWorldMapWithCompletionHandler completionHandler)
Copies the current state of the world being tracked by the session. A world map is only provided when running an ARWorldTrackingConfiguration.- Parameters:
completionHandler- The completion handler to call when the get has completed. This handler is executed on the session's delegate queue. The completion handler takes the following parameters: worldMap - The current world map or nil if unavailable. error - An error that indicates why the world map is unavailable, or nil if a world map was provided.
-
identifier
public NSUUID identifier()
Unique identifier of the running session. The identifier may change after calling runWithConfiguration.
-
raycast
public NSArray<? extends ARRaycastResult> raycast(ARRaycastQuery query)
Perform a raycast.- Parameters:
query- Raycast query used for raycasting.- Returns:
- List of raycast results, sorted from nearest to farthest (in distance from the camera). The results could be empty if raycast fails.
-
trackedRaycastUpdateHandler
public ARTrackedRaycast trackedRaycastUpdateHandler(ARRaycastQuery query, ARSession.Block_trackedRaycastUpdateHandler updateHandler)
Perform a tracked raycast. The session performs continuous raycasting and calls the update handler with the updated results. The ARTrackedRaycast object returned can be used to update the raycast with a new raycast query or stop raycasting.- Parameters:
query- Raycast query used for raycasting.updateHandler- update handler where updated list of results, sorted from nearest to farthest (in distance from the camera) are delivered. updateHandler will be called on session's delegate queue.- Returns:
- Tracked raycast object used to update or stop raycasting. This could be nil if the raycast fails or if the configuration is not `ARWorldTrackingConfiguration` or its subclasses.
-
updateWithCollaborationData
public void updateWithCollaborationData(ARCollaborationData collaborationData)
Update session with collaboration data. Use this to update the session with collaboration data received from other participants.- Parameters:
collaborationData- Collaboration data for updating the session.- See Also:
ARCollaborationData
-
-