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.

WorldBoundFrustum Class

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

WorldBoundFrustum Class

Members


WorldBoundFrustum()

Default constructor.

void set(variable v)

Depending on the variable passed as argument, the function sets the bounding frustum by the given bounding sphere or the bounding box.

Arguments

  • variable v - Argument of one of the following types:
    • WorldBoundSphere bs - The bounding sphere.
    • WorldBoundBox bb - The bounding box.

void set(variable v0, variable v1)

Sets the bounding frustum. The function can receive the following arguments:
  • dmat4 projection and dmat4 modelview - projection and modelview matrices.
  • WorldBoundFrustum bf and dmat4 itransform - the bounding frustum and inverse transformation matrix.

Arguments

  • variable v0 - Argument of one of the following types:
    • dmat4 projection - Projection matrix.
    • WorldBoundFrustum bf - The bounding frustum.
  • variable v1 - Argument of one of the following types:
    • dat4 modelview - Modelview matrix.
    • dmat4 itransform - Inverse transformation matrix.

dvec3 getCamera()

Returns the position of the camera.

Return value

Camera position.

int isValid()

Checks if the bounding frustum is valid.

Return value

1 if the bounding frustum is valid; otherwise, 0.

BoundFrustum(WorldBoundFrustum bf)

Constructor. Creates a bounding frustum initialized by the bounding frustum.

Arguments

  • WorldBoundFrustum bf - Bounding frustum.

BoundFrustum(variable v0, variable v1)

Constructor. Creates a bounding frustum initialized by one of the following:
  • dmat4 projection and dmat4 modelview - projection and modelview matrices.
  • WorldBoundFrustum bf and dmat4 itransform - the bounding frustum and inverse transformation matrix.

Arguments

  • variable v0 - Argument of one of the following types:
    • dmat4 projection - Projection matrix.
    • WorldBoundFrustum bf - The bounding frustum.
  • variable v1 - Argument of one of the following types:
    • dmat4 modelview - Modelview matrix.
    • dmat4 itransform - Inverse transformation matrix.

int inside(variable v)

Depending on the variable passed as an argument, the function performs the following:
  • If dvec3 is passed, the function checks if the given point is inside the current bounding frustum.
  • If WorldBoundBox is passed, the function checks if the given bounding box is inside the current bounding frustum.
  • If WorldBoundSphere is passed, the function checks if the given bounding sphere is inside the current bounding frustum.

Arguments

  • variable v - Argument of one of the following types:
    • dvec3 point - Coordinates of the point.
    • WorldBoundSphere bs - The bounding sphere.
    • WorldBoundBox bb - The bounding box.

Return value

1 if the bounding box or the bounding sphere or the point is inside the current bounding frustum; otherwise, 0.

int inside(variable v0, variable v1)

Checks if the specified sphere or the box is inside the current bounding frustum. Variables, passed as arguments, can be the following:
  • dvec3 point and double radius
  • dvec3 min and dvec3 max

Arguments

  • variable v0 - Argument of one of the following types:
    • dvec3 point - Coordinates of the sphere center.
    • dvec3 min - Bounding box minimum coordinates.
  • variable v1 - Argument of one of the following types:
    • double radius - Radius of the bounding sphere.
    • dvec3 max - Bounding box maximum coordinates.

Return value

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

int insideAll(variable v)

Checks if the given bounding sphere or the bounding box is inside the current bounding frustum.

Arguments

  • variable v - Argument of one of the following types:
    • WorldBoundSphere bs - The bounding sphere.
    • WorldBoundBox bb - The bounding box.

Return value

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