KudanAR - iOS  1.6.0
ARFullscreenManager Class Reference

#import <ARFullscreenManager.h>

Inherits NSObject, and <ARRendererDelegate>.

Instance Methods

(void) - initialiseWithViewport:
 
(void) - deinitialise
 
(void) - setDeviceOrientation:
 
(void) - makeNodeFullscreen:
 
(void) - disableFullscreen
 
- Instance Methods inherited from <ARRendererDelegate>
(void) - rendererPreRender
 
(void) - rendererPostRender
 
(void) - rendererDidPause
 
(void) - rendererDidResume
 

Class Methods

(ARFullscreenManager *) + getInstance
 

Properties

float nearPlaneWidth
 
float nearPlaneHeight
 
float renderTargetCorrection
 
CGPoint principlePointOffset
 
ARQuaternionscreenOrientation
 
ARWorldworld
 
ARVideoNodefullscreenNode
 
NSTimeInterval fullscreenAnimationTime
 
NSTimeInterval rotationAnimationTime
 
NSTimeInterval backgroundFadeAnimationTime
 
BOOL showPlaceholder
 
BOOL showBackground
 

Detailed Description

The ARFullscreenManager is a class that allows ARVideos to smoothly transition to fullscreen videos and back.

Example of use:

-(void)setup
{
ARImageTrackable *imageTrackable = [[ARImageTrackable alloc] initWithImage:[UIImage imageNamed:@"example.jpg"] name:@"Example Marker"];
ARNode *node = [ARNode nodeWithName:@"Example Node"];
ARVideoNode *videoNode = [[ARVideoNode alloc] initWithBundledFile:@"example.mp4"];
[imageTrackable.world addChild:node];
[node addChild:videoNoce];
UIPinchGestureRecognizer *pinchRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(respondToPinch:)];
[self addGestureRecognizer:pinchRecognizer];
}
- (void)respondToPinch:(UIPinchGestureRecognizer *)recognizer
{
[[ARFullscreenManager getInstance] fullScreenManager makeNodeFullscreen:videoNode];
}

Method Documentation

◆ deinitialise

- (void) deinitialise

Disables fullscreen and removes all references and delegates.

Example of use:

◆ disableFullscreen

- (void) disableFullscreen

Transitions the current fullscreen node back to it's original transformation in it's parent.

Example of use:

◆ getInstance

+ (ARFullscreenManager *) getInstance

Gets the ARFullscreenManager singleton.

Example of use:

◆ initialiseWithViewport:

- (void) initialiseWithViewport: (ARViewPort *)  viewport

Initialises the manager to enable fullscreen in the desired viewport. Must be called for fullscreen to occur.

Example of use:

[[ARFullscreenManager getInstance] initialiseWithViewport:self.cameraView.contentViewPort];

◆ makeNodeFullscreen:

- (void) makeNodeFullscreen: (ARVideoNode *)  node

Makes the specified ARVideoNode transition to fullscreen view. Can only be called if no other node is currently fullscreen.

Example of use:

// self.videoNode - A previously made ARVideoNode
[[ARFullscreenManager getInstance] makeNodeFullscreen:self.videoNode];

◆ setDeviceOrientation:

- (void) setDeviceOrientation: (UIInterfaceOrientation)  orientation

Called when the orientation of the device changes. Used to keep fullscreen nodes in the correct orientation. Should be called automatically.

Example of use:

[[ARFullscreenManager getInstance] fullscreenManager setDeviceOrientation:UIInterfaceOrientationPortrait];

Property Documentation

◆ backgroundFadeAnimationTime

- (NSTimeInterval) backgroundFadeAnimationTime
readwritenonatomicassign

The amount of time, in seconds, that the background around the video fading to black should take. Changing this value will make the transition faster or slower. By default, it takes 1 second to complete. This only applies if showBackground is set to YES.

◆ fullscreenAnimationTime

- (NSTimeInterval) fullscreenAnimationTime
readwritenonatomicassign

The amount of time, in seconds, that the animation going between node and fullscreen should take. Changing this value will make the transition faster or slower. By default, it takes 1 second to complete.

◆ fullscreenNode

- (ARVideoNode*) fullscreenNode
readnonatomicassign

The current node in fullscreen. Will be nil if no node is currently fullscreen.

◆ nearPlaneHeight

- (float) nearPlaneHeight
readnonatomicassign

The height of the camera's near clip plane.

◆ nearPlaneWidth

- (float) nearPlaneWidth
readnonatomicassign

The width of the camera's near clip plane.

◆ principlePointOffset

- (CGPoint) principlePointOffset
readnonatomicassign

The offset of the camera principle point from the screen centre.

◆ renderTargetCorrection

- (float) renderTargetCorrection
readnonatomicassign

Correctional value to account for the difference in viewport width to its associated render target.

◆ rotationAnimationTime

- (NSTimeInterval) rotationAnimationTime
readwritenonatomicassign

The amount of time, in seconds, that the animation for turning the video when the screen orientation changes should take. Changing this value will make the animation faster or slower. By default, it takes 1 second to complete.

◆ screenOrientation

- (ARQuaternion*) screenOrientation
readnonatomicassign

Rotation of the screen from default state of UIInterfaceOrientationLandscapeLeft.

◆ showBackground

- (BOOL) showBackground
readwritenonatomicassign

Whether or not the node will have a black borders that fade in to obscure the rest of the scene after enabling fullscreen. The size of the black borders will be dependant on the aspect ratio of the video vs the aspect ratio of the screen.

◆ showPlaceholder

- (BOOL) showPlaceholder
readwritenonatomicassign

Whether or not a black placeholder box will be left in the place of a node when fullscreen is enabled. A black box will appear at the VideoNode's location if YES. Nothing will appear at the node's location if NO.

◆ world

- (ARWorld*) world
readnonatomicassign

The ARWorld containing the fullscreen node.


The documentation for this class was generated from the following files:
+[ARFullscreenManager getInstance]
ARFullscreenManager * getInstance()
Definition: ARFullscreenManager.m:73
ARImageTrackable
Definition: ARImageTrackable.h:12
ARNode
Definition: ARNode.h:19
ARFullscreenManager
Definition: ARFullscreenManager.h:34
ARImageTrackable::world
ARNode * world
Definition: ARImageTrackable.h:56
-[ARFullscreenManager disableFullscreen]
void disableFullscreen()
Definition: ARFullscreenManager.m:249
-[ARFullscreenManager deinitialise]
void deinitialise()
Definition: ARFullscreenManager.m:90
ARVideoNode
Definition: ARVideoNode.h:12