KudanAR - iOS  1.6.0
ARGyroPlaceManager Class Reference

#import <ARGyroPlaceManager.h>

Inherits NSObject, and <ARRendererDelegate>.

Instance Methods

(void) - initialise
 
(void) - deinitialise
 
- Instance Methods inherited from <ARRendererDelegate>
(void) - rendererPreRender
 
(void) - rendererPostRender
 
(void) - rendererDidPause
 
(void) - rendererDidResume
 

Class Methods

(ARGyroPlaceManager *) + getInstance
 

Properties

float floorDepth
 
ARWorldworld
 
CGPoint screenCentre
 

Detailed Description

The ARGyroPlaceManager is a sensor-only tracker that places content on a virtual floor plane where the device is aimed.

Nodes added to the world of this manager will move with the world of this manager, which automatically updates its properties as the device moves and the gyroscope updates.

This is most commonly used to place the target node, which acts as a kind of preview for where content will be placed when the ArbiTracker starts.

Method Documentation

◆ deinitialise

- (void) deinitialise

Deinitialise the ARGyroPlaceManager.

By doing so: ARGyroPlaceManager removes itself from being a delegate of ARRenderer ARGyroManager is stopped and deinitialised world node is set to nil floorDepth set to 0

Example of use:

◆ getInstance

+ (ARGyroPlaceManager *) getInstance

Get the Gyro Place Manager singleton.

Example of use:

Returns
The Gyro Place Manager singleton.

◆ initialise

- (void) initialise

Initialise the Gyro Place Manager. Sometimes, while the manager first initialises, the device's gyroscope will report incorrect values, causing the orientation of the target node to appear incorrect. This will correct itself after a number of frames.

As part of the initialisation: New world is created The floorDepth is set to -150 The ARGyroPlaceManager adds itself as a delegate of ARRenderer ARGyroManager is initialised and started.

Example of use:

Property Documentation

◆ floorDepth

- (float) floorDepth
readwritenonatomicassign

The distance between the floor and the camera. The units are arbitrary but can have real-world meaning to achieve realistic scale for placed content. Eg. if you estimate the device to be 100cm above the floor, set floorDepth to -100. Content rendered using this same space will look approximately the correct scale. The default value is -150;

◆ screenCentre

- (CGPoint) screenCentre
readwritenonatomicassign

The centre of the screen in viewport coordinates. This is automatically set but can be overridden if you with a different part of the screen to act as the target.

◆ world

- (ARWorld*) world
readwritenonatomicassign

The world node that is controlled by this tracker. The world is placed where the camera normal intersects the floor plane.


The documentation for this class was generated from the following files:
+[ARGyroPlaceManager getInstance]
ARGyroPlaceManager * getInstance()
Definition: ARGyroPlaceManager.m:25
-[ARGyroPlaceManager deinitialise]
void deinitialise()
Definition: ARGyroPlaceManager.m:67
-[ARGyroPlaceManager initialise]
void initialise()
Definition: ARGyroPlaceManager.m:43
ARGyroPlaceManager
Definition: ARGyroPlaceManager.h:14