KudanAR - iOS  1.6.0
ARViewPort Class Reference

#import <ARViewPort.h>

Inherits NSObject.

Instance Methods

(instancetype) - initWithOffsetX:y:height:width:
 

Properties

float offsetX
 
float offsetY
 
float width
 
float height
 
ARCameracamera
 
ARRenderTargetrenderTarget
 
int zOrder
 

Detailed Description

ARViewPort represents a viewport into the scene. It can be used for cropping the rendered image or for zoom. The creation of ARViewPorts is usually handled automatically by the ARCameraView. If you wish to use your own custom view controller, rather than the ARCameraViewController, one of the things you will have to do is create the ncessary ARViewPorts for the camera and content manually.

Method Documentation

◆ initWithOffsetX:y:height:width:

- (instancetype) initWithOffsetX: (float)  x
y: (float)  y
height: (float)  height
width: (float)  width 

Initialises an instance of an ARViewPort with the given X and Y offset values and the given height and width values.

Example of use:

ARViewPort *viewPort = [[ARViewPort alloc] initWithOffsetX:0.0 y:0.0 height:self.view.frame.size.height width:self.view.frame.size.width];
Parameters
xBottom left x coordinate.
yBottom left y coordinate.
heightViewport height.
widthViewport width.

Property Documentation

◆ camera

- (ARCamera *) camera
readwritenonatomicassign

The ARViewPorts camera. This acts as the root of the viewports scene graph.

◆ height

- (float) height
readwritenonatomicassign

The width of the viewport in pixels, including any that extend beyond edge of the screen.

◆ offsetX

- (float) offsetX
readwritenonatomicassign

The offset of the viewport in the X direction. This can be negative to crop horizontally.

◆ offsetY

- (float) offsetY
readwritenonatomicassign

The offset of the viewport in the Y direction. This can be negative to crop vertically.

◆ renderTarget

- (ARRenderTarget*) renderTarget
readwritenonatomicweak

The ARRenderTarget that this viewport belongs to.

◆ width

- (float) width
readwritenonatomicassign

The width of the viewport in pixels, including any that extend beyond edge of the screen.

◆ zOrder

- (int) zOrder
readwritenonatomicassign

When there are multiple viewports added to a render target, this value determines the order. Lower values get rendered first. Negative integers are OK.


The documentation for this class was generated from the following files:
ARViewPort::width
float width
Definition: ARViewPort.h:26
ARViewPort
Definition: ARViewPort.h:12
ARViewPort::height
float height
Definition: ARViewPort.h:31