This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор 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::Plugins::IG::IGConfig Class

Header: #include <plugins/Unigine/IG/UnigineIG.h>

This class is used to manage the IG configuration via API.

Notice
IG plugin must be loaded.

The CloudTypeDef structure represents the cloud type definitions. It is declared as follows:

Source code (C++)
struct CloudTypeDef
{
	int type = 0;
	Unigine::String name;
	Unigine::String material;
};

The PrecipitationTypeDef structure represents the precipitation type definitions. It is declared as follows:

Source code (C++)
struct PrecipitationTypeDef
{
	int type = 0;
	Unigine::String name;
	Unigine::String far_node_path;
	Unigine::String near_node_path;
};

The SynckerChannelDef structure represents the Syncker channel definitions. It is declared as follows:

Source code (C++)
struct SynckerChannelDef
{
	Unigine::String slave_name;
	int view_id = 0;
	bool use_projection = false;
};

The DatabaseDef structure represents the database definitions. It is declared as follows:

Source code (C++)
struct DatabaseDef
{
	int database_id = 0;
	Unigine::String world_name;
	Unigine::Math::Vec3 geodetic_origin;
};

The ViewTypeDef structure represents the view type definitions. It is declared as follows:

Source code (C++)
struct ViewTypeDef
{
	int view_type_id = 0;
	Unigine::String post_material;
};

The EntityTypeDef structure represents the entity type definitions with the components, articulated parts, and volumes. It is declared as follows:

Source code (C++)
struct EntityTypeDef
{
	int64_t id = 0;
	Unigine::String name;
	Unigine::String path;
	int64_t inherit_id = 0;

	struct ComponentDef
	{
		struct ComponentParameterDef
		{
			ITEM_TYPE type = ITEM_TYPE::UNKNOWN;
			Unigine::String name;
			Unigine::String parameter_name;
		};
		bool inherited = false;
		int id = 0;
		Unigine::String name;
		Unigine::String node_path;
		Unigine::String property_name;
		Unigine::Vector<ComponentParameterDef> parameters;
	};
	Unigine::Map<int, ComponentDef> components;

	struct ArticulatedPartDef
	{
		bool inherited = false;
		int id = 0;
		Unigine::String name;
		Unigine::Vector<Unigine::String> node_path;
		Unigine::Vector<Unigine::Math::ivec3> is_inverted;
	};
	Unigine::Map<int, ArticulatedPartDef> articulated_parts;

	struct VolumeDef
	{
		bool inherited = false;
		int id = 0;
		int shape_id = 0;
		Unigine::String node_path;
		Unigine::String name;
	};
	Unigine::Map<int, VolumeDef> volume_definitions;
};

IGConfig Class

Перечисления (Enums)

ITEM_TYPE#

ИмяОписание
ITEM_TYPE_UNKNOWN = 0The parameter type has not been defined.
ITEM_TYPE_INT = 1The parameter type is an integer.
ITEM_TYPE_FLOAT = 2The parameter type is a float.
ITEM_TYPE_DOUBLE = 3The parameter type is a double.
ITEM_TYPE_STRING = 4The parameter type is a string.

Members


void setValue ( const char * name, int value ) #

Sets the value for the specified parameter.

Arguments

  • const char * name - Parameter name.
  • int value - Integer value to be set.

void setValue ( const char * name, float value ) #

Sets the value for the specified parameter.

Arguments

  • const char * name - Parameter name.
  • float value - Float value to be set.

void setValue ( const char * name, const char * value ) #

Sets the value for the specified parameter.

Arguments

  • const char * name - Parameter name.
  • const char * value - String value to be set.

void setValue ( const char * name, double value ) #

Sets the value for the specified parameter.

Arguments

  • const char * name - Parameter name.
  • double value - Parameter value.

int getValue ( const char * name, int default_value ) const#

Returns the value of the specified parameter. If this parameter has not been specified in the ig_config.xml file, default_value is set for this parameter.

