This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
Полезные советы
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
Программирование
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
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::BoundFrustum Class

Header: #include <UnigineBounds.h>

This class serves to construct the bounding frustum in single precision coordinates.

Notice
Instances of this class are deleted automatically, when necessary.

In case of double precision coordinates, the bounding frustum should be constructed by using the WorldBoundFrustum class. It includes the same functions as the BoundFrustum class, but its functions deal with the double precision coordinates.

Notice
To support both single and double precision builds, you can use the WorldBoundFrustum class only. The engine will automatically substitute it with the BoundFrustum, if required.

BoundFrustum Class

Members


BoundFrustum ( ) #

Constructor. Creates an empty bounding frustum.

BoundFrustum ( const Math::mat4 & projection, const Math::mat4 & modelview ) #

Initialization by the projection and modelview matrices.

Arguments

  • const Math::mat4 & projection - A projection matrix.
  • const Math::mat4 & modelview - A modelview matrix.

BoundFrustum ( const BoundFrustum & bf ) #

Initialization by the bounding frustum.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

BoundFrustum ( const BoundFrustum & bf, const Math::mat4 & itransform ) #

Initialization by the bounding frustum and transformation matrix.

Arguments

  • const BoundFrustum & bf - The bounding frustum.
  • const Math::mat4 & itransform - The inverse transformation matrix.

BoundFrustum & operator= ( const BoundFrustum & bf ) #

Assignment operator.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

Return value

Bounding frustum.

void clear ( ) #

Clears the bounding frustum.

void set ( const Math::mat4 & projection, const Math::mat4 & modelview ) #

Sets the bounding frustum by matrices.

Arguments

  • const Math::mat4 & projection - Projection matrix.
  • const Math::mat4 & modelview - Modelview matrix.

void set ( const BoundFrustum & bf ) #

Sets the bounding frustum by the bounding frustum.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

void set ( const BoundFrustum & bf, const Math::mat4 & itransform ) #

Sets the bounding frustum by the bounding frustum and transformation matrix.

Arguments

  • const BoundFrustum & bf - The bounding frustum.
  • const Math::mat4 & itransform - The inverse transformation matrix.

void setITransform ( const Math::mat4 & itransform ) #

Sets the transformation matrix by an inverse transformation matrix.

Arguments

  • const Math::mat4 & itransform - The inverse transformation matrix.

void setITransform ( const Math::dmat4 & itransform ) #

Sets the transformation matrix by an inverse transformation matrix.

Arguments

  • const Math::dmat4 & itransform - The inverse transformation matrix.

int compare ( const BoundFrustum & bf ) const#

Compares the current bounding frustum with the given one.

Arguments

  • const BoundFrustum & bf - Bounding frustum.

Return value

1 if the current bounding frustum is equal to the given one; otherwise, 0.

int operator== ( const BoundFrustum & bf ) const#

Bounding frustum equal comparison operator.

Arguments

  • const BoundFrustum & bf - The bounding frustum to compare with.

Return value

1 if the current bounding frustum is equal to the given one; otherwise, 0.

int operator!= ( const BoundFrustum & bf ) const#

Bounding frustum not equal comparison operator.

Arguments

  • const BoundFrustum & bf - The bounding frustum to compare with.

Return value

1 if the current bounding frustum is not equal to the given one; otherwise, 0.

void expand ( float radius ) #

Expands the current bounding frustum by the given radius.

Arguments

  • float radius - Radius.

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

Checks if the point is inside the bounding frustum.

Arguments

  • const Math::vec3 & point - The coordinates of the point.

Return value

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

int inside ( const Math::vec3 & point, float radius ) const#

Checks if the sphere is inside the bounding frustum.

Arguments

  • const Math::vec3 & point - The coordinates of the center of the sphere.
  • float radius - The sphere radius.

Return value

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

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

Checks if the box is inside the bounding frustum.

Arguments

  • const Math::vec3 & min - The box minimum coordinate.
  • const Math::vec3 & max - The box maximum coordinate.

Return value

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

int inside ( const Math::vec3 * points, int num ) const#

Checks if a set of points is inside the bounding frustum.

Arguments

  • const Math::vec3 * points - Vector of points.
  • int num - Number of points.

Return value

1 if the points are inside the bounding frustum; otherwise, 0.

int inside ( const BoundSphere & bs ) const#

Checks if the bounding sphere is inside the bounding frustum.

Arguments

  • const BoundSphere & bs - Bounding sphere.

Return value

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

int inside ( const BoundBox & bb ) const#

Checks if the bounding box is inside the bounding frustum.

Arguments

  • const BoundBox & bb - Bounding box.

Return value

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

int inside ( const BoundFrustum & bf ) const#

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

Arguments

  • const BoundFrustum & bf - Bounding frustum.

Return value

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

int insideFast ( const Math::vec3 & point ) const#

Performs a fast check if the point is inside the bounding frustum.

Arguments

  • const Math::vec3 & point - Point.

Return value

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

int insideFast ( const Math::vec3 & point, float radius ) const#

Performs a fast check if the sphere is inside the bounding frustum.

Arguments

  • const Math::vec3 & point - Center point.
  • float radius - Radius.

Return value

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

int insideFast ( const Math::vec3 & min, const Math::vec3 & max ) const#

Performs a fast check if the box is inside the bounding frustum.

Arguments

  • const Math::vec3 & min - Minimum point.
  • const Math::vec3 & max - Maximum point.

Return value

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

int insideFast ( const Math::vec3 * points, int num ) const#

Performs a fast check if the set of points is inside the bounding frustum.

Arguments

  • const Math::vec3 * points - Vector of points.
  • int num - Number of points.

Return value

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

