KudanAR - iOS  1.6.0
ARView Class Reference

#import <ARView.h>

Inherits UIView.

Inherited by ARCameraView.

Instance Methods

(UIImage *) - screenshot
 
(void) - didRotateToInterfaceOrientation:
 
(instancetype) - initWithFrame:interfaceOrientation:
 

Properties

ARRenderTargetMainrenderTarget
 

Detailed Description

An ARView encapsulates AR activities. It is a custom subclass of UIView that specifically handles the rendering of AR content and any interaction with it. It uses an assocaited render target to draw more complex content that an ordinary UIView is not capable of displaying.

Method Documentation

◆ didRotateToInterfaceOrientation:

- (void) didRotateToInterfaceOrientation: (UIInterfaceOrientation)  orientation

An abstract method that can be implemented in subclasses, this provides a way to run code when the view's orientation changes.

◆ initWithFrame:interfaceOrientation:

- (instancetype) initWithFrame: (CGRect)  frame
interfaceOrientation: (UIInterfaceOrientation)  orientation 

Initialise a view with the given frame at the given interface orientation.

Example of use:

CGRect frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
ARView *view = [[ARView alloc] initWithFrame:frame interfaceOrientation:[[UIApplication sharedApplication] statusBarOrientation]];
Parameters
frameThe frame rectangle for the view.
interfaceOrientationThe orientation at the time of creation. ARView needs to keep track of this to function properly.

◆ screenshot

- (UIImage *) screenshot

Take a screenshot of the current render target. To use this method, it is recommended to use it via the ARCameraView in your ARCameraViewController.

Example of use:

UIImage image = [self.cameraView screenshot];
Returns
A UIImage containing the current framebuffer of the main render target. Resolution will match that of the renderTarget.

Property Documentation

◆ renderTarget

- (ARRenderTargetMain*) renderTarget
readwritenonatomicassign

The main render target associated with this view.


The documentation for this class was generated from the following files:
-[ARView screenshot]
UIImage * screenshot()
Definition: ARView.m:47
ARView
Definition: ARView.h:13