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
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::WorldBoundSphere Struct

Header: #include <UnigineMathLibBounds.h>

This structure serves to construct the bounding sphere in double precision coordinates.

By using this structure you can easily find the common bounding sphere for several objects by expanding the bounding sphere.

WorldBoundSphere Class

Members


static WorldBoundSpherePtr create ( ) #

Constructor. Creates an empty bounding sphere.

WorldBoundSphere ( Math::Vec3 & center, Math::Scalar radius ) #

Constructor. Initializes bounding sphere by the center and radius of the bounding sphere.

Arguments

  • Math::Vec3 & center - The bounding sphere center.
  • Math::Scalar radius - The bounding sphere radius.

WorldBoundSphere ( const WorldBoundSphere & bs ) #

Constructor. Initializes by given bounding sphere.

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

WorldBoundSphere ( const WorldBoundBox & bb ) #

Constructor. Initializes by given bounding box.

Arguments

WorldBoundSphere ( const BoundSphere & bs, const Math::Mat4 & transform ) #

Initialization by the bounding sphere and setting the given transformation matrix to the new bounding sphere.

Arguments

  • const BoundSphere & bs - The bounding sphere.
  • const Math::Mat4 & transform - Transformation matrix.

WorldBoundSphere & operator= ( const WorldBoundSphere & bs ) #

Assignment operator for the bounding sphere.

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

void clear ( ) #

Clears the bounding sphere.

void set ( const Math::Vec3 & center, Math::Scalar radius ) #

Sets the bounding sphere by its center and radius.

Arguments

  • const Math::Vec3 & center - The bounding sphere center.
  • Math::Scalar radius - The bounding sphere radius.

void set ( const WorldBoundSphere & bs ) #

Sets the bounding sphere.

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

void set ( const WorldBoundBox & bb ) #

Sets the bounding sphere by the bounding box.

Arguments

void set ( const BoundSphere & bs, const Math::Mat4 & transform ) #

Sets the bounding sphere by a bounding sphere with a transformation matrix taken into account.

Arguments

  • const BoundSphere & bs - The bounding sphere.
  • const Math::Mat4 & transform - Transformation matrix.

void expand ( const Math::Vec3 & point ) #

Expands the current bounding sphere for including given point.

Arguments

  • const Math::Vec3 & point - Point coordinates.

void expand ( const WorldBoundSphere & bs ) #

Expands the current bounding sphere for including given bounding sphere.

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

void expand ( const WorldBoundBox & bb ) #

Expands the current bounding sphere for including given bounding box.

Arguments

int inside ( const Math::Vec3 & point ) const#

Checks if the given point is inside the current bounding sphere.

Arguments

  • const Math::Vec3 & point - Point coordinates.

Return value

1 if the given point is inside the bounding sphere; otherwise, 0.

int inside ( const Math::Vec3 & point, Math::Scalar radius ) const#

Checks if the sphere is inside the bounding sphere.

Arguments

  • const Math::Vec3 & point - The coordinates of the center of the sphere .
  • Math::Scalar radius - The sphere radius.

Return value

1 if the sphere is inside the bounding sphere; otherwise, 0.

int inside ( const Math::Vec3 & min, const Math::Vec3 & max ) const#

Checks if the box is inside the bounding sphere.

Arguments

  • const Math::Vec3 & min - The box minimum coordinates.
  • const Math::Vec3 & max - The box maximum coordinates.

Return value

1 if the box is inside the bounding sphere; otherwise, 0.

int inside ( const WorldBoundSphere & bs ) const#

Checks if the specified bounding sphere is inside the current bounding sphere.

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

Return value

1 if the specified bounding sphere is inside the current bounding sphere; otherwise, 0.

int inside ( const WorldBoundBox & bb ) const#

Checks if the bounding box is inside the bounding sphere.

Arguments

Return value

1 if the bounding box is inside the bounding sphere; otherwise, 0.

int insideValid ( const Math::Vec3 & point ) const#

Checks if the given point is inside the current bounding sphere.
Notice
The method doesn't check if the bounding sphere is valid (has a positive radius).

Arguments

  • const Math::Vec3 & point - Point.

Return value

1 if the given point is inside the bounding sphere; otherwise, 0.

int insideValid ( const Math::Vec3 & point, Math::Scalar radius ) const#

Checks if the given sphere is inside the current bounding sphere.
Notice
The method doesn't check if the bounding sphere is valid (has a positive radius).

Arguments

  • const Math::Vec3 & point - Cente of the sphere.
  • Math::Scalar radius - Radius of the sphere.

Return value

1 if the sphere is inside the bounding sphere; otherwise, 0.

int insideValid ( const Math::Vec3 & min, const Math::Vec3 & max ) const#

Checks if the box is inside the bounding sphere.
Notice
The method doesn't check if the bounding sphere is valid (has a positive radius).

Arguments

  • const Math::Vec3 & min - The box minimum coordinates.
  • const Math::Vec3 & max - The box maximum coordinates.

Return value

1 if the box is inside the bounding sphere; otherwise, 0.

int insideValid ( const WorldBoundSphere & bs ) const#

Checks if the bounding sphere is inside the bounding sphere.
Notice
The method doesn't check if the bounding sphere is valid (has a positive radius).

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

Return value

1 if the bounding sphere is inside the bounding sphere; otherwise, 0.

int insideValid ( const WorldBoundBox & bb ) const#

Checks if the bounding box is inside the bounding sphere.
Notice
The method doesn't check if the bounding sphere is valid (has a positive radius).

Arguments

Return value

1 if the bounding box is inside the bounding sphere; otherwise, 0.

int insideAll ( const WorldBoundSphere & bs ) const#

Checks if the whole specified bounding sphere is inside the current bounding sphere.

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

Return value

1 if the whole specified sphere is inside the current bounding sphere; otherwise, 0.

int insideAll ( const WorldBoundBox & bb ) const#

Checks if the whole bounding box is inside the bounding sphere.

Arguments

Return value

1 if the whole box is inside the bounding sphere; otherwise, 0.

int insideAllValid ( const WorldBoundSphere & bs ) const#

Checks if the whole given bounding sphere is inside the current bounding sphere.
Notice
The method doesn't check if the bounding sphere is valid (has a positive radius).

Arguments

  • const WorldBoundSphere & bs - Bounding sphere.

Return value

1 if the whole bounding sphere is inside the bounding sphere; otherwise, 0.

int insideAllValid ( const WorldBoundBox & bb ) const#

Checks if the whole given bounding box is inside the current bounding sphere.
Notice
The method doesn't check if the bounding sphere is valid (has a positive radius).

Arguments

Return value

1 if the whole bounding box is inside the bounding sphere; otherwise, 0.

Math::Scalar distanceValid ( const Math::Vec3 & point ) const#

Returns the distance from the given point to the closest point of the current bounding sphere.

Arguments

  • const Math::Vec3 & point - Point

Return value

Distance from the point, in units.

bool isValid ( ) const#

Checks the bounding sphere status.

Return value

1 if the bounding sphere radius has a positive value.

Math::Vec3 getCenter ( ) const#

Gets the bounding sphere center.

Return value

The bounding sphere center.

Math::Scalar getRadius ( ) const#

Gets the bounding sphere radius.

Return value

The bounding sphere radius.
Last update: 23.06.2023
Build: ()