KudanAR - iOS
ARRenderer Class Reference

#import <ARRenderer.h>

+ Inheritance diagram for ARRenderer:
+ Collaboration diagram for ARRenderer:

Instance Methods

(void) - useContext
 
(void) - addDelegate:
 
(void) - removeDelegate:
 
(void) - addRenderTarget:
 
(void) - removeRenderTarget:
 
(void) - initialise
 
(void) - deinitialise
 
(void) - pause
 
(void) - resume
 

Class Methods

(ARRenderer *) + getInstance
 

Properties

ARRendererState rendererState
 
NSTimeInterval currentFrameTime
 
NSArray * renderTargets
 

Detailed Description

A class used for rendering the camera image and AR content on screen.

Method Documentation

- (void) addDelegate: (id< ARRendererDelegate >)  delegate

Add a delegate for rendering event notifications.

Example of use:

[[ARRenderer getInstance] addDelegate:self];
Parameters
delegateThe delegate to add.
- (void) addRenderTarget: (ARRenderTarget *)  renderTarget

Add a render target to the renderer. This is required if render targets are to be automatically drawn each frame.

Example of use:

// self.renderTarget - A previously created ARRenderTarget.
[[ARRenderer getInstance] addRenderTarget:self.renderTarget];
Parameters
renderTargetThe render target to add.
- (void) deinitialise

Deinitialise the renderer. This is usually called automatically. It is not recommended to call this method manually. Changes the ARRendererState to ARRendererStateUninitialised.

Example of use:

+ (ARRenderer *) getInstance

Get the ARRenderer singleton.

Example of use:

Returns
The singleton instance.
- (void) initialise

Initialise the renderer. This should be called automatically. It is not recommended to call this method manually.

Example of use:

- (void) pause

Pause all rendering operations. Changes the ARRendererState to ARRendererStatePaused. Any delegates implementing rendererDidPause will be called at this time.

Example of use:

- (void) removeDelegate: (id< ARRendererDelegate >)  delegate

Remove a delegate for rendering event notifications.

Example of use:

[[ARRenderer getInstance] removeDelegate:self];
Parameters
delegateThe delegate to remove.
- (void) removeRenderTarget: (ARRenderTarget *)  renderTarget

Remove a render target from the renderer.

Example of use:

[[ARRenderer getInstance] removeRenderTarget:renderTarget];
Parameters
renderTargetThe render target to remove.
- (void) resume

Resume rendering operations. Changes the ARRendererState to ARRendererStateRunning. Any delegates implementing rendererDidResume will be called this time.

Example of use:

- (void) useContext

Use this renderer's OpenGL context. This should be called if you intend to modify content (textures, meshes, materials) from a new thread.

Example of use:

Property Documentation

- (NSTimeInterval) currentFrameTime
readnonatomicassign

The time, in seconds, of the current frame.

- (ARRendererState) rendererState
readwritenonatomicassign

The current renderer state (Uninitialised, Paused or Running).

- (NSArray*) renderTargets
readnonatomicassign

The list of ARRenderTarget objects registered with the renderer.


The documentation for this class was generated from the following file: