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.BoundFrustum Class

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

Notice
Instances of this class are deleted automatically when it is 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 it is required.

BoundFrustum Class

Members


BoundFrustum()

Constructor. Creates an empty bounding frustum.

BoundFrustum(mat4 projection, mat4 modelview)

Initialization by matrices.

Arguments

  • mat4 projection - A projection matrix.
  • mat4 modelview - A modelview matrix.

BoundFrustum(BoundFrustum bf)

Initialization by the bounding frustum.

Arguments

  • BoundFrustum bf - The bounding frustum.

BoundFrustum(BoundFrustum bf, mat4 invtransform)

Initialization by the bounding frustum and transformation matrix.

Arguments

  • BoundFrustum bf - The bounding frustum.
  • mat4 invtransform - The inverse transformation matrix.

void set(mat4 projection, mat4 modelview)

Sets the bounding frustum by matrices.

Arguments

  • mat4 projection - A projection matrix.
  • mat4 modelview - A modelview matrix.

void set(BoundFrustum bf)

Sets the bounding frustum by the bounding frustum.

Arguments

  • BoundFrustum bf - The bounding frustum.

void set(BoundFrustum bf, mat4 itransform)

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

Arguments

  • BoundFrustum bf - The bounding frustum.
  • mat4 itransform - The inverse transformation matrix.

mat4 getModelview() const

Returns the bounding frustum modelview matrix.

Return value

The bounding frustum modelview matrix.

vec4 getPlanes() const

Returns the bounding frustum cliping planes array.

Return value

The bounding frustum cliping planes array.

mat4 getProjection() const

Returns the projection matrix of the bounding frustum.

Return value

The bounding frustum projection matrix.

int isValid() const

Checks the bounding frustum status.

Return value

1 if the bounding frustum is valid.

void clear()

Clears the bounding frustum.

int inside(vec3 point, float radius) const

Checks if the sphere is inside the bounding frustum.

Arguments

  • 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(vec3 min, vec3 max) const

Checks if the box is inside the bounding frustum.

Arguments

  • vec3 min - The box minimum coordinate.
  • vec3 max - The box maximum coordinate.

Return value

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

int inside(BoundSphere bs) const

Checks if the bounding sphere is inside the bounding frustum.

Arguments

  • BoundSphere bs - The bounding sphere.

Return value

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

int inside(BoundBox bb) const

Checks if the bounding box is inside the bounding frustum.

Arguments

  • BoundBox bb - The bounding box.

Return value

1 if the bounding box is inside the bounding frustum; otherwise, 0.
Last update: 2018-08-10
Build: ()