![]() |
KudanAR - iOS
1.6.0
|
#import <ARGyroManager.h>
Inherits NSObject, and <ARRendererDelegate>.
Instance Methods | |
(void) | - initialise |
(void) | - deinitialise |
(void) | - start |
(void) | - stop |
(void) | - actualStart |
(void) | - actualStop |
(void) | - updateNode |
(void) | - addDelegate: |
(void) | - removeDelegate: |
![]() | |
(void) | - rendererPreRender |
(void) | - rendererPostRender |
(void) | - rendererDidPause |
(void) | - rendererDidResume |
Class Methods | |
(ARGyroManager *) | + getInstance |
Properties | |
ARGyroManagerState | gyroState |
ARGyroManagerStateInternal | internalGyroState |
CMMotionManager * | motionManager |
CMAttitudeReferenceFrame | gyroReferenceFrame |
ARWorld * | world |
A manager class representing the device's gyro. This class is resposible for using IMU data to transform AR content with device rotations.
- (enum) ARGyroManagerState |
- (enum) ARGyroManagerStateInternal |
- (void) addDelegate: | (id <ARGyroManagerDelegate>) | delegate |
Add a delegate for gyro event notifications.
delegate | The delegate to add to the Gyro Manager. |
- (void) deinitialise |
Deinitialises the ARGyroManager singleton and dereferences CMMotiionManger.
+ (ARGyroManager *) getInstance |
Gets the instance of the gyro manager singleton.
Example of use:
- (void) initialise |
Initialises the ARGyroManager singleton and the ARCMMotionManger singleton with a default gyro update interval of 0.05 seconds.
- (void) removeDelegate: | (id <ARGyroManagerDelegate>) | delegate |
Remove a delegate for gyro event notifications.
delegate | The delegate to remove from the Gyro Manager. |
- (void) start |
Sets the gyro state to ARGyroManagerStateInitialised, starts device motion updates and adds ARGyroManager to the array of ARRenderDelegates.
- (void) stop |
Sets the gyro state to ARGyroManagerStateStopped, stops device motion updates and removes ARGyroManager from the array of ARRenderDelegates.
- (void) updateNode |
Updates the world node by getting a 3x3 rotation matrix from the gyroscope attitude, rotating it so that its axes match the camera's, and applying it to the orientation of the Gyro Manager's world.
|
readwritenonatomicassign |
The reference frame used to start the motion manager. Default is CMAttitudeReferenceFrameXTrueNorthZVertical.
|
readwritenonatomicassign |
The gyro manager's current state.
|
readwritenonatomicassign |
The gyro managers current internal state
|
readnonatomicassign |
The motion manager used to update the ARGyroManager's orientation.
|
readwritenonatomicassign |
A node representing the ARGyroManager's world.