SCNTextureInfo Class Reference

Inherits from NSObject
Declared in SCNTextureInfo.h
SCNTextureInfo.m

Overview

An object which scans the assimp material, identifies if a color, embedded texture or external texture exists and generates a color/texture object.

The color and texture objects are platform independent CoreGraphics objects thereby removing the depdence on external paths for texture resources.

Other Methods

  textureType

The texture type: diffuse, specular etc.

@property enum aiTextureType textureType

Discussion

The texture type: diffuse, specular etc.

Declared In

SCNTextureInfo.h

– initWithMeshIndex:textureType:inScene:atPath:

Create a texture metadata object for a material property.

- (id)initWithMeshIndex:(int)aiMeshIndex textureType:(enum aiTextureType)aiTextureType inScene:(const struct aiScene *)aiScene atPath:(NSString *)path

Parameters

aiMeshIndex

The index of the mesh to which this texture is applied.

aiTextureType

The texture type: diffuse, specular etc.

aiScene

The assimp scene.

path

The path to the scene file to load.

Return Value

A new texture info.

Discussion

Create a texture metadata object for a material property.

Declared In

SCNTextureInfo.h

– getMaterialPropertyContents

The contents of the material property which can be a texture or color.

- (id)getMaterialPropertyContents

Return Value

The contents which is either a texture or a color.

Discussion

The contents of the material property which can be a texture or color.

Declared In

SCNTextureInfo.h

– releaseContents

Releases the core graphics image resources used to load colors and textures.

- (void)releaseContents

Discussion

Releases the core graphics image resources used to load colors and textures.

Declared In

SCNTextureInfo.h

Other Methods

– checkTextureTypeForMaterial:withTextureType:inScene:atPath:

Inspects the material texture properties to determine if color, embedded texture or external texture should be applied to the material property.

- (void)checkTextureTypeForMaterial:(const struct aiMaterial *)aiMaterial withTextureType:(enum aiTextureType)aiTextureType inScene:(const struct aiScene *)aiScene atPath:(NSString *)path

Parameters

aiMaterial

The assimp material.

aiTextureType

The material property: diffuse, specular etc.

aiScene

The assimp scene.

path

The path to the scene file to load.

Discussion

Inspects the material texture properties to determine if color, embedded texture or external texture should be applied to the material property.

Declared In

SCNTextureInfo.m

– generateCGImageForEmbeddedTextureAtIndex:inScene:

Generates a bitmap image representing the embedded texture.

- (void)generateCGImageForEmbeddedTextureAtIndex:(int)index inScene:(const struct aiScene *)aiScene

Parameters

index

The index of the texture in assimp scene’s textures.

aiScene

The assimp scene.

Discussion

Generates a bitmap image representing the embedded texture.

Declared In

SCNTextureInfo.m

– generateCGImageForExternalTextureAtPath:

Generates a bitmap image representing the external texture.

- (void)generateCGImageForExternalTextureAtPath:(NSString *)path

Parameters

path

The path to the scene file to load.

Discussion

Generates a bitmap image representing the external texture.

Declared In

SCNTextureInfo.m

Extension Methods

  materialName

The material name which is the owner of this texture.

@property (nonatomic, readwrite) NSString *materialName

Discussion

The material name which is the owner of this texture.

Declared In

SCNTextureInfo.m

  applyColor

A Boolean value that determines whether a color is applied to a material property.

@property bool applyColor

Discussion

A Boolean value that determines whether a color is applied to a material property.

Declared In

SCNTextureInfo.m

  color

The actual color to be applied to a material property.

@property CGColorRef color

Discussion

The actual color to be applied to a material property.

Declared In

SCNTextureInfo.m

  colorSpace

A profile that specifies the interpretation of a color to be applied to a material property.

@property CGColorSpaceRef colorSpace

Discussion

A profile that specifies the interpretation of a color to be applied to a material property.

Declared In

SCNTextureInfo.m

  applyEmbeddedTexture

A Boolean value that determines if embedded texture is applied to a material property.

@property bool applyEmbeddedTexture

Discussion

A Boolean value that determines if embedded texture is applied to a material property.

Declared In

SCNTextureInfo.m

  embeddedTextureIndex

The index of the embedded texture in the array of assimp scene textures.

@property int embeddedTextureIndex

Discussion

The index of the embedded texture in the array of assimp scene textures.

Declared In

SCNTextureInfo.m

  applyExternalTexture

A Boolean value that determines if an external texture is applied to a material property.

@property bool applyExternalTexture

Discussion

A Boolean value that determines if an external texture is applied to a material property.

Declared In

SCNTextureInfo.m

  externalTexturePath

The path to the external texture resource on the disk.

@property NSString *externalTexturePath

Discussion

The path to the external texture resource on the disk.

Declared In

SCNTextureInfo.m

  imageSource

An opaque type that represents the external texture image source.

@property CGImageSourceRef imageSource

Discussion

An opaque type that represents the external texture image source.

Declared In

SCNTextureInfo.m

  imageDataProvider

An abstraction for the raw image data of an embedded texture image source that eliminates the need to manage raw memory buffer.

@property CGDataProviderRef imageDataProvider

Discussion

An abstraction for the raw image data of an embedded texture image source that eliminates the need to manage raw memory buffer.

Declared In

SCNTextureInfo.m

  image

A bitmap image representing either an external or embedded texture applied to a material property.

@property CGImageRef image

Discussion

A bitmap image representing either an external or embedded texture applied to a material property.

Declared In

SCNTextureInfo.m