This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
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
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::WorldBoundFrustum Class

Header:#include <UnigineBounds.h>

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

WorldBoundFrustum Class

Members


WorldBoundFrustum()

Default constructor.

WorldBoundFrustum(const mat4 & projection, const dmat4 & modelview)

Constructor. Initializes the bounding frustum by given matrices.

Arguments

  • const mat4 & projection - A projection matrix.
  • const dmat4 & modelview - A modelview matrix.

WorldBoundFrustum(const WorldBoundFrustum & bf)

Constructor. Initializes by given bounding frustum.

Arguments

  • const WorldBoundFrustum & bf - The bounding frustum.

WorldBoundFrustum(const WorldBoundFrustum & bf, const dmat4 & itransform)

Constructor. Initializes by given bounding frustum and transformation matrix.

Arguments

  • const WorldBoundFrustum & bf - The bounding frustum.
  • const dmat4 & itransform - The inverse transformation matrix.

void set(const mat4 & projection, const dmat4 & modelview)

Sets the bounding frustum by given matrices.

Arguments

  • const mat4 & projection - A projection matrix.
  • const dmat4 & modelview - A modelview matrix.

void set(const WorldBoundFrustum & bf)

Sets the bounding frustum by given bounding frustum.

Arguments

  • const WorldBoundFrustum & bf - The bounding frustum.

void set(const WorldBoundFrustum & bf, const dmat4 & itransform)

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

Arguments

  • const WorldBoundFrustum & bf - The bounding frustum.
  • const dmat4 & itransform - The inverse transformation matrix.

dvec3 getCamera()

Returns the position of the camera.

Return value

Camera position.

const dmat4 & getModelview()

Gets the bounding frustum modelview matrix.

Return value

The bounding frustum modelview matrix.

const dvec4 * getPlanes()

Gets the bounding frustum cliping planes array.

Return value

The bounding frustum cliping planes array.

const dmat4 & getProjection()

Gets the bounding frustum modelview matrix.

Return value

The bounding frustum projection matrix.

int isValid()

Checks the bounding frustum status.

Return value

1 if the bounding frustum is valid.

void clear()

Clears the bounding frustum.

int inside(const dvec3 & point, double radius)

Checks if the sphere is inside the bounding frustum.

Arguments

  • const 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 frustum; otherwise, 0.

int inside(const dvec3 & min, const dvec3 & max)

Checks if the box is inside the bounding frustum.

Arguments

  • const dvec3 & min - The box minimum coordinate.
  • const dvec3 & max - The box maximum coordinate.

Return value

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

int inside(const WorldBoundBox & bb)

Checks if the bounding box is inside the bounding frustum.

Arguments

  • const WorldBoundBox & bb - The bounding box.

Return value

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

int inside(const WorldBoundSphere & bs)

Checks if the bounding sphere is inside the bounding frustum.

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

Return value

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

int insideAll(const WorldBoundBox & bb)

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

Arguments

  • const WorldBoundBox & bb - The bounding box.

Return value

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

int insideAll(const WorldBoundSphere & bs)

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

Arguments

  • const WorldBoundSphere & bs - The bounding sphere.

Return value

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

~BoundFrustum()

Destructor.
Last update: 2017-07-03
Build: ()