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::Interpreter Class

Header: #include <UnigineInterpreter.h>

Unigine interpreter.

To group the elements (definitions, libraries, variables, functions, classes) together you need to create a group via addGroup(). Then, this group can be assigned as an argument to the element via the following methods:

If the same group is added to several elements, all of them can be removed from interpreter at once via removeGroup().

Interpreter Class

Members


static void * get ( ) #

Returns the current interpreter pointer.

Return value

Interpreter pointer.

static ExternClassBase * getExternClass ( const char * name ) #

Returns an external user class from UnigineScript.

Arguments

  • const char * name - Name of the class.

Return value

Pointer to the external class.

static ExternFunctionBase * getExternFunction ( const char * name ) #

Returns an external user function from UnigineScript.

Arguments

  • const char * name - Name of the function.

Return value

Pointer to the external function.

static ExternVariableBase * getExternVariable ( const char * name ) #

Returns an external user variable from UnigineScript.

Arguments

  • const char * name - Name of the variable.

Return value

Pointer to the external variable.

static int getStack ( ) #

Returns the current interpreter stack depth.

Return value

Interpreter stack depth.

static void addExternClass ( const char * name, ExternClassBase * extern_class, int group_id ) #

Adds an external user class to UnigineScript. To create an external function use MakeExternClass() command.

Arguments

  • const char * name - Name of the class.
  • ExternClassBase * extern_class - Pointer to the external class.
  • int group_id - ID of the group.

void addExternDefine ( const char * name, int group_id ) #

Adds a definition to UnigineScript. This function is similar to #define Foo.

Arguments

  • const char * name - Name of the definition.
  • int group_id - ID of the group.

void addExternFunction ( const char * name, ExternFunctionBase * extern_function, int group_id ) #

Adds an external user function to UnigineScript. To create an external function use addExternFunction() command.

Arguments

  • const char * name - Name of the function.
  • ExternFunctionBase * extern_function - Pointer to the external function.
  • int group_id - ID of the group.

void addExternLibrary ( const char * name, int group_id ) #

Adds an external library namespace to UnigineScript.
Notice
All external variables and functions with names like library.function() will be treated as library functions.

Arguments

  • const char * name - Name of the library.
  • int group_id - ID of the group.

void addExternVariable ( const char * name, ExternVariableBase * extern_variable, int group_id ) #

Adds an external user variable to UnigineScript.

Arguments

  • const char * name - Name of the variable.
  • ExternVariableBase * extern_variable - Pointer to the external variable.
  • int group_id - ID of the group.

int addGroup ( const char * group_name ) #

Adds a new group with the specified name. This group is assigned as an argument to the element via the following methods: If the same group is added to several elements (definitions, libraries, variables, functions, classes), all of them can be removed from interpreter at once via removeGroup().

Arguments

  • const char * group_name - Name of the group.

Return value

ID of the group.

void error ( const char * format ) #

Interpreter error function.

Arguments

  • const char * format - Format string. It is similar to the format string for printf() in C.

static Variable popStack ( ) #

Pops the variable from the current interpreter stack.

Return value

A variable.

static void removeExternClass ( const char * name ) #

Remove a user class from UnigineScript.

Arguments

  • const char * name - Name of the class.

static void removeExternDefine ( const char * name ) #

Removes an external definition with the specified name from UnigineScript. This function is similar to #undef Foo.

Arguments

  • const char * name - Name of the definition.

static void removeExternFunction ( const char * name ) #

Removes an external user function from UnigineScript.

Arguments

  • const char * name - Name of the function.

static void removeExternLibrary ( const char * name ) #

Removes an external library namespace from UnigineScript.

Arguments

  • const char * name - Name of the library.

static void removeExternVariable ( const char * name ) #

Removes an external user variable from UnigineScript.

Arguments

  • const char * name - Name of the variable.

void removeGroup ( const char * group_name ) #

Removes all the elements (definitions, libraries, variables, functions, classes) added via addExternDefine(), addExternLibrary(), addExternVariable(), addExternFunction() and addExternClass() methods that belong to the specified group.

Arguments

  • const char * group_name - Name of the group.
Last update: 16.08.2024
Build: ()