![]() |
KudanAR - iOS
1.6.0
|
#import <ARTextureCube.h>
Inherits ARTexture.
Instance Methods | |
(instancetype) | - initWithUIImages: |
(instancetype) | - initWithBundledFiles: |
![]() | |
(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 |
Additional Inherited Members | |
![]() | |
enum | ARTextureFilter { ARTextureFilterNearest, ARTextureFilterLinear } |
![]() | |
NSData * | _rawImage |
![]() | |
GLuint | textureID |
unsigned long | width |
unsigned long | height |
BOOL | isPowerOfTwo |
ARTextureFilter | minificationFilter |
ARTextureFilter | magnificationFilter |
An ARTextureCube is a "Cubemap" texture, a collection of six square textures that represent the reflections on an environment. The six squares form the faces of an imaginary cube that surrounds an object. Each face represents the view along the directions of the world axes (up, down, left, right, forward and back). Cubemaps are often used to capture reflections or “surroundings” of objects. For example, skyboxes often use cubemaps, as do environment reflections, which allow an object to appear as though it is a reflective surface.
Images used must be a "Power of Two" texture. This means that the width and height of each image must be a power of 2 (128, 256, 512, 1024, etc).
- (instancetype) initWithBundledFiles: | (NSArray *) | bundledFiles |
Initialise with an array of strings, each of which is a file path relative to the main bundle, pointing to image files. The array must be in the correct order for the mapping to work properly. The order of images cannot be altered once initialised. The correct order of images is as follows: Element 0 - Right. Element 1 - Left. Element 2 - Top. Element 3 - Bottom. Element 4 - Front. Element 5 - Back.
Example of use:
images | An array of image file names relative to the main bundle. |
- (instancetype) initWithUIImages: | (NSArray *) | images |
Initialise a cube with an array of UIImage images. The array must be in the correct order for the mapping to work properly. The order of images cannot be altered once initialised. The correct order of images is as follows: Element 0 - Right. Element 1 - Left. Element 2 - Top. Element 3 - Bottom. Element 4 - Front. Element 5 - Back.
Example of use:
images | An array of UIImage objects to load into the cube map. |