KudanAR - iOS  1.6.0
ARAnimatedTexture Class Reference

#import <ARAnimatedTexture.h>

Inherits ARPlayableTexture, and <ARRendererDelegate>.

Instance Methods

(void) - addFrameFromImage:
 
- Instance Methods inherited from ARPlayableTexture
(void) - reset
 
(void) - play
 
(void) - pause
 
- 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
ARPlayableTextureState playState
 
float frameRate
 
NSTimeInterval pauseTolerance
 
NSTimeInterval resetThreshold
 
BOOL lastFramePersist
 
id< ARPlayableTextureDelegatedelegate
 
- Properties inherited from ARTexture
GLuint textureID
 
unsigned long width
 
unsigned long height
 
BOOL isPowerOfTwo
 
ARTextureFilter minificationFilter
 
ARTextureFilter magnificationFilter
 

Additional Inherited Members

- Protected Types inherited from ARPlayableTexture
enum  ARPlayableTextureState { ARPlayableTextureStateUninitialised, ARPlayableTextureStatePaused, ARPlayableTextureStatePlaying, ARPlayableTextureStateFinished }
 
- Protected Types inherited from ARTexture
enum  ARTextureFilter { ARTextureFilterNearest, ARTextureFilterLinear }
 
- 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

◆ addFrameFromImage:

- (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:[UIImage imageNamed:@"exampleImage.jpg"]];
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 when the sequence has finished.

Property Documentation

◆ numberOfFrames

- (NSUInteger) numberOfFrames
readnonatomicassign

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


The documentation for this class was generated from the following files:
ARAnimatedTexture
Definition: ARAnimatedTexture.h:12