This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.WorldBoundSphere Class

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

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

WorldBoundSphere Class

Properties

double Radius#

The bounding sphere radius.

dvec3 Center#

The bounding sphere center.

bool IsValid#

Checks the bounding sphere status.

Members


static WorldBoundSphere ( ) #

Constructor. Creates an empty bounding sphere.

WorldBoundSphere ( dvec3 center, double radius ) #

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

Arguments

  • dvec3 center - The bounding sphere center.
  • double radius - The bounding sphere radius.

WorldBoundSphere ( WorldBoundSphere bs ) #

Constructor. Initializes by given bounding sphere.

Arguments

  • WorldBoundSphere bs - The bounding sphere.

WorldBoundSphere ( WorldBoundBox bb ) #

Constructor. Initializes by given bounding box.

Arguments

  • WorldBoundBox bb - The bounding box.

WorldBoundSphere ( BoundSphere bs, dmat4 transform ) #

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

Arguments

  • BoundSphere bs - The bounding sphere.
  • dmat4 transform - Transformation matrix.

void Clear ( ) #

Clears the bounding sphere.

void Set ( dvec3 center, double radius ) #

Sets the bounding sphere by its center and radius.

Arguments

  • dvec3 center - The bounding sphere center.
  • double radius - The bounding sphere radius.

void Set ( WorldBoundSphere bs ) #

Sets the bounding sphere.

Arguments

  • WorldBoundSphere bs - The bounding sphere.

void Set ( WorldBoundBox bb ) #

Sets the bounding sphere by the bounding box.

Arguments

  • WorldBoundBox bb - The bounding box.

void Set ( BoundSphere bs, dmat4 transform ) #

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

Arguments

  • BoundSphere bs - The bounding sphere.
  • dmat4 transform - Transformation matrix.

void Expand ( dvec3 point ) #

Expands the current bounding sphere for including given point.

Arguments

  • dvec3 point - Point coordinates.

void Expand ( WorldBoundSphere bs ) #

Expands the current bounding sphere for including given bounding sphere.

Arguments

  • WorldBoundSphere bs - The bounding sphere.

void Expand ( WorldBoundBox bb ) #

Expands the current bounding sphere for including given bounding box.

Arguments

  • WorldBoundBox bb - The bounding box.

int Inside ( dvec3 point ) #

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

Arguments

  • dvec3 point - Point coordinates.

Return value

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

int Inside ( dvec3 point, double radius ) #

Checks if the sphere is inside the bounding sphere.

Arguments

  • dvec3 point - The coordinates of the center of the sphere .
  • double radius - The sphere radius.

Return value

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

int Inside ( dvec3 min, dvec3 max ) #

Checks if the box is inside the bounding sphere.

Arguments

  • dvec3 min - The box minimum coordinates.
  • dvec3 max - The box maximum coordinates.

Return value

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

int Inside ( WorldBoundSphere bs ) #

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

Arguments

  • WorldBoundSphere bs - The bounding sphere.

Return value

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

int Inside ( WorldBoundBox bb ) #

Checks if the bounding box is inside the bounding sphere.

Arguments

  • WorldBoundBox bb - The bounding box.

Return value

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

int InsideAll ( WorldBoundSphere bs ) #

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

Arguments

  • WorldBoundSphere bs - The bounding sphere.

Return value

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

int InsideAll ( WorldBoundBox bb ) #

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

Arguments

  • WorldBoundBox bb - The bounding box.

Return value

1 if the whole box is inside the bounding sphere; otherwise, 0.
Last update: 2020-04-10
Build: ()