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
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
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
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
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
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