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
Учебные материалы
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::Plugins::SpiderVision::WarpGridData Class

Header: #include <plugins/Unigine/SpiderVision/UnigineSpiderVision.h>

The object of this class stores the information on the warp grid — a set of points and their handles that create a mesh based on which the displayed image is reshaped.

Warping of the image is required to render the projected image on a distorted surface in such a way that it would look undistorted.

This object is accessible via the corresponding method of the ViewportData class.

The mask data are stored in the configuration file.

WarpGridData Class

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

VIEWPORT_FLIP_TYPE#

ИмяОписание
VIEWPORT_FLIP_TYPE_NONE = 0The canvas mask is not flipped.
VIEWPORT_FLIP_TYPE_VERTICAL = 1The canvas mask is flipped vertically.
VIEWPORT_FLIP_TYPE_HORIZONTAL = 2The canvas mask is flipped horizontally.
VIEWPORT_FLIP_TYPE_BOTH = 3The canvas mask is flipped both vertically and horizontally.

WARP_HANDLE_ROLE#

ИмяОписание
WARP_HANDLE_ROLE_LEFT = 0Left-side control handle of the warping control point on the grid.
WARP_HANDLE_ROLE_RIGHT = 1Right-side control handle of the warping control point on the grid.
WARP_HANDLE_ROLE_UP = 2Top-side control handle of the warping control point on the grid.
WARP_HANDLE_ROLE_DOWN = 3Bottom-side control handle of the warping control point on the grid.
WARP_HANDLE_ROLE_NUM = 4Total number of control handles of the warping control point.

Members


void setGridSize ( int row, int column ) #

Sets the number of columns and rows on the warping grid.

Arguments

  • int row - Number of grid rows.
  • int column - Number of grid columns.

void setPoint ( int x, int y, const Math::vec2 & point ) #

Sets the coordinates of the warping control point on the grid.

Arguments

  • int x - Position of the warping control point in the row, starting from 0 on the left.
  • int y - Position of the warping control point in the column, starting from 0 at the bottom.
  • const Math::vec2 & point - Screen-space coordinates of the point.

void setPoint ( int index, const Math::vec2 & point ) #

Sets the coordinates of the warping control point on the grid.

Arguments

  • int index - Warping control point index. The point with the 0 index is in the bottom left corner with the progression going upwards, and then to the next column bottom point.
  • const Math::vec2 & point - Screen-space coordinates of the point.

Math::vec2 getPoint ( int x, int y ) const#

Returns the coordinates of the warping control point on the grid.

Arguments

  • int x - Position of the warping control point in the row, starting from 0 on the left.
  • int y - Position of the warping control point in the column, starting from 0 at the bottom.

Return value

Screen-space coordinates of the point.

Math::vec2 getPoint ( int index ) const#

Returns the coordinates of the warping control point on the grid.

Arguments

  • int index - Warping control point index. The point with the 0 index is in the bottom left corner with the progression going upwards, and then to the next column bottom point.

Return value

Screen-space coordinates of the point.

void setPointHandle ( int x, int y, WarpGridData::WARP_HANDLE_ROLE type, const Math::vec2 & point ) #

Sets the type and position of the handle point for the specified warp grid point.

Arguments

  • int x - Position of the warping control point in the row, starting from 0 on the left.
  • int y - Position of the warping control point in the column, starting from 0 at the bottom.
  • WarpGridData::WARP_HANDLE_ROLE type - Type of control handle of the warping control point.
  • const Math::vec2 & point - Screen-space coordinates of the point.

void setPointHandle ( int index, WarpGridData::WARP_HANDLE_ROLE type, const Math::vec2 & point ) #

Sets the type and position of the handle point for the specified warp grid point.

Arguments

  • int index - Warping control point index. The point with the 0 index is in the bottom left corner with the progression going upwards, and then to the next column bottom point.
  • WarpGridData::WARP_HANDLE_ROLE type - Type of control handle of the warping control point.
  • const Math::vec2 & point - Screen-space coordinates of the point.

Math::vec2 getPointHandle ( int x, int y, WarpGridData::WARP_HANDLE_ROLE type ) const#

Returns the type and position of the handle point for the specified warp grid point.

Arguments

  • int x - Position of the warping control point in the row, starting from 0 on the left.
  • int y - Position of the warping control point in the column, starting from 0 at the bottom.
  • WarpGridData::WARP_HANDLE_ROLE type - Type of control handle of the warping control point.

Return value

Screen-space coordinates of the point.

Math::vec2 getPointHandle ( int index, WarpGridData::WARP_HANDLE_ROLE type ) const#

Returns the type and position of the handle point for the specified warp grid point.

Arguments

  • int index - Warping control point index. The point with the 0 index is in the bottom left corner with the progression going upwards, and then to the next column bottom point.
  • WarpGridData::WARP_HANDLE_ROLE type - Type of control handle of the warping control point.

Return value

Screen-space coordinates of the point.

void setPointHandleSmoothType ( int x, int y, ViewportData::POINT_SMOOTH_TYPE smooth_type ) #

Sets the type of line curving for the handle point of the specified warp grid point.

Arguments

  • int x - Position of the warping control point in the row, starting from 0 on the left.
  • int y - Position of the warping control point in the column, starting from 0 at the bottom.
  • ViewportData::POINT_SMOOTH_TYPE smooth_type - The type of line curving for the handle point.

void setPointHandleSmoothType ( int index, ViewportData::POINT_SMOOTH_TYPE smooth_type ) #

Sets the type of line curving for the handle point of the specified warp grid point.

Arguments

  • int index - Warping control point index. The point with the 0 index is in the bottom left corner with the progression going upwards, and then to the next column bottom point.
  • ViewportData::POINT_SMOOTH_TYPE smooth_type - The type of line curving for the handle point.

ViewportData::POINT_SMOOTH_TYPE getPointHandleSmoothType ( int x, int y ) const#

Returns the type of line curving for the handle point of the specified warp grid point.

Arguments

  • int x - Position of the warping control point in the row, starting from 0 on the left.
  • int y - Position of the warping control point in the column, starting from 0 at the bottom.

Return value

The type of line curving for the handle point.

ViewportData::POINT_SMOOTH_TYPE getPointHandleSmoothType ( int index ) const#

Returns the type of line curving for the handle point of the specified warp grid point.

Arguments

  • int index - Warping control point index. The point with the 0 index is in the bottom left corner with the progression going upwards, and then to the next column bottom point.

Return value

The type of line curving for the handle point.

void saveXml ( const Ptr<Xml> & xml ) #

Saves the warp grid data to the given instance of the Xml class.

Arguments

  • const Ptr<Xml> & xml - Xml class instance into which the data will be saved.

bool restoreXml ( const Ptr<Xml> & xml ) #

Loads the warp grid data from the specified instance of the Xml class.

Arguments

  • const Ptr<Xml> & xml - Xml class instance the data from which is to be loaded.

Return value

true if the data has been loaded successfully, otherwise false.

void save ( const Ptr<Stream> & stream ) #

Saves the warp grid data to the specified stream.

Arguments

  • const Ptr<Stream> & stream - Stream to which the data is to be written.

void restore ( const Ptr<Stream> & stream ) #

Loads the warp grid data from the specified stream.

Arguments

  • const Ptr<Stream> & stream - Stream the data from which is to be loaded.
Last update: 16.08.2024
Build: ()