This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client 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

Members


WorldBoundSphere()

Constructor. Creates an empty bounding sphere.

WorldBoundSphere(dvec3 center, double radius)

Construction. 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.

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(WorldBoundBox bb)

Sets the bounding sphere by the bounding box.

Arguments

  • WorldBoundBox bb - The bounding box.

void set(WorldBoundSphere bs)

Sets the bounding sphere.

Arguments

  • WorldBoundSphere bs - The bounding sphere.

dvec3 getCenter()

Gets the bounding sphere center.

Return value

The bounding sphere center.

double getRadius()

Gets the bounding sphere radius.

Return value

The bounding sphere radius.

int isValid()

Checks the bounding sphere status.

Return value

1 if the bounding sphere radius has a positive value.

void clear()

Clears the bounding sphere.

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.

void expand(dvec3 point)

Expands the current bounding sphere for including given point.

Arguments

  • dvec3 point - Point coordinates.

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(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 inside(WorldBoundSphere bs)

Checks if the bounding sphere is inside the bounding sphere.

Arguments

  • WorldBoundSphere bs - The bounding sphere.

Return value

1 if the bounding sphere 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 insideAll(WorldBoundSphere bs)

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

Arguments

  • WorldBoundSphere bs

Return value

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

int insideAll(WorldBoundBox bb)

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

Arguments

  • WorldBoundBox bb

Return value

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

~WorldBoundSphere()

Destructor.
Last update: 2018-06-04
Build: ()