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 textureTypeDiscussion
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 *)pathParameters
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 *)pathParameters
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 *)aiSceneParameters
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 *materialNameDiscussion
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 colorDiscussion
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 applyEmbeddedTextureDiscussion
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 embeddedTextureIndexDiscussion
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 applyExternalTextureDiscussion
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 *externalTexturePathDiscussion
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 imageDataProviderDiscussion
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 imageDiscussion
A bitmap image representing either an external or embedded texture applied to a material property.
Declared In
SCNTextureInfo.m