UE Assimp
Asset importer exporter for unreal engine
UAIMaterial Class Reference
Inheritance diagram for UAIMaterial:

Public Member Functions

void GetMaterialBaseColor (FLinearColor &BaseColor) const
 
FString GetMaterialName () const
 Returns the name of the material. More...
 
EAssimpReturn GetMaterialTexture (EAiTextureType Type, uint8 Index, FString &Path, EAiTextureMapping Mapping)
 Helper function to get all values pertaining to a particular texture slot from a material structure. More...
 

Static Public Member Functions

static UAIMaterialInternalCreateNewObject (UObject *Parent, aiMaterial *InMaterial)
 

Member Function Documentation

◆ GetMaterialName()

FString UAIMaterial::GetMaterialName ( ) const

Returns the name of the material.

Returns
The name of the material.

◆ GetMaterialTexture()

EAssimpReturn UAIMaterial::GetMaterialTexture ( EAiTextureType  Type,
uint8  Index,
FString &  Path,
EAiTextureMapping  Mapping 
)

Helper function to get all values pertaining to a particular texture slot from a material structure.

This function is provided just for convenience. You could also read the texture by parsing all of its properties manually. This function bundles all of them in a huge function monster.

Parameters
[in]matPointer to the input material. May not be NULL
[in]typeSpecifies the texture stack to read from (e.g. diffuse, specular, height map ...).
[in]indexIndex of the texture. The function fails if the requested index is not available for this texture type. #aiGetMaterialTextureCount() can be used to determine the number of textures in a particular texture stack.
[out]pathReceives the output path If the texture is embedded, receives a '*' followed by the id of the texture (for the textures stored in the corresponding scene) which can be converted to an int using a function like atoi. This parameter must be non-null.
mappingThe texture mapping mode to be used. Pass NULL if you're not interested in this information.
[out]uvindexFor UV-mapped textures: receives the index of the UV source channel. Unmodified otherwise. Pass NULL if you're not interested in this information.
[out]blendReceives the blend factor for the texture Pass NULL if you're not interested in this information.
[out]opReceives the texture blend operation to be perform between this texture and the previous texture. Pass NULL if you're not interested in this information.
[out]mapmodeReceives the mapping modes to be used for the texture. Pass NULL if you're not interested in this information. Otherwise, pass a pointer to an array of two aiTextureMapMode's (one for each axis, UV order).
[out]flagsReceives the the texture flags.
Returns
AI_SUCCESS on success, otherwise something else. Have fun.

The documentation for this class was generated from the following files: