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.SpiderVision.Manager Class

This class provides auxiliary functions for configuring the plugin, as well as access to an object of DisplaysConfig class.

Manager Class

Properties

DisplaysConfig Config#

The DisplaysConfig class instance that stores the complete configuration data.

string ComputerName#

The name of the computer on which the viewport is to be displayed. If this parameter is not set, the viewport can be displayed on any PC. If set, the viewport is only displayed on the PC that has a matching name.

bool IsConfiguratorEnabled#

The value indicating if the configurator window is open.

Event EventComputerNameChanged#

The event triggered on changing a computer name. You can subscribe to events via Connect() and unsubscribe via Disconnect(). You can also use EventConnection and EventConnections classes for convenience (see examples below).
Notice
For more details see the Event Handling article.
The event handler signature is as follows: myhandler()

Usage Example

Source code (C#)
// implement the ComputerNameChanged event handler
void computernamechanged_event_handler()
{
	Log.Message("\Handling ComputerNameChanged event\n");
}

//////////////////////////////////////////////////////////////////////////////
//  1. Multiple subscriptions can be linked to an EventConnections instance
//  class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnections class
EventConnections computernamechanged_event_connections = new EventConnections();


// link to this instance when subscribing to an event (subscription to various events can be linked)
Manager.EventComputerNameChanged.Connect(computernamechanged_event_connections, computernamechanged_event_handler);

// other subscriptions are also linked to this EventConnections instance 
// (e.g. you can subscribe using lambdas)
Manager.EventComputerNameChanged.Connect(computernamechanged_event_connections, () => { 
		Log.Message("Handling ComputerNameChanged event lambda\n");
		}
	);

// later all of these linked subscriptions can be removed with a single line
computernamechanged_event_connections.DisconnectAll();

//////////////////////////////////////////////////////////////////////////////
//  2. You can subscribe and unsubscribe via the handler function directly
//////////////////////////////////////////////////////////////////////////////

// subscribe to the ComputerNameChanged event with a handler function
Manager.EventComputerNameChanged.Connect(computernamechanged_event_handler);


// remove subscription to the ComputerNameChanged event later by the handler function
Manager.EventComputerNameChanged.Disconnect(computernamechanged_event_handler);


//////////////////////////////////////////////////////////////////////////////
//   3. Subscribe to an event and unsubscribe later via an EventConnection instance
//////////////////////////////////////////////////////////////////////////////

// define a connection to be used to unsubscribe later
EventConnection computernamechanged_event_connection;

// subscribe to the ComputerNameChanged event with a lambda handler function and keeping the connection
computernamechanged_event_connection = Manager.EventComputerNameChanged.Connect(() => { 
		Log.Message("Handling ComputerNameChanged event lambda\n");
	}
);

// ...

// you can temporarily disable a particular event connection 
computernamechanged_event_connection.Enabled = false;

// ... perform certain actions

// and enable it back when necessary
computernamechanged_event_connection.Enabled = true;

// ...

// remove the subscription later using the saved connection
computernamechanged_event_connection.Disconnect();

//////////////////////////////////////////////////////////////////////////////
//   4. Ignoring ComputerNameChanged events when necessary
//////////////////////////////////////////////////////////////////////////////

// you can temporarily disable the event to perform certain actions without triggering it
Manager.EventComputerNameChanged.Enabled = false;

// ... actions to be performed

// and enable it back when necessary
Manager.EventComputerNameChanged.Enabled = true;

Members


int FindViewportID ( string viewport_name ) #

Returns the of the viewport window with the specified name.

Arguments

  • string viewport_name - Name of the viewport.

Return value

ID of the viewport window with the specified name if it exists, otherwise -1.

int FindGroupID ( string group_name ) #

Returns the of the viewport group with the specified name.

Arguments

  • string group_name - Name of the viewport group.

Return value

ID of the viewport group with the specified name if it exists, otherwise -1.

void SetProjectionEnabled ( int viewport_id, bool enabled ) #

Sets a value indicating if the projection for the specified viewport (correction of the image according to projection) is enabled. If disabled, the image is rendered as seen from the point of view without any distortions (i.e. regardless of the viewport plane position in the configuration space). If enabled, the image takes into account the projection angle (i.e. the viewport plane position relative to the point of view in the configuration space) and distorts the rendered image accordingly.

Arguments

void SetViewportCustomPlayer ( int viewport_id, Player player ) #

Assigns a player to the specified viewport.

Arguments

  • int viewport_id - ID of the viewport window.
  • Player player - The player camera.

void SetViewportViewOffset ( int viewport_id, vec3 offset ) #

Sets a camera view offset (eye position) for the viewport with the specified ID.

Arguments

  • int viewport_id - ID of the viewport window.
  • vec3 offset - Camera view offset coordinates along the corresponding axes.

void SetGroupCustomPlayer ( int group_id, Player player ) #

Assigns a player to the specified group of viewports.

Arguments

  • int group_id - ID of the viewport group.
  • Player player - The player camera.

void SetGroupViewOffset ( int group_id, vec3 offset ) #

Sets a camera view offset (eye position) for the viewport group with the specified ID.

Arguments

  • int group_id - ID of the viewport group.
  • vec3 offset - Camera view offset coordinates along the corresponding axes.

EngineWindowViewport GetEngineWindow ( int viewport_id ) #

Returns the engine window viewport for the specified viewport.

Arguments

  • int viewport_id - ID of the viewport window.

Return value

The engine window viewport.
Last update: 29.08.2024
Build: ()