Arguments

  • const char * name - Parameter name.
  • int default_value - A value to be set if the parameter is not specified in the ig_config.xml file.

Return value

Parameter value.

float getValue ( const char * name, float default_value ) const#

Returns the value of the specified parameter. If this parameter has not been specified in the ig_config.xml file, default_value is set for this parameter.

Arguments

  • const char * name - Parameter name.
  • float default_value - A value to be set if the parameter is not specified in the ig_config.xml file.

Return value

Parameter value.

String getValue ( const char * name, const char * default_value ) const#

Returns the value of the specified parameter. If this parameter has not been specified in the ig_config.xml file, default_value is set for this parameter.

Arguments

  • const char * name - Parameter name.
  • const char * default_value - A value to be set if the parameter is not specified in the ig_config.xml file.

Return value

Parameter value.

double getValue ( const char * name, double default_value ) const#

Returns the value for the specified parameter. If this parameter has not been specified in the ig_config.xml file, default_value is set for this parameter.

Arguments

  • const char * name - Parameter name.
  • double default_value - A value to be set if the parameter is not specified in the ig_config.xml file.

Return value

Parameter value.

const String & getPath ( ) const#

Returns the path to the current ig_config.xml file.

Return value

Path to the ig_config.xml file.

bool load ( const char * filename = "ig_config.xml" ) #

Loads IG configuration from a file with the specified name.

Arguments

Return value

true if the IG configuration is successfully loaded from the specified file; otherwise, false.

bool save ( const char * filename ) #

Saves the IG configuration to the specified file.

Arguments

  • const char * filename - Path to a file to save the IG configuration to.

Return value

true if the IG configuration is successfully saved to the specified file; otherwise, false.

bool save ( ) #

Saves the IG configuration to the current file.

Return value

true if the IG configuration is successfully saved; otherwise, false.

bool reload ( ) #

Reloads the IG configuration.

Return value

true if the IG configuration is successfully reloaded; otherwise, false.

void removeVariable ( const char * name ) #

Removes the specified variable from the configuration file.

Arguments

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

bool isVariableExist ( const char * name ) const#

Returns a value indicating if a variable with the specified name exists.

Arguments

  • const char * name - Name of the variable.

Return value

true if a variable with the specified name exists; otherwise, false.

const Unigine::HashMap < Unigine::String, int64_t> & getEntityTypeNames ( ) const#

Returns the list of available type names (type_name -> type_id).

Return value

List of available type names (type_name -> type_id).

Unigine::HashMap <int64_t, EntityTypeDef> & getEntityTypes ( ) #

Returns the list of available types (type_id -> EntityTypeDef).

Return value

List of available types (type_id -> EntityTypeDef).

Unigine::HashMap <int, DatabaseDef> & getDatabases ( ) #

Returns the list of available worlds (id -> DatabaseDef).

Return value

List of available worlds (id -> DatabaseDef).

Unigine::HashMap <int, ViewTypeDef> & getViewTypes ( ) #

Returns the list of available camera post effects (id -> ViewTypeDef).

Return value

List of available camera post effects (id -> ViewTypeDef).

Unigine::HashMap <int, CloudTypeDef> & getCloudTypes ( ) #

Returns the list of available cloud types (id -> CloudTypeDef).

Return value

List of available cloud types (id -> CloudTypeDef).

Unigine::HashMap <int, SynckerChannelDef> & getSynckerChannels ( ) #

Returns the list of available Syncker channels (id -> SynckerChannelDef).

Return value

List of available Syncker channels (id -> SynckerChannelDef).

Unigine::HashMap <int, PrecipitationTypeDef> & getPrecipitationTypes ( ) #

Returns the list of available precipitation types (id -> PrecipitationTypeDef).

Return value

List of available precipitation types (id -> PrecipitationTypeDef).
Last update: 16.08.2024
Build: ()