int insideValid ( const BoundSphere & bs ) const#

Checks if the given bounding sphere is inside the bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundSphere & bs - The bounding sphere.

Return value

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

int insideValid ( const BoundBox & bb ) const#

Checks if the given bounding box is inside the bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundBox & bb - The bounding box.

Return value

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

int insideValid ( const BoundFrustum & bf ) const#

Checks if the given bounding frustum is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

Return value

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

int insideValidFast ( const BoundSphere & bs ) const#

Performs a fast check if the given bounding sphere is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundSphere & bs - The bounding sphere.

Return value

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

int insideValidFast ( const BoundBox & bb ) const#

Performs a fast check if the given bounding box is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundBox & bb - The bounding box.

Return value

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

int insideValidFast ( const BoundFrustum & bf ) const#

Performs a fast check if the given bounding frustum is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

Return value

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

int insideAll ( const BoundBox & bb ) const#

Checks if the whole given bounding box is inside the current bounding frustum.

Arguments

  • const BoundBox & bb - Bounding box.

Return value

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

int insideAll ( const BoundSphere & bs ) const#

Checks if the whole given bounding sphere is inside the current bounding frustum.

Arguments

  • const BoundSphere & bs - Bounding sphere.

Return value

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

int insideAll ( const BoundFrustum & bf ) const#

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

Arguments

  • const BoundFrustum & bf - Bounding frustum.

Return value

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

int insideAllValid ( const BoundSphere & bs ) const#

Checks if the whole given bounding sphere is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundSphere & bs - The bounding sphere.

Return value

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

int insideAllValid ( const BoundBox & bb ) const#

Checks if the whole given bounding box is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundBox & bb - The bounding box.

Return value

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

int insideAllValid ( const BoundFrustum & bf ) const#

Checks if the whole given bounding frustum is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

Return value

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

int insideAllValidFast ( const BoundSphere & bs ) const#

Performs a fast check if the whole given bounding sphere is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundSphere & bs - The bounding sphere.

Return value

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

int insideAllValidFast ( const BoundBox & bb ) const#

Performs a fast check if the whole given bounding box is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundBox & bb - The bounding box.

Return value

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

int insideAllValidFast ( const BoundFrustum & bf ) const#

Performs a fast check if the whole given bounding frustum is inside the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

Return value

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

int insidePlanes ( const BoundSphere & bs ) const#

Checks if the given bounding sphere is inside the volume defined by the planes of the current bounding frustum.

Arguments

  • const BoundSphere & bs - Bounding sphere.

Return value

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

int insidePlanes ( const BoundBox & bb ) const#

Checks if the given bounding box is inside the volume defined by the planes of the current bounding frustum.

Arguments

  • const BoundBox & bb - Bounding box.

Return value

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

int insidePlanes ( const BoundFrustum & bf ) const#

Checks if the given bounding frustum is inside the volume defined by the planes of the current bounding frustum.

Arguments

  • const BoundFrustum & bf - Bounding frustum.

Return value

1 if the given bounding frustum is inside the volume; otherwise, 0.

int insidePlanesValid ( const BoundSphere & bs ) const#

Checks if the given bounding sphere is inside the volume defined by the planes of the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundSphere & bs - The bounding sphere.

Return value

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

int insidePlanesValid ( const BoundBox & bb ) const#

Checks if the given bounding box is inside the volume defined by the planes of the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundBox & bb - The bounding box.

Return value

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

int insidePlanesValid ( const BoundFrustum & bf ) const#

Checks if the given bounding frustum is inside the volume defined by the planes of the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

Return value

1 if the given bounding frustum is inside the volume; otherwise, 0.

int insidePlanesValidFast ( const BoundSphere & bs ) const#

Performs a fast check if the given bounding sphere is inside the volume defined by the planes of the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundSphere & bs - The bounding sphere.

Return value

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

int insidePlanesValidFast ( const BoundBox & bb ) const#

Performs a fast check if the given bounding box is inside the volume defined by the planes of the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundBox & bb - The bounding box.

Return value

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

int insidePlanesValidFast ( const BoundFrustum & bf ) const#

Performs a fast check if the given bounding frustum is inside the volume defined by the planes of the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundFrustum & bf - The bounding frustum.

Return value

1 if the given bounding frustum is inside the volume; otherwise, 0.

int insideShadowValid ( const BoundSphere & object, const Math::vec3 & direction ) const#

Checks if the given bounding sphere is inside the shadow of the current bounding frustum.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundSphere & object - Bounding sphere.
  • const Math::vec3 & direction - The direction vector.

Return value

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

int insideShadowValid ( const BoundSphere & object, const BoundSphere & light, const Math::vec3 & offset ) const#

Checks if the given bounding sphere is inside the shadow of the current bounding frustum and outside the bounding sphere of a light source.
Notice
The method doesn't check the status of the current bounding frustum.

Arguments

  • const BoundSphere & object - Bounding sphere.
  • const BoundSphere & light - The bounding sphere of the light source.
  • const Math::vec3 & offset - The offset vector.

Return value

1 if the given bounding sphere is inside the shadow and outside the given light source bounding sphere; otherwise, 0.

bool isValid ( ) const#

Checks the bounding frustum status.

Return value

true if the bounding frustum is valid, otherwise false.

Math::vec3 getCamera ( ) #

Returns the position of the camera.

Return value

Camera position.

const Math::vec4 * getPlanes ( ) const#

Returns the bounding frustum cliping planes array.

Return value

The bounding frustum cliping planes array.

const Math::vec3 * getPoints ( ) #

Returns the vector of points of the current bounding frustum.

Return value

Vector of points.
Last update: 31.07.2020
Build: ()