KudanAR - iOS
ARAnimatedTexture Class Reference

#import <ARAnimatedTexture.h>

+ Inheritance diagram for ARAnimatedTexture:
+ Collaboration diagram for ARAnimatedTexture:

Instance Methods

(void) - addFrameFromImage:
 
- Instance Methods inherited from ARPlayableTexture
(void) - reset
 
(void) - play
 
(void) - pause
 
(typedef) - NS_ENUM
 
- Instance Methods inherited from ARTexture
(instancetype) - initWithUIImage:
 
(instancetype) - initWithEmpty
 
(instancetype) - initWithExistingTextureID:
 
(void) - generateTexture
 
(void) - uploadTexture
 
(void) - loadTextureFromUIImage:reverseLines:
 
(void) - uploadBGRATexture:width:height:
 
(void) - uploadBGRATextureSub:width:height:
 
(BOOL) - preRender
 
(void) - postRender
 
- Instance Methods inherited from <ARRendererDelegate>
(void) - rendererPreRender
 
(void) - rendererPostRender
 
(void) - rendererDidPause
 
(void) - rendererDidResume
 

Properties

NSUInteger numberOfFrames
 
- Properties inherited from ARPlayableTexture
float frameRate
 
ARPlayableTextureState playState
 
NSTimeInterval pauseTolerance
 
NSTimeInterval resetThreshold
 
BOOL lastFramePersist
 
id< ARPlayableTextureDelegatedelegate
 
- Properties inherited from ARTexture
unsigned textureID
 
unsigned long width
 
unsigned long height
 
BOOL isPowerOfTwo
 
ARTextureFilter minificationFilter
 
ARTextureFilter magnificationFilter
 

Additional Inherited Members

- Protected Attributes inherited from ARTexture
NSData * _rawImage
 

Detailed Description

A texture consisting of a series of frames. Each frame added to this texture is played in sequence when the texture is rendered on a material until it the sequence reaches the end, at which point the default behaviour is to loop back to the first frame and start again. This behaviour can be disabled if need be, so that the last frame in the sequence is continually rendered once the sequence has finished. This is useful for simple 2D animations, akin to a gif or sprite sheet, as transparency is maintained when using .png images.

Method Documentation

- (void) addFrameFromImage: (UIImage *)  image

Adds a new frame to the end of this texture's sequence.

Example of use:

ARAnimatedTexture *animatedTexture = [[ARAnimatedTexture alloc] init];
[animatedTexture addFrameFromImage:image];
Parameters
imageThe UIImage containing the texture. It should have the same resolution as any previously added images. If lastFramePersist (Inherited from ARPlayableTexture) is set to YES, this will become the frame that gets continually rendered once the sequence has finished.

Property Documentation

- (NSUInteger) numberOfFrames
readnonatomicassign

The total number of frames in this texture's sequence.


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