This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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

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

Properties

vec3 Camera#

The position of the camera.

bool IsValid#

Checks the bounding frustum status.

vec4[] Planes#

The bounding frustum cliping planes array.

vec3[] Points#

The array of points of the current bounding frustum.

Members


BoundFrustum ( ) #

Constructor. Creates an empty bounding frustum.

BoundFrustum ( mat4 projection, mat4 modelview ) #

Initialization by the projection and modelview 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 itransform ) #

Initialization by the bounding frustum and transformation matrix.

Arguments

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

void Clear ( ) #

Clears the bounding frustum.

void Set ( mat4 projection, mat4 modelview ) #

Sets the bounding frustum by matrices.

Arguments

  • mat4 projection - Projection matrix.
  • mat4 modelview - 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.

void SetITransform ( mat4 itransform ) #

Sets the transformation matrix by an inverse transformation matrix.

Arguments

  • mat4 itransform - The inverse transformation matrix.

void SetITransform ( dmat4 itransform ) #

Sets the transformation matrix by an inverse transformation matrix.

Arguments

  • dmat4 itransform - The inverse transformation matrix.

int Compare ( BoundFrustum bf ) #

Compares the current bounding frustum with the given one.

Arguments

  • BoundFrustum bf - Bounding frustum.

Return value

1 if the current bounding frustum is 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 ( vec3 point ) #

Checks if the point is inside the bounding frustum.

Arguments

  • vec3 point - The coordinates of the point.

Return value

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

int Inside ( vec3 point, float radius ) #

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 ) #

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 ( vec3[] points ) #

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

Arguments

  • vec3[] points - Array of points.

Return value

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

int Inside ( BoundSphere bs ) #

Checks if the bounding sphere is inside the bounding frustum.

Arguments

Return value

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

int Inside ( BoundBox bb ) #

Checks if the bounding box is inside the bounding frustum.

Arguments

Return value

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

int Inside ( BoundFrustum bf ) #

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

Arguments

  • BoundFrustum bf - Bounding frustum.

Return value

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

int InsideAll ( BoundBox bb ) #

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

Arguments

Return value

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

int InsideAll ( BoundSphere bs ) #

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

Arguments

Return value

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

int InsideAll ( BoundFrustum bf ) #

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

Arguments

  • BoundFrustum bf - Bounding frustum.

Return value

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

int InsidePlanes ( BoundSphere bs ) #

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

Arguments

Return value

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

int InsidePlanes ( BoundBox bb ) #

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

Arguments

Return value

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

int InsidePlanes ( BoundFrustum bf ) #

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

Arguments

  • BoundFrustum bf - Bounding frustum.

Return value

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

int InsideShadowValid ( BoundSphere object, vec3 direction ) #

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

  • BoundSphere object - Bounding sphere.
  • vec3 direction - The direction vector.

Return value

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

int InsideShadowValid ( BoundSphere object, BoundSphere light, vec3 offset ) #

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

Return value

1 if the given bounding sphere is inside the shadow and outside the given light source bounding sphere; otherwise, 0.
Last update: 2020-11-24
Build: ()