This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::ImportMaterial Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.
Header: #include <UnigineImport.h>

This class represents a container of metadata for an imported material.

ImportMaterial Class

Members

void setData ( void * data ) #

Sets a new metadata of the imported material.

Arguments

  • void * data - The material metadata.

void * getData() const#

Returns the current metadata of the imported material.

Return value

Current material metadata.

void setName ( const char * name ) #

Sets a new name of the imported material.

Arguments

  • const char * name - The material name.

const char * getName() const#

Returns the current name of the imported material.

Return value

Current material name.

void setFilepath ( const char * filepath ) #

Sets a new path to the material's *.mat output file.

Arguments

  • const char * filepath - The output material file path.

const char * getFilepath() const#

Returns the current path to the material's *.mat output file.

Return value

Current output material file path.

ImportMaterial ( ) #

Constructor. Creates an empty ImportMaterial instance.

int getNumParameters ( ) const#

Returns the number of parameters of the imported material.

Return value

Number of material parameters.

Math::vec4 getParameter ( int index ) const#

Returns the value of the material parameter by its index in the list.

Arguments

Return value

Value of the material parameter with the specified index.

const char * getParameterName ( int index ) const#

Returns the name of the material parameter by its index in the list.

Arguments

Return value

Name of the material parameter with the specified index (if it exists).

void setParameter ( const char * name, const Math::vec4 & value ) #

Sets a new value for the material parameter with the specified name.

Arguments

  • const char * name - Name of the material parameter.
  • const Math::vec4 & value - New parameter value to be set.

bool hasParameter ( const char * name ) const#

Returns a value indicating if the material has a parameter with the specified name.

Arguments

  • const char * name - Name of the material parameter to be checked.

Return value

true if the material has a parameter with the specified name; otherwise false.

void removeParameter ( const char * name ) #

Removes a parameter of the imported material by its name.

Arguments

  • const char * name - Name of the material parameter to be removed.

Math::vec4 getParameter ( const char * name ) const#

Returns the value of the material parameter with the specified name.

Arguments

  • const char * name - Material parameter name.

Return value

Material parameter value as a four-component vector.

int getNumTextures ( ) const#

Returns the number of textures used in the imported material.

Return value

Number of textures used in the imported material.

Ptr<ImportTexture> getTexture ( int index ) const#

Returns a texture used in the material by its index.

Arguments

Return value

Material texture with the specified index.

const char * getTextureName ( int index ) const#

Returns the name of the texture with the specified index.

Arguments

Return value

Name of the material texture with the specified index.

void setTexture ( const char * name, const Ptr<ImportTexture> & value ) #

Sets a new imported texture to be used for the material texture with the specified name.

Arguments

  • const char * name - Material texture name.
  • const Ptr<ImportTexture> & value - New texture to be set.

Ptr<ImportTexture> getTexture ( const char * name ) const#

Returns a texture used in the material by its name.

Arguments

  • const char * name - Material texture name.

Return value

Imported texture currently set as the specified material texture.

bool hasTexture ( const char * name ) const#

Returns a value indicating if the material has a texture with the specified name.

Arguments

  • const char * name - Texture name to be checked.

Return value

true if the material has a texture with the specified name; otherwise false.

void removeTexture ( const char * name ) #

Removes a texture of the imported material by its name.

Arguments

  • const char * name - Name of the material texture to be removed.
Last update: 10.12.2022
Build: